diff --git a/azion-api/.gitignore b/azion-api/.gitignore new file mode 100644 index 0000000..7fdd855 --- /dev/null +++ b/azion-api/.gitignore @@ -0,0 +1,26 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof +go.mod +go.sum diff --git a/azion-api/.openapi-generator-ignore b/azion-api/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/azion-api/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/azion-api/.openapi-generator/FILES b/azion-api/.openapi-generator/FILES new file mode 100644 index 0000000..0d19438 --- /dev/null +++ b/azion-api/.openapi-generator/FILES @@ -0,0 +1,1591 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +api_accounts_descendants.go +api_accounts_info.go +api_accounts_logged_in.go +api_ai_studio_chat_threads.go +api_ai_studio_chunks.go +api_ai_studio_documents.go +api_ai_studio_knowledge_bases.go +api_ai_studio_messages.go +api_ai_studio_tools.go +api_applications.go +api_applications_cache_settings.go +api_applications_device_groups.go +api_applications_function.go +api_applications_request_rules.go +api_applications_response_rules.go +api_auth_login.go +api_auth_mfatotp_device.go +api_auth_refresh_access_token.go +api_auth_revoke.go +api_billing_invoices.go +api_billing_payments.go +api_connectors.go +api_custom_pages.go +api_data_stream_data_sources.go +api_data_stream_streams.go +api_data_stream_templates.go +api_digital_certificates_certificate_revocation_lists.go +api_digital_certificates_certificate_signing_requests.go +api_digital_certificates_certificates.go +api_digital_certificates_request_a_certificate.go +api_dns_records.go +api_dns_zones.go +api_dnsdnssec.go +api_favorites.go +api_firewalls.go +api_firewalls_function.go +api_firewalls_rules_engine.go +api_functions.go +api_identity_grants.go +api_identity_group_members.go +api_identity_groups.go +api_identity_logged_in_user.go +api_identity_service_token_renew.go +api_identity_service_tokens.go +api_identity_user_info.go +api_identity_users.go +api_kv_namespaces.go +api_metrics_dashboard.go +api_metrics_folders.go +api_metrics_library_reports.go +api_metrics_recommendations.go +api_metrics_reports.go +api_metrics_rows.go +api_network_lists.go +api_orchestrator_node_groups.go +api_orchestrator_node_services.go +api_orchestrator_nodes.go +api_orchestrator_service_resources.go +api_orchestrator_services.go +api_policy_lockout_policy.go +api_policy_policies.go +api_policy_session_timeout_policy.go +api_publisher_management.go +api_purge.go +api_sql.go +api_storage_buckets.go +api_storage_credentials.go +api_storage_objects.go +api_users_lockout.go +api_vcs_continuous_deployment_executions.go +api_vcs_continuous_deployment_executor.go +api_vcs_continuous_deployments.go +api_vcs_execution_scripts.go +api_vcs_integrations.go +api_vcs_providers.go +api_wafs.go +api_wafs_exceptions.go +api_workload_deployments.go +api_workloads.go +client.go +configuration.go +docs/AIStudioChatThreadsAPI.md +docs/AIStudioChunksAPI.md +docs/AIStudioDocumentsAPI.md +docs/AIStudioKnowledgeBasesAPI.md +docs/AIStudioMessagesAPI.md +docs/AIStudioToolsAPI.md +docs/AWS4HMAC.md +docs/AWS4HMACAttributes.md +docs/AWS4HMACAttributesRequest.md +docs/AWS4HMACRequest.md +docs/AWSKinesisFirehoseEndpoint.md +docs/AWSKinesisFirehoseEndpointRequest.md +docs/Account.md +docs/AccountInfo.md +docs/AccountInfoRequest.md +docs/AccountRequest.md +docs/AccountsDescendantsAPI.md +docs/AccountsInfoAPI.md +docs/AccountsLoggedInAPI.md +docs/Address.md +docs/AddressLoadBalancerModule.md +docs/AddressLoadBalancerModuleRequest.md +docs/AddressModules.md +docs/AddressModulesRequest.md +docs/AddressRequest.md +docs/AggregatedField.md +docs/AggregatedFieldRequest.md +docs/AlgType.md +docs/Application.md +docs/ApplicationAcceleratorModule.md +docs/ApplicationAcceleratorModuleRequest.md +docs/ApplicationCriterionArgument.md +docs/ApplicationCriterionArgumentRequest.md +docs/ApplicationCriterionField.md +docs/ApplicationCriterionFieldRequest.md +docs/ApplicationModules.md +docs/ApplicationModulesRequest.md +docs/ApplicationRequest.md +docs/ApplicationRequestPhaseRuleEngineOrder.md +docs/ApplicationResponse.md +docs/ApplicationResponsePhaseRuleEngineOrderRequest.md +docs/ApplicationsAPI.md +docs/ApplicationsCacheSettingsAPI.md +docs/ApplicationsDeviceGroupsAPI.md +docs/ApplicationsFunctionAPI.md +docs/ApplicationsRequestRulesAPI.md +docs/ApplicationsResponseRulesAPI.md +docs/AuthLoginAPI.md +docs/AuthMFATOTPDeviceAPI.md +docs/AuthRefreshAccessTokenAPI.md +docs/AuthRevokeAPI.md +docs/AzureBlobStorageEndpoint.md +docs/AzureBlobStorageEndpointRequest.md +docs/AzureMonitorEndpoint.md +docs/AzureMonitorEndpointRequest.md +docs/BaseQuery.md +docs/BaseQueryRequest.md +docs/BehaviorArgs.md +docs/BehaviorArgsAttributes.md +docs/BehaviorArgsAttributesValue.md +docs/BehaviorCapture.md +docs/BehaviorCaptureMatchGroupsAttributes.md +docs/BehaviorNoArgs.md +docs/BigQueryEndpoint.md +docs/BigQueryEndpointRequest.md +docs/BillingInvoicesAPI.md +docs/BillingPaymentsAPI.md +docs/Brand.md +docs/BrandRequest.md +docs/BrowserCacheModule.md +docs/BrowserCacheModuleRequest.md +docs/Bucket.md +docs/BucketCreate.md +docs/BucketCreateRequest.md +docs/BucketCreateResponse.md +docs/BucketObject.md +docs/BuildContextField.md +docs/BuildContextFieldRequest.md +docs/CacheModule.md +docs/CacheModuleRequest.md +docs/CacheSetting.md +docs/CacheSettingRequest.md +docs/CacheSettingResponse.md +docs/CacheSettingsApplicationAcceleratorModule.md +docs/CacheSettingsApplicationAcceleratorModuleRequest.md +docs/CacheSettingsCacheModule.md +docs/CacheSettingsCacheModuleRequest.md +docs/CacheSettingsModules.md +docs/CacheSettingsModulesRequest.md +docs/CacheSettingsTieredCacheModule.md +docs/CacheSettingsTieredCacheModuleRequest.md +docs/CacheVaryByCookiesModule.md +docs/CacheVaryByCookiesModuleRequest.md +docs/CacheVaryByDevicesModule.md +docs/CacheVaryByDevicesModuleRequest.md +docs/CacheVaryByQuerystringModule.md +docs/CacheVaryByQuerystringModuleRequest.md +docs/Certificate.md +docs/CertificateRequest.md +docs/CertificateResponse.md +docs/CertificateRevocationList.md +docs/CertificateRevocationListResponse.md +docs/CertificateSigningRequest.md +docs/ChatThread.md +docs/ChatThreadRequest.md +docs/Chunk.md +docs/CloneApplicationRequest.md +docs/CloneFirewallRequest.md +docs/CloneWAFRequest.md +docs/Connector.md +docs/Connector2.md +docs/ConnectorHTTP.md +docs/ConnectorHTTPAttributes.md +docs/ConnectorHTTPAttributesRequest.md +docs/ConnectorHTTPRequest.md +docs/ConnectorRequest.md +docs/ConnectorRequest2.md +docs/ConnectorResponse.md +docs/ConnectorStorageAttributes.md +docs/ConnectorStorageAttributesRequest.md +docs/ConnectorsAPI.md +docs/Content.md +docs/ContentRequest.md +docs/ContinuousDeployment.md +docs/ContinuousDeploymentRequest.md +docs/CreateAccountRequest.md +docs/CreateBrandRequest.md +docs/CreateOrganizationRequest.md +docs/CreateResellerRequest.md +docs/CreateWorkspaceRequest.md +docs/Credential.md +docs/CredentialCreateRequest.md +docs/CredentialResponse.md +docs/Credit.md +docs/CreditRequest.md +docs/CustomPage.md +docs/CustomPageRequest.md +docs/CustomPageResponse.md +docs/CustomPagesAPI.md +docs/DNSDNSSECAPI.md +docs/DNSRecordsAPI.md +docs/DNSSEC.md +docs/DNSSECRequest.md +docs/DNSSECResponse.md +docs/DNSZonesAPI.md +docs/Dashboard.md +docs/DashboardRequest.md +docs/DataSource.md +docs/DataStream.md +docs/DataStreamDataSourcesAPI.md +docs/DataStreamRequest.md +docs/DataStreamResponse.md +docs/DataStreamStreamsAPI.md +docs/DataStreamTemplatesAPI.md +docs/DatabaseDetail.md +docs/DatabaseDetailResponse.md +docs/DatabaseRequest.md +docs/DatadogEndpoint.md +docs/DatadogEndpointRequest.md +docs/DefaultDeploymentStrategy.md +docs/DefaultDeploymentStrategyAttrs.md +docs/DefaultDeploymentStrategyAttrsRequest.md +docs/DefaultDeploymentStrategyRequest.md +docs/DelegationSigner.md +docs/DeleteResponse.md +docs/DeploymentStrategyDefaultDeploymentStrategy.md +docs/DeploymentStrategyDefaultDeploymentStrategyRequest.md +docs/DeploymentStrategyShared.md +docs/DeviceGroup.md +docs/DeviceGroupRequest.md +docs/DeviceGroupResponse.md +docs/DigitalCertificatesCertificateRevocationListsAPI.md +docs/DigitalCertificatesCertificateSigningRequestsAPI.md +docs/DigitalCertificatesCertificatesAPI.md +docs/DigitalCertificatesRequestACertificateAPI.md +docs/Document.md +docs/DocumentRequest.md +docs/ElasticsearchEndpoint.md +docs/ElasticsearchEndpointRequest.md +docs/ErrorResponse.md +docs/Execution.md +docs/ExecutionScript.md +docs/Executor.md +docs/Favorite.md +docs/FavoriteRequest.md +docs/FavoritesAPI.md +docs/Firewall.md +docs/FirewallBehavior.md +docs/FirewallBehaviorNoArgs.md +docs/FirewallBehaviorNoArgsRequest.md +docs/FirewallBehaviorRequest.md +docs/FirewallBehaviorRunFunction.md +docs/FirewallBehaviorRunFunctionAttributes.md +docs/FirewallBehaviorRunFunctionAttributesRequest.md +docs/FirewallBehaviorRunFunctionRequest.md +docs/FirewallBehaviorSetCustomResponse.md +docs/FirewallBehaviorSetCustomResponseAttributes.md +docs/FirewallBehaviorSetCustomResponseAttributesRequest.md +docs/FirewallBehaviorSetCustomResponseRequest.md +docs/FirewallBehaviorSetRateLimit.md +docs/FirewallBehaviorSetRateLimitAttributes.md +docs/FirewallBehaviorSetRateLimitAttributesRequest.md +docs/FirewallBehaviorSetRateLimitRequest.md +docs/FirewallBehaviorSetWaf.md +docs/FirewallBehaviorSetWafAttributes.md +docs/FirewallBehaviorSetWafAttributesRequest.md +docs/FirewallBehaviorSetWafRequest.md +docs/FirewallCriterionArgument.md +docs/FirewallCriterionArgumentRequest.md +docs/FirewallCriterionField.md +docs/FirewallCriterionFieldRequest.md +docs/FirewallFunctionInstance.md +docs/FirewallFunctionInstanceRequest.md +docs/FirewallFunctionInstanceResponse.md +docs/FirewallModule.md +docs/FirewallModuleRequest.md +docs/FirewallModules.md +docs/FirewallModulesRequest.md +docs/FirewallRequest.md +docs/FirewallResponse.md +docs/FirewallRule.md +docs/FirewallRuleEngineOrderRequest.md +docs/FirewallRuleRequest.md +docs/FirewallRuleResponse.md +docs/FirewallsAPI.md +docs/FirewallsFunctionAPI.md +docs/FirewallsRulesEngineAPI.md +docs/Folder.md +docs/FolderRequest.md +docs/FunctionInstance.md +docs/FunctionInstanceRequest.md +docs/FunctionInstanceResponse.md +docs/FunctionModule.md +docs/FunctionModuleRequest.md +docs/FunctionResponse.md +docs/Functions.md +docs/FunctionsAPI.md +docs/FunctionsAzionForm.md +docs/FunctionsRequest.md +docs/Grant.md +docs/GrantRequest.md +docs/Group.md +docs/GroupMembers.md +docs/GroupMembersRequest.md +docs/GroupRequest.md +docs/HMAC.md +docs/HMACRequest.md +docs/HTTPConnectionOptions.md +docs/HTTPConnectionOptionsRequest.md +docs/HTTPModules.md +docs/HTTPModulesRequest.md +docs/HttpPostEndpoint.md +docs/HttpPostEndpointRequest.md +docs/HttpProtocol.md +docs/HttpProtocolRequest.md +docs/IdentityGrantsAPI.md +docs/IdentityGroupMembersAPI.md +docs/IdentityGroupsAPI.md +docs/IdentityLoggedInUserAPI.md +docs/IdentityServiceTokenRenewAPI.md +docs/IdentityServiceTokensAPI.md +docs/IdentityUserInfoAPI.md +docs/IdentityUsersAPI.md +docs/ImageProcessorModule.md +docs/ImageProcessorModuleRequest.md +docs/InputDataSource.md +docs/InputDataSourceAttributes.md +docs/InputDataSourceAttributesRequest.md +docs/InputDataSourceRequest.md +docs/InputInputDataSourceAttributes.md +docs/InputInputDataSourceAttributesRequest.md +docs/InputShared.md +docs/Integration.md +docs/JSONAPIErrorObject.md +docs/JSONAPIErrorSource.md +docs/KBAskRequest.md +docs/KBAskResponse.md +docs/KBQueryRequest.md +docs/KBQueryResponse.md +docs/KBQueryResult.md +docs/KVNamespacesAPI.md +docs/KafkaEndpoint.md +docs/KafkaEndpointRequest.md +docs/KnowledgeBase.md +docs/KnowledgeBaseRequest.md +docs/LargeFileCacheModule.md +docs/LargeFileCacheModuleRequest.md +docs/LibraryReportRequest.md +docs/LoadBalancerModule.md +docs/LoadBalancerModuleConfig.md +docs/LoadBalancerModuleConfigRequest.md +docs/LoadBalancerModuleRequest.md +docs/LockoutPolicy.md +docs/LockoutPolicyRequest.md +docs/LockoutPolicyResponse.md +docs/LoginRequest.md +docs/LoginResponse.md +docs/MFAToken.md +docs/MTLS.md +docs/MTLSConfig.md +docs/MTLSConfigRequest.md +docs/MTLSRequest.md +docs/Message.md +docs/MessageRequest.md +docs/MetricsDashboardAPI.md +docs/MetricsFoldersAPI.md +docs/MetricsLibraryReportsAPI.md +docs/MetricsRecommendationsAPI.md +docs/MetricsReportsAPI.md +docs/MetricsRowsAPI.md +docs/Namespace.md +docs/NamespaceCreateRequest.md +docs/NamespaceList.md +docs/NetworkList.md +docs/NetworkListRequest.md +docs/NetworkListResponse.md +docs/NetworkListSummary.md +docs/NetworkListsAPI.md +docs/NodeGroups.md +docs/NodeGroupsById.md +docs/NodeGroupsByIdRequest.md +docs/NodeGroupsRequest.md +docs/NodeServiceBind.md +docs/NodeServices.md +docs/NodeServicesRequest.md +docs/Nodes.md +docs/NodesRequest.md +docs/ObjectResponseAsyncData.md +docs/ObjectResponseData.md +docs/OrchestratorNodeGroupsAPI.md +docs/OrchestratorNodeServicesAPI.md +docs/OrchestratorNodesAPI.md +docs/OrchestratorServiceResourcesAPI.md +docs/OrchestratorServicesAPI.md +docs/Order.md +docs/OrderRequest.md +docs/Organization.md +docs/OrganizationRequest.md +docs/OriginIPACL.md +docs/OriginIPACLRequest.md +docs/OriginShieldConfig.md +docs/OriginShieldConfigRequest.md +docs/OriginShieldModule.md +docs/OriginShieldModuleRequest.md +docs/Output.md +docs/Output2.md +docs/OutputRequest.md +docs/OutputRequest2.md +docs/Page.md +docs/PageConnector.md +docs/PageConnectorAttributes.md +docs/PageConnectorAttributesRequest.md +docs/PageConnectorRequest.md +docs/PageRequest.md +docs/PaginatedAccountList.md +docs/PaginatedApplicationList.md +docs/PaginatedBucketList.md +docs/PaginatedCacheSettingList.md +docs/PaginatedCertificateList.md +docs/PaginatedCertificateRevocationList.md +docs/PaginatedChatThreadList.md +docs/PaginatedChunkList.md +docs/PaginatedConnectorList.md +docs/PaginatedContinuousDeploymentList.md +docs/PaginatedCredentialList.md +docs/PaginatedCustomPageList.md +docs/PaginatedDashboardList.md +docs/PaginatedDataSourceList.md +docs/PaginatedDataStreamList.md +docs/PaginatedDatabaseDetailList.md +docs/PaginatedDeviceGroupList.md +docs/PaginatedDocumentList.md +docs/PaginatedExecutionList.md +docs/PaginatedExecutionScriptList.md +docs/PaginatedFavoriteList.md +docs/PaginatedFirewallFunctionInstanceList.md +docs/PaginatedFirewallList.md +docs/PaginatedFirewallRuleList.md +docs/PaginatedFolderList.md +docs/PaginatedFunctionInstanceList.md +docs/PaginatedFunctionsList.md +docs/PaginatedGrantList.md +docs/PaginatedGroupList.md +docs/PaginatedIntegrationList.md +docs/PaginatedKnowledgeBaseList.md +docs/PaginatedMessageList.md +docs/PaginatedNetworkListSummaryList.md +docs/PaginatedNodeGroupsByIdList.md +docs/PaginatedNodeGroupsList.md +docs/PaginatedNodeServicesList.md +docs/PaginatedNodesList.md +docs/PaginatedPaymentHistoryList.md +docs/PaginatedPlatformList.md +docs/PaginatedPolicyList.md +docs/PaginatedRecordList.md +docs/PaginatedReportList.md +docs/PaginatedRepositoryList.md +docs/PaginatedRequestPhaseRuleList.md +docs/PaginatedResponsePaymentMethodList.md +docs/PaginatedResponsePhaseRuleList.md +docs/PaginatedRowList.md +docs/PaginatedServiceResourceList.md +docs/PaginatedServiceTokenList.md +docs/PaginatedServicesList.md +docs/PaginatedTOTPDeviceList.md +docs/PaginatedTemplateList.md +docs/PaginatedToolList.md +docs/PaginatedUserList.md +docs/PaginatedWAFList.md +docs/PaginatedWAFRuleList.md +docs/PaginatedWorkloadDeploymentList.md +docs/PaginatedWorkloadList.md +docs/PaginatedZoneList.md +docs/Pagination.md +docs/PatchContinuousDeploymentRequest.md +docs/PatchedAccountRequest.md +docs/PatchedApplicationRequest.md +docs/PatchedBrandRequest.md +docs/PatchedBucketRequest.md +docs/PatchedCacheSettingRequest.md +docs/PatchedCertificate.md +docs/PatchedCertificateRevocationList.md +docs/PatchedChatThreadRequest.md +docs/PatchedConnectorHTTPRequest.md +docs/PatchedConnectorRequest.md +docs/PatchedConnectorRequest2.md +docs/PatchedCustomPageRequest.md +docs/PatchedDNSSECRequest.md +docs/PatchedDashboardRequest.md +docs/PatchedDataStreamRequest.md +docs/PatchedDeviceGroupRequest.md +docs/PatchedFirewallFunctionInstanceRequest.md +docs/PatchedFirewallRequest.md +docs/PatchedFirewallRuleRequest.md +docs/PatchedFolderRequest.md +docs/PatchedFunctionInstanceRequest.md +docs/PatchedFunctionsRequest.md +docs/PatchedGrantRequest.md +docs/PatchedGroupRequest.md +docs/PatchedKnowledgeBaseRequest.md +docs/PatchedNetworkListRequest.md +docs/PatchedNodesRequest.md +docs/PatchedOrganizationRequest.md +docs/PatchedPartialUpdateRequest.md +docs/PatchedPolicyRequest.md +docs/PatchedRecordRequest.md +docs/PatchedRequestPhaseRule.md +docs/PatchedResellerRequest.md +docs/PatchedResponsePhaseRuleRequest.md +docs/PatchedServiceTokenUpdateRequest.md +docs/PatchedServicesRequest.md +docs/PatchedTemplateRequest.md +docs/PatchedToolRequest.md +docs/PatchedUpdateZoneRequest.md +docs/PatchedUserRequest.md +docs/PatchedWAFRequest.md +docs/PatchedWAFRuleRequest.md +docs/PatchedWorkloadDeploymentRequest.md +docs/PatchedWorkloadRequest.md +docs/PatchedWorkspaceRequest.md +docs/PaymentHistory.md +docs/PaymentMethod.md +docs/PaymentMethodRequest.md +docs/Platform.md +docs/Policy.md +docs/PolicyLockoutPolicyAPI.md +docs/PolicyPoliciesAPI.md +docs/PolicyRequest.md +docs/PolicyResponse.md +docs/PolicyRule.md +docs/PolicyRuleCondition.md +docs/PolicyRuleConditionRequest.md +docs/PolicyRuleRequest.md +docs/PolicySessionTimeoutPolicyAPI.md +docs/Protocols.md +docs/ProtocolsRequest.md +docs/Publisher.md +docs/PublisherManagementAPI.md +docs/PublisherRequest.md +docs/Purge.md +docs/PurgeAPI.md +docs/PurgeRequest.md +docs/PurgeResponse.md +docs/QRadarEndpoint.md +docs/QRadarEndpointRequest.md +docs/RecommendationRequest.md +docs/Record.md +docs/RecordRequest.md +docs/RecordResponse.md +docs/Report.md +docs/ReportRequest.md +docs/RequestPhaseBehavior.md +docs/RequestPhaseBehavior2.md +docs/RequestPhaseRule.md +docs/RequestPhaseRule2.md +docs/RequestPhaseRuleResponse.md +docs/Reseller.md +docs/ResellerRequest.md +docs/ResponseAccount.md +docs/ResponseAccountInfo.md +docs/ResponseAsyncAccount.md +docs/ResponseAsyncAccountInfo.md +docs/ResponseAsyncChatThread.md +docs/ResponseAsyncContinuousDeployment.md +docs/ResponseAsyncCredit.md +docs/ResponseAsyncDashboard.md +docs/ResponseAsyncDeleteChatThread.md +docs/ResponseAsyncDeleteContinuousDeployment.md +docs/ResponseAsyncDeleteDocument.md +docs/ResponseAsyncDeleteIntegration.md +docs/ResponseAsyncDeleteKnowledgeBase.md +docs/ResponseAsyncDeleteMessage.md +docs/ResponseAsyncDeleteNodeServiceBind.md +docs/ResponseAsyncDeleteNodes.md +docs/ResponseAsyncDeletePaymentMethod.md +docs/ResponseAsyncDeleteServices.md +docs/ResponseAsyncDeleteTool.md +docs/ResponseAsyncDocument.md +docs/ResponseAsyncExecution.md +docs/ResponseAsyncExecutor.md +docs/ResponseAsyncFolder.md +docs/ResponseAsyncKnowledgeBase.md +docs/ResponseAsyncMessage.md +docs/ResponseAsyncNodeGroupsById.md +docs/ResponseAsyncNodeServices.md +docs/ResponseAsyncNodes.md +docs/ResponseAsyncOrder.md +docs/ResponseAsyncPaymentMethod.md +docs/ResponseAsyncReport.md +docs/ResponseAsyncRow.md +docs/ResponseAsyncServices.md +docs/ResponseAsyncTool.md +docs/ResponseBucketObject.md +docs/ResponseChatThread.md +docs/ResponseContinuousDeployment.md +docs/ResponseCredit.md +docs/ResponseDashboard.md +docs/ResponseDeleteChatThread.md +docs/ResponseDeleteContinuousDeployment.md +docs/ResponseDeleteDashboard.md +docs/ResponseDeleteDocument.md +docs/ResponseDeleteFavorite.md +docs/ResponseDeleteFolder.md +docs/ResponseDeleteGrant.md +docs/ResponseDeleteGroup.md +docs/ResponseDeleteIntegration.md +docs/ResponseDeleteKnowledgeBase.md +docs/ResponseDeleteMessage.md +docs/ResponseDeletePaymentMethod.md +docs/ResponseDeleteRecommendation.md +docs/ResponseDeleteReport.md +docs/ResponseDeleteRow.md +docs/ResponseDeleteServiceToken.md +docs/ResponseDeleteTool.md +docs/ResponseDeleteUser.md +docs/ResponseDocument.md +docs/ResponseExecution.md +docs/ResponseExecutor.md +docs/ResponseFavorite.md +docs/ResponseFolder.md +docs/ResponseGrant.md +docs/ResponseGroup.md +docs/ResponseGroupMembers.md +docs/ResponseKnowledgeBase.md +docs/ResponseListAccount.md +docs/ResponseListContinuousDeployment.md +docs/ResponseListDashboard.md +docs/ResponseListExecution.md +docs/ResponseListExecutionScript.md +docs/ResponseListFavorite.md +docs/ResponseListFolder.md +docs/ResponseListGrant.md +docs/ResponseListGroup.md +docs/ResponseListIntegration.md +docs/ResponseListNodeGroupsById.md +docs/ResponseListNodeServices.md +docs/ResponseListNodes.md +docs/ResponseListPlatform.md +docs/ResponseListReport.md +docs/ResponseListRepository.md +docs/ResponseListRow.md +docs/ResponseListServiceToken.md +docs/ResponseListServices.md +docs/ResponseListUser.md +docs/ResponseLogin.md +docs/ResponseMessage.md +docs/ResponseOrder.md +docs/ResponsePaymentMethod.md +docs/ResponsePhaseBehavior.md +docs/ResponsePhaseBehaviorRequest.md +docs/ResponsePhaseRule.md +docs/ResponsePhaseRuleRequest.md +docs/ResponsePhaseRuleResponse.md +docs/ResponsePublisher.md +docs/ResponseReport.md +docs/ResponseRetrieveAccount.md +docs/ResponseRetrieveAccountInfo.md +docs/ResponseRetrieveChatThread.md +docs/ResponseRetrieveContinuousDeployment.md +docs/ResponseRetrieveDashboard.md +docs/ResponseRetrieveDocument.md +docs/ResponseRetrieveExecutionScript.md +docs/ResponseRetrieveExecutor.md +docs/ResponseRetrieveFolder.md +docs/ResponseRetrieveGrant.md +docs/ResponseRetrieveGroup.md +docs/ResponseRetrieveGroupMembers.md +docs/ResponseRetrieveIntegration.md +docs/ResponseRetrieveKnowledgeBase.md +docs/ResponseRetrieveMessage.md +docs/ResponseRetrieveNodeServiceBind.md +docs/ResponseRetrieveNodes.md +docs/ResponseRetrievePublisher.md +docs/ResponseRetrieveReport.md +docs/ResponseRetrieveRow.md +docs/ResponseRetrieveServiceToken.md +docs/ResponseRetrieveServices.md +docs/ResponseRetrieveTool.md +docs/ResponseRetrieveUser.md +docs/ResponseRetrieveUserInfo.md +docs/ResponseRow.md +docs/ResponseServiceToken.md +docs/ResponseServiceTokenCreate.md +docs/ResponseServiceTokenRenew.md +docs/ResponseTool.md +docs/ResponseUser.md +docs/ResponseUserInfo.md +docs/Row.md +docs/RowRequest.md +docs/S3Endpoint.md +docs/S3EndpointRequest.md +docs/SQLAPI.md +docs/SQLResult.md +docs/SQLResultResponse.md +docs/SQLStatementsRequest.md +docs/ServiceResource.md +docs/ServiceResourceId.md +docs/ServiceResourceIdRequest.md +docs/ServiceResourceIdTrigger.md +docs/ServiceResourceRequest.md +docs/ServiceToken.md +docs/ServiceTokenCreate.md +docs/ServiceTokenCreateRequest.md +docs/ServiceTokenRenew.md +docs/ServiceTokenRenewRequest.md +docs/ServiceTokenUpdateRequest.md +docs/Services.md +docs/ServicesRequest.md +docs/SessionTimeoutPolicy.md +docs/SessionTimeoutPolicyRequest.md +docs/SessionTimeoutPolicyResponse.md +docs/SplunkEndpoint.md +docs/SplunkEndpointRequest.md +docs/StateCacheModule.md +docs/StateCacheModuleRequest.md +docs/StateExecutedResponse.md +docs/StorageBucketsAPI.md +docs/StorageCredentialsAPI.md +docs/StorageObjectsAPI.md +docs/SuccessObjectOperation.md +docs/SuccessObjectOperationAsync.md +docs/TLSWorkload.md +docs/TLSWorkloadMinimumVersion.md +docs/TLSWorkloadRequest.md +docs/TOTPDevice.md +docs/TOTPDeviceList.md +docs/TOTPDeviceResponse.md +docs/TOTPVerificationRequest.md +docs/Template.md +docs/TemplateRequest.md +docs/TemplateResponse.md +docs/ThresholdsConfigField.md +docs/ThresholdsConfigFieldRequest.md +docs/Token.md +docs/TokenPair.md +docs/TokenPairResponse.md +docs/TokenRequest.md +docs/TokenResponse.md +docs/Tool.md +docs/ToolKBLink.md +docs/ToolRequest.md +docs/Transform.md +docs/TransformFilterWorkloads.md +docs/TransformFilterWorkloadsAttributes.md +docs/TransformFilterWorkloadsAttributesRequest.md +docs/TransformFilterWorkloadsRequest.md +docs/TransformRenderTemplate.md +docs/TransformRenderTemplateAttributes.md +docs/TransformRenderTemplateAttributesRequest.md +docs/TransformRenderTemplateRequest.md +docs/TransformRequest.md +docs/TransformSampling.md +docs/TransformSamplingAttributes.md +docs/TransformSamplingAttributesRequest.md +docs/TransformSamplingRequest.md +docs/TransformShared.md +docs/TransformTransformFilterWorkloadsAttributes.md +docs/TransformTransformFilterWorkloadsAttributesRequest.md +docs/TransformTransformRenderTemplateAttributes.md +docs/TransformTransformRenderTemplateAttributesRequest.md +docs/TransformTransformSamplingAttributes.md +docs/TransformTransformSamplingAttributesRequest.md +docs/UpdateAccountInfoDetailsRequest.md +docs/UpdateUserInfoRequest.md +docs/UpdateZoneRequest.md +docs/User.md +docs/UserInfo.md +docs/UserInfoRequest.md +docs/UserLoginMethodResponse.md +docs/UserRequest.md +docs/UsersLockoutAPI.md +docs/VCSContinuousDeploymentExecutionsAPI.md +docs/VCSContinuousDeploymentExecutorAPI.md +docs/VCSContinuousDeploymentsAPI.md +docs/VCSExecutionScriptsAPI.md +docs/VCSIntegrationsAPI.md +docs/VCSProvidersAPI.md +docs/WAF.md +docs/WAFEngineSettingsAttributesField.md +docs/WAFEngineSettingsAttributesFieldRequest.md +docs/WAFEngineSettingsField.md +docs/WAFEngineSettingsFieldRequest.md +docs/WAFExceptionCondition.md +docs/WAFExceptionConditionRequest.md +docs/WAFExceptionGenericCondition.md +docs/WAFExceptionGenericConditionRequest.md +docs/WAFExceptionSpecificConditionOnName.md +docs/WAFExceptionSpecificConditionOnNameRequest.md +docs/WAFExceptionSpecificConditionOnValue.md +docs/WAFExceptionSpecificConditionOnValueRequest.md +docs/WAFRequest.md +docs/WAFResponse.md +docs/WAFRule.md +docs/WAFRuleRequest.md +docs/WAFRuleResponse.md +docs/WAFsAPI.md +docs/WAFsExceptionsAPI.md +docs/Workload.md +docs/WorkloadDeployment.md +docs/WorkloadDeploymentRequest.md +docs/WorkloadDeploymentResponse.md +docs/WorkloadDeploymentsAPI.md +docs/WorkloadRequest.md +docs/WorkloadResponse.md +docs/WorkloadsAPI.md +docs/Workspace.md +docs/WorkspaceRequest.md +docs/Zone.md +docs/ZoneRequest.md +docs/ZoneResponse.md +git_push.sh +go.mod +go.sum +model_account.go +model_account_info.go +model_account_info_request.go +model_account_request.go +model_address.go +model_address_load_balancer_module.go +model_address_load_balancer_module_request.go +model_address_modules.go +model_address_modules_request.go +model_address_request.go +model_aggregated_field.go +model_aggregated_field_request.go +model_alg_type.go +model_application.go +model_application_accelerator_module.go +model_application_accelerator_module_request.go +model_application_criterion_argument.go +model_application_criterion_argument_request.go +model_application_criterion_field.go +model_application_criterion_field_request.go +model_application_modules.go +model_application_modules_request.go +model_application_request.go +model_application_request_phase_rule_engine_order.go +model_application_response.go +model_application_response_phase_rule_engine_order_request.go +model_aws4_hmac.go +model_aws4_hmac_attributes.go +model_aws4_hmac_attributes_request.go +model_aws4_hmac_request.go +model_aws_kinesis_firehose_endpoint.go +model_aws_kinesis_firehose_endpoint_request.go +model_azure_blob_storage_endpoint.go +model_azure_blob_storage_endpoint_request.go +model_azure_monitor_endpoint.go +model_azure_monitor_endpoint_request.go +model_base_query.go +model_base_query_request.go +model_behavior_args.go +model_behavior_args_attributes.go +model_behavior_args_attributes_value.go +model_behavior_capture.go +model_behavior_capture_match_groups_attributes.go +model_behavior_no_args.go +model_big_query_endpoint.go +model_big_query_endpoint_request.go +model_brand.go +model_brand_request.go +model_browser_cache_module.go +model_browser_cache_module_request.go +model_bucket.go +model_bucket_create.go +model_bucket_create_request.go +model_bucket_create_response.go +model_bucket_object.go +model_build_context_field.go +model_build_context_field_request.go +model_cache_module.go +model_cache_module_request.go +model_cache_setting.go +model_cache_setting_request.go +model_cache_setting_response.go +model_cache_settings_application_accelerator_module.go +model_cache_settings_application_accelerator_module_request.go +model_cache_settings_cache_module.go +model_cache_settings_cache_module_request.go +model_cache_settings_modules.go +model_cache_settings_modules_request.go +model_cache_settings_tiered_cache_module.go +model_cache_settings_tiered_cache_module_request.go +model_cache_vary_by_cookies_module.go +model_cache_vary_by_cookies_module_request.go +model_cache_vary_by_devices_module.go +model_cache_vary_by_devices_module_request.go +model_cache_vary_by_querystring_module.go +model_cache_vary_by_querystring_module_request.go +model_certificate.go +model_certificate_request.go +model_certificate_response.go +model_certificate_revocation_list.go +model_certificate_revocation_list_response.go +model_certificate_signing_request.go +model_chat_thread.go +model_chat_thread_request.go +model_chunk.go +model_clone_application_request.go +model_clone_firewall_request.go +model_clone_waf_request.go +model_connector.go +model_connector2.go +model_connector_http.go +model_connector_http_attributes.go +model_connector_http_attributes_request.go +model_connector_http_request.go +model_connector_request.go +model_connector_request2.go +model_connector_response.go +model_connector_storage_attributes.go +model_connector_storage_attributes_request.go +model_content.go +model_content_request.go +model_continuous_deployment.go +model_continuous_deployment_request.go +model_create_account_request.go +model_create_brand_request.go +model_create_organization_request.go +model_create_reseller_request.go +model_create_workspace_request.go +model_credential.go +model_credential_create_request.go +model_credential_response.go +model_credit.go +model_credit_request.go +model_custom_page.go +model_custom_page_request.go +model_custom_page_response.go +model_dashboard.go +model_dashboard_request.go +model_data_source.go +model_data_stream.go +model_data_stream_request.go +model_data_stream_response.go +model_database_detail.go +model_database_detail_response.go +model_database_request.go +model_datadog_endpoint.go +model_datadog_endpoint_request.go +model_default_deployment_strategy.go +model_default_deployment_strategy_attrs.go +model_default_deployment_strategy_attrs_request.go +model_default_deployment_strategy_request.go +model_delegation_signer.go +model_delete_response.go +model_deployment_strategy_default_deployment_strategy.go +model_deployment_strategy_default_deployment_strategy_request.go +model_deployment_strategy_shared.go +model_device_group.go +model_device_group_request.go +model_device_group_response.go +model_dnssec.go +model_dnssec_request.go +model_dnssec_response.go +model_document.go +model_document_request.go +model_elasticsearch_endpoint.go +model_elasticsearch_endpoint_request.go +model_error_response.go +model_execution.go +model_execution_script.go +model_executor.go +model_favorite.go +model_favorite_request.go +model_firewall.go +model_firewall_behavior.go +model_firewall_behavior_no_args.go +model_firewall_behavior_no_args_request.go +model_firewall_behavior_request.go +model_firewall_behavior_run_function.go +model_firewall_behavior_run_function_attributes.go +model_firewall_behavior_run_function_attributes_request.go +model_firewall_behavior_run_function_request.go +model_firewall_behavior_set_custom_response.go +model_firewall_behavior_set_custom_response_attributes.go +model_firewall_behavior_set_custom_response_attributes_request.go +model_firewall_behavior_set_custom_response_request.go +model_firewall_behavior_set_rate_limit.go +model_firewall_behavior_set_rate_limit_attributes.go +model_firewall_behavior_set_rate_limit_attributes_request.go +model_firewall_behavior_set_rate_limit_request.go +model_firewall_behavior_set_waf.go +model_firewall_behavior_set_waf_attributes.go +model_firewall_behavior_set_waf_attributes_request.go +model_firewall_behavior_set_waf_request.go +model_firewall_criterion_argument.go +model_firewall_criterion_argument_request.go +model_firewall_criterion_field.go +model_firewall_criterion_field_request.go +model_firewall_function_instance.go +model_firewall_function_instance_request.go +model_firewall_function_instance_response.go +model_firewall_module.go +model_firewall_module_request.go +model_firewall_modules.go +model_firewall_modules_request.go +model_firewall_request.go +model_firewall_response.go +model_firewall_rule.go +model_firewall_rule_engine_order_request.go +model_firewall_rule_request.go +model_firewall_rule_response.go +model_folder.go +model_folder_request.go +model_function_instance.go +model_function_instance_request.go +model_function_instance_response.go +model_function_module.go +model_function_module_request.go +model_function_response.go +model_functions.go +model_functions_azion_form.go +model_functions_request.go +model_grant.go +model_grant_request.go +model_group.go +model_group_members.go +model_group_members_request.go +model_group_request.go +model_hmac.go +model_hmac_request.go +model_http_connection_options.go +model_http_connection_options_request.go +model_http_modules.go +model_http_modules_request.go +model_http_post_endpoint.go +model_http_post_endpoint_request.go +model_http_protocol.go +model_http_protocol_request.go +model_image_processor_module.go +model_image_processor_module_request.go +model_input_data_source.go +model_input_data_source_attributes.go +model_input_data_source_attributes_request.go +model_input_data_source_request.go +model_input_input_data_source_attributes.go +model_input_input_data_source_attributes_request.go +model_input_shared.go +model_integration.go +model_jsonapi_error_object.go +model_jsonapi_error_source.go +model_kafka_endpoint.go +model_kafka_endpoint_request.go +model_kb_ask_request.go +model_kb_ask_response.go +model_kb_query_request.go +model_kb_query_response.go +model_kb_query_result.go +model_knowledge_base.go +model_knowledge_base_request.go +model_large_file_cache_module.go +model_large_file_cache_module_request.go +model_library_report_request.go +model_load_balancer_module.go +model_load_balancer_module_config.go +model_load_balancer_module_config_request.go +model_load_balancer_module_request.go +model_lockout_policy.go +model_lockout_policy_request.go +model_lockout_policy_response.go +model_login_request.go +model_login_response.go +model_message.go +model_message_request.go +model_mfa_token.go +model_mtls.go +model_mtls_config.go +model_mtls_config_request.go +model_mtls_request.go +model_namespace.go +model_namespace_create_request.go +model_namespace_list.go +model_network_list.go +model_network_list_request.go +model_network_list_response.go +model_network_list_summary.go +model_node_groups.go +model_node_groups_by_id.go +model_node_groups_by_id_request.go +model_node_groups_request.go +model_node_service_bind.go +model_node_services.go +model_node_services_request.go +model_nodes.go +model_nodes_request.go +model_object_response_async_data.go +model_object_response_data.go +model_order.go +model_order_request.go +model_organization.go +model_organization_request.go +model_origin_ipacl.go +model_origin_ipacl_request.go +model_origin_shield_config.go +model_origin_shield_config_request.go +model_origin_shield_module.go +model_origin_shield_module_request.go +model_output.go +model_output2.go +model_output_request.go +model_output_request2.go +model_page.go +model_page_connector.go +model_page_connector_attributes.go +model_page_connector_attributes_request.go +model_page_connector_request.go +model_page_request.go +model_paginated_account_list.go +model_paginated_application_list.go +model_paginated_bucket_list.go +model_paginated_cache_setting_list.go +model_paginated_certificate_list.go +model_paginated_certificate_revocation_list.go +model_paginated_chat_thread_list.go +model_paginated_chunk_list.go +model_paginated_connector_list.go +model_paginated_continuous_deployment_list.go +model_paginated_credential_list.go +model_paginated_custom_page_list.go +model_paginated_dashboard_list.go +model_paginated_data_source_list.go +model_paginated_data_stream_list.go +model_paginated_database_detail_list.go +model_paginated_device_group_list.go +model_paginated_document_list.go +model_paginated_execution_list.go +model_paginated_execution_script_list.go +model_paginated_favorite_list.go +model_paginated_firewall_function_instance_list.go +model_paginated_firewall_list.go +model_paginated_firewall_rule_list.go +model_paginated_folder_list.go +model_paginated_function_instance_list.go +model_paginated_functions_list.go +model_paginated_grant_list.go +model_paginated_group_list.go +model_paginated_integration_list.go +model_paginated_knowledge_base_list.go +model_paginated_message_list.go +model_paginated_network_list_summary_list.go +model_paginated_node_groups_by_id_list.go +model_paginated_node_groups_list.go +model_paginated_node_services_list.go +model_paginated_nodes_list.go +model_paginated_payment_history_list.go +model_paginated_platform_list.go +model_paginated_policy_list.go +model_paginated_record_list.go +model_paginated_report_list.go +model_paginated_repository_list.go +model_paginated_request_phase_rule_list.go +model_paginated_response_payment_method_list.go +model_paginated_response_phase_rule_list.go +model_paginated_row_list.go +model_paginated_service_resource_list.go +model_paginated_service_token_list.go +model_paginated_services_list.go +model_paginated_template_list.go +model_paginated_tool_list.go +model_paginated_totp_device_list.go +model_paginated_user_list.go +model_paginated_waf_list.go +model_paginated_waf_rule_list.go +model_paginated_workload_deployment_list.go +model_paginated_workload_list.go +model_paginated_zone_list.go +model_pagination.go +model_patch_continuous_deployment_request.go +model_patched_account_request.go +model_patched_application_request.go +model_patched_brand_request.go +model_patched_bucket_request.go +model_patched_cache_setting_request.go +model_patched_certificate.go +model_patched_certificate_revocation_list.go +model_patched_chat_thread_request.go +model_patched_connector_http_request.go +model_patched_connector_request.go +model_patched_connector_request2.go +model_patched_custom_page_request.go +model_patched_dashboard_request.go +model_patched_data_stream_request.go +model_patched_device_group_request.go +model_patched_dnssec_request.go +model_patched_firewall_function_instance_request.go +model_patched_firewall_request.go +model_patched_firewall_rule_request.go +model_patched_folder_request.go +model_patched_function_instance_request.go +model_patched_functions_request.go +model_patched_grant_request.go +model_patched_group_request.go +model_patched_knowledge_base_request.go +model_patched_network_list_request.go +model_patched_nodes_request.go +model_patched_organization_request.go +model_patched_partial_update_request.go +model_patched_policy_request.go +model_patched_record_request.go +model_patched_request_phase_rule.go +model_patched_reseller_request.go +model_patched_response_phase_rule_request.go +model_patched_service_token_update_request.go +model_patched_services_request.go +model_patched_template_request.go +model_patched_tool_request.go +model_patched_update_zone_request.go +model_patched_user_request.go +model_patched_waf_request.go +model_patched_waf_rule_request.go +model_patched_workload_deployment_request.go +model_patched_workload_request.go +model_patched_workspace_request.go +model_payment_history.go +model_payment_method.go +model_payment_method_request.go +model_platform.go +model_policy.go +model_policy_request.go +model_policy_response.go +model_policy_rule.go +model_policy_rule_condition.go +model_policy_rule_condition_request.go +model_policy_rule_request.go +model_protocols.go +model_protocols_request.go +model_publisher.go +model_publisher_request.go +model_purge.go +model_purge_request.go +model_purge_response.go +model_q_radar_endpoint.go +model_q_radar_endpoint_request.go +model_recommendation_request.go +model_record.go +model_record_request.go +model_record_response.go +model_report.go +model_report_request.go +model_request_phase_behavior.go +model_request_phase_behavior2.go +model_request_phase_rule.go +model_request_phase_rule2.go +model_request_phase_rule_response.go +model_reseller.go +model_reseller_request.go +model_response_account.go +model_response_account_info.go +model_response_async_account.go +model_response_async_account_info.go +model_response_async_chat_thread.go +model_response_async_continuous_deployment.go +model_response_async_credit.go +model_response_async_dashboard.go +model_response_async_delete_chat_thread.go +model_response_async_delete_continuous_deployment.go +model_response_async_delete_document.go +model_response_async_delete_integration.go +model_response_async_delete_knowledge_base.go +model_response_async_delete_message.go +model_response_async_delete_node_service_bind.go +model_response_async_delete_nodes.go +model_response_async_delete_payment_method.go +model_response_async_delete_services.go +model_response_async_delete_tool.go +model_response_async_document.go +model_response_async_execution.go +model_response_async_executor.go +model_response_async_folder.go +model_response_async_knowledge_base.go +model_response_async_message.go +model_response_async_node_groups_by_id.go +model_response_async_node_services.go +model_response_async_nodes.go +model_response_async_order.go +model_response_async_payment_method.go +model_response_async_report.go +model_response_async_row.go +model_response_async_services.go +model_response_async_tool.go +model_response_bucket_object.go +model_response_chat_thread.go +model_response_continuous_deployment.go +model_response_credit.go +model_response_dashboard.go +model_response_delete_chat_thread.go +model_response_delete_continuous_deployment.go +model_response_delete_dashboard.go +model_response_delete_document.go +model_response_delete_favorite.go +model_response_delete_folder.go +model_response_delete_grant.go +model_response_delete_group.go +model_response_delete_integration.go +model_response_delete_knowledge_base.go +model_response_delete_message.go +model_response_delete_payment_method.go +model_response_delete_recommendation.go +model_response_delete_report.go +model_response_delete_row.go +model_response_delete_service_token.go +model_response_delete_tool.go +model_response_delete_user.go +model_response_document.go +model_response_execution.go +model_response_executor.go +model_response_favorite.go +model_response_folder.go +model_response_grant.go +model_response_group.go +model_response_group_members.go +model_response_knowledge_base.go +model_response_list_account.go +model_response_list_continuous_deployment.go +model_response_list_dashboard.go +model_response_list_execution.go +model_response_list_execution_script.go +model_response_list_favorite.go +model_response_list_folder.go +model_response_list_grant.go +model_response_list_group.go +model_response_list_integration.go +model_response_list_node_groups_by_id.go +model_response_list_node_services.go +model_response_list_nodes.go +model_response_list_platform.go +model_response_list_report.go +model_response_list_repository.go +model_response_list_row.go +model_response_list_service_token.go +model_response_list_services.go +model_response_list_user.go +model_response_login.go +model_response_message.go +model_response_order.go +model_response_payment_method.go +model_response_phase_behavior.go +model_response_phase_behavior_request.go +model_response_phase_rule.go +model_response_phase_rule_request.go +model_response_phase_rule_response.go +model_response_publisher.go +model_response_report.go +model_response_retrieve_account.go +model_response_retrieve_account_info.go +model_response_retrieve_chat_thread.go +model_response_retrieve_continuous_deployment.go +model_response_retrieve_dashboard.go +model_response_retrieve_document.go +model_response_retrieve_execution_script.go +model_response_retrieve_executor.go +model_response_retrieve_folder.go +model_response_retrieve_grant.go +model_response_retrieve_group.go +model_response_retrieve_group_members.go +model_response_retrieve_integration.go +model_response_retrieve_knowledge_base.go +model_response_retrieve_message.go +model_response_retrieve_node_service_bind.go +model_response_retrieve_nodes.go +model_response_retrieve_publisher.go +model_response_retrieve_report.go +model_response_retrieve_row.go +model_response_retrieve_service_token.go +model_response_retrieve_services.go +model_response_retrieve_tool.go +model_response_retrieve_user.go +model_response_retrieve_user_info.go +model_response_row.go +model_response_service_token.go +model_response_service_token_create.go +model_response_service_token_renew.go +model_response_tool.go +model_response_user.go +model_response_user_info.go +model_row.go +model_row_request.go +model_s3_endpoint.go +model_s3_endpoint_request.go +model_service_resource.go +model_service_resource_id.go +model_service_resource_id_request.go +model_service_resource_id_trigger.go +model_service_resource_request.go +model_service_token.go +model_service_token_create.go +model_service_token_create_request.go +model_service_token_renew.go +model_service_token_renew_request.go +model_service_token_update_request.go +model_services.go +model_services_request.go +model_session_timeout_policy.go +model_session_timeout_policy_request.go +model_session_timeout_policy_response.go +model_splunk_endpoint.go +model_splunk_endpoint_request.go +model_sql_result.go +model_sql_result_response.go +model_sql_statements_request.go +model_state_cache_module.go +model_state_cache_module_request.go +model_state_executed_response.go +model_success_object_operation.go +model_success_object_operation_async.go +model_template.go +model_template_request.go +model_template_response.go +model_thresholds_config_field.go +model_thresholds_config_field_request.go +model_tls_workload.go +model_tls_workload_minimum_version.go +model_tls_workload_request.go +model_token.go +model_token_pair.go +model_token_pair_response.go +model_token_request.go +model_token_response.go +model_tool.go +model_tool_kb_link.go +model_tool_request.go +model_totp_device.go +model_totp_device_list.go +model_totp_device_response.go +model_totp_verification_request.go +model_transform.go +model_transform_filter_workloads.go +model_transform_filter_workloads_attributes.go +model_transform_filter_workloads_attributes_request.go +model_transform_filter_workloads_request.go +model_transform_render_template.go +model_transform_render_template_attributes.go +model_transform_render_template_attributes_request.go +model_transform_render_template_request.go +model_transform_request.go +model_transform_sampling.go +model_transform_sampling_attributes.go +model_transform_sampling_attributes_request.go +model_transform_sampling_request.go +model_transform_shared.go +model_transform_transform_filter_workloads_attributes.go +model_transform_transform_filter_workloads_attributes_request.go +model_transform_transform_render_template_attributes.go +model_transform_transform_render_template_attributes_request.go +model_transform_transform_sampling_attributes.go +model_transform_transform_sampling_attributes_request.go +model_update_account_info_details_request.go +model_update_user_info_request.go +model_update_zone_request.go +model_user.go +model_user_info.go +model_user_info_request.go +model_user_login_method_response.go +model_user_request.go +model_waf.go +model_waf_engine_settings_attributes_field.go +model_waf_engine_settings_attributes_field_request.go +model_waf_engine_settings_field.go +model_waf_engine_settings_field_request.go +model_waf_exception_condition.go +model_waf_exception_condition_request.go +model_waf_exception_generic_condition.go +model_waf_exception_generic_condition_request.go +model_waf_exception_specific_condition_on_name.go +model_waf_exception_specific_condition_on_name_request.go +model_waf_exception_specific_condition_on_value.go +model_waf_exception_specific_condition_on_value_request.go +model_waf_request.go +model_waf_response.go +model_waf_rule.go +model_waf_rule_request.go +model_waf_rule_response.go +model_workload.go +model_workload_deployment.go +model_workload_deployment_request.go +model_workload_deployment_response.go +model_workload_request.go +model_workload_response.go +model_workspace.go +model_workspace_request.go +model_zone.go +model_zone_request.go +model_zone_response.go +response.go +test/api_accounts_descendants_test.go +test/api_accounts_info_test.go +test/api_accounts_logged_in_test.go +test/api_ai_studio_chat_threads_test.go +test/api_ai_studio_chunks_test.go +test/api_ai_studio_documents_test.go +test/api_ai_studio_knowledge_bases_test.go +test/api_ai_studio_messages_test.go +test/api_ai_studio_tools_test.go +test/api_applications_cache_settings_test.go +test/api_applications_device_groups_test.go +test/api_applications_function_test.go +test/api_applications_request_rules_test.go +test/api_applications_response_rules_test.go +test/api_applications_test.go +test/api_auth_login_test.go +test/api_auth_mfatotp_device_test.go +test/api_auth_refresh_access_token_test.go +test/api_auth_revoke_test.go +test/api_billing_invoices_test.go +test/api_billing_payments_test.go +test/api_connectors_test.go +test/api_custom_pages_test.go +test/api_data_stream_data_sources_test.go +test/api_data_stream_streams_test.go +test/api_data_stream_templates_test.go +test/api_digital_certificates_certificate_revocation_lists_test.go +test/api_digital_certificates_certificate_signing_requests_test.go +test/api_digital_certificates_certificates_test.go +test/api_digital_certificates_request_a_certificate_test.go +test/api_dns_records_test.go +test/api_dns_zones_test.go +test/api_dnsdnssec_test.go +test/api_favorites_test.go +test/api_firewalls_function_test.go +test/api_firewalls_rules_engine_test.go +test/api_firewalls_test.go +test/api_functions_test.go +test/api_identity_grants_test.go +test/api_identity_group_members_test.go +test/api_identity_groups_test.go +test/api_identity_logged_in_user_test.go +test/api_identity_service_token_renew_test.go +test/api_identity_service_tokens_test.go +test/api_identity_user_info_test.go +test/api_identity_users_test.go +test/api_kv_namespaces_test.go +test/api_metrics_dashboard_test.go +test/api_metrics_folders_test.go +test/api_metrics_library_reports_test.go +test/api_metrics_recommendations_test.go +test/api_metrics_reports_test.go +test/api_metrics_rows_test.go +test/api_network_lists_test.go +test/api_orchestrator_node_groups_test.go +test/api_orchestrator_node_services_test.go +test/api_orchestrator_nodes_test.go +test/api_orchestrator_service_resources_test.go +test/api_orchestrator_services_test.go +test/api_policy_lockout_policy_test.go +test/api_policy_policies_test.go +test/api_policy_session_timeout_policy_test.go +test/api_publisher_management_test.go +test/api_purge_test.go +test/api_sql_test.go +test/api_storage_buckets_test.go +test/api_storage_credentials_test.go +test/api_storage_objects_test.go +test/api_users_lockout_test.go +test/api_vcs_continuous_deployment_executions_test.go +test/api_vcs_continuous_deployment_executor_test.go +test/api_vcs_continuous_deployments_test.go +test/api_vcs_execution_scripts_test.go +test/api_vcs_integrations_test.go +test/api_vcs_providers_test.go +test/api_wafs_exceptions_test.go +test/api_wafs_test.go +test/api_workload_deployments_test.go +test/api_workloads_test.go +utils.go diff --git a/azion-api/.openapi-generator/VERSION b/azion-api/.openapi-generator/VERSION new file mode 100644 index 0000000..3821090 --- /dev/null +++ b/azion-api/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.19.0 diff --git a/azion-api/.travis.yml b/azion-api/.travis.yml new file mode 100644 index 0000000..f5cb2ce --- /dev/null +++ b/azion-api/.travis.yml @@ -0,0 +1,8 @@ +language: go + +install: + - go get -d -v . + +script: + - go build -v ./ + diff --git a/azion-api/README.md b/azion-api/README.md new file mode 100644 index 0000000..88023a8 --- /dev/null +++ b/azion-api/README.md @@ -0,0 +1,1219 @@ +# Go API client for azionapi + +The AZION v4 REST API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 4.0.0 +- Package version: 1.0.0 +- Generator version: 7.19.0 +- Build package: org.openapitools.codegen.languages.GoClientCodegen +For more information, please visit [https://www.azion.com/en/contact/](https://www.azion.com/en/contact/) + +## Installation + +Install the following dependencies: + +```sh +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```go +import azionapi "github.com/GIT_USER_ID/GIT_REPO_ID" +``` + +To use a proxy, set the environment variable `HTTP_PROXY`: + +```go +os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") +``` + +## Configuration of Server URL + +Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. + +### Select Server Configuration + +For using other server than the one defined on index 0 set context value `azionapi.ContextServerIndex` of type `int`. + +```go +ctx := context.WithValue(context.Background(), azionapi.ContextServerIndex, 1) +``` + +### Templated Server URL + +Templated server URL is formatted using default variables from configuration or from context value `azionapi.ContextServerVariables` of type `map[string]string`. + +```go +ctx := context.WithValue(context.Background(), azionapi.ContextServerVariables, map[string]string{ + "basePath": "v2", +}) +``` + +Note, enum values are always validated and all unused variables are silently ignored. + +### URLs Configuration per Operation + +Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. +An operation is uniquely identified by `"{classname}Service.{nickname}"` string. +Similar rules for overriding default operation server index and variables applies by using `azionapi.ContextOperationServerIndices` and `azionapi.ContextOperationServerVariables` context maps. + +```go +ctx := context.WithValue(context.Background(), azionapi.ContextOperationServerIndices, map[string]int{ + "{classname}Service.{nickname}": 2, +}) +ctx = context.WithValue(context.Background(), azionapi.ContextOperationServerVariables, map[string]map[string]string{ + "{classname}Service.{nickname}": { + "port": "8443", + }, +}) +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://stage-api.azion.com/v4* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AIStudioChatThreadsAPI* | [**CreateChatThread**](docs/AIStudioChatThreadsAPI.md#createchatthread) | **Post** /workspace/ai/threads | Create a chat thread +*AIStudioChatThreadsAPI* | [**DestroyAChatThread**](docs/AIStudioChatThreadsAPI.md#destroyachatthread) | **Delete** /workspace/ai/threads/{thread_id} | Destroy a chat thread +*AIStudioChatThreadsAPI* | [**ListChatThreads**](docs/AIStudioChatThreadsAPI.md#listchatthreads) | **Get** /workspace/ai/threads | List chat threads +*AIStudioChatThreadsAPI* | [**PartialUpdateChatThread**](docs/AIStudioChatThreadsAPI.md#partialupdatechatthread) | **Patch** /workspace/ai/threads/{thread_id} | Partially update a chat thread +*AIStudioChatThreadsAPI* | [**RetriveChatThread**](docs/AIStudioChatThreadsAPI.md#retrivechatthread) | **Get** /workspace/ai/threads/{thread_id} | Retrieve details from a chat thread +*AIStudioChatThreadsAPI* | [**UpdateChatThread**](docs/AIStudioChatThreadsAPI.md#updatechatthread) | **Put** /workspace/ai/threads/{thread_id} | Update a chat thread +*AIStudioChunksAPI* | [**ListChunks**](docs/AIStudioChunksAPI.md#listchunks) | **Get** /workspace/ai/kbs/{kb_id}/documents/{document_id}/chunks | List chunks +*AIStudioDocumentsAPI* | [**CreateDocument**](docs/AIStudioDocumentsAPI.md#createdocument) | **Post** /workspace/ai/kbs/{kb_id}/documents | Create a document +*AIStudioDocumentsAPI* | [**DestroyADocument**](docs/AIStudioDocumentsAPI.md#destroyadocument) | **Delete** /workspace/ai/kbs/{kb_id}/documents/{document_id} | Destroy a document +*AIStudioDocumentsAPI* | [**ListDocuments**](docs/AIStudioDocumentsAPI.md#listdocuments) | **Get** /workspace/ai/kbs/{kb_id}/documents | List documents +*AIStudioDocumentsAPI* | [**RetriveDocument**](docs/AIStudioDocumentsAPI.md#retrivedocument) | **Get** /workspace/ai/kbs/{kb_id}/documents/{document_id} | Retrieve details from a document +*AIStudioDocumentsAPI* | [**UpdateDocument**](docs/AIStudioDocumentsAPI.md#updatedocument) | **Put** /workspace/ai/kbs/{kb_id}/documents/{document_id} | Update a document +*AIStudioKnowledgeBasesAPI* | [**AskKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#askknowledgebase) | **Post** /workspace/ai/kbs/{kb_id}/ask | Ask the knowledge base +*AIStudioKnowledgeBasesAPI* | [**CreateKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#createknowledgebase) | **Post** /workspace/ai/kbs | Create a knowledge base +*AIStudioKnowledgeBasesAPI* | [**DestroyAKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#destroyaknowledgebase) | **Delete** /workspace/ai/kbs/{kb_id} | Destroy a knowledge base +*AIStudioKnowledgeBasesAPI* | [**ListKnowledgeBases**](docs/AIStudioKnowledgeBasesAPI.md#listknowledgebases) | **Get** /workspace/ai/kbs | List knowledge bases +*AIStudioKnowledgeBasesAPI* | [**PartialUpdateKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#partialupdateknowledgebase) | **Patch** /workspace/ai/kbs/{kb_id} | Partially update a knowledge base +*AIStudioKnowledgeBasesAPI* | [**QueryChunkFromKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#querychunkfromknowledgebase) | **Post** /workspace/ai/kbs/{kb_id}/query | Query a chunk from a knowledge base +*AIStudioKnowledgeBasesAPI* | [**RetriveKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#retriveknowledgebase) | **Get** /workspace/ai/kbs/{kb_id} | Retrieve details from a knowledge base +*AIStudioKnowledgeBasesAPI* | [**UpdateKnowledgeBase**](docs/AIStudioKnowledgeBasesAPI.md#updateknowledgebase) | **Put** /workspace/ai/kbs/{kb_id} | Update a knowledge base +*AIStudioMessagesAPI* | [**CreateMessage**](docs/AIStudioMessagesAPI.md#createmessage) | **Post** /workspace/ai/threads/{thread_id}/messages | Create a message +*AIStudioMessagesAPI* | [**DestroyAMessage**](docs/AIStudioMessagesAPI.md#destroyamessage) | **Delete** /workspace/ai/threads/{thread_id}/messages/{message_id} | Destroy a message +*AIStudioMessagesAPI* | [**ListMessages**](docs/AIStudioMessagesAPI.md#listmessages) | **Get** /workspace/ai/threads/{thread_id}/messages | List messages +*AIStudioMessagesAPI* | [**RetriveMessage**](docs/AIStudioMessagesAPI.md#retrivemessage) | **Get** /workspace/ai/threads/{thread_id}/messages/{message_id} | Retrieve details from a message +*AIStudioMessagesAPI* | [**UpdateMessage**](docs/AIStudioMessagesAPI.md#updatemessage) | **Put** /workspace/ai/threads/{thread_id}/messages/{message_id} | Update a message +*AIStudioToolsAPI* | [**AddKnowledgeBaseToATool**](docs/AIStudioToolsAPI.md#addknowledgebasetoatool) | **Post** /workspace/ai/tools/{tool_id}/kbs | Add a knowledge base to a tool +*AIStudioToolsAPI* | [**CreateTool**](docs/AIStudioToolsAPI.md#createtool) | **Post** /workspace/ai/tools | Create a tool +*AIStudioToolsAPI* | [**DestroyATool**](docs/AIStudioToolsAPI.md#destroyatool) | **Delete** /workspace/ai/tools/{tool_id} | Destroy a tool +*AIStudioToolsAPI* | [**ListKnowledgeBasesLinkedToATool**](docs/AIStudioToolsAPI.md#listknowledgebaseslinkedtoatool) | **Get** /workspace/ai/tools/{tool_id}/kbs | List knowledge bases linked to a tool +*AIStudioToolsAPI* | [**ListTools**](docs/AIStudioToolsAPI.md#listtools) | **Get** /workspace/ai/tools | List tools +*AIStudioToolsAPI* | [**PartialUpdateTool**](docs/AIStudioToolsAPI.md#partialupdatetool) | **Patch** /workspace/ai/tools/{tool_id} | Partially update a tool +*AIStudioToolsAPI* | [**RemoveKnowledgeBaseFromATool**](docs/AIStudioToolsAPI.md#removeknowledgebasefromatool) | **Delete** /workspace/ai/tools/{tool_id}/kbs/{kb_id} | Remove a knowledge base from a tool +*AIStudioToolsAPI* | [**RetriveTool**](docs/AIStudioToolsAPI.md#retrivetool) | **Get** /workspace/ai/tools/{tool_id} | Retrieve details from a tool +*AIStudioToolsAPI* | [**UpdateTool**](docs/AIStudioToolsAPI.md#updatetool) | **Put** /workspace/ai/tools/{tool_id} | Update a tool +*AccountsDescendantsAPI* | [**CreateDescendantAccount**](docs/AccountsDescendantsAPI.md#createdescendantaccount) | **Post** /account/accounts | Create a new account +*AccountsDescendantsAPI* | [**ListDescendantsAccounts**](docs/AccountsDescendantsAPI.md#listdescendantsaccounts) | **Get** /account/accounts | List accounts +*AccountsDescendantsAPI* | [**PartialUpdateDescendantAccount**](docs/AccountsDescendantsAPI.md#partialupdatedescendantaccount) | **Patch** /account/accounts/{account_id} | Partially update account details +*AccountsDescendantsAPI* | [**RetrieveDescendantAccount**](docs/AccountsDescendantsAPI.md#retrievedescendantaccount) | **Get** /account/accounts/{account_id} | Retrieve account details +*AccountsDescendantsAPI* | [**UpdateDescendantAccount**](docs/AccountsDescendantsAPI.md#updatedescendantaccount) | **Put** /account/accounts/{account_id} | Update account details +*AccountsInfoAPI* | [**RetrieveAccountInfoDetails**](docs/AccountsInfoAPI.md#retrieveaccountinfodetails) | **Get** /account/accounts/{account_id}/info | Retrieve account information details +*AccountsInfoAPI* | [**UpdateAccountInfoDetails**](docs/AccountsInfoAPI.md#updateaccountinfodetails) | **Put** /account/accounts/{account_id}/info | Update account information details +*AccountsLoggedInAPI* | [**PartialUpdateLoggedAccount**](docs/AccountsLoggedInAPI.md#partialupdateloggedaccount) | **Patch** /account/account | Partially update logged account details +*AccountsLoggedInAPI* | [**RetrieveLoggedAccountDetails**](docs/AccountsLoggedInAPI.md#retrieveloggedaccountdetails) | **Get** /account/account | Retrieve logged account details +*AccountsLoggedInAPI* | [**UpdateLoggedAccount**](docs/AccountsLoggedInAPI.md#updateloggedaccount) | **Put** /account/account | Update logged account details +*ApplicationsAPI* | [**CloneApplication**](docs/ApplicationsAPI.md#cloneapplication) | **Post** /workspace/applications/{application_id}/clone | Clone an Application +*ApplicationsAPI* | [**CreateApplication**](docs/ApplicationsAPI.md#createapplication) | **Post** /workspace/applications | Create an Application +*ApplicationsAPI* | [**DeleteApplication**](docs/ApplicationsAPI.md#deleteapplication) | **Delete** /workspace/applications/{application_id} | Delete an Application +*ApplicationsAPI* | [**ListApplications**](docs/ApplicationsAPI.md#listapplications) | **Get** /workspace/applications | List Applications +*ApplicationsAPI* | [**PartialUpdateApplication**](docs/ApplicationsAPI.md#partialupdateapplication) | **Patch** /workspace/applications/{application_id} | Partially update an Application +*ApplicationsAPI* | [**RetrieveApplication**](docs/ApplicationsAPI.md#retrieveapplication) | **Get** /workspace/applications/{application_id} | Retrieve details of an Application +*ApplicationsAPI* | [**UpdateApplication**](docs/ApplicationsAPI.md#updateapplication) | **Put** /workspace/applications/{application_id} | Update an Application +*ApplicationsCacheSettingsAPI* | [**CreateCacheSetting**](docs/ApplicationsCacheSettingsAPI.md#createcachesetting) | **Post** /workspace/applications/{application_id}/cache_settings | Create an Applications Cache Setting +*ApplicationsCacheSettingsAPI* | [**DeleteCacheSetting**](docs/ApplicationsCacheSettingsAPI.md#deletecachesetting) | **Delete** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Delete an Applications Cache Setting +*ApplicationsCacheSettingsAPI* | [**ListCacheSettings**](docs/ApplicationsCacheSettingsAPI.md#listcachesettings) | **Get** /workspace/applications/{application_id}/cache_settings | List all Applications Cache Settings +*ApplicationsCacheSettingsAPI* | [**PartialUpdateCacheSetting**](docs/ApplicationsCacheSettingsAPI.md#partialupdatecachesetting) | **Patch** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Partially update an Applications Cache Setting +*ApplicationsCacheSettingsAPI* | [**RetrieveCacheSetting**](docs/ApplicationsCacheSettingsAPI.md#retrievecachesetting) | **Get** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Retrieve details of an Applications Cache Setting +*ApplicationsCacheSettingsAPI* | [**UpdateCacheSetting**](docs/ApplicationsCacheSettingsAPI.md#updatecachesetting) | **Put** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Update an Applications Cache Setting +*ApplicationsDeviceGroupsAPI* | [**CreateDeviceGroup**](docs/ApplicationsDeviceGroupsAPI.md#createdevicegroup) | **Post** /workspace/applications/{application_id}/device_groups | Create an Applications Device Group +*ApplicationsDeviceGroupsAPI* | [**DeleteDeviceGroup**](docs/ApplicationsDeviceGroupsAPI.md#deletedevicegroup) | **Delete** /workspace/applications/{application_id}/device_groups/{device_group_id} | Delete an Applications Device Group +*ApplicationsDeviceGroupsAPI* | [**ListDeviceGroups**](docs/ApplicationsDeviceGroupsAPI.md#listdevicegroups) | **Get** /workspace/applications/{application_id}/device_groups | List Applications Device Groups +*ApplicationsDeviceGroupsAPI* | [**PartialUpdateDeviceGroup**](docs/ApplicationsDeviceGroupsAPI.md#partialupdatedevicegroup) | **Patch** /workspace/applications/{application_id}/device_groups/{device_group_id} | Partially update an Applications Device Group +*ApplicationsDeviceGroupsAPI* | [**RetrieveDeviceGroup**](docs/ApplicationsDeviceGroupsAPI.md#retrievedevicegroup) | **Get** /workspace/applications/{application_id}/device_groups/{device_group_id} | Retrieve details of a Device Group +*ApplicationsDeviceGroupsAPI* | [**UpdateDeviceGroup**](docs/ApplicationsDeviceGroupsAPI.md#updatedevicegroup) | **Put** /workspace/applications/{application_id}/device_groups/{device_group_id} | Update an Applications Device Group +*ApplicationsFunctionAPI* | [**CreateApplicationFunctionInstance**](docs/ApplicationsFunctionAPI.md#createapplicationfunctioninstance) | **Post** /workspace/applications/{application_id}/functions | Create an Application Function Instance +*ApplicationsFunctionAPI* | [**DeleteApplicationFunctionInstance**](docs/ApplicationsFunctionAPI.md#deleteapplicationfunctioninstance) | **Delete** /workspace/applications/{application_id}/functions/{function_id} | Delete an Application Function Instance +*ApplicationsFunctionAPI* | [**ListApplicationFunctionInstances**](docs/ApplicationsFunctionAPI.md#listapplicationfunctioninstances) | **Get** /workspace/applications/{application_id}/functions | List Function Instances +*ApplicationsFunctionAPI* | [**PartialUpdateApplicationFunctionInstance**](docs/ApplicationsFunctionAPI.md#partialupdateapplicationfunctioninstance) | **Patch** /workspace/applications/{application_id}/functions/{function_id} | Partially update an Application Function Instance +*ApplicationsFunctionAPI* | [**RetrieveApplicationFunctionInstance**](docs/ApplicationsFunctionAPI.md#retrieveapplicationfunctioninstance) | **Get** /workspace/applications/{application_id}/functions/{function_id} | Retrieve details of an Application Function Instance +*ApplicationsFunctionAPI* | [**UpdateApplicationFunctionInstance**](docs/ApplicationsFunctionAPI.md#updateapplicationfunctioninstance) | **Put** /workspace/applications/{application_id}/functions/{function_id} | Update an Application Function Instance +*ApplicationsRequestRulesAPI* | [**CreateApplicationRequestRule**](docs/ApplicationsRequestRulesAPI.md#createapplicationrequestrule) | **Post** /workspace/applications/{application_id}/request_rules | Create an Application Request Rule +*ApplicationsRequestRulesAPI* | [**DeleteApplicationRequestRule**](docs/ApplicationsRequestRulesAPI.md#deleteapplicationrequestrule) | **Delete** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Delete an Application Request Rule +*ApplicationsRequestRulesAPI* | [**ListApplicationRequestRules**](docs/ApplicationsRequestRulesAPI.md#listapplicationrequestrules) | **Get** /workspace/applications/{application_id}/request_rules | List Application Request Rules +*ApplicationsRequestRulesAPI* | [**PartialUpdateApplicationRequestRule**](docs/ApplicationsRequestRulesAPI.md#partialupdateapplicationrequestrule) | **Patch** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Partially update an Application Request Rule +*ApplicationsRequestRulesAPI* | [**RetrieveApplicationRequestRule**](docs/ApplicationsRequestRulesAPI.md#retrieveapplicationrequestrule) | **Get** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Retrieve details of an Application Request Rule +*ApplicationsRequestRulesAPI* | [**UpdateApplicationRequestRule**](docs/ApplicationsRequestRulesAPI.md#updateapplicationrequestrule) | **Put** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Update an Application Request Rule +*ApplicationsRequestRulesAPI* | [**UpdateApplicationRequestRulesOrder**](docs/ApplicationsRequestRulesAPI.md#updateapplicationrequestrulesorder) | **Put** /workspace/applications/{application_id}/request_rules/order | Ordering Application Request Rules +*ApplicationsResponseRulesAPI* | [**CreateApplicationResponseRule**](docs/ApplicationsResponseRulesAPI.md#createapplicationresponserule) | **Post** /workspace/applications/{application_id}/response_rules | Create an Application Response Rule +*ApplicationsResponseRulesAPI* | [**DeleteApplicationResponseRule**](docs/ApplicationsResponseRulesAPI.md#deleteapplicationresponserule) | **Delete** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Delete an Application Response Rule +*ApplicationsResponseRulesAPI* | [**ListApplicationResponseRules**](docs/ApplicationsResponseRulesAPI.md#listapplicationresponserules) | **Get** /workspace/applications/{application_id}/response_rules | List Application Response Rules +*ApplicationsResponseRulesAPI* | [**PartialUpdateApplicationResponseRule**](docs/ApplicationsResponseRulesAPI.md#partialupdateapplicationresponserule) | **Patch** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Partially update an Application Response Rule +*ApplicationsResponseRulesAPI* | [**RetrieveApplicationResponseRule**](docs/ApplicationsResponseRulesAPI.md#retrieveapplicationresponserule) | **Get** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Retrieve details of an Application Response Rule +*ApplicationsResponseRulesAPI* | [**UpdateApplicationResponseRule**](docs/ApplicationsResponseRulesAPI.md#updateapplicationresponserule) | **Put** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Update an Application Response Rule +*ApplicationsResponseRulesAPI* | [**UpdateApplicationResponseRulesOrder**](docs/ApplicationsResponseRulesAPI.md#updateapplicationresponserulesorder) | **Put** /workspace/applications/{application_id}/response_rules/order | Ordering Application Response Rules +*AuthLoginAPI* | [**AuthUserLogin**](docs/AuthLoginAPI.md#authuserlogin) | **Post** /account/auth/login | User Login – Generate JWT Tokens +*AuthLoginAPI* | [**AuthUserLoginMethod**](docs/AuthLoginAPI.md#authuserloginmethod) | **Get** /account/auth/login/method | Check User Authentication Method +*AuthLoginAPI* | [**TotpVerify**](docs/AuthLoginAPI.md#totpverify) | **Post** /account/auth/mfa/totp/verify | Retrieve user JWT tokens by MFA auth +*AuthMFATOTPDeviceAPI* | [**CreateTotpDevice**](docs/AuthMFATOTPDeviceAPI.md#createtotpdevice) | **Post** /account/auth/mfa/totp | Create a TOTP device +*AuthMFATOTPDeviceAPI* | [**DeleteTotpDevice**](docs/AuthMFATOTPDeviceAPI.md#deletetotpdevice) | **Delete** /auth/mfa/totp/{device_id} | Delete a TOTP device +*AuthMFATOTPDeviceAPI* | [**ListTotpDevices**](docs/AuthMFATOTPDeviceAPI.md#listtotpdevices) | **Get** /account/auth/mfa/totp | List of TOTP devices +*AuthRefreshAccessTokenAPI* | [**AuthUserRefreshToken**](docs/AuthRefreshAccessTokenAPI.md#authuserrefreshtoken) | **Post** /account/auth/token | Refresh user JWT access token +*AuthRevokeAPI* | [**AuthUserRevoke**](docs/AuthRevokeAPI.md#authuserrevoke) | **Post** /account/auth/revoke | Revoke user JWT refresh token +*BillingInvoicesAPI* | [**RetrieveInvoice**](docs/BillingInvoicesAPI.md#retrieveinvoice) | **Get** /billing/invoices/{period} | Retrieve details of an invoice +*BillingPaymentsAPI* | [**AddCredits**](docs/BillingPaymentsAPI.md#addcredits) | **Post** /payments/credits | Add credits using the default credit card +*BillingPaymentsAPI* | [**CreateCreditCard**](docs/BillingPaymentsAPI.md#createcreditcard) | **Post** /payments/credit_cards | Create a new credit card +*BillingPaymentsAPI* | [**DestroyCreditCard**](docs/BillingPaymentsAPI.md#destroycreditcard) | **Delete** /payments/credit_cards/{id} | Destroy a credit card +*BillingPaymentsAPI* | [**ListCreditCards**](docs/BillingPaymentsAPI.md#listcreditcards) | **Get** /payments/credit_cards | List of the credit cards +*BillingPaymentsAPI* | [**ListPaymentHistory**](docs/BillingPaymentsAPI.md#listpaymenthistory) | **Get** /payments/history | List of the payment history +*BillingPaymentsAPI* | [**PartialUpdateCreditCard**](docs/BillingPaymentsAPI.md#partialupdatecreditcard) | **Patch** /payments/credit_cards/{id} | Partially update a credit card +*BillingPaymentsAPI* | [**RetrieveCreditCard**](docs/BillingPaymentsAPI.md#retrievecreditcard) | **Get** /payments/credit_cards/{id} | Retrieve details from a credit card +*ConnectorsAPI* | [**CreateConnector**](docs/ConnectorsAPI.md#createconnector) | **Post** /workspace/connectors | Create an Connector +*ConnectorsAPI* | [**DeleteConnector**](docs/ConnectorsAPI.md#deleteconnector) | **Delete** /workspace/connectors/{connector_id} | Delete an Connector +*ConnectorsAPI* | [**ListConnectors**](docs/ConnectorsAPI.md#listconnectors) | **Get** /workspace/connectors | List Connectors +*ConnectorsAPI* | [**PartialUpdateConnector**](docs/ConnectorsAPI.md#partialupdateconnector) | **Patch** /workspace/connectors/{connector_id} | Partially update an Connector +*ConnectorsAPI* | [**RetrieveConnector**](docs/ConnectorsAPI.md#retrieveconnector) | **Get** /workspace/connectors/{connector_id} | Retrieve details of an Connector +*ConnectorsAPI* | [**UpdateConnector**](docs/ConnectorsAPI.md#updateconnector) | **Put** /workspace/connectors/{connector_id} | Update an Connector +*CustomPagesAPI* | [**CreateCustomPage**](docs/CustomPagesAPI.md#createcustompage) | **Post** /workspace/custom_pages | Create a Custom Page +*CustomPagesAPI* | [**DeleteCustomPage**](docs/CustomPagesAPI.md#deletecustompage) | **Delete** /workspace/custom_pages/{custom_page_id} | Delete a Custom Page +*CustomPagesAPI* | [**ListCustomPages**](docs/CustomPagesAPI.md#listcustompages) | **Get** /workspace/custom_pages | List Custom Pages +*CustomPagesAPI* | [**PartialUpdateCustomPage**](docs/CustomPagesAPI.md#partialupdatecustompage) | **Patch** /workspace/custom_pages/{custom_page_id} | Partially update a Custom Page +*CustomPagesAPI* | [**RetrieveCustomPage**](docs/CustomPagesAPI.md#retrievecustompage) | **Get** /workspace/custom_pages/{custom_page_id} | Retrieve details of a Custom Page +*CustomPagesAPI* | [**UpdateCustomPage**](docs/CustomPagesAPI.md#updatecustompage) | **Put** /workspace/custom_pages/{custom_page_id} | Update a Custom Page +*DNSDNSSECAPI* | [**PartialUpdateDnssec**](docs/DNSDNSSECAPI.md#partialupdatednssec) | **Patch** /workspace/dns/zones/{zone_id}/dnssec | Partially update a DNSSEC +*DNSDNSSECAPI* | [**RetrieveDnssec**](docs/DNSDNSSECAPI.md#retrievednssec) | **Get** /workspace/dns/zones/{zone_id}/dnssec | Retrieve details of a DNSSEC +*DNSDNSSECAPI* | [**UpdateDnssec**](docs/DNSDNSSECAPI.md#updatednssec) | **Put** /workspace/dns/zones/{zone_id}/dnssec | Update a DNSSEC +*DNSRecordsAPI* | [**CreateDnsRecord**](docs/DNSRecordsAPI.md#creatednsrecord) | **Post** /workspace/dns/zones/{zone_id}/records | Create a DNS Record +*DNSRecordsAPI* | [**DeleteDnsRecord**](docs/DNSRecordsAPI.md#deletednsrecord) | **Delete** /workspace/dns/zones/{zone_id}/records/{record_id} | Delete a DNS Record +*DNSRecordsAPI* | [**ListDnsRecords**](docs/DNSRecordsAPI.md#listdnsrecords) | **Get** /workspace/dns/zones/{zone_id}/records | List DNS Records +*DNSRecordsAPI* | [**PartialUpdateDnsRecord**](docs/DNSRecordsAPI.md#partialupdatednsrecord) | **Patch** /workspace/dns/zones/{zone_id}/records/{record_id} | Partially update a DNS Record +*DNSRecordsAPI* | [**RetrieveDnsRecord**](docs/DNSRecordsAPI.md#retrievednsrecord) | **Get** /workspace/dns/zones/{zone_id}/records/{record_id} | Retrieve details of a DNS Record +*DNSRecordsAPI* | [**UpdateDnsRecord**](docs/DNSRecordsAPI.md#updatednsrecord) | **Put** /workspace/dns/zones/{zone_id}/records/{record_id} | Update a DNS Record +*DNSZonesAPI* | [**CreateDnsZone**](docs/DNSZonesAPI.md#creatednszone) | **Post** /workspace/dns/zones | Create a DNS Zone +*DNSZonesAPI* | [**DeleteDnsZone**](docs/DNSZonesAPI.md#deletednszone) | **Delete** /workspace/dns/zones/{zone_id} | Delete a DNS Zone +*DNSZonesAPI* | [**ListDnsZones**](docs/DNSZonesAPI.md#listdnszones) | **Get** /workspace/dns/zones | List DNS Zones +*DNSZonesAPI* | [**PartialUpdateDnsZone**](docs/DNSZonesAPI.md#partialupdatednszone) | **Patch** /workspace/dns/zones/{zone_id} | Partially update a DNS Zone +*DNSZonesAPI* | [**RetrieveDnsZone**](docs/DNSZonesAPI.md#retrievednszone) | **Get** /workspace/dns/zones/{zone_id} | Retrieve details of a DNS Zone +*DNSZonesAPI* | [**UpdateDnsZone**](docs/DNSZonesAPI.md#updatednszone) | **Put** /workspace/dns/zones/{zone_id} | Update a DNS Zone +*DataStreamDataSourcesAPI* | [**ListDataSources**](docs/DataStreamDataSourcesAPI.md#listdatasources) | **Get** /workspace/stream/data_sources | List of Data Sources +*DataStreamStreamsAPI* | [**CreateDataStream**](docs/DataStreamStreamsAPI.md#createdatastream) | **Post** /workspace/stream/streams | Create a Data Stream +*DataStreamStreamsAPI* | [**DeleteDataStream**](docs/DataStreamStreamsAPI.md#deletedatastream) | **Delete** /workspace/stream/streams/{stream_id} | Delete a Data Stream +*DataStreamStreamsAPI* | [**ListDataStreams**](docs/DataStreamStreamsAPI.md#listdatastreams) | **Get** /workspace/stream/streams | List Data Streams +*DataStreamStreamsAPI* | [**PartialUpdateDataStream**](docs/DataStreamStreamsAPI.md#partialupdatedatastream) | **Patch** /workspace/stream/streams/{stream_id} | Partially update a Data Stream +*DataStreamStreamsAPI* | [**RetrieveDataStream**](docs/DataStreamStreamsAPI.md#retrievedatastream) | **Get** /workspace/stream/streams/{stream_id} | Retrieve details of a Data Stream +*DataStreamStreamsAPI* | [**UpdateDataStream**](docs/DataStreamStreamsAPI.md#updatedatastream) | **Put** /workspace/stream/streams/{stream_id} | Update a Data Stream +*DataStreamTemplatesAPI* | [**CreateTemplate**](docs/DataStreamTemplatesAPI.md#createtemplate) | **Post** /workspace/stream/templates | Create a Template +*DataStreamTemplatesAPI* | [**DeleteTemplate**](docs/DataStreamTemplatesAPI.md#deletetemplate) | **Delete** /workspace/stream/templates/{template_id} | Delete a Template +*DataStreamTemplatesAPI* | [**ListTemplates**](docs/DataStreamTemplatesAPI.md#listtemplates) | **Get** /workspace/stream/templates | List Templates +*DataStreamTemplatesAPI* | [**PartialUpdateTemplate**](docs/DataStreamTemplatesAPI.md#partialupdatetemplate) | **Patch** /workspace/stream/templates/{template_id} | Partially update a Template +*DataStreamTemplatesAPI* | [**RetrieveTemplate**](docs/DataStreamTemplatesAPI.md#retrievetemplate) | **Get** /workspace/stream/templates/{template_id} | Retrieve details of a Template +*DataStreamTemplatesAPI* | [**UpdateTemplate**](docs/DataStreamTemplatesAPI.md#updatetemplate) | **Put** /workspace/stream/templates/{template_id} | Update a Template +*DigitalCertificatesCertificateRevocationListsAPI* | [**CreateCertificateRevocationList**](docs/DigitalCertificatesCertificateRevocationListsAPI.md#createcertificaterevocationlist) | **Post** /workspace/tls/crls | Create a certificate revocation lists (CRL) +*DigitalCertificatesCertificateRevocationListsAPI* | [**DeleteCertificateRevocationList**](docs/DigitalCertificatesCertificateRevocationListsAPI.md#deletecertificaterevocationlist) | **Delete** /workspace/tls/crls/{crl_id} | Delete a certificate revocation list +*DigitalCertificatesCertificateRevocationListsAPI* | [**ListCertificateRevocationLists**](docs/DigitalCertificatesCertificateRevocationListsAPI.md#listcertificaterevocationlists) | **Get** /workspace/tls/crls | List certificate revocation lists (CRL) +*DigitalCertificatesCertificateRevocationListsAPI* | [**PartialUpdateCertificateRevocationList**](docs/DigitalCertificatesCertificateRevocationListsAPI.md#partialupdatecertificaterevocationlist) | **Patch** /workspace/tls/crls/{crl_id} | Update a certificate revocation lists (CRL) +*DigitalCertificatesCertificateRevocationListsAPI* | [**RetrieveCertificateRevocationList**](docs/DigitalCertificatesCertificateRevocationListsAPI.md#retrievecertificaterevocationlist) | **Get** /workspace/tls/crls/{crl_id} | Retrieve details from a certificate revocation lists (CRL) +*DigitalCertificatesCertificateRevocationListsAPI* | [**UpdateCertificateRevocationList**](docs/DigitalCertificatesCertificateRevocationListsAPI.md#updatecertificaterevocationlist) | **Put** /workspace/tls/crls/{crl_id} | Update a certificate revocation lists (CRL) +*DigitalCertificatesCertificateSigningRequestsAPI* | [**CreateCertificateSigningRequest**](docs/DigitalCertificatesCertificateSigningRequestsAPI.md#createcertificatesigningrequest) | **Post** /workspace/tls/csr | Create a certificate signing request (CSR) +*DigitalCertificatesCertificatesAPI* | [**CreateCertificate**](docs/DigitalCertificatesCertificatesAPI.md#createcertificate) | **Post** /workspace/tls/certificates | Create a certificate +*DigitalCertificatesCertificatesAPI* | [**DeleteCertificate**](docs/DigitalCertificatesCertificatesAPI.md#deletecertificate) | **Delete** /workspace/tls/certificates/{certificate_id} | Delete a certificate +*DigitalCertificatesCertificatesAPI* | [**ListCertificates**](docs/DigitalCertificatesCertificatesAPI.md#listcertificates) | **Get** /workspace/tls/certificates | List certificates +*DigitalCertificatesCertificatesAPI* | [**PartialUpdateCertificate**](docs/DigitalCertificatesCertificatesAPI.md#partialupdatecertificate) | **Patch** /workspace/tls/certificates/{certificate_id} | Partially update a certificate +*DigitalCertificatesCertificatesAPI* | [**RetrieveCertificate**](docs/DigitalCertificatesCertificatesAPI.md#retrievecertificate) | **Get** /workspace/tls/certificates/{certificate_id} | Retrieve details from a certificate +*DigitalCertificatesCertificatesAPI* | [**UpdateCertificate**](docs/DigitalCertificatesCertificatesAPI.md#updatecertificate) | **Put** /workspace/tls/certificates/{certificate_id} | Update a certificate +*DigitalCertificatesRequestACertificateAPI* | [**RequestCertificate**](docs/DigitalCertificatesRequestACertificateAPI.md#requestcertificate) | **Post** /workspace/tls/certificates/request | Request a certificate +*FavoritesAPI* | [**CreateFavorite**](docs/FavoritesAPI.md#createfavorite) | **Post** /identity/user/favorites | Create a new favorite +*FavoritesAPI* | [**DeleteFavorite**](docs/FavoritesAPI.md#deletefavorite) | **Delete** /identity/user/favorites/{favorite_id} | Delete a favorite +*FavoritesAPI* | [**ListFavorites**](docs/FavoritesAPI.md#listfavorites) | **Get** /identity/user/favorites | List of the favorites +*FirewallsAPI* | [**CloneFirewall**](docs/FirewallsAPI.md#clonefirewall) | **Post** /workspace/firewalls/{firewall_id}/clone | Clone a Firewall +*FirewallsAPI* | [**CreateFirewall**](docs/FirewallsAPI.md#createfirewall) | **Post** /workspace/firewalls | Create a Firewall +*FirewallsAPI* | [**DeleteFirewall**](docs/FirewallsAPI.md#deletefirewall) | **Delete** /workspace/firewalls/{firewall_id} | Delete a Firewall +*FirewallsAPI* | [**ListFirewalls**](docs/FirewallsAPI.md#listfirewalls) | **Get** /workspace/firewalls | List Firewalls +*FirewallsAPI* | [**PartialUpdateFirewall**](docs/FirewallsAPI.md#partialupdatefirewall) | **Patch** /workspace/firewalls/{firewall_id} | Partially update a Firewall +*FirewallsAPI* | [**RetrieveFirewall**](docs/FirewallsAPI.md#retrievefirewall) | **Get** /workspace/firewalls/{firewall_id} | Retrieve details from a Firewall +*FirewallsAPI* | [**UpdateFirewall**](docs/FirewallsAPI.md#updatefirewall) | **Put** /workspace/firewalls/{firewall_id} | Update a Firewall +*FirewallsFunctionAPI* | [**CreateFirewallFunction**](docs/FirewallsFunctionAPI.md#createfirewallfunction) | **Post** /workspace/firewalls/{firewall_id}/functions | Create an Firewall Function +*FirewallsFunctionAPI* | [**DeleteFirewallFunction**](docs/FirewallsFunctionAPI.md#deletefirewallfunction) | **Delete** /workspace/firewalls/{firewall_id}/functions/{function_id} | Delete an Firewall Function +*FirewallsFunctionAPI* | [**ListFirewallFunction**](docs/FirewallsFunctionAPI.md#listfirewallfunction) | **Get** /workspace/firewalls/{firewall_id}/functions | List Firewall Function +*FirewallsFunctionAPI* | [**PartialUpdateFirewallFunction**](docs/FirewallsFunctionAPI.md#partialupdatefirewallfunction) | **Patch** /workspace/firewalls/{firewall_id}/functions/{function_id} | Partially update an Firewall Function +*FirewallsFunctionAPI* | [**RetrieveFirewallFunction**](docs/FirewallsFunctionAPI.md#retrievefirewallfunction) | **Get** /workspace/firewalls/{firewall_id}/functions/{function_id} | Retrieve details of an Firewall Function +*FirewallsFunctionAPI* | [**UpdateFirewallFunction**](docs/FirewallsFunctionAPI.md#updatefirewallfunction) | **Put** /workspace/firewalls/{firewall_id}/functions/{function_id} | Update an Firewall Function +*FirewallsRulesEngineAPI* | [**CreateFirewallRule**](docs/FirewallsRulesEngineAPI.md#createfirewallrule) | **Post** /workspace/firewalls/{firewall_id}/request_rules | Create an Firewall Rule +*FirewallsRulesEngineAPI* | [**DeleteFirewallRule**](docs/FirewallsRulesEngineAPI.md#deletefirewallrule) | **Delete** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Delete an Firewall Rule +*FirewallsRulesEngineAPI* | [**ListFirewallRules**](docs/FirewallsRulesEngineAPI.md#listfirewallrules) | **Get** /workspace/firewalls/{firewall_id}/request_rules | List Firewall Rules +*FirewallsRulesEngineAPI* | [**OrderFirewallRules**](docs/FirewallsRulesEngineAPI.md#orderfirewallrules) | **Put** /workspace/firewalls/{firewall_id}/request_rules/order | Ordering Firewall Rules +*FirewallsRulesEngineAPI* | [**PartialUpdateFirewallRule**](docs/FirewallsRulesEngineAPI.md#partialupdatefirewallrule) | **Patch** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Partially update an Firewall Rule +*FirewallsRulesEngineAPI* | [**RetrieveFirewallRule**](docs/FirewallsRulesEngineAPI.md#retrievefirewallrule) | **Get** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Retrieve details of an Firewall Rule +*FirewallsRulesEngineAPI* | [**UpdateFirewallRule**](docs/FirewallsRulesEngineAPI.md#updatefirewallrule) | **Put** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Update an Firewall Rule +*FunctionsAPI* | [**CreateFunction**](docs/FunctionsAPI.md#createfunction) | **Post** /workspace/functions | Create an Function +*FunctionsAPI* | [**DeleteFunction**](docs/FunctionsAPI.md#deletefunction) | **Delete** /workspace/functions/{function_id} | Delete an Function +*FunctionsAPI* | [**ListFunctions**](docs/FunctionsAPI.md#listfunctions) | **Get** /workspace/functions | List Functions +*FunctionsAPI* | [**PartialUpdateFunction**](docs/FunctionsAPI.md#partialupdatefunction) | **Patch** /workspace/functions/{function_id} | Partially update an Function +*FunctionsAPI* | [**RetrieveFunction**](docs/FunctionsAPI.md#retrievefunction) | **Get** /workspace/functions/{function_id} | Retrieve details of an Function +*FunctionsAPI* | [**UpdateFunction**](docs/FunctionsAPI.md#updatefunction) | **Put** /workspace/functions/{function_id} | Update an Function +*IdentityGrantsAPI* | [**CreateGrant**](docs/IdentityGrantsAPI.md#creategrant) | **Post** /identity/grants | Create a new grant +*IdentityGrantsAPI* | [**DeleteGrant**](docs/IdentityGrantsAPI.md#deletegrant) | **Delete** /identity/grants/{grant_id} | Delete a grant +*IdentityGrantsAPI* | [**ListGrants**](docs/IdentityGrantsAPI.md#listgrants) | **Get** /identity/grants | List grants for the account +*IdentityGrantsAPI* | [**PartialUpdateGrant**](docs/IdentityGrantsAPI.md#partialupdategrant) | **Patch** /identity/grants/{grant_id} | Partially update a grant +*IdentityGrantsAPI* | [**RetrieveGrant**](docs/IdentityGrantsAPI.md#retrievegrant) | **Get** /identity/grants/{grant_id} | Retrieve grant details +*IdentityGrantsAPI* | [**UpdateGrant**](docs/IdentityGrantsAPI.md#updategrant) | **Put** /identity/grants/{grant_id} | Update a grant +*IdentityGroupMembersAPI* | [**RetrieveMembersGroup**](docs/IdentityGroupMembersAPI.md#retrievemembersgroup) | **Get** /identity/groups/{id}/members | Retrieve members from a group +*IdentityGroupMembersAPI* | [**UpdateMembersGroup**](docs/IdentityGroupMembersAPI.md#updatemembersgroup) | **Put** /identity/groups/{id}/members | Update members from a group +*IdentityGroupsAPI* | [**CreateGroup**](docs/IdentityGroupsAPI.md#creategroup) | **Post** /identity/groups | Create a new group +*IdentityGroupsAPI* | [**DeleteGroup**](docs/IdentityGroupsAPI.md#deletegroup) | **Delete** /identity/groups/{group_id} | Delete a group +*IdentityGroupsAPI* | [**ListGroup**](docs/IdentityGroupsAPI.md#listgroup) | **Get** /identity/groups | List of the account groups +*IdentityGroupsAPI* | [**PartialUpdateGroup**](docs/IdentityGroupsAPI.md#partialupdategroup) | **Patch** /identity/groups/{group_id} | Partially update a group +*IdentityGroupsAPI* | [**RetrieveGroup**](docs/IdentityGroupsAPI.md#retrievegroup) | **Get** /identity/groups/{group_id} | Retrieve details from a group +*IdentityGroupsAPI* | [**UpdateGroup**](docs/IdentityGroupsAPI.md#updategroup) | **Put** /identity/groups/{group_id} | Update a group +*IdentityLoggedInUserAPI* | [**ListLoggedUser**](docs/IdentityLoggedInUserAPI.md#listloggeduser) | **Get** /identity/user | Retrieve details from the currently logged-in user +*IdentityLoggedInUserAPI* | [**PartialUpdateLoggedUser**](docs/IdentityLoggedInUserAPI.md#partialupdateloggeduser) | **Patch** /identity/user | Partially update the currently logged-in user +*IdentityLoggedInUserAPI* | [**UpdateLoggedUser**](docs/IdentityLoggedInUserAPI.md#updateloggeduser) | **Put** /identity/user | Update the currently logged-in user +*IdentityServiceTokenRenewAPI* | [**RenewServiceToken**](docs/IdentityServiceTokenRenewAPI.md#renewservicetoken) | **Post** /identity/service-tokens/{id}/renew | Renews a service token +*IdentityServiceTokensAPI* | [**CreateServiceToken**](docs/IdentityServiceTokensAPI.md#createservicetoken) | **Post** /identity/service-tokens | Create a new service token +*IdentityServiceTokensAPI* | [**DeleteServiceToken**](docs/IdentityServiceTokensAPI.md#deleteservicetoken) | **Delete** /identity/service-tokens/{token_id} | Delete a service token +*IdentityServiceTokensAPI* | [**ListServiceToken**](docs/IdentityServiceTokensAPI.md#listservicetoken) | **Get** /identity/service-tokens | List of the account service tokens +*IdentityServiceTokensAPI* | [**PartialUpdateServiceToken**](docs/IdentityServiceTokensAPI.md#partialupdateservicetoken) | **Patch** /identity/service-tokens/{token_id} | Partially update a service token +*IdentityServiceTokensAPI* | [**RetrieveServiceToken**](docs/IdentityServiceTokensAPI.md#retrieveservicetoken) | **Get** /identity/service-tokens/{token_id} | Retrieve details from a service token +*IdentityServiceTokensAPI* | [**UpdateServiceToken**](docs/IdentityServiceTokensAPI.md#updateservicetoken) | **Put** /identity/service-tokens/{token_id} | Update a service token +*IdentityUserInfoAPI* | [**RetrieveUserInfo**](docs/IdentityUserInfoAPI.md#retrieveuserinfo) | **Get** /identity/users/{id}/info | Retrieve user info +*IdentityUserInfoAPI* | [**UpdateUserInfo**](docs/IdentityUserInfoAPI.md#updateuserinfo) | **Put** /identity/users/{id}/info | Update an user info +*IdentityUsersAPI* | [**CreateUser**](docs/IdentityUsersAPI.md#createuser) | **Post** /identity/users | Create a new user +*IdentityUsersAPI* | [**DeleteUser**](docs/IdentityUsersAPI.md#deleteuser) | **Delete** /identity/users/{user_id} | Delete an user +*IdentityUsersAPI* | [**ListUsers**](docs/IdentityUsersAPI.md#listusers) | **Get** /identity/users | List of the account users +*IdentityUsersAPI* | [**PartialUpdateUser**](docs/IdentityUsersAPI.md#partialupdateuser) | **Patch** /identity/users/{user_id} | Partially update an user +*IdentityUsersAPI* | [**RetrieveUser**](docs/IdentityUsersAPI.md#retrieveuser) | **Get** /identity/users/{user_id} | Retrieve details from an user +*IdentityUsersAPI* | [**UpdateUser**](docs/IdentityUsersAPI.md#updateuser) | **Put** /identity/users/{user_id} | Update an user +*KVNamespacesAPI* | [**CreateNamespace**](docs/KVNamespacesAPI.md#createnamespace) | **Post** /workspace/kv/namespaces | Create namespace +*KVNamespacesAPI* | [**ListNamespaces**](docs/KVNamespacesAPI.md#listnamespaces) | **Get** /workspace/kv/namespaces | List namespaces +*KVNamespacesAPI* | [**RetrieveNamespace**](docs/KVNamespacesAPI.md#retrievenamespace) | **Get** /workspace/kv/namespaces/{namespace} | Retrieve namespace +*MetricsDashboardAPI* | [**CreateDashboard**](docs/MetricsDashboardAPI.md#createdashboard) | **Post** /metrics/folders/{folder_id}/dashboards | Create a new dashboard +*MetricsDashboardAPI* | [**DeleteDashboard**](docs/MetricsDashboardAPI.md#deletedashboard) | **Delete** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Delete a dashboard +*MetricsDashboardAPI* | [**ListDashboards**](docs/MetricsDashboardAPI.md#listdashboards) | **Get** /metrics/folders/{folder_id}/dashboards | List of the dashboards +*MetricsDashboardAPI* | [**PartialUpdateDashboard**](docs/MetricsDashboardAPI.md#partialupdatedashboard) | **Patch** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Partially update a dashboard +*MetricsDashboardAPI* | [**RetrieveDashboard**](docs/MetricsDashboardAPI.md#retrievedashboard) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Retrieve details from a dashboard +*MetricsDashboardAPI* | [**UpdateDashboard**](docs/MetricsDashboardAPI.md#updatedashboard) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Update a dashboard +*MetricsFoldersAPI* | [**CreateFolder**](docs/MetricsFoldersAPI.md#createfolder) | **Post** /metrics/folders | Create a new folder +*MetricsFoldersAPI* | [**DeleteFolder**](docs/MetricsFoldersAPI.md#deletefolder) | **Delete** /metrics/folders/{folder_id} | Delete a folder +*MetricsFoldersAPI* | [**ListFolders**](docs/MetricsFoldersAPI.md#listfolders) | **Get** /metrics/folders | List of the folders +*MetricsFoldersAPI* | [**PartialUpdateFolder**](docs/MetricsFoldersAPI.md#partialupdatefolder) | **Patch** /metrics/folders/{folder_id} | Partially update a folder +*MetricsFoldersAPI* | [**RetrieveFolder**](docs/MetricsFoldersAPI.md#retrievefolder) | **Get** /metrics/folders/{folder_id} | Retrieve details from a folder +*MetricsFoldersAPI* | [**UpdateFolder**](docs/MetricsFoldersAPI.md#updatefolder) | **Put** /metrics/folders/{folder_id} | Update a folder +*MetricsLibraryReportsAPI* | [**CreateLibraryReport**](docs/MetricsLibraryReportsAPI.md#createlibraryreport) | **Post** /metrics/library/reports | Create a new library report +*MetricsLibraryReportsAPI* | [**DeleteLibraryReport**](docs/MetricsLibraryReportsAPI.md#deletelibraryreport) | **Delete** /metrics/library/reports/{library_report_id} | Delete a library report +*MetricsLibraryReportsAPI* | [**ListLibraryReports**](docs/MetricsLibraryReportsAPI.md#listlibraryreports) | **Get** /metrics/library/reports | List of library reports +*MetricsLibraryReportsAPI* | [**RetrieveLibraryReport**](docs/MetricsLibraryReportsAPI.md#retrievelibraryreport) | **Get** /metrics/library/reports/{library_report_id} | Retrieve details from a library report +*MetricsLibraryReportsAPI* | [**UpdateLibraryReport**](docs/MetricsLibraryReportsAPI.md#updatelibraryreport) | **Put** /metrics/library/reports/{library_report_id} | Update a library report +*MetricsRecommendationsAPI* | [**CreateRecommendation**](docs/MetricsRecommendationsAPI.md#createrecommendation) | **Post** /metrics/recommendations | Create a new recommendation +*MetricsRecommendationsAPI* | [**DeleteRecommendation**](docs/MetricsRecommendationsAPI.md#deleterecommendation) | **Delete** /metrics/recommendations/{recommendation_id} | Delete a recommendation +*MetricsRecommendationsAPI* | [**ListRecommendations**](docs/MetricsRecommendationsAPI.md#listrecommendations) | **Get** /metrics/recommendations | List of the recommendations +*MetricsReportsAPI* | [**CreateReport**](docs/MetricsReportsAPI.md#createreport) | **Post** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports | Create a new report +*MetricsReportsAPI* | [**DeleteReport**](docs/MetricsReportsAPI.md#deletereport) | **Delete** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id} | Delete a report +*MetricsReportsAPI* | [**ListReports**](docs/MetricsReportsAPI.md#listreports) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports | List of reports +*MetricsReportsAPI* | [**OrderingReport**](docs/MetricsReportsAPI.md#orderingreport) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/order | Ordering reports in row +*MetricsReportsAPI* | [**RetrieveReport**](docs/MetricsReportsAPI.md#retrievereport) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id} | Retrieve details from a report +*MetricsReportsAPI* | [**UpdateReport**](docs/MetricsReportsAPI.md#updatereport) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id} | Update a report +*MetricsRowsAPI* | [**CreateRow**](docs/MetricsRowsAPI.md#createrow) | **Post** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows | Create a new row +*MetricsRowsAPI* | [**DeleteRow**](docs/MetricsRowsAPI.md#deleterow) | **Delete** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id} | Delete a row +*MetricsRowsAPI* | [**ListRows**](docs/MetricsRowsAPI.md#listrows) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows | List of the rows +*MetricsRowsAPI* | [**OrderingRow**](docs/MetricsRowsAPI.md#orderingrow) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/order | Ordering rows in dashboard +*MetricsRowsAPI* | [**RetrieveRow**](docs/MetricsRowsAPI.md#retrieverow) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id} | Retrieve details from a row +*MetricsRowsAPI* | [**UpdateRow**](docs/MetricsRowsAPI.md#updaterow) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id} | Update a row +*NetworkListsAPI* | [**CreateNetworkList**](docs/NetworkListsAPI.md#createnetworklist) | **Post** /workspace/network_lists | Create a Network List +*NetworkListsAPI* | [**DeleteNetworkList**](docs/NetworkListsAPI.md#deletenetworklist) | **Delete** /workspace/network_lists/{network_list_id} | Delete a Network List +*NetworkListsAPI* | [**ListNetworkLists**](docs/NetworkListsAPI.md#listnetworklists) | **Get** /workspace/network_lists | List Network Lists +*NetworkListsAPI* | [**PartialUpdateNetworkList**](docs/NetworkListsAPI.md#partialupdatenetworklist) | **Patch** /workspace/network_lists/{network_list_id} | Partially update a Network List +*NetworkListsAPI* | [**RetrieveNetworkList**](docs/NetworkListsAPI.md#retrievenetworklist) | **Get** /workspace/network_lists/{network_list_id} | Retrieve details of a Network List +*NetworkListsAPI* | [**UpdateNetworkList**](docs/NetworkListsAPI.md#updatenetworklist) | **Put** /workspace/network_lists/{network_list_id} | Update a Network List +*OrchestratorNodeGroupsAPI* | [**BindNodeGroup**](docs/OrchestratorNodeGroupsAPI.md#bindnodegroup) | **Post** /orchestrator/nodes/{node_id}/groups | Bind Node Group +*OrchestratorNodeGroupsAPI* | [**CreateNodeGroup**](docs/OrchestratorNodeGroupsAPI.md#createnodegroup) | **Post** /orchestrator/nodes/groups | Create Node Group +*OrchestratorNodeGroupsAPI* | [**ListNodeGroups**](docs/OrchestratorNodeGroupsAPI.md#listnodegroups) | **Get** /orchestrator/nodes/groups | List Node Groups +*OrchestratorNodeGroupsAPI* | [**ListNodeGroupsByID**](docs/OrchestratorNodeGroupsAPI.md#listnodegroupsbyid) | **Get** /orchestrator/nodes/{node_id}/groups | List Node Groups by id +*OrchestratorNodeGroupsAPI* | [**RemoveNodeGroup**](docs/OrchestratorNodeGroupsAPI.md#removenodegroup) | **Delete** /orchestrator/nodes/groups/{group_id} | Remove Node Group +*OrchestratorNodeServicesAPI* | [**BindNodeServices**](docs/OrchestratorNodeServicesAPI.md#bindnodeservices) | **Post** /orchestrator/nodes/{node_id}/services | Bind Node Service +*OrchestratorNodeServicesAPI* | [**ListNodeServices**](docs/OrchestratorNodeServicesAPI.md#listnodeservices) | **Get** /orchestrator/nodes/{node_id}/services | List Node Services +*OrchestratorNodeServicesAPI* | [**RetrieveNodeServiceBind**](docs/OrchestratorNodeServicesAPI.md#retrievenodeservicebind) | **Get** /orchestrator/nodes/{node_id}/services/{bind_id} | Retrieve details of an Node Service Bind +*OrchestratorNodeServicesAPI* | [**UnbindNodeService**](docs/OrchestratorNodeServicesAPI.md#unbindnodeservice) | **Delete** /orchestrator/nodes/{node_id}/services/{bind_id} | Unbind Node Service +*OrchestratorNodesAPI* | [**DeleteNode**](docs/OrchestratorNodesAPI.md#deletenode) | **Delete** /orchestrator/nodes/{node_id} | Delete an Node +*OrchestratorNodesAPI* | [**ListNodes**](docs/OrchestratorNodesAPI.md#listnodes) | **Get** /orchestrator/nodes | List Nodes +*OrchestratorNodesAPI* | [**PartialUpdateNode**](docs/OrchestratorNodesAPI.md#partialupdatenode) | **Patch** /orchestrator/nodes/{node_id} | Partially update an Node +*OrchestratorNodesAPI* | [**PartialUpdateNode2**](docs/OrchestratorNodesAPI.md#partialupdatenode2) | **Patch** /orchestrator/nodes/{node_id}/ | Partially update an Node +*OrchestratorNodesAPI* | [**RetrieveNode**](docs/OrchestratorNodesAPI.md#retrievenode) | **Get** /orchestrator/nodes/{node_id} | Retrieve details of an Node +*OrchestratorNodesAPI* | [**RetrieveNode2**](docs/OrchestratorNodesAPI.md#retrievenode2) | **Get** /orchestrator/nodes/{node_id}/ | Retrieve details of an Node +*OrchestratorNodesAPI* | [**UpdateNode**](docs/OrchestratorNodesAPI.md#updatenode) | **Put** /orchestrator/nodes/{node_id} | Update an Node +*OrchestratorNodesAPI* | [**UpdateNode2**](docs/OrchestratorNodesAPI.md#updatenode2) | **Put** /orchestrator/nodes/{node_id}/ | Update an Node +*OrchestratorServiceResourcesAPI* | [**CreateResource**](docs/OrchestratorServiceResourcesAPI.md#createresource) | **Post** /orchestrator/services/{service_id}/resources | Create Service Resource +*OrchestratorServiceResourcesAPI* | [**DeleteResource**](docs/OrchestratorServiceResourcesAPI.md#deleteresource) | **Delete** /orchestrator/services/{service_id}/resources/{resource_id} | Delete Resource +*OrchestratorServiceResourcesAPI* | [**ListResourcesOfAService**](docs/OrchestratorServiceResourcesAPI.md#listresourcesofaservice) | **Get** /orchestrator/services/{service_id}/resources | List Service Resources +*OrchestratorServiceResourcesAPI* | [**RetrieveResource**](docs/OrchestratorServiceResourcesAPI.md#retrieveresource) | **Get** /orchestrator/services/{service_id}/resources/{resource_id} | Retrieve details of a Resource +*OrchestratorServiceResourcesAPI* | [**RetrieveResourceContent**](docs/OrchestratorServiceResourcesAPI.md#retrieveresourcecontent) | **Get** /orchestrator/services/{service_id}/resources/{resource_id}/content | Retrieve content of a Resource +*OrchestratorServiceResourcesAPI* | [**UpdateResource**](docs/OrchestratorServiceResourcesAPI.md#updateresource) | **Put** /orchestrator/services/{service_id}/resources/{resource_id} | Update Resource +*OrchestratorServiceResourcesAPI* | [**UploadResourceContent**](docs/OrchestratorServiceResourcesAPI.md#uploadresourcecontent) | **Put** /orchestrator/services/{service_id}/resources/{resource_id}/content | Upload content of a Resource +*OrchestratorServicesAPI* | [**CreateService**](docs/OrchestratorServicesAPI.md#createservice) | **Post** /orchestrator/services | Create Service +*OrchestratorServicesAPI* | [**DestroyService**](docs/OrchestratorServicesAPI.md#destroyservice) | **Delete** /orchestrator/services/{service_id} | Destroy an Service +*OrchestratorServicesAPI* | [**ListServices**](docs/OrchestratorServicesAPI.md#listservices) | **Get** /orchestrator/services | List Services +*OrchestratorServicesAPI* | [**PartialUpdateService**](docs/OrchestratorServicesAPI.md#partialupdateservice) | **Patch** /orchestrator/services/{service_id} | Partially update an Service +*OrchestratorServicesAPI* | [**RetrieveService**](docs/OrchestratorServicesAPI.md#retrieveservice) | **Get** /orchestrator/services/{service_id} | Retrieve details of an Service +*OrchestratorServicesAPI* | [**UpdateService**](docs/OrchestratorServicesAPI.md#updateservice) | **Put** /orchestrator/services/{service_id} | Update an Service +*PolicyLockoutPolicyAPI* | [**RetrieveLockoutPolicy**](docs/PolicyLockoutPolicyAPI.md#retrievelockoutpolicy) | **Get** /auth/policies/lockout | Get Lockout Policy +*PolicyLockoutPolicyAPI* | [**UpdateLockoutPolicy**](docs/PolicyLockoutPolicyAPI.md#updatelockoutpolicy) | **Put** /auth/policies/lockout | Put Lockout Policy +*PolicyPoliciesAPI* | [**CreatePolicy**](docs/PolicyPoliciesAPI.md#createpolicy) | **Post** /auth/policies | Create a new policy +*PolicyPoliciesAPI* | [**DeletePolicy**](docs/PolicyPoliciesAPI.md#deletepolicy) | **Delete** /auth/policies/{policy_id} | Delete a policy +*PolicyPoliciesAPI* | [**ListPolicy**](docs/PolicyPoliciesAPI.md#listpolicy) | **Get** /auth/policies | List of account policies +*PolicyPoliciesAPI* | [**PartialUpdatePolicy**](docs/PolicyPoliciesAPI.md#partialupdatepolicy) | **Patch** /auth/policies/{policy_id} | Partially update a policy +*PolicyPoliciesAPI* | [**RetrievePolicy**](docs/PolicyPoliciesAPI.md#retrievepolicy) | **Get** /auth/policies/{policy_id} | Retrieve details from a policy +*PolicyPoliciesAPI* | [**UpdatePolicy**](docs/PolicyPoliciesAPI.md#updatepolicy) | **Put** /auth/policies/{policy_id} | Update a policy +*PolicySessionTimeoutPolicyAPI* | [**RetrieveSessionTimeoutPolicy**](docs/PolicySessionTimeoutPolicyAPI.md#retrievesessiontimeoutpolicy) | **Get** /auth/policies/session | Get Session Timeout Policy +*PolicySessionTimeoutPolicyAPI* | [**UpdateSessionTimeoutPolicy**](docs/PolicySessionTimeoutPolicyAPI.md#updatesessiontimeoutpolicy) | **Put** /auth/policies/session | Put Session Timeout Policy +*PublisherManagementAPI* | [**GetPublisherDetails**](docs/PublisherManagementAPI.md#getpublisherdetails) | **Get** /marketplace/publisher | Get publisher details +*PublisherManagementAPI* | [**UpdatePublisherDetails**](docs/PublisherManagementAPI.md#updatepublisherdetails) | **Put** /marketplace/publisher | Update publisher details +*PurgeAPI* | [**CreatePurgeRequest**](docs/PurgeAPI.md#createpurgerequest) | **Post** /workspace/purge/{purge_type} | Create a Purge Request +*SQLAPI* | [**CreateDatabase**](docs/SQLAPI.md#createdatabase) | **Post** /workspace/sql/databases | Create a database +*SQLAPI* | [**DeleteDatabase**](docs/SQLAPI.md#deletedatabase) | **Delete** /workspace/sql/databases/{database_id} | Delete a database +*SQLAPI* | [**ExecuteQuery**](docs/SQLAPI.md#executequery) | **Post** /workspace/sql/databases/{database_id}/query | Execute a query into a database +*SQLAPI* | [**ListDatabases**](docs/SQLAPI.md#listdatabases) | **Get** /workspace/sql/databases | List databases +*SQLAPI* | [**RetrieveDatabase**](docs/SQLAPI.md#retrievedatabase) | **Get** /workspace/sql/databases/{database_id} | Retrieve details from a database +*StorageBucketsAPI* | [**CreateBucket**](docs/StorageBucketsAPI.md#createbucket) | **Post** /workspace/storage/buckets | Create a new bucket +*StorageBucketsAPI* | [**DeleteBucket**](docs/StorageBucketsAPI.md#deletebucket) | **Delete** /workspace/storage/buckets/{bucket_name} | Delete a bucket +*StorageBucketsAPI* | [**ListBuckets**](docs/StorageBucketsAPI.md#listbuckets) | **Get** /workspace/storage/buckets | List buckets +*StorageBucketsAPI* | [**RetrieveBucket**](docs/StorageBucketsAPI.md#retrievebucket) | **Get** /workspace/storage/buckets/{bucket_name} | Retrieve a bucket +*StorageBucketsAPI* | [**UpdateBucket**](docs/StorageBucketsAPI.md#updatebucket) | **Patch** /workspace/storage/buckets/{bucket_name} | Update bucket info +*StorageCredentialsAPI* | [**CreateCredential**](docs/StorageCredentialsAPI.md#createcredential) | **Post** /workspace/storage/credentials | Create a new credential +*StorageCredentialsAPI* | [**DeleteCredential**](docs/StorageCredentialsAPI.md#deletecredential) | **Delete** /workspace/storage/credentials/{credential_id} | Delete a credential +*StorageCredentialsAPI* | [**ListCredentials**](docs/StorageCredentialsAPI.md#listcredentials) | **Get** /workspace/storage/credentials | List credentials +*StorageCredentialsAPI* | [**RetrieveCredential**](docs/StorageCredentialsAPI.md#retrievecredential) | **Get** /workspace/storage/credentials/{credential_id} | Retrieve details from a credential +*StorageObjectsAPI* | [**CopyObjectKey**](docs/StorageObjectsAPI.md#copyobjectkey) | **Post** /workspace/storage/buckets/{bucket_name}/objects/{object_key}/copy/{new_object_key} | Copy object to new key +*StorageObjectsAPI* | [**CreateObjectKey**](docs/StorageObjectsAPI.md#createobjectkey) | **Post** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Create new object key. +*StorageObjectsAPI* | [**DeleteObjectKey**](docs/StorageObjectsAPI.md#deleteobjectkey) | **Delete** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Delete object key +*StorageObjectsAPI* | [**DownloadObject**](docs/StorageObjectsAPI.md#downloadobject) | **Get** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Download object +*StorageObjectsAPI* | [**ListObjects**](docs/StorageObjectsAPI.md#listobjects) | **Get** /workspace/storage/buckets/{bucket_name}/objects | List objects from bucket +*StorageObjectsAPI* | [**UpdateObjectKey**](docs/StorageObjectsAPI.md#updateobjectkey) | **Put** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Update the object key. +*UsersLockoutAPI* | [**DestroyLockoutUser**](docs/UsersLockoutAPI.md#destroylockoutuser) | **Delete** /identity/users/{user_id}/lockout | Unlock user +*VCSContinuousDeploymentExecutionsAPI* | [**CreateExecution**](docs/VCSContinuousDeploymentExecutionsAPI.md#createexecution) | **Post** /vcs/continuous_deployments/{continuous_deployment_id}/executions | Create a execution +*VCSContinuousDeploymentExecutionsAPI* | [**ListExecutions**](docs/VCSContinuousDeploymentExecutionsAPI.md#listexecutions) | **Get** /vcs/continuous_deployments/{continuous_deployment_id}/executions | List executions +*VCSContinuousDeploymentExecutorAPI* | [**RetrieveExecutor**](docs/VCSContinuousDeploymentExecutorAPI.md#retrieveexecutor) | **Get** /vcs/continuous_deployments/{continuous_deployment_id}/executor | Retrieve details from a executor +*VCSContinuousDeploymentExecutorAPI* | [**UpdateExecutor**](docs/VCSContinuousDeploymentExecutorAPI.md#updateexecutor) | **Put** /vcs/continuous_deployments/{continuous_deployment_id}/executor | Update a executor +*VCSContinuousDeploymentsAPI* | [**CreateContinuousDeployment**](docs/VCSContinuousDeploymentsAPI.md#createcontinuousdeployment) | **Post** /vcs/continuous_deployments | Create a continuous deployment +*VCSContinuousDeploymentsAPI* | [**DeleteContinuousDeployment**](docs/VCSContinuousDeploymentsAPI.md#deletecontinuousdeployment) | **Delete** /vcs/continuous_deployments/{continuous_deployment_id} | Delete a continuous deployment +*VCSContinuousDeploymentsAPI* | [**ListContinuousDeployments**](docs/VCSContinuousDeploymentsAPI.md#listcontinuousdeployments) | **Get** /vcs/continuous_deployments | List continuous deployments +*VCSContinuousDeploymentsAPI* | [**PartialUpdateContinuousDeployment**](docs/VCSContinuousDeploymentsAPI.md#partialupdatecontinuousdeployment) | **Patch** /vcs/continuous_deployments/{continuous_deployment_id} | Partialy update a continuous deployment +*VCSContinuousDeploymentsAPI* | [**RetrieveContinuousDeployment**](docs/VCSContinuousDeploymentsAPI.md#retrievecontinuousdeployment) | **Get** /vcs/continuous_deployments/{continuous_deployment_id} | Retrieve details from a continuous deployment +*VCSContinuousDeploymentsAPI* | [**UpdateContinuousDeployment**](docs/VCSContinuousDeploymentsAPI.md#updatecontinuousdeployment) | **Put** /vcs/continuous_deployments/{continuous_deployment_id} | Update a continuous deployment +*VCSExecutionScriptsAPI* | [**ListExecutionScripts**](docs/VCSExecutionScriptsAPI.md#listexecutionscripts) | **Get** /vcs/execution_scripts | List execution scripts +*VCSExecutionScriptsAPI* | [**RetrieveExecutionScript**](docs/VCSExecutionScriptsAPI.md#retrieveexecutionscript) | **Get** /vcs/execution_scripts/{execution_script_id} | Retrieve details from a execution script +*VCSIntegrationsAPI* | [**DeleteIntegration**](docs/VCSIntegrationsAPI.md#deleteintegration) | **Delete** /vcs/integrations/{integration_id} | Delete an integration +*VCSIntegrationsAPI* | [**ListIntegrations**](docs/VCSIntegrationsAPI.md#listintegrations) | **Get** /vcs/integrations | List integrations +*VCSIntegrationsAPI* | [**ListRepositories**](docs/VCSIntegrationsAPI.md#listrepositories) | **Get** /vcs/integrations/{integration_id}/repositories | List integration repositories. +*VCSIntegrationsAPI* | [**RetrieveIntegration**](docs/VCSIntegrationsAPI.md#retrieveintegration) | **Get** /vcs/integrations/{integration_id} | Retrieve details from a integration +*VCSProvidersAPI* | [**ListProviders**](docs/VCSProvidersAPI.md#listproviders) | **Get** /vcs/providers | List providers +*WAFsAPI* | [**CloneWaf**](docs/WAFsAPI.md#clonewaf) | **Post** /workspace/wafs/{waf_id}/clone | Clone a Web Application Firewall (WAF) +*WAFsAPI* | [**CreateWaf**](docs/WAFsAPI.md#createwaf) | **Post** /workspace/wafs | Create a Web Application Firewall (WAF) +*WAFsAPI* | [**DeleteWaf**](docs/WAFsAPI.md#deletewaf) | **Delete** /workspace/wafs/{waf_id} | Delete a Web Application Firewall (WAF) +*WAFsAPI* | [**ListWafs**](docs/WAFsAPI.md#listwafs) | **Get** /workspace/wafs | List Web Application Firewalls (WAFs) +*WAFsAPI* | [**PartialUpdateWaf**](docs/WAFsAPI.md#partialupdatewaf) | **Patch** /workspace/wafs/{waf_id} | Partially update a Web Application Firewall (WAF) +*WAFsAPI* | [**RetrieveWaf**](docs/WAFsAPI.md#retrievewaf) | **Get** /workspace/wafs/{waf_id} | Retrieve details from a Web Application Firewall (WAF) +*WAFsAPI* | [**UpdateWaf**](docs/WAFsAPI.md#updatewaf) | **Put** /workspace/wafs/{waf_id} | Update a Web Application Firewall (WAF) +*WAFsExceptionsAPI* | [**CreateWafException**](docs/WAFsExceptionsAPI.md#createwafexception) | **Post** /workspace/wafs/{waf_id}/exceptions | Create an Exception for a Web Application Firewall (WAF) +*WAFsExceptionsAPI* | [**DeleteWafException**](docs/WAFsExceptionsAPI.md#deletewafexception) | **Delete** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Delete an Exception from a Web Application Firewall (WAF) +*WAFsExceptionsAPI* | [**ListWafExceptions**](docs/WAFsExceptionsAPI.md#listwafexceptions) | **Get** /workspace/wafs/{waf_id}/exceptions | List Exceptions for a Web Application Firewall (WAF) +*WAFsExceptionsAPI* | [**PartialUpdateWafException**](docs/WAFsExceptionsAPI.md#partialupdatewafexception) | **Patch** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Partially update an Exception for a Web Application Firewall (WAF) +*WAFsExceptionsAPI* | [**RetrieveWafException**](docs/WAFsExceptionsAPI.md#retrievewafexception) | **Get** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Retrieve details of an Exception from a Web Application Firewall (WAF) +*WAFsExceptionsAPI* | [**UpdateWafException**](docs/WAFsExceptionsAPI.md#updatewafexception) | **Put** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Update an Exception for a Web Application Firewall (WAF) +*WorkloadDeploymentsAPI* | [**CreateWorkloadDeployment**](docs/WorkloadDeploymentsAPI.md#createworkloaddeployment) | **Post** /workspace/workloads/{workload_id}/deployments | Create a Workload Deployment +*WorkloadDeploymentsAPI* | [**DeleteWorkloadDeployment**](docs/WorkloadDeploymentsAPI.md#deleteworkloaddeployment) | **Delete** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Delete a Workload Deployment +*WorkloadDeploymentsAPI* | [**ListWorkloadDeployments**](docs/WorkloadDeploymentsAPI.md#listworkloaddeployments) | **Get** /workspace/workloads/{workload_id}/deployments | List Workload Deployments +*WorkloadDeploymentsAPI* | [**PartialUpdateWorkloadDeployment**](docs/WorkloadDeploymentsAPI.md#partialupdateworkloaddeployment) | **Patch** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Partially update a Workload Deployment +*WorkloadDeploymentsAPI* | [**RetrieveWorkloadDeployment**](docs/WorkloadDeploymentsAPI.md#retrieveworkloaddeployment) | **Get** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Retrieve details of a Workload Deployment +*WorkloadDeploymentsAPI* | [**UpdateWorkloadDeployment**](docs/WorkloadDeploymentsAPI.md#updateworkloaddeployment) | **Put** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Update a Workload Deployment +*WorkloadsAPI* | [**CreateWorkload**](docs/WorkloadsAPI.md#createworkload) | **Post** /workspace/workloads | Create an Workload +*WorkloadsAPI* | [**DeleteWorkload**](docs/WorkloadsAPI.md#deleteworkload) | **Delete** /workspace/workloads/{workload_id} | Delete an Workload +*WorkloadsAPI* | [**ListWorkloads**](docs/WorkloadsAPI.md#listworkloads) | **Get** /workspace/workloads | List Workloads +*WorkloadsAPI* | [**PartialUpdateWorkload**](docs/WorkloadsAPI.md#partialupdateworkload) | **Patch** /workspace/workloads/{workload_id} | Partially update an Workload +*WorkloadsAPI* | [**RetrieveWorkload**](docs/WorkloadsAPI.md#retrieveworkload) | **Get** /workspace/workloads/{workload_id} | Retrieve details of an Workload +*WorkloadsAPI* | [**UpdateWorkload**](docs/WorkloadsAPI.md#updateworkload) | **Put** /workspace/workloads/{workload_id} | Update an Workload + + +## Documentation For Models + + - [AWS4HMAC](docs/AWS4HMAC.md) + - [AWS4HMACAttributes](docs/AWS4HMACAttributes.md) + - [AWS4HMACAttributesRequest](docs/AWS4HMACAttributesRequest.md) + - [AWS4HMACRequest](docs/AWS4HMACRequest.md) + - [AWSKinesisFirehoseEndpoint](docs/AWSKinesisFirehoseEndpoint.md) + - [AWSKinesisFirehoseEndpointRequest](docs/AWSKinesisFirehoseEndpointRequest.md) + - [Account](docs/Account.md) + - [AccountInfo](docs/AccountInfo.md) + - [AccountInfoRequest](docs/AccountInfoRequest.md) + - [AccountRequest](docs/AccountRequest.md) + - [Address](docs/Address.md) + - [AddressLoadBalancerModule](docs/AddressLoadBalancerModule.md) + - [AddressLoadBalancerModuleRequest](docs/AddressLoadBalancerModuleRequest.md) + - [AddressModules](docs/AddressModules.md) + - [AddressModulesRequest](docs/AddressModulesRequest.md) + - [AddressRequest](docs/AddressRequest.md) + - [AggregatedField](docs/AggregatedField.md) + - [AggregatedFieldRequest](docs/AggregatedFieldRequest.md) + - [AlgType](docs/AlgType.md) + - [Application](docs/Application.md) + - [ApplicationAcceleratorModule](docs/ApplicationAcceleratorModule.md) + - [ApplicationAcceleratorModuleRequest](docs/ApplicationAcceleratorModuleRequest.md) + - [ApplicationCriterionArgument](docs/ApplicationCriterionArgument.md) + - [ApplicationCriterionArgumentRequest](docs/ApplicationCriterionArgumentRequest.md) + - [ApplicationCriterionField](docs/ApplicationCriterionField.md) + - [ApplicationCriterionFieldRequest](docs/ApplicationCriterionFieldRequest.md) + - [ApplicationModules](docs/ApplicationModules.md) + - [ApplicationModulesRequest](docs/ApplicationModulesRequest.md) + - [ApplicationRequest](docs/ApplicationRequest.md) + - [ApplicationRequestPhaseRuleEngineOrder](docs/ApplicationRequestPhaseRuleEngineOrder.md) + - [ApplicationResponse](docs/ApplicationResponse.md) + - [ApplicationResponsePhaseRuleEngineOrderRequest](docs/ApplicationResponsePhaseRuleEngineOrderRequest.md) + - [AzureBlobStorageEndpoint](docs/AzureBlobStorageEndpoint.md) + - [AzureBlobStorageEndpointRequest](docs/AzureBlobStorageEndpointRequest.md) + - [AzureMonitorEndpoint](docs/AzureMonitorEndpoint.md) + - [AzureMonitorEndpointRequest](docs/AzureMonitorEndpointRequest.md) + - [BaseQuery](docs/BaseQuery.md) + - [BaseQueryRequest](docs/BaseQueryRequest.md) + - [BehaviorArgs](docs/BehaviorArgs.md) + - [BehaviorArgsAttributes](docs/BehaviorArgsAttributes.md) + - [BehaviorArgsAttributesValue](docs/BehaviorArgsAttributesValue.md) + - [BehaviorCapture](docs/BehaviorCapture.md) + - [BehaviorCaptureMatchGroupsAttributes](docs/BehaviorCaptureMatchGroupsAttributes.md) + - [BehaviorNoArgs](docs/BehaviorNoArgs.md) + - [BigQueryEndpoint](docs/BigQueryEndpoint.md) + - [BigQueryEndpointRequest](docs/BigQueryEndpointRequest.md) + - [Brand](docs/Brand.md) + - [BrandRequest](docs/BrandRequest.md) + - [BrowserCacheModule](docs/BrowserCacheModule.md) + - [BrowserCacheModuleRequest](docs/BrowserCacheModuleRequest.md) + - [Bucket](docs/Bucket.md) + - [BucketCreate](docs/BucketCreate.md) + - [BucketCreateRequest](docs/BucketCreateRequest.md) + - [BucketCreateResponse](docs/BucketCreateResponse.md) + - [BucketObject](docs/BucketObject.md) + - [BuildContextField](docs/BuildContextField.md) + - [BuildContextFieldRequest](docs/BuildContextFieldRequest.md) + - [CacheModule](docs/CacheModule.md) + - [CacheModuleRequest](docs/CacheModuleRequest.md) + - [CacheSetting](docs/CacheSetting.md) + - [CacheSettingRequest](docs/CacheSettingRequest.md) + - [CacheSettingResponse](docs/CacheSettingResponse.md) + - [CacheSettingsApplicationAcceleratorModule](docs/CacheSettingsApplicationAcceleratorModule.md) + - [CacheSettingsApplicationAcceleratorModuleRequest](docs/CacheSettingsApplicationAcceleratorModuleRequest.md) + - [CacheSettingsCacheModule](docs/CacheSettingsCacheModule.md) + - [CacheSettingsCacheModuleRequest](docs/CacheSettingsCacheModuleRequest.md) + - [CacheSettingsModules](docs/CacheSettingsModules.md) + - [CacheSettingsModulesRequest](docs/CacheSettingsModulesRequest.md) + - [CacheSettingsTieredCacheModule](docs/CacheSettingsTieredCacheModule.md) + - [CacheSettingsTieredCacheModuleRequest](docs/CacheSettingsTieredCacheModuleRequest.md) + - [CacheVaryByCookiesModule](docs/CacheVaryByCookiesModule.md) + - [CacheVaryByCookiesModuleRequest](docs/CacheVaryByCookiesModuleRequest.md) + - [CacheVaryByDevicesModule](docs/CacheVaryByDevicesModule.md) + - [CacheVaryByDevicesModuleRequest](docs/CacheVaryByDevicesModuleRequest.md) + - [CacheVaryByQuerystringModule](docs/CacheVaryByQuerystringModule.md) + - [CacheVaryByQuerystringModuleRequest](docs/CacheVaryByQuerystringModuleRequest.md) + - [Certificate](docs/Certificate.md) + - [CertificateRequest](docs/CertificateRequest.md) + - [CertificateResponse](docs/CertificateResponse.md) + - [CertificateRevocationList](docs/CertificateRevocationList.md) + - [CertificateRevocationListResponse](docs/CertificateRevocationListResponse.md) + - [CertificateSigningRequest](docs/CertificateSigningRequest.md) + - [ChatThread](docs/ChatThread.md) + - [ChatThreadRequest](docs/ChatThreadRequest.md) + - [Chunk](docs/Chunk.md) + - [CloneApplicationRequest](docs/CloneApplicationRequest.md) + - [CloneFirewallRequest](docs/CloneFirewallRequest.md) + - [CloneWAFRequest](docs/CloneWAFRequest.md) + - [Connector](docs/Connector.md) + - [Connector2](docs/Connector2.md) + - [ConnectorHTTP](docs/ConnectorHTTP.md) + - [ConnectorHTTPAttributes](docs/ConnectorHTTPAttributes.md) + - [ConnectorHTTPAttributesRequest](docs/ConnectorHTTPAttributesRequest.md) + - [ConnectorHTTPRequest](docs/ConnectorHTTPRequest.md) + - [ConnectorRequest](docs/ConnectorRequest.md) + - [ConnectorRequest2](docs/ConnectorRequest2.md) + - [ConnectorResponse](docs/ConnectorResponse.md) + - [ConnectorStorageAttributes](docs/ConnectorStorageAttributes.md) + - [ConnectorStorageAttributesRequest](docs/ConnectorStorageAttributesRequest.md) + - [Content](docs/Content.md) + - [ContentRequest](docs/ContentRequest.md) + - [ContinuousDeployment](docs/ContinuousDeployment.md) + - [ContinuousDeploymentRequest](docs/ContinuousDeploymentRequest.md) + - [CreateAccountRequest](docs/CreateAccountRequest.md) + - [CreateBrandRequest](docs/CreateBrandRequest.md) + - [CreateOrganizationRequest](docs/CreateOrganizationRequest.md) + - [CreateResellerRequest](docs/CreateResellerRequest.md) + - [CreateWorkspaceRequest](docs/CreateWorkspaceRequest.md) + - [Credential](docs/Credential.md) + - [CredentialCreateRequest](docs/CredentialCreateRequest.md) + - [CredentialResponse](docs/CredentialResponse.md) + - [Credit](docs/Credit.md) + - [CreditRequest](docs/CreditRequest.md) + - [CustomPage](docs/CustomPage.md) + - [CustomPageRequest](docs/CustomPageRequest.md) + - [CustomPageResponse](docs/CustomPageResponse.md) + - [DNSSEC](docs/DNSSEC.md) + - [DNSSECRequest](docs/DNSSECRequest.md) + - [DNSSECResponse](docs/DNSSECResponse.md) + - [Dashboard](docs/Dashboard.md) + - [DashboardRequest](docs/DashboardRequest.md) + - [DataSource](docs/DataSource.md) + - [DataStream](docs/DataStream.md) + - [DataStreamRequest](docs/DataStreamRequest.md) + - [DataStreamResponse](docs/DataStreamResponse.md) + - [DatabaseDetail](docs/DatabaseDetail.md) + - [DatabaseDetailResponse](docs/DatabaseDetailResponse.md) + - [DatabaseRequest](docs/DatabaseRequest.md) + - [DatadogEndpoint](docs/DatadogEndpoint.md) + - [DatadogEndpointRequest](docs/DatadogEndpointRequest.md) + - [DefaultDeploymentStrategy](docs/DefaultDeploymentStrategy.md) + - [DefaultDeploymentStrategyAttrs](docs/DefaultDeploymentStrategyAttrs.md) + - [DefaultDeploymentStrategyAttrsRequest](docs/DefaultDeploymentStrategyAttrsRequest.md) + - [DefaultDeploymentStrategyRequest](docs/DefaultDeploymentStrategyRequest.md) + - [DelegationSigner](docs/DelegationSigner.md) + - [DeleteResponse](docs/DeleteResponse.md) + - [DeploymentStrategyDefaultDeploymentStrategy](docs/DeploymentStrategyDefaultDeploymentStrategy.md) + - [DeploymentStrategyDefaultDeploymentStrategyRequest](docs/DeploymentStrategyDefaultDeploymentStrategyRequest.md) + - [DeploymentStrategyShared](docs/DeploymentStrategyShared.md) + - [DeviceGroup](docs/DeviceGroup.md) + - [DeviceGroupRequest](docs/DeviceGroupRequest.md) + - [DeviceGroupResponse](docs/DeviceGroupResponse.md) + - [Document](docs/Document.md) + - [DocumentRequest](docs/DocumentRequest.md) + - [ElasticsearchEndpoint](docs/ElasticsearchEndpoint.md) + - [ElasticsearchEndpointRequest](docs/ElasticsearchEndpointRequest.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [Execution](docs/Execution.md) + - [ExecutionScript](docs/ExecutionScript.md) + - [Executor](docs/Executor.md) + - [Favorite](docs/Favorite.md) + - [FavoriteRequest](docs/FavoriteRequest.md) + - [Firewall](docs/Firewall.md) + - [FirewallBehavior](docs/FirewallBehavior.md) + - [FirewallBehaviorNoArgs](docs/FirewallBehaviorNoArgs.md) + - [FirewallBehaviorNoArgsRequest](docs/FirewallBehaviorNoArgsRequest.md) + - [FirewallBehaviorRequest](docs/FirewallBehaviorRequest.md) + - [FirewallBehaviorRunFunction](docs/FirewallBehaviorRunFunction.md) + - [FirewallBehaviorRunFunctionAttributes](docs/FirewallBehaviorRunFunctionAttributes.md) + - [FirewallBehaviorRunFunctionAttributesRequest](docs/FirewallBehaviorRunFunctionAttributesRequest.md) + - [FirewallBehaviorRunFunctionRequest](docs/FirewallBehaviorRunFunctionRequest.md) + - [FirewallBehaviorSetCustomResponse](docs/FirewallBehaviorSetCustomResponse.md) + - [FirewallBehaviorSetCustomResponseAttributes](docs/FirewallBehaviorSetCustomResponseAttributes.md) + - [FirewallBehaviorSetCustomResponseAttributesRequest](docs/FirewallBehaviorSetCustomResponseAttributesRequest.md) + - [FirewallBehaviorSetCustomResponseRequest](docs/FirewallBehaviorSetCustomResponseRequest.md) + - [FirewallBehaviorSetRateLimit](docs/FirewallBehaviorSetRateLimit.md) + - [FirewallBehaviorSetRateLimitAttributes](docs/FirewallBehaviorSetRateLimitAttributes.md) + - [FirewallBehaviorSetRateLimitAttributesRequest](docs/FirewallBehaviorSetRateLimitAttributesRequest.md) + - [FirewallBehaviorSetRateLimitRequest](docs/FirewallBehaviorSetRateLimitRequest.md) + - [FirewallBehaviorSetWaf](docs/FirewallBehaviorSetWaf.md) + - [FirewallBehaviorSetWafAttributes](docs/FirewallBehaviorSetWafAttributes.md) + - [FirewallBehaviorSetWafAttributesRequest](docs/FirewallBehaviorSetWafAttributesRequest.md) + - [FirewallBehaviorSetWafRequest](docs/FirewallBehaviorSetWafRequest.md) + - [FirewallCriterionArgument](docs/FirewallCriterionArgument.md) + - [FirewallCriterionArgumentRequest](docs/FirewallCriterionArgumentRequest.md) + - [FirewallCriterionField](docs/FirewallCriterionField.md) + - [FirewallCriterionFieldRequest](docs/FirewallCriterionFieldRequest.md) + - [FirewallFunctionInstance](docs/FirewallFunctionInstance.md) + - [FirewallFunctionInstanceRequest](docs/FirewallFunctionInstanceRequest.md) + - [FirewallFunctionInstanceResponse](docs/FirewallFunctionInstanceResponse.md) + - [FirewallModule](docs/FirewallModule.md) + - [FirewallModuleRequest](docs/FirewallModuleRequest.md) + - [FirewallModules](docs/FirewallModules.md) + - [FirewallModulesRequest](docs/FirewallModulesRequest.md) + - [FirewallRequest](docs/FirewallRequest.md) + - [FirewallResponse](docs/FirewallResponse.md) + - [FirewallRule](docs/FirewallRule.md) + - [FirewallRuleEngineOrderRequest](docs/FirewallRuleEngineOrderRequest.md) + - [FirewallRuleRequest](docs/FirewallRuleRequest.md) + - [FirewallRuleResponse](docs/FirewallRuleResponse.md) + - [Folder](docs/Folder.md) + - [FolderRequest](docs/FolderRequest.md) + - [FunctionInstance](docs/FunctionInstance.md) + - [FunctionInstanceRequest](docs/FunctionInstanceRequest.md) + - [FunctionInstanceResponse](docs/FunctionInstanceResponse.md) + - [FunctionModule](docs/FunctionModule.md) + - [FunctionModuleRequest](docs/FunctionModuleRequest.md) + - [FunctionResponse](docs/FunctionResponse.md) + - [Functions](docs/Functions.md) + - [FunctionsAzionForm](docs/FunctionsAzionForm.md) + - [FunctionsRequest](docs/FunctionsRequest.md) + - [Grant](docs/Grant.md) + - [GrantRequest](docs/GrantRequest.md) + - [Group](docs/Group.md) + - [GroupMembers](docs/GroupMembers.md) + - [GroupMembersRequest](docs/GroupMembersRequest.md) + - [GroupRequest](docs/GroupRequest.md) + - [HMAC](docs/HMAC.md) + - [HMACRequest](docs/HMACRequest.md) + - [HTTPConnectionOptions](docs/HTTPConnectionOptions.md) + - [HTTPConnectionOptionsRequest](docs/HTTPConnectionOptionsRequest.md) + - [HTTPModules](docs/HTTPModules.md) + - [HTTPModulesRequest](docs/HTTPModulesRequest.md) + - [HttpPostEndpoint](docs/HttpPostEndpoint.md) + - [HttpPostEndpointRequest](docs/HttpPostEndpointRequest.md) + - [HttpProtocol](docs/HttpProtocol.md) + - [HttpProtocolRequest](docs/HttpProtocolRequest.md) + - [ImageProcessorModule](docs/ImageProcessorModule.md) + - [ImageProcessorModuleRequest](docs/ImageProcessorModuleRequest.md) + - [InputDataSource](docs/InputDataSource.md) + - [InputDataSourceAttributes](docs/InputDataSourceAttributes.md) + - [InputDataSourceAttributesRequest](docs/InputDataSourceAttributesRequest.md) + - [InputDataSourceRequest](docs/InputDataSourceRequest.md) + - [InputInputDataSourceAttributes](docs/InputInputDataSourceAttributes.md) + - [InputInputDataSourceAttributesRequest](docs/InputInputDataSourceAttributesRequest.md) + - [InputShared](docs/InputShared.md) + - [Integration](docs/Integration.md) + - [JSONAPIErrorObject](docs/JSONAPIErrorObject.md) + - [JSONAPIErrorSource](docs/JSONAPIErrorSource.md) + - [KBAskRequest](docs/KBAskRequest.md) + - [KBAskResponse](docs/KBAskResponse.md) + - [KBQueryRequest](docs/KBQueryRequest.md) + - [KBQueryResponse](docs/KBQueryResponse.md) + - [KBQueryResult](docs/KBQueryResult.md) + - [KafkaEndpoint](docs/KafkaEndpoint.md) + - [KafkaEndpointRequest](docs/KafkaEndpointRequest.md) + - [KnowledgeBase](docs/KnowledgeBase.md) + - [KnowledgeBaseRequest](docs/KnowledgeBaseRequest.md) + - [LargeFileCacheModule](docs/LargeFileCacheModule.md) + - [LargeFileCacheModuleRequest](docs/LargeFileCacheModuleRequest.md) + - [LibraryReportRequest](docs/LibraryReportRequest.md) + - [LoadBalancerModule](docs/LoadBalancerModule.md) + - [LoadBalancerModuleConfig](docs/LoadBalancerModuleConfig.md) + - [LoadBalancerModuleConfigRequest](docs/LoadBalancerModuleConfigRequest.md) + - [LoadBalancerModuleRequest](docs/LoadBalancerModuleRequest.md) + - [LockoutPolicy](docs/LockoutPolicy.md) + - [LockoutPolicyRequest](docs/LockoutPolicyRequest.md) + - [LockoutPolicyResponse](docs/LockoutPolicyResponse.md) + - [LoginRequest](docs/LoginRequest.md) + - [LoginResponse](docs/LoginResponse.md) + - [MFAToken](docs/MFAToken.md) + - [MTLS](docs/MTLS.md) + - [MTLSConfig](docs/MTLSConfig.md) + - [MTLSConfigRequest](docs/MTLSConfigRequest.md) + - [MTLSRequest](docs/MTLSRequest.md) + - [Message](docs/Message.md) + - [MessageRequest](docs/MessageRequest.md) + - [Namespace](docs/Namespace.md) + - [NamespaceCreateRequest](docs/NamespaceCreateRequest.md) + - [NamespaceList](docs/NamespaceList.md) + - [NetworkList](docs/NetworkList.md) + - [NetworkListRequest](docs/NetworkListRequest.md) + - [NetworkListResponse](docs/NetworkListResponse.md) + - [NetworkListSummary](docs/NetworkListSummary.md) + - [NodeGroups](docs/NodeGroups.md) + - [NodeGroupsById](docs/NodeGroupsById.md) + - [NodeGroupsByIdRequest](docs/NodeGroupsByIdRequest.md) + - [NodeGroupsRequest](docs/NodeGroupsRequest.md) + - [NodeServiceBind](docs/NodeServiceBind.md) + - [NodeServices](docs/NodeServices.md) + - [NodeServicesRequest](docs/NodeServicesRequest.md) + - [Nodes](docs/Nodes.md) + - [NodesRequest](docs/NodesRequest.md) + - [ObjectResponseAsyncData](docs/ObjectResponseAsyncData.md) + - [ObjectResponseData](docs/ObjectResponseData.md) + - [Order](docs/Order.md) + - [OrderRequest](docs/OrderRequest.md) + - [Organization](docs/Organization.md) + - [OrganizationRequest](docs/OrganizationRequest.md) + - [OriginIPACL](docs/OriginIPACL.md) + - [OriginIPACLRequest](docs/OriginIPACLRequest.md) + - [OriginShieldConfig](docs/OriginShieldConfig.md) + - [OriginShieldConfigRequest](docs/OriginShieldConfigRequest.md) + - [OriginShieldModule](docs/OriginShieldModule.md) + - [OriginShieldModuleRequest](docs/OriginShieldModuleRequest.md) + - [Output](docs/Output.md) + - [Output2](docs/Output2.md) + - [OutputRequest](docs/OutputRequest.md) + - [OutputRequest2](docs/OutputRequest2.md) + - [Page](docs/Page.md) + - [PageConnector](docs/PageConnector.md) + - [PageConnectorAttributes](docs/PageConnectorAttributes.md) + - [PageConnectorAttributesRequest](docs/PageConnectorAttributesRequest.md) + - [PageConnectorRequest](docs/PageConnectorRequest.md) + - [PageRequest](docs/PageRequest.md) + - [PaginatedAccountList](docs/PaginatedAccountList.md) + - [PaginatedApplicationList](docs/PaginatedApplicationList.md) + - [PaginatedBucketList](docs/PaginatedBucketList.md) + - [PaginatedCacheSettingList](docs/PaginatedCacheSettingList.md) + - [PaginatedCertificateList](docs/PaginatedCertificateList.md) + - [PaginatedCertificateRevocationList](docs/PaginatedCertificateRevocationList.md) + - [PaginatedChatThreadList](docs/PaginatedChatThreadList.md) + - [PaginatedChunkList](docs/PaginatedChunkList.md) + - [PaginatedConnectorList](docs/PaginatedConnectorList.md) + - [PaginatedContinuousDeploymentList](docs/PaginatedContinuousDeploymentList.md) + - [PaginatedCredentialList](docs/PaginatedCredentialList.md) + - [PaginatedCustomPageList](docs/PaginatedCustomPageList.md) + - [PaginatedDashboardList](docs/PaginatedDashboardList.md) + - [PaginatedDataSourceList](docs/PaginatedDataSourceList.md) + - [PaginatedDataStreamList](docs/PaginatedDataStreamList.md) + - [PaginatedDatabaseDetailList](docs/PaginatedDatabaseDetailList.md) + - [PaginatedDeviceGroupList](docs/PaginatedDeviceGroupList.md) + - [PaginatedDocumentList](docs/PaginatedDocumentList.md) + - [PaginatedExecutionList](docs/PaginatedExecutionList.md) + - [PaginatedExecutionScriptList](docs/PaginatedExecutionScriptList.md) + - [PaginatedFavoriteList](docs/PaginatedFavoriteList.md) + - [PaginatedFirewallFunctionInstanceList](docs/PaginatedFirewallFunctionInstanceList.md) + - [PaginatedFirewallList](docs/PaginatedFirewallList.md) + - [PaginatedFirewallRuleList](docs/PaginatedFirewallRuleList.md) + - [PaginatedFolderList](docs/PaginatedFolderList.md) + - [PaginatedFunctionInstanceList](docs/PaginatedFunctionInstanceList.md) + - [PaginatedFunctionsList](docs/PaginatedFunctionsList.md) + - [PaginatedGrantList](docs/PaginatedGrantList.md) + - [PaginatedGroupList](docs/PaginatedGroupList.md) + - [PaginatedIntegrationList](docs/PaginatedIntegrationList.md) + - [PaginatedKnowledgeBaseList](docs/PaginatedKnowledgeBaseList.md) + - [PaginatedMessageList](docs/PaginatedMessageList.md) + - [PaginatedNetworkListSummaryList](docs/PaginatedNetworkListSummaryList.md) + - [PaginatedNodeGroupsByIdList](docs/PaginatedNodeGroupsByIdList.md) + - [PaginatedNodeGroupsList](docs/PaginatedNodeGroupsList.md) + - [PaginatedNodeServicesList](docs/PaginatedNodeServicesList.md) + - [PaginatedNodesList](docs/PaginatedNodesList.md) + - [PaginatedPaymentHistoryList](docs/PaginatedPaymentHistoryList.md) + - [PaginatedPlatformList](docs/PaginatedPlatformList.md) + - [PaginatedPolicyList](docs/PaginatedPolicyList.md) + - [PaginatedRecordList](docs/PaginatedRecordList.md) + - [PaginatedReportList](docs/PaginatedReportList.md) + - [PaginatedRepositoryList](docs/PaginatedRepositoryList.md) + - [PaginatedRequestPhaseRuleList](docs/PaginatedRequestPhaseRuleList.md) + - [PaginatedResponsePaymentMethodList](docs/PaginatedResponsePaymentMethodList.md) + - [PaginatedResponsePhaseRuleList](docs/PaginatedResponsePhaseRuleList.md) + - [PaginatedRowList](docs/PaginatedRowList.md) + - [PaginatedServiceResourceList](docs/PaginatedServiceResourceList.md) + - [PaginatedServiceTokenList](docs/PaginatedServiceTokenList.md) + - [PaginatedServicesList](docs/PaginatedServicesList.md) + - [PaginatedTOTPDeviceList](docs/PaginatedTOTPDeviceList.md) + - [PaginatedTemplateList](docs/PaginatedTemplateList.md) + - [PaginatedToolList](docs/PaginatedToolList.md) + - [PaginatedUserList](docs/PaginatedUserList.md) + - [PaginatedWAFList](docs/PaginatedWAFList.md) + - [PaginatedWAFRuleList](docs/PaginatedWAFRuleList.md) + - [PaginatedWorkloadDeploymentList](docs/PaginatedWorkloadDeploymentList.md) + - [PaginatedWorkloadList](docs/PaginatedWorkloadList.md) + - [PaginatedZoneList](docs/PaginatedZoneList.md) + - [Pagination](docs/Pagination.md) + - [PatchContinuousDeploymentRequest](docs/PatchContinuousDeploymentRequest.md) + - [PatchedAccountRequest](docs/PatchedAccountRequest.md) + - [PatchedApplicationRequest](docs/PatchedApplicationRequest.md) + - [PatchedBrandRequest](docs/PatchedBrandRequest.md) + - [PatchedBucketRequest](docs/PatchedBucketRequest.md) + - [PatchedCacheSettingRequest](docs/PatchedCacheSettingRequest.md) + - [PatchedCertificate](docs/PatchedCertificate.md) + - [PatchedCertificateRevocationList](docs/PatchedCertificateRevocationList.md) + - [PatchedChatThreadRequest](docs/PatchedChatThreadRequest.md) + - [PatchedConnectorHTTPRequest](docs/PatchedConnectorHTTPRequest.md) + - [PatchedConnectorRequest](docs/PatchedConnectorRequest.md) + - [PatchedConnectorRequest2](docs/PatchedConnectorRequest2.md) + - [PatchedCustomPageRequest](docs/PatchedCustomPageRequest.md) + - [PatchedDNSSECRequest](docs/PatchedDNSSECRequest.md) + - [PatchedDashboardRequest](docs/PatchedDashboardRequest.md) + - [PatchedDataStreamRequest](docs/PatchedDataStreamRequest.md) + - [PatchedDeviceGroupRequest](docs/PatchedDeviceGroupRequest.md) + - [PatchedFirewallFunctionInstanceRequest](docs/PatchedFirewallFunctionInstanceRequest.md) + - [PatchedFirewallRequest](docs/PatchedFirewallRequest.md) + - [PatchedFirewallRuleRequest](docs/PatchedFirewallRuleRequest.md) + - [PatchedFolderRequest](docs/PatchedFolderRequest.md) + - [PatchedFunctionInstanceRequest](docs/PatchedFunctionInstanceRequest.md) + - [PatchedFunctionsRequest](docs/PatchedFunctionsRequest.md) + - [PatchedGrantRequest](docs/PatchedGrantRequest.md) + - [PatchedGroupRequest](docs/PatchedGroupRequest.md) + - [PatchedKnowledgeBaseRequest](docs/PatchedKnowledgeBaseRequest.md) + - [PatchedNetworkListRequest](docs/PatchedNetworkListRequest.md) + - [PatchedNodesRequest](docs/PatchedNodesRequest.md) + - [PatchedOrganizationRequest](docs/PatchedOrganizationRequest.md) + - [PatchedPartialUpdateRequest](docs/PatchedPartialUpdateRequest.md) + - [PatchedPolicyRequest](docs/PatchedPolicyRequest.md) + - [PatchedRecordRequest](docs/PatchedRecordRequest.md) + - [PatchedRequestPhaseRule](docs/PatchedRequestPhaseRule.md) + - [PatchedResellerRequest](docs/PatchedResellerRequest.md) + - [PatchedResponsePhaseRuleRequest](docs/PatchedResponsePhaseRuleRequest.md) + - [PatchedServiceTokenUpdateRequest](docs/PatchedServiceTokenUpdateRequest.md) + - [PatchedServicesRequest](docs/PatchedServicesRequest.md) + - [PatchedTemplateRequest](docs/PatchedTemplateRequest.md) + - [PatchedToolRequest](docs/PatchedToolRequest.md) + - [PatchedUpdateZoneRequest](docs/PatchedUpdateZoneRequest.md) + - [PatchedUserRequest](docs/PatchedUserRequest.md) + - [PatchedWAFRequest](docs/PatchedWAFRequest.md) + - [PatchedWAFRuleRequest](docs/PatchedWAFRuleRequest.md) + - [PatchedWorkloadDeploymentRequest](docs/PatchedWorkloadDeploymentRequest.md) + - [PatchedWorkloadRequest](docs/PatchedWorkloadRequest.md) + - [PatchedWorkspaceRequest](docs/PatchedWorkspaceRequest.md) + - [PaymentHistory](docs/PaymentHistory.md) + - [PaymentMethod](docs/PaymentMethod.md) + - [PaymentMethodRequest](docs/PaymentMethodRequest.md) + - [Platform](docs/Platform.md) + - [Policy](docs/Policy.md) + - [PolicyRequest](docs/PolicyRequest.md) + - [PolicyResponse](docs/PolicyResponse.md) + - [PolicyRule](docs/PolicyRule.md) + - [PolicyRuleCondition](docs/PolicyRuleCondition.md) + - [PolicyRuleConditionRequest](docs/PolicyRuleConditionRequest.md) + - [PolicyRuleRequest](docs/PolicyRuleRequest.md) + - [Protocols](docs/Protocols.md) + - [ProtocolsRequest](docs/ProtocolsRequest.md) + - [Publisher](docs/Publisher.md) + - [PublisherRequest](docs/PublisherRequest.md) + - [Purge](docs/Purge.md) + - [PurgeRequest](docs/PurgeRequest.md) + - [PurgeResponse](docs/PurgeResponse.md) + - [QRadarEndpoint](docs/QRadarEndpoint.md) + - [QRadarEndpointRequest](docs/QRadarEndpointRequest.md) + - [RecommendationRequest](docs/RecommendationRequest.md) + - [Record](docs/Record.md) + - [RecordRequest](docs/RecordRequest.md) + - [RecordResponse](docs/RecordResponse.md) + - [Report](docs/Report.md) + - [ReportRequest](docs/ReportRequest.md) + - [RequestPhaseBehavior](docs/RequestPhaseBehavior.md) + - [RequestPhaseBehavior2](docs/RequestPhaseBehavior2.md) + - [RequestPhaseRule](docs/RequestPhaseRule.md) + - [RequestPhaseRule2](docs/RequestPhaseRule2.md) + - [RequestPhaseRuleResponse](docs/RequestPhaseRuleResponse.md) + - [Reseller](docs/Reseller.md) + - [ResellerRequest](docs/ResellerRequest.md) + - [ResponseAccount](docs/ResponseAccount.md) + - [ResponseAccountInfo](docs/ResponseAccountInfo.md) + - [ResponseAsyncAccount](docs/ResponseAsyncAccount.md) + - [ResponseAsyncAccountInfo](docs/ResponseAsyncAccountInfo.md) + - [ResponseAsyncChatThread](docs/ResponseAsyncChatThread.md) + - [ResponseAsyncContinuousDeployment](docs/ResponseAsyncContinuousDeployment.md) + - [ResponseAsyncCredit](docs/ResponseAsyncCredit.md) + - [ResponseAsyncDashboard](docs/ResponseAsyncDashboard.md) + - [ResponseAsyncDeleteChatThread](docs/ResponseAsyncDeleteChatThread.md) + - [ResponseAsyncDeleteContinuousDeployment](docs/ResponseAsyncDeleteContinuousDeployment.md) + - [ResponseAsyncDeleteDocument](docs/ResponseAsyncDeleteDocument.md) + - [ResponseAsyncDeleteIntegration](docs/ResponseAsyncDeleteIntegration.md) + - [ResponseAsyncDeleteKnowledgeBase](docs/ResponseAsyncDeleteKnowledgeBase.md) + - [ResponseAsyncDeleteMessage](docs/ResponseAsyncDeleteMessage.md) + - [ResponseAsyncDeleteNodeServiceBind](docs/ResponseAsyncDeleteNodeServiceBind.md) + - [ResponseAsyncDeleteNodes](docs/ResponseAsyncDeleteNodes.md) + - [ResponseAsyncDeletePaymentMethod](docs/ResponseAsyncDeletePaymentMethod.md) + - [ResponseAsyncDeleteServices](docs/ResponseAsyncDeleteServices.md) + - [ResponseAsyncDeleteTool](docs/ResponseAsyncDeleteTool.md) + - [ResponseAsyncDocument](docs/ResponseAsyncDocument.md) + - [ResponseAsyncExecution](docs/ResponseAsyncExecution.md) + - [ResponseAsyncExecutor](docs/ResponseAsyncExecutor.md) + - [ResponseAsyncFolder](docs/ResponseAsyncFolder.md) + - [ResponseAsyncKnowledgeBase](docs/ResponseAsyncKnowledgeBase.md) + - [ResponseAsyncMessage](docs/ResponseAsyncMessage.md) + - [ResponseAsyncNodeGroupsById](docs/ResponseAsyncNodeGroupsById.md) + - [ResponseAsyncNodeServices](docs/ResponseAsyncNodeServices.md) + - [ResponseAsyncNodes](docs/ResponseAsyncNodes.md) + - [ResponseAsyncOrder](docs/ResponseAsyncOrder.md) + - [ResponseAsyncPaymentMethod](docs/ResponseAsyncPaymentMethod.md) + - [ResponseAsyncReport](docs/ResponseAsyncReport.md) + - [ResponseAsyncRow](docs/ResponseAsyncRow.md) + - [ResponseAsyncServices](docs/ResponseAsyncServices.md) + - [ResponseAsyncTool](docs/ResponseAsyncTool.md) + - [ResponseBucketObject](docs/ResponseBucketObject.md) + - [ResponseChatThread](docs/ResponseChatThread.md) + - [ResponseContinuousDeployment](docs/ResponseContinuousDeployment.md) + - [ResponseCredit](docs/ResponseCredit.md) + - [ResponseDashboard](docs/ResponseDashboard.md) + - [ResponseDeleteChatThread](docs/ResponseDeleteChatThread.md) + - [ResponseDeleteContinuousDeployment](docs/ResponseDeleteContinuousDeployment.md) + - [ResponseDeleteDashboard](docs/ResponseDeleteDashboard.md) + - [ResponseDeleteDocument](docs/ResponseDeleteDocument.md) + - [ResponseDeleteFavorite](docs/ResponseDeleteFavorite.md) + - [ResponseDeleteFolder](docs/ResponseDeleteFolder.md) + - [ResponseDeleteGrant](docs/ResponseDeleteGrant.md) + - [ResponseDeleteGroup](docs/ResponseDeleteGroup.md) + - [ResponseDeleteIntegration](docs/ResponseDeleteIntegration.md) + - [ResponseDeleteKnowledgeBase](docs/ResponseDeleteKnowledgeBase.md) + - [ResponseDeleteMessage](docs/ResponseDeleteMessage.md) + - [ResponseDeletePaymentMethod](docs/ResponseDeletePaymentMethod.md) + - [ResponseDeleteRecommendation](docs/ResponseDeleteRecommendation.md) + - [ResponseDeleteReport](docs/ResponseDeleteReport.md) + - [ResponseDeleteRow](docs/ResponseDeleteRow.md) + - [ResponseDeleteServiceToken](docs/ResponseDeleteServiceToken.md) + - [ResponseDeleteTool](docs/ResponseDeleteTool.md) + - [ResponseDeleteUser](docs/ResponseDeleteUser.md) + - [ResponseDocument](docs/ResponseDocument.md) + - [ResponseExecution](docs/ResponseExecution.md) + - [ResponseExecutor](docs/ResponseExecutor.md) + - [ResponseFavorite](docs/ResponseFavorite.md) + - [ResponseFolder](docs/ResponseFolder.md) + - [ResponseGrant](docs/ResponseGrant.md) + - [ResponseGroup](docs/ResponseGroup.md) + - [ResponseGroupMembers](docs/ResponseGroupMembers.md) + - [ResponseKnowledgeBase](docs/ResponseKnowledgeBase.md) + - [ResponseListAccount](docs/ResponseListAccount.md) + - [ResponseListContinuousDeployment](docs/ResponseListContinuousDeployment.md) + - [ResponseListDashboard](docs/ResponseListDashboard.md) + - [ResponseListExecution](docs/ResponseListExecution.md) + - [ResponseListExecutionScript](docs/ResponseListExecutionScript.md) + - [ResponseListFavorite](docs/ResponseListFavorite.md) + - [ResponseListFolder](docs/ResponseListFolder.md) + - [ResponseListGrant](docs/ResponseListGrant.md) + - [ResponseListGroup](docs/ResponseListGroup.md) + - [ResponseListIntegration](docs/ResponseListIntegration.md) + - [ResponseListNodeGroupsById](docs/ResponseListNodeGroupsById.md) + - [ResponseListNodeServices](docs/ResponseListNodeServices.md) + - [ResponseListNodes](docs/ResponseListNodes.md) + - [ResponseListPlatform](docs/ResponseListPlatform.md) + - [ResponseListReport](docs/ResponseListReport.md) + - [ResponseListRepository](docs/ResponseListRepository.md) + - [ResponseListRow](docs/ResponseListRow.md) + - [ResponseListServiceToken](docs/ResponseListServiceToken.md) + - [ResponseListServices](docs/ResponseListServices.md) + - [ResponseListUser](docs/ResponseListUser.md) + - [ResponseLogin](docs/ResponseLogin.md) + - [ResponseMessage](docs/ResponseMessage.md) + - [ResponseOrder](docs/ResponseOrder.md) + - [ResponsePaymentMethod](docs/ResponsePaymentMethod.md) + - [ResponsePhaseBehavior](docs/ResponsePhaseBehavior.md) + - [ResponsePhaseBehaviorRequest](docs/ResponsePhaseBehaviorRequest.md) + - [ResponsePhaseRule](docs/ResponsePhaseRule.md) + - [ResponsePhaseRuleRequest](docs/ResponsePhaseRuleRequest.md) + - [ResponsePhaseRuleResponse](docs/ResponsePhaseRuleResponse.md) + - [ResponsePublisher](docs/ResponsePublisher.md) + - [ResponseReport](docs/ResponseReport.md) + - [ResponseRetrieveAccount](docs/ResponseRetrieveAccount.md) + - [ResponseRetrieveAccountInfo](docs/ResponseRetrieveAccountInfo.md) + - [ResponseRetrieveChatThread](docs/ResponseRetrieveChatThread.md) + - [ResponseRetrieveContinuousDeployment](docs/ResponseRetrieveContinuousDeployment.md) + - [ResponseRetrieveDashboard](docs/ResponseRetrieveDashboard.md) + - [ResponseRetrieveDocument](docs/ResponseRetrieveDocument.md) + - [ResponseRetrieveExecutionScript](docs/ResponseRetrieveExecutionScript.md) + - [ResponseRetrieveExecutor](docs/ResponseRetrieveExecutor.md) + - [ResponseRetrieveFolder](docs/ResponseRetrieveFolder.md) + - [ResponseRetrieveGrant](docs/ResponseRetrieveGrant.md) + - [ResponseRetrieveGroup](docs/ResponseRetrieveGroup.md) + - [ResponseRetrieveGroupMembers](docs/ResponseRetrieveGroupMembers.md) + - [ResponseRetrieveIntegration](docs/ResponseRetrieveIntegration.md) + - [ResponseRetrieveKnowledgeBase](docs/ResponseRetrieveKnowledgeBase.md) + - [ResponseRetrieveMessage](docs/ResponseRetrieveMessage.md) + - [ResponseRetrieveNodeServiceBind](docs/ResponseRetrieveNodeServiceBind.md) + - [ResponseRetrieveNodes](docs/ResponseRetrieveNodes.md) + - [ResponseRetrievePublisher](docs/ResponseRetrievePublisher.md) + - [ResponseRetrieveReport](docs/ResponseRetrieveReport.md) + - [ResponseRetrieveRow](docs/ResponseRetrieveRow.md) + - [ResponseRetrieveServiceToken](docs/ResponseRetrieveServiceToken.md) + - [ResponseRetrieveServices](docs/ResponseRetrieveServices.md) + - [ResponseRetrieveTool](docs/ResponseRetrieveTool.md) + - [ResponseRetrieveUser](docs/ResponseRetrieveUser.md) + - [ResponseRetrieveUserInfo](docs/ResponseRetrieveUserInfo.md) + - [ResponseRow](docs/ResponseRow.md) + - [ResponseServiceToken](docs/ResponseServiceToken.md) + - [ResponseServiceTokenCreate](docs/ResponseServiceTokenCreate.md) + - [ResponseServiceTokenRenew](docs/ResponseServiceTokenRenew.md) + - [ResponseTool](docs/ResponseTool.md) + - [ResponseUser](docs/ResponseUser.md) + - [ResponseUserInfo](docs/ResponseUserInfo.md) + - [Row](docs/Row.md) + - [RowRequest](docs/RowRequest.md) + - [S3Endpoint](docs/S3Endpoint.md) + - [S3EndpointRequest](docs/S3EndpointRequest.md) + - [SQLResult](docs/SQLResult.md) + - [SQLResultResponse](docs/SQLResultResponse.md) + - [SQLStatementsRequest](docs/SQLStatementsRequest.md) + - [ServiceResource](docs/ServiceResource.md) + - [ServiceResourceId](docs/ServiceResourceId.md) + - [ServiceResourceIdRequest](docs/ServiceResourceIdRequest.md) + - [ServiceResourceIdTrigger](docs/ServiceResourceIdTrigger.md) + - [ServiceResourceRequest](docs/ServiceResourceRequest.md) + - [ServiceToken](docs/ServiceToken.md) + - [ServiceTokenCreate](docs/ServiceTokenCreate.md) + - [ServiceTokenCreateRequest](docs/ServiceTokenCreateRequest.md) + - [ServiceTokenRenew](docs/ServiceTokenRenew.md) + - [ServiceTokenRenewRequest](docs/ServiceTokenRenewRequest.md) + - [ServiceTokenUpdateRequest](docs/ServiceTokenUpdateRequest.md) + - [Services](docs/Services.md) + - [ServicesRequest](docs/ServicesRequest.md) + - [SessionTimeoutPolicy](docs/SessionTimeoutPolicy.md) + - [SessionTimeoutPolicyRequest](docs/SessionTimeoutPolicyRequest.md) + - [SessionTimeoutPolicyResponse](docs/SessionTimeoutPolicyResponse.md) + - [SplunkEndpoint](docs/SplunkEndpoint.md) + - [SplunkEndpointRequest](docs/SplunkEndpointRequest.md) + - [StateCacheModule](docs/StateCacheModule.md) + - [StateCacheModuleRequest](docs/StateCacheModuleRequest.md) + - [StateExecutedResponse](docs/StateExecutedResponse.md) + - [SuccessObjectOperation](docs/SuccessObjectOperation.md) + - [SuccessObjectOperationAsync](docs/SuccessObjectOperationAsync.md) + - [TLSWorkload](docs/TLSWorkload.md) + - [TLSWorkloadMinimumVersion](docs/TLSWorkloadMinimumVersion.md) + - [TLSWorkloadRequest](docs/TLSWorkloadRequest.md) + - [TOTPDevice](docs/TOTPDevice.md) + - [TOTPDeviceList](docs/TOTPDeviceList.md) + - [TOTPDeviceResponse](docs/TOTPDeviceResponse.md) + - [TOTPVerificationRequest](docs/TOTPVerificationRequest.md) + - [Template](docs/Template.md) + - [TemplateRequest](docs/TemplateRequest.md) + - [TemplateResponse](docs/TemplateResponse.md) + - [ThresholdsConfigField](docs/ThresholdsConfigField.md) + - [ThresholdsConfigFieldRequest](docs/ThresholdsConfigFieldRequest.md) + - [Token](docs/Token.md) + - [TokenPair](docs/TokenPair.md) + - [TokenPairResponse](docs/TokenPairResponse.md) + - [TokenRequest](docs/TokenRequest.md) + - [TokenResponse](docs/TokenResponse.md) + - [Tool](docs/Tool.md) + - [ToolKBLink](docs/ToolKBLink.md) + - [ToolRequest](docs/ToolRequest.md) + - [Transform](docs/Transform.md) + - [TransformFilterWorkloads](docs/TransformFilterWorkloads.md) + - [TransformFilterWorkloadsAttributes](docs/TransformFilterWorkloadsAttributes.md) + - [TransformFilterWorkloadsAttributesRequest](docs/TransformFilterWorkloadsAttributesRequest.md) + - [TransformFilterWorkloadsRequest](docs/TransformFilterWorkloadsRequest.md) + - [TransformRenderTemplate](docs/TransformRenderTemplate.md) + - [TransformRenderTemplateAttributes](docs/TransformRenderTemplateAttributes.md) + - [TransformRenderTemplateAttributesRequest](docs/TransformRenderTemplateAttributesRequest.md) + - [TransformRenderTemplateRequest](docs/TransformRenderTemplateRequest.md) + - [TransformRequest](docs/TransformRequest.md) + - [TransformSampling](docs/TransformSampling.md) + - [TransformSamplingAttributes](docs/TransformSamplingAttributes.md) + - [TransformSamplingAttributesRequest](docs/TransformSamplingAttributesRequest.md) + - [TransformSamplingRequest](docs/TransformSamplingRequest.md) + - [TransformShared](docs/TransformShared.md) + - [TransformTransformFilterWorkloadsAttributes](docs/TransformTransformFilterWorkloadsAttributes.md) + - [TransformTransformFilterWorkloadsAttributesRequest](docs/TransformTransformFilterWorkloadsAttributesRequest.md) + - [TransformTransformRenderTemplateAttributes](docs/TransformTransformRenderTemplateAttributes.md) + - [TransformTransformRenderTemplateAttributesRequest](docs/TransformTransformRenderTemplateAttributesRequest.md) + - [TransformTransformSamplingAttributes](docs/TransformTransformSamplingAttributes.md) + - [TransformTransformSamplingAttributesRequest](docs/TransformTransformSamplingAttributesRequest.md) + - [UpdateAccountInfoDetailsRequest](docs/UpdateAccountInfoDetailsRequest.md) + - [UpdateUserInfoRequest](docs/UpdateUserInfoRequest.md) + - [UpdateZoneRequest](docs/UpdateZoneRequest.md) + - [User](docs/User.md) + - [UserInfo](docs/UserInfo.md) + - [UserInfoRequest](docs/UserInfoRequest.md) + - [UserLoginMethodResponse](docs/UserLoginMethodResponse.md) + - [UserRequest](docs/UserRequest.md) + - [WAF](docs/WAF.md) + - [WAFEngineSettingsAttributesField](docs/WAFEngineSettingsAttributesField.md) + - [WAFEngineSettingsAttributesFieldRequest](docs/WAFEngineSettingsAttributesFieldRequest.md) + - [WAFEngineSettingsField](docs/WAFEngineSettingsField.md) + - [WAFEngineSettingsFieldRequest](docs/WAFEngineSettingsFieldRequest.md) + - [WAFExceptionCondition](docs/WAFExceptionCondition.md) + - [WAFExceptionConditionRequest](docs/WAFExceptionConditionRequest.md) + - [WAFExceptionGenericCondition](docs/WAFExceptionGenericCondition.md) + - [WAFExceptionGenericConditionRequest](docs/WAFExceptionGenericConditionRequest.md) + - [WAFExceptionSpecificConditionOnName](docs/WAFExceptionSpecificConditionOnName.md) + - [WAFExceptionSpecificConditionOnNameRequest](docs/WAFExceptionSpecificConditionOnNameRequest.md) + - [WAFExceptionSpecificConditionOnValue](docs/WAFExceptionSpecificConditionOnValue.md) + - [WAFExceptionSpecificConditionOnValueRequest](docs/WAFExceptionSpecificConditionOnValueRequest.md) + - [WAFRequest](docs/WAFRequest.md) + - [WAFResponse](docs/WAFResponse.md) + - [WAFRule](docs/WAFRule.md) + - [WAFRuleRequest](docs/WAFRuleRequest.md) + - [WAFRuleResponse](docs/WAFRuleResponse.md) + - [Workload](docs/Workload.md) + - [WorkloadDeployment](docs/WorkloadDeployment.md) + - [WorkloadDeploymentRequest](docs/WorkloadDeploymentRequest.md) + - [WorkloadDeploymentResponse](docs/WorkloadDeploymentResponse.md) + - [WorkloadRequest](docs/WorkloadRequest.md) + - [WorkloadResponse](docs/WorkloadResponse.md) + - [Workspace](docs/Workspace.md) + - [WorkspaceRequest](docs/WorkspaceRequest.md) + - [Zone](docs/Zone.md) + - [ZoneRequest](docs/ZoneRequest.md) + - [ZoneResponse](docs/ZoneResponse.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### BearerAuth + +- **Type**: HTTP Bearer token authentication + +Example + +```go +auth := context.WithValue(context.Background(), azionapi.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +### TokenAuth + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: TokenAuth and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + azionapi.ContextAPIKeys, + map[string]azionapi.APIKey{ + "TokenAuth": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + +### JwtMfaAuthentication + +- **Type**: HTTP Bearer token authentication + +Example + +```go +auth := context.WithValue(context.Background(), azionapi.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +### JwtRefreshAuthentication + +- **Type**: HTTP Bearer token authentication + +Example + +```go +auth := context.WithValue(context.Background(), azionapi.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +### tokenAuth + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: tokenAuth and passed in as the auth context for each request. + +Example + +```go +auth := context.WithValue( + context.Background(), + azionapi.ContextAPIKeys, + map[string]azionapi.APIKey{ + "tokenAuth": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +support@azion.com + diff --git a/azion-api/api/openapi.yaml b/azion-api/api/openapi.yaml new file mode 100644 index 0000000..2ad0fab --- /dev/null +++ b/azion-api/api/openapi.yaml @@ -0,0 +1,86809 @@ +openapi: 3.0.0 +info: + contact: + email: support@azion.com + name: Azion Support + url: https://www.azion.com/en/contact/ + description: The AZION v4 REST API. + license: + name: MIT + url: https://github.com/aziontech/azionapi-v4-openapi/blob/main/LICENSE + title: azion-api + version: 4.0.0 +externalDocs: + description: "For more information, visit the Azion API documentation." + url: https://api.azion.com/v4 +servers: +- url: https://stage-api.azion.com/v4 +tags: +- description: Operations related to AI Studio - Chat Threads. + name: AI Studio - Chat Threads +- description: Operations related to AI Studio - Chunks. + name: AI Studio - Chunks +- description: Operations related to AI Studio - Documents. + name: AI Studio - Documents +- description: Operations related to AI Studio - Knowledge Bases. + name: AI Studio - Knowledge Bases +- description: Operations related to AI Studio - Messages. + name: AI Studio - Messages +- description: Operations related to AI Studio - Tools. + name: AI Studio - Tools +- description: Operations related to Accounts - Descendants. + name: Accounts - Descendants +- description: Operations related to Accounts - Info. + name: Accounts - Info +- description: Operations related to Accounts - Logged In. + name: Accounts - Logged In +- description: Manage Applications and their configurations. + name: Applications +- description: Configure cache settings for Applications. + name: Applications - Cache Settings +- description: Manage device groups for Applications. + name: Applications - Device Groups +- description: Manage Functions attached to Applications. + name: Applications - Function +- description: Configure request rules for Applications. + name: Applications - Request Rules +- description: Configure response rules for Applications. + name: Applications - Response Rules +- description: Authentication endpoints for user login. + name: Auth - Login +- description: Manage Multi-Factor Authentication TOTP devices. + name: Auth - MFA TOTP Device +- description: Refresh access tokens for continued authentication. + name: Auth - Refresh Access Token +- description: Revoke authentication tokens. + name: Auth - Revoke +- description: Operations related to Billing & Payments. + name: Billing & Payments +- description: Operations related to Billing - Invoices. + name: Billing - Invoices +- description: Manage Connectors. + name: Connectors +- description: Manage custom error pages. + name: Custom Pages +- description: Manage DNSSEC configuration for DNS zones. + name: DNS - DNSSEC +- description: Manage DNS records within zones. + name: DNS - Records +- description: Manage DNS zones. + name: DNS - Zones +- description: Manage data sources for Data Stream. + name: Data Stream - Data Sources +- description: Manage data streams. + name: Data Stream - Streams +- description: Manage templates for Data Stream. + name: Data Stream - Templates +- description: Manage Certificate Revocation Lists (CRLs). + name: Digital Certificates - Certificate Revocation Lists +- description: Manage Certificate Signing Requests (CSRs). + name: Digital Certificates - Certificate Signing Requests +- description: Manage digital certificates. + name: Digital Certificates - Certificates +- description: Request new digital certificates. + name: Digital Certificates - Request a Certificate +- description: Operations related to Favorites. + name: Favorites +- description: Manage Firewalls. + name: Firewalls +- description: Manage Functions attached to Firewalls. + name: Firewalls - Function +- description: Configure rules engine for Firewalls. + name: Firewalls - Rules Engine +- description: Manage Functions. + name: Functions +- description: Operations related to Identity - Grants. + name: Identity - Grants +- description: Operations related to Identity - Group Members. + name: Identity - Group Members +- description: Operations related to Identity - Groups. + name: Identity - Groups +- description: Operations related to Identity - Logged In User. + name: Identity - Logged In User +- description: Operations related to Identity - Service Token Renew. + name: Identity - Service Token Renew +- description: Operations related to Identity - Service Tokens. + name: Identity - Service Tokens +- description: Operations related to Identity - User info. + name: Identity - User info +- description: Operations related to Identity - Users. + name: Identity - Users +- description: Operations related to KV - Namespaces. + name: KV - Namespaces +- description: Operations related to Metrics - Dashboard. + name: Metrics - Dashboard +- description: Operations related to Metrics - Folders. + name: Metrics - Folders +- description: Operations related to Metrics - Library Reports. + name: Metrics - Library Reports +- description: Operations related to Metrics - Recommendations. + name: Metrics - Recommendations +- description: Operations related to Metrics - Reports. + name: Metrics - Reports +- description: Operations related to Metrics - Rows. + name: Metrics - Rows +- description: Manage network lists for access control. + name: Network Lists +- description: Operations related to Orchestrator - Node Groups. + name: Orchestrator - Node Groups +- description: Operations related to Orchestrator - Node Services. + name: Orchestrator - Node Services +- description: Operations related to Orchestrator - Nodes. + name: Orchestrator - Nodes +- description: Operations related to Orchestrator - Service Resources. + name: Orchestrator - Service Resources +- description: Operations related to Orchestrator - Services. + name: Orchestrator - Services +- description: Operations related to Policy - Lockout Policy. + name: Policy - Lockout Policy +- description: Operations related to Policy - Policies. + name: Policy - Policies +- description: Operations related to Policy - Session Timeout Policy. + name: Policy - Session Timeout Policy +- description: Operations related to Publisher Management. + name: Publisher Management +- description: Purge cached content. + name: Purge +- description: Execute SQL queries on databases. + name: SQL +- description: Manage Storage buckets. + name: Storage - Buckets +- description: Manage credentials for Storage. + name: Storage - Credentials +- description: Manage objects within Storage buckets. + name: Storage - Objects +- description: Operations related to Users - Lockout. + name: Users - Lockout +- description: Operations related to VCS - Continuous Deployment Executions. + name: VCS - Continuous Deployment Executions +- description: Operations related to VCS - Continuous Deployment Executor. + name: VCS - Continuous Deployment Executor +- description: Operations related to VCS - Continuous Deployments. + name: VCS - Continuous Deployments +- description: Operations related to VCS - Execution Scripts. + name: VCS - Execution Scripts +- description: Operations related to VCS - Integrations. + name: VCS - Integrations +- description: Operations related to VCS - Providers. + name: VCS - Providers +- description: Manage Web Application Firewalls. + name: WAFs +- description: Manage WAF exceptions and allowed rules. + name: WAFs - Exceptions +- description: Manage workload deployments. + name: Workload Deployments +- description: Manage workloads. + name: Workloads +paths: + /workspace/ai/threads: + get: + description: List all chat threads owned by your account. + operationId: list chat threads + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedChatThreadList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List chat threads + tags: + - AI Studio - Chat Threads + post: + description: Create a new chat thread for your account. + operationId: create chat thread + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatThreadRequest" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseChatThread" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncChatThread" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a chat thread + tags: + - AI Studio - Chat Threads + /workspace/ai/threads/{thread_id}: + delete: + description: Destruction of a specific chat thread in your account. + operationId: destroy a chat thread + parameters: + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteChatThread" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteChatThread" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy a chat thread + tags: + - AI Studio - Chat Threads + get: + description: Retrieve details from a specific chat thread in your account. + operationId: retrive chat thread + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveChatThread" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a chat thread + tags: + - AI Studio - Chat Threads + patch: + description: Update one or more fields of an existing chat thread without affecting + other fields. + operationId: partial update chat thread + parameters: + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedChatThreadRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseChatThread" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncChatThread" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a chat thread + tags: + - AI Studio - Chat Threads + put: + description: Update an existing chat thread. This replaces the entire chat thread + with the new data provided. + operationId: update chat thread + parameters: + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ChatThreadRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseChatThread" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncChatThread" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a chat thread + tags: + - AI Studio - Chat Threads + /workspace/ai/kbs/{kb_id}/documents/{document_id}/chunks: + get: + description: List all chunks owned by your account. + operationId: list chunks + parameters: + - explode: false + in: path + name: document_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedChunkList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List chunks + tags: + - AI Studio - Chunks + /workspace/ai/kbs/{kb_id}/documents: + get: + description: List all documents owned by your account. + operationId: list documents + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDocumentList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List documents + tags: + - AI Studio - Documents + post: + description: Create a new document for your account. + operationId: create document + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/DocumentRequest" + application/x-www-form-urlencoded: + schema: + $ref: "#/components/schemas/DocumentRequest" + application/json: + schema: + $ref: "#/components/schemas/DocumentRequest" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDocument" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDocument" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a document + tags: + - AI Studio - Documents + /workspace/ai/kbs/{kb_id}/documents/{document_id}: + delete: + description: Destruction of a specific document in your account. + operationId: destroy a document + parameters: + - explode: false + in: path + name: document_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteDocument" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteDocument" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy a document + tags: + - AI Studio - Documents + get: + description: Retrieve details from a specific document in your account. + operationId: retrive document + parameters: + - explode: false + in: path + name: document_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveDocument" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a document + tags: + - AI Studio - Documents + put: + description: Update an existing document. This replaces the entire document + with the new data provided. + operationId: update document + parameters: + - explode: false + in: path + name: document_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/DocumentRequest" + application/x-www-form-urlencoded: + schema: + $ref: "#/components/schemas/DocumentRequest" + application/json: + schema: + $ref: "#/components/schemas/DocumentRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDocument" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDocument" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a document + tags: + - AI Studio - Documents + /workspace/ai/kbs: + get: + description: List all knowledge bases owned by your account. + operationId: list knowledge bases + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedKnowledgeBaseList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List knowledge bases + tags: + - AI Studio - Knowledge Bases + post: + description: Create a new knowledge base for your account. + operationId: create knowledge base + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/KnowledgeBaseRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseKnowledgeBase" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncKnowledgeBase" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a knowledge base + tags: + - AI Studio - Knowledge Bases + /workspace/ai/kbs/{kb_id}: + delete: + description: Destruction of a specific knowledge base in your account. + operationId: destroy a knowledge base + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteKnowledgeBase" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteKnowledgeBase" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy a knowledge base + tags: + - AI Studio - Knowledge Bases + get: + description: Retrieve details from a specific knowledge base in your account. + operationId: retrive knowledge base + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: kb_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveKnowledgeBase" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a knowledge base + tags: + - AI Studio - Knowledge Bases + patch: + description: Update one or more fields of an existing knowledge base without + affecting other fields. + operationId: partial update knowledge base + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedKnowledgeBaseRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseKnowledgeBase" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncKnowledgeBase" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a knowledge base + tags: + - AI Studio - Knowledge Bases + put: + description: Update an existing knowledge base. This replaces the entire knowledge + base with the new data provided. + operationId: update knowledge base + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/KnowledgeBaseRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseKnowledgeBase" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncKnowledgeBase" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a knowledge base + tags: + - AI Studio - Knowledge Bases + /workspace/ai/kbs/{kb_id}/ask: + post: + description: Ask a question. The agent will use RAG over this knowledge base + and answer with context. + operationId: ask knowledge base + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/KBAskRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/KBAskResponse" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Ask the knowledge base + tags: + - AI Studio - Knowledge Bases + /workspace/ai/kbs/{kb_id}/query: + post: + description: Query a specific chunk from a knowledge base in your account. + operationId: query chunk from knowledge base + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + examples: + QueryRequest: + value: + query: how to deploy + top_k: 5 + schema: + $ref: "#/components/schemas/KBQueryRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/KBQueryResponse" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Query a chunk from a knowledge base + tags: + - AI Studio - Knowledge Bases + /workspace/ai/threads/{thread_id}/messages: + get: + description: List all messages owned by your account. + operationId: list messages + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedMessageList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List messages + tags: + - AI Studio - Messages + post: + description: Create a new message for your account. + operationId: create message + parameters: + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MessageRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseMessage" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncMessage" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a message + tags: + - AI Studio - Messages + /workspace/ai/threads/{thread_id}/messages/{message_id}: + delete: + description: Destruction of a specific message in your account. + operationId: destroy a message + parameters: + - explode: false + in: path + name: message_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteMessage" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteMessage" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy a message + tags: + - AI Studio - Messages + get: + description: Retrieve details from a specific message in your account. + operationId: retrive message + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: message_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveMessage" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a message + tags: + - AI Studio - Messages + put: + description: Update an existing message. This replaces the entire message with + the new data provided. + operationId: update message + parameters: + - explode: false + in: path + name: message_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: thread_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MessageRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseMessage" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncMessage" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a message + tags: + - AI Studio - Messages + /workspace/ai/tools: + get: + description: List all tools owned by your account. + operationId: list tools + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedToolList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List tools + tags: + - AI Studio - Tools + post: + description: Create a new tool for your account. + operationId: create tool + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ToolRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseTool" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncTool" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a tool + tags: + - AI Studio - Tools + /workspace/ai/tools/{tool_id}: + delete: + description: Destruction of a specific tool in your account. + operationId: destroy a tool + parameters: + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteTool" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteTool" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy a tool + tags: + - AI Studio - Tools + get: + description: Retrieve details from a specific tool in your account. + operationId: retrive tool + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveTool" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a tool + tags: + - AI Studio - Tools + patch: + description: Update one or more fields of an existing tool without affecting + other fields. + operationId: partial update tool + parameters: + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedToolRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseTool" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncTool" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a tool + tags: + - AI Studio - Tools + put: + description: Update an existing tool. This replaces the entire tool with the + new data provided. + operationId: update tool + parameters: + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ToolRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseTool" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncTool" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a tool + tags: + - AI Studio - Tools + /workspace/ai/tools/{tool_id}/kbs: + get: + description: List all knowledge bases linked to a specific tool in your account. + operationId: list knowledge bases linked to a tool + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedKnowledgeBaseList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List knowledge bases linked to a tool + tags: + - AI Studio - Tools + post: + description: Add a new knowledge base to a specific tool for your account. + operationId: add knowledge base to a tool + parameters: + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ToolRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ToolKBLink" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Add a knowledge base to a tool + tags: + - AI Studio - Tools + /workspace/ai/tools/{tool_id}/kbs/{kb_id}: + delete: + description: Remove a specific knowledge base from a tool in your account. + operationId: remove knowledge base from a tool + parameters: + - explode: false + in: path + name: kb_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: tool_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "204": + description: No response body + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Remove a knowledge base from a tool + tags: + - AI Studio - Tools + /account/accounts: + get: + description: List all accounts that are descendants of the logged-in user's + account. + operationId: list_descendants_accounts + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Filter by created date (exact match). + explode: true + in: query + name: created + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by created date (greater than or equal). + explode: true + in: query + name: created__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by created date (less than or equal). + explode: true + in: query + name: created__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by account ID (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + type: string + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (exact match). + explode: true + in: query + name: last_modified + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: Filter by parent account ID (accepts comma-separated values). + explode: true + in: query + name: parent_id + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedAccountList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List accounts + tags: + - Accounts - Descendants + post: + description: Create a new sub-account under the logged-in user's account. + operationId: create_descendant_account + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreateAccountRequest" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAccount" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncAccount" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new account + tags: + - Accounts - Descendants + /account/accounts/{account_id}: + get: + description: Retrieve detailed information of a specific account under the logged-in + user's account. + operationId: retrieve_descendant_account + parameters: + - description: A unique integer value identifying the account. + explode: false + in: path + name: account_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveAccount" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve account details + tags: + - Accounts - Descendants + patch: + description: "Update specific fields of an account under the logged-in user's\ + \ account. Only editable fields, such as `name`, can be updated with this\ + \ operation." + operationId: partial_update_descendant_account + parameters: + - description: A unique integer value identifying the account. + explode: false + in: path + name: account_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedAccountRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAccount" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncAccount" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update account details + tags: + - Accounts - Descendants + put: + description: Update the information of a specific account under the logged-in + user's account. This operation allows replacing the entire account data with + new values. + operationId: update_descendant_account + parameters: + - description: A unique integer value identifying the account. + explode: false + in: path + name: account_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AccountRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAccount" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncAccount" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update account details + tags: + - Accounts - Descendants + /account/accounts/{account_id}/info: + get: + description: Retrieve detailed information about your account or a specific + child account under your logged-in account. + operationId: retrieve_account_info_details + parameters: + - description: A unique integer value identifying the account. + explode: false + in: path + name: account_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveAccountInfo" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve account information details + tags: + - Accounts - Info + put: + description: "Update the information details about your account or a specific\ + \ child account under your logged-in account. This operation allows replacing\ + \ the entire account info data with new values. In this operation, you can\ + \ also clear all detailed information of an account by providing an empty\ + \ dictionary in the `info` field." + operationId: update_account_info_details + parameters: + - description: A unique integer value identifying the account. + explode: false + in: path + name: account_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/update_account_info_details_request" + application/x-www-form-urlencoded: + schema: + $ref: "#/components/schemas/update_account_info_details_request" + multipart/form-data: + schema: + $ref: "#/components/schemas/update_account_info_details_request" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAccountInfo" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncAccountInfo" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update account information details + tags: + - Accounts - Info + /account/account: + get: + description: Retrieve detailed information about the currently logged-in user's + account. + operationId: retrieve_logged_account_details + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveAccount" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve logged account details + tags: + - Accounts - Logged In + patch: + description: "Partially update specific fields of the currently logged-in user's\ + \ account. Only editable fields, such as `name`, can be updated with this\ + \ operation." + operationId: partial_update_logged_account + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedAccountRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAccount" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncAccount" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update logged account details + tags: + - Accounts - Logged In + put: + description: Update the details of the currently logged-in user's account. This + operation allows replacing the entire account data with new values. + operationId: update_logged_account + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/AccountRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAccount" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncAccount" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update logged account details + tags: + - Accounts - Logged In + /workspace/applications: + get: + description: List all Applications owned by your account. + operationId: list_applications + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedApplicationList" + description: List of applications retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Applications + tags: + - Applications + post: + description: Create a new Application in your account. + operationId: create_application + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationResponse" + description: Application created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Application + tags: + - Applications + /workspace/applications/{application_id}: + delete: + description: Delete a specific Application in your account. + operationId: delete_application + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Application deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Application + tags: + - Applications + get: + description: Retrieve details of a specific Application in your account. + operationId: retrieve_application + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationResponse" + description: Application details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Application + tags: + - Applications + patch: + description: Update one or more fields of an existing Application without affecting + other fields. + operationId: partial_update_application + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedApplicationRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationResponse" + description: Application partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Application + tags: + - Applications + put: + description: Update an existing Application. This replaces the entire Application + with the new data provided. + operationId: update_application + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationResponse" + description: Application updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Application + tags: + - Applications + /workspace/applications/{application_id}/clone: + post: + description: "Create a new Application by performing a deep copy of an existing\ + \ Application, including its Cache Settings, Origins, Error Responses, Function\ + \ Instances, and Rules Engine." + operationId: clone_application + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CloneApplicationRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationResponse" + description: Application cloned successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Clone an Application + tags: + - Applications + /workspace/applications/{application_id}/cache_settings: + get: + description: List all Cache Settings owned by your account. + operationId: list_cache_settings + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedCacheSettingList" + description: List of cache settings retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List all Applications Cache Settings + tags: + - Applications - Cache Settings + post: + description: Create a new Cache Setting in your account. + operationId: create_cache_setting + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CacheSettingRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CacheSettingResponse" + description: Cache setting created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Applications Cache Setting + tags: + - Applications - Cache Settings + /workspace/applications/{application_id}/cache_settings/{cache_setting_id}: + delete: + description: Delete a specific Cache Setting in your account. + operationId: delete_cache_setting + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the cache setting. + explode: false + in: path + name: cache_setting_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Cache setting deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Applications Cache Setting + tags: + - Applications - Cache Settings + get: + description: Retrieve details of a specific Cache Setting in your account. + operationId: retrieve_cache_setting + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the cache setting. + explode: false + in: path + name: cache_setting_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CacheSetting" + description: Cache setting details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Applications Cache Setting + tags: + - Applications - Cache Settings + patch: + description: Update one or more fields of an existing Cache Setting without + affecting other fields. + operationId: partial_update_cache_setting + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the cache setting. + explode: false + in: path + name: cache_setting_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedCacheSettingRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CacheSettingResponse" + description: Cache setting partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Applications Cache Setting + tags: + - Applications - Cache Settings + put: + description: Update an existing Cache Setting. This replaces the entire Cache + Setting with the new data provided. + operationId: update_cache_setting + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the cache setting. + explode: false + in: path + name: cache_setting_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CacheSettingRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CacheSettingResponse" + description: Cache setting updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Applications Cache Setting + tags: + - Applications - Cache Settings + /workspace/applications/{application_id}/device_groups: + get: + description: List all Device Groups owned by your account. + operationId: list_device_groups + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "Filter by user agent (case-insensitive, partial match)." + explode: true + in: query + name: user_agent + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDeviceGroupList" + description: List of device groups retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Applications Device Groups + tags: + - Applications - Device Groups + post: + description: Create a new Device Group in your account. + operationId: create_device_group + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceGroupRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceGroupResponse" + description: Device group created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Applications Device Group + tags: + - Applications - Device Groups + /workspace/applications/{application_id}/device_groups/{device_group_id}: + delete: + description: Delete a specific Device Group in your account. + operationId: delete_device_group + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the device group. + explode: false + in: path + name: device_group_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Device group deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Applications Device Group + tags: + - Applications - Device Groups + get: + description: Retrieve details of a specific Device Group in your account. + operationId: retrieve_device_group + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the device group. + explode: false + in: path + name: device_group_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceGroupResponse" + description: Device group details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Device Group + tags: + - Applications - Device Groups + patch: + description: Update one or more fields of an existing Device Group without affecting + other fields. + operationId: partial_update_device_group + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the device group. + explode: false + in: path + name: device_group_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedDeviceGroupRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceGroupResponse" + description: Device group partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Applications Device Group + tags: + - Applications - Device Groups + put: + description: Update an existing Device Group. This replaces the entire Device + Group with the new data provided. + operationId: update_device_group + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the device group. + explode: false + in: path + name: device_group_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceGroupRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeviceGroupResponse" + description: Device group updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Applications Device Group + tags: + - Applications - Device Groups + /workspace/applications/{application_id}/functions: + get: + description: List all Function Instances for a specific Application owned by + your account. + operationId: list_application_function_instances + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFunctionInstanceList" + description: List of application function instances retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Function Instances + tags: + - Applications - Function + post: + description: Create a new Function Instance for a specific Application in your + account. + operationId: create_application_function_instance + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionInstanceRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionInstanceResponse" + description: Application function instance created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Application Function Instance + tags: + - Applications - Function + /workspace/applications/{application_id}/functions/{function_id}: + delete: + description: Delete a specific Application Function Instance in your account. + operationId: delete_application_function_instance + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Application function instance deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Application Function Instance + tags: + - Applications - Function + get: + description: Retrieve details of a specific Application Function Instance in + your account. + operationId: retrieve_application_function_instance + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionInstanceResponse" + description: Application function instance details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Application Function Instance + tags: + - Applications - Function + patch: + description: Update one or more fields of an existing Application Function Instance + without affecting other fields. + operationId: partial_update_application_function_instance + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedFunctionInstanceRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionInstanceResponse" + description: Application function instance partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Application Function Instance + tags: + - Applications - Function + put: + description: Update an existing Application Function Instance. This replaces + the entire Function Instance with the new data provided. + operationId: update_application_function_instance + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionInstanceRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionInstanceResponse" + description: Application function instance updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Application Function Instance + tags: + - Applications - Function + /workspace/applications/{application_id}/request_rules: + get: + description: List all Rules for a specific Application owned by your account. + operationId: list_application_request_rules + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: "Filter by description (case-insensitive, partial match)." + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Filter by order (greater than or equal). + explode: true + in: query + name: order__gte + required: false + schema: + format: int64 + type: integer + style: form + - description: Filter by order (less than or equal). + explode: true + in: query + name: order__lte + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRequestPhaseRuleList" + description: List of application request rules retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Application Request Rules + tags: + - Applications - Request Rules + post: + description: Create a new Rule for a specific Application in your account. + operationId: create_application_request_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRule2" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRuleResponse" + description: Application request rule created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Application Request Rule + tags: + - Applications - Request Rules + /workspace/applications/{application_id}/request_rules/{request_rule_id}: + delete: + description: Delete a specific Rule in your account. + operationId: delete_application_request_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Application request rule deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Application Request Rule + tags: + - Applications - Request Rules + get: + description: Retrieve details of a specific Rule in your account. + operationId: retrieve_application_request_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRuleResponse" + description: Application request rule details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Application Request Rule + tags: + - Applications - Request Rules + patch: + description: Update one or more fields of an existing Application Rule without + affecting other fields. + operationId: partial_update_application_request_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedRequestPhaseRule" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRuleResponse" + description: Application request rule partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Application Request Rule + tags: + - Applications - Request Rules + put: + description: Update an existing Rule. This replaces the entire Rule with the + new data provided. + operationId: update_application_request_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRule2" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRuleResponse" + description: Application request rule updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Application Request Rule + tags: + - Applications - Request Rules + /workspace/applications/{application_id}/request_rules/order: + put: + description: Reoder all Rules for a specific Application owned by your account. + operationId: update_application_request_rules_order + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationRequestPhaseRuleEngineOrder" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRequestPhaseRuleList" + description: Application request rules order updated successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Ordering Application Request Rules + tags: + - Applications - Request Rules + /workspace/applications/{application_id}/response_rules: + get: + description: List all Rules for a specific Application owned by your account. + operationId: list_application_response_rules + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: "Filter by description (case-insensitive, partial match)." + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Filter by order (greater than or equal). + explode: true + in: query + name: order__gte + required: false + schema: + format: int64 + type: integer + style: form + - description: Filter by order (less than or equal). + explode: true + in: query + name: order__lte + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedResponsePhaseRuleList" + description: List of application response rules retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Application Response Rules + tags: + - Applications - Response Rules + post: + description: Create a new Rule for a specific Application in your account. + operationId: create_application_response_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePhaseRuleRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePhaseRuleResponse" + description: Application response rule created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Application Response Rule + tags: + - Applications - Response Rules + /workspace/applications/{application_id}/response_rules/{response_rule_id}: + delete: + description: Delete a specific Rule in your account. + operationId: delete_application_response_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the response rule. + explode: false + in: path + name: response_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Application response rule deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Application Response Rule + tags: + - Applications - Response Rules + get: + description: Retrieve details of a specific Rule in your account. + operationId: retrieve_application_response_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the response rule. + explode: false + in: path + name: response_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RequestPhaseRuleResponse" + description: Application response rule details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Application Response Rule + tags: + - Applications - Response Rules + patch: + description: Update one or more fields of an existing Application Rule without + affecting other fields. + operationId: partial_update_application_response_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the response rule. + explode: false + in: path + name: response_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedResponsePhaseRuleRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePhaseRuleResponse" + description: Application response rule partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Application Response Rule + tags: + - Applications - Response Rules + put: + description: Update an existing Rule. This replaces the entire Rule with the + new data provided. + operationId: update_application_response_rule + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the response rule. + explode: false + in: path + name: response_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePhaseRuleRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePhaseRuleResponse" + description: Application response rule updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Application Response Rule + tags: + - Applications - Response Rules + /workspace/applications/{application_id}/response_rules/order: + put: + description: Reoder all Rules for a specific Application owned by your account. + operationId: update_application_response_rules_order + parameters: + - description: A unique integer value identifying the application. + explode: false + in: path + name: application_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationResponsePhaseRuleEngineOrderRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedResponsePhaseRuleList" + description: Application response rules order updated successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Ordering Application Response Rules + tags: + - Applications - Response Rules + /account/auth/login: + post: + description: |- + This endpoint performs user authentication and issues the user's JWT tokens.The response depends on whether multi-factor authentication (MFA) is enabled for the user: + - If the user does not have MFA enabled, the API returns a TokenPair object containing the access_token and refresh_token, allowing immediate authentication. + - If the user has MFA enabled, the response returns an MFAToken object.This temporary token must be used in the MFA verification endpoint to complete authentication.After successful verification of the second factor, the TokenPair is issued. + operationId: auth_user_login + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LoginRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseLogin" + description: User authenticated successfully. Returns JWT tokens or MFA + token if MFA is enabled. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: [] + summary: User Login – Generate JWT Tokens + tags: + - Auth - Login + /account/auth/login/method: + get: + description: |- + Returns the login type configured for the user. This indicates whether the user authenticates directly via Azion credentials (login) or via a federated Identity Provider (federated) linked to their account. + This endpoint allows clients to determine whether to proceed with Azion's native login flow or redirect the user to the Identity Provider (IdP) for authentication. + operationId: auth_user_login_method + parameters: + - description: Email address of the user + explode: true + in: query + name: email + required: false + schema: + format: email + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + examples: + ExampleResponseForLoginMethod.: + summary: Example response for login method. + value: + method: login + url: http://localhost:9999/login + ExampleResponseForFederatedLoginMethod.: + summary: Example response for federated login method. + value: + method: federated + url: http://localhost:8000/login + schema: + $ref: "#/components/schemas/UserLoginMethodResponse" + description: User authentication method retrieved successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: [] + summary: Check User Authentication Method + tags: + - Auth - Login + /account/auth/mfa/totp/verify: + post: + description: "Retrieves JWT access and refresh tokens, via a POST request with\ + \ jwt mfa token as auth + code." + operationId: totp_verify + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TOTPVerificationRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/TokenPairResponse" + description: TOTP verification successful. JWT tokens generated. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - JwtMfaAuthentication: [] + summary: Retrieve user JWT tokens by MFA auth + tags: + - Auth - Login + /account/auth/mfa/totp: + get: + description: List all totp devices for user account and descendant accounts. + operationId: list_totp_devices + parameters: + - description: Filter by confirmed status. + explode: true + in: query + name: confirmed + required: false + schema: + type: boolean + style: form + - description: "Filter by user's email (case-insensitive, partial match)." + explode: true + in: query + name: email + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + type: string + style: form + - description: "Filter by user's first name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTOTPDeviceList" + description: List of TOTP devices retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of TOTP devices + tags: + - Auth - MFA TOTP Device + post: + description: Create a new TOTP device for your account. + operationId: create_totp_device + requestBody: + content: + application/json: + schema: {} + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/TOTPDeviceResponse" + description: TOTP device created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - JwtMfaAuthentication: [] + summary: Create a TOTP device + tags: + - Auth - MFA TOTP Device + /auth/mfa/totp/{device_id}: + delete: + description: Delete a specific TOTP device from your account or descendant account. + operationId: delete_totp_device + parameters: + - description: A unique integer value identifying the TOTP device. + explode: false + in: path + name: device_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: TOTP device deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a TOTP device + tags: + - Auth - MFA TOTP Device + /account/auth/token: + post: + description: "Refresh JWT access token, via a POST request." + operationId: auth_user_refresh_token + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TokenRequest" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/TokenResponse" + description: Refresh token generated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - JwtRefreshAuthentication: [] + - {} + summary: Refresh user JWT access token + tags: + - Auth - Refresh Access Token + /account/auth/revoke: + post: + description: Revoke refresh token via a POST request. + operationId: auth_user_revoke + requestBody: + content: + application/json: + schema: {} + responses: + "201": + content: + application/json: + examples: + Executed: + value: + state: executed + schema: + $ref: "#/components/schemas/StateExecutedResponse" + description: Revoke successfully executed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - JwtRefreshAuthentication: [] + - {} + summary: Revoke user JWT refresh token + tags: + - Auth - Revoke + /payments/credit_cards: + get: + description: List all credit cards owned by your account. + operationId: list credit cards + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedResponsePaymentMethodList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the credit cards + tags: + - Billing & Payments + post: + description: Create a new credit card for your account. + operationId: create credit card + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PaymentMethodRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePaymentMethod" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncPaymentMethod" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new credit card + tags: + - Billing & Payments + /payments/credit_cards/{id}: + delete: + description: Destruction of a specific credit card in your account. + operationId: destroy credit card + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeletePaymentMethod" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeletePaymentMethod" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy a credit card + tags: + - Billing & Payments + get: + description: Retrieve details from a specific credit card in your account. + operationId: retrieve credit card + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePaymentMethod" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a credit card + tags: + - Billing & Payments + patch: + description: Update the field 'is_default' to enable of an existing credit card.Only + the field 'is_default' is editable for an existing card. + operationId: partial update credit card + parameters: + - explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + examples: + PartialUpdateExample: + summary: Example of partial update request body + value: + is_default: true + schema: + $ref: "#/components/schemas/PatchedPartialUpdateRequest" + responses: + "200": + content: + application/json: + examples: + PartialUpdateResponseExample: + summary: Example of partial update response body + value: + state: executed + data: + id: 0 + card_holder: string + card_brand: string + card_expiration_month: 12 + card_expiration_year: 2099 + card_last_4_digits: "1234" + card_address_zip: string + card_country: string + card_address_line1: string + card_address_line2: string + card_id: string + is_default: true + schema: + $ref: "#/components/schemas/ResponsePaymentMethod" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncPaymentMethod" + description: "" + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a credit card + tags: + - Billing & Payments + /payments/credits: + post: + description: Add credit into the default credit card in US Dollars. + operationId: add credits + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CreditRequest" + required: true + responses: + "201": + content: + application/json: + examples: + ResponseExample: + description: This is the response format for a successful credit + creation. + summary: Response example + value: + state: executed + data: + client_id: string + currency: string + entry_type: string + amount: "12.75" + expiration_date: string + created: string + customer_stripe_id: string + description: string + schema: + $ref: "#/components/schemas/ResponseCredit" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncCredit" + description: "" + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Add credits using the default credit card + tags: + - Billing & Payments + /payments/history: + get: + description: List all details of the payment history. + operationId: list payment history + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedPaymentHistoryList" + description: "" + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the payment history + tags: + - Billing & Payments + /billing/invoices/{period}: + get: + description: Retrieve invoice data for a specific period. + operationId: retrieve_invoice + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: "Invoice period in MM-YYYY format (e.g., 01-2024 for January\ + \ 2024)" + explode: false + in: path + name: period + required: true + schema: + type: string + style: simple + responses: + "200": + description: Invoice details (application/pdf) + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - tokenAuth: [] + - tokenAuth: [] + summary: Retrieve details of an invoice + tags: + - Billing - Invoices + /workspace/connectors: + get: + description: List all Connectors owned by your account. + operationId: list_connectors + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Filter by type (accepts comma-separated values). + explode: true + in: query + name: type__in + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedConnectorList" + description: List of connectors retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Connectors + tags: + - Connectors + post: + description: Create a new Connector in your account. + operationId: create_connector + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectorRequest2" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectorResponse" + description: Connector created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Connector + tags: + - Connectors + /workspace/connectors/{connector_id}: + delete: + description: Delete a specific Connector in your account. + operationId: delete_connector + parameters: + - description: A unique integer value identifying the connector. + explode: false + in: path + name: connector_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Connector deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Connector + tags: + - Connectors + get: + description: Retrieve details of a specific Connector in your account. + operationId: retrieve_connector + parameters: + - description: A unique integer value identifying the connector. + explode: false + in: path + name: connector_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectorResponse" + description: Connector details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Connector + tags: + - Connectors + patch: + description: Update one or more fields of an existing Connector without affecting + other fields. + operationId: partial_update_connector + parameters: + - description: A unique integer value identifying the connector. + explode: false + in: path + name: connector_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedConnectorRequest2" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectorResponse" + description: Connector partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Connector + tags: + - Connectors + put: + description: Update an existing Connector. This replaces the entire Connector + with the new data provided. + operationId: update_connector + parameters: + - description: A unique integer value identifying the connector. + explode: false + in: path + name: connector_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectorRequest2" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ConnectorResponse" + description: Connector updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Connector + tags: + - Connectors + /workspace/custom_pages: + get: + description: List all Custom Pages owned by your account. + operationId: list_custom_pages + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedCustomPageList" + description: List of custom pages retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Custom Pages + tags: + - Custom Pages + post: + description: Create a new Custom Page in your account. + operationId: create_custom_page + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomPageRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomPageResponse" + description: Custom page created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Custom Page + tags: + - Custom Pages + /workspace/custom_pages/{custom_page_id}: + delete: + description: Delete a specific Custom Page in your account. + operationId: delete_custom_page + parameters: + - description: A unique integer value identifying the custom page. + explode: false + in: path + name: custom_page_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Custom page deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Custom Page + tags: + - Custom Pages + get: + description: Retrieve details of a specific Custom Page in your account. + operationId: retrieve_custom_page + parameters: + - description: A unique integer value identifying the custom page. + explode: false + in: path + name: custom_page_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomPageResponse" + description: Custom page details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Custom Page + tags: + - Custom Pages + patch: + description: Update one or more fields of an existing Custom Page without affecting + other fields. + operationId: partial_update_custom_page + parameters: + - description: A unique integer value identifying the custom page. + explode: false + in: path + name: custom_page_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedCustomPageRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomPageResponse" + description: Custom page partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Custom Page + tags: + - Custom Pages + put: + description: Update an existing Custom Page. This replaces the entire Custom + Page with the new data provided. + operationId: update_custom_page + parameters: + - description: A unique integer value identifying the custom page. + explode: false + in: path + name: custom_page_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CustomPageRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CustomPageResponse" + description: Custom page updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Custom Page + tags: + - Custom Pages + /workspace/dns/zones/{zone_id}/dnssec: + get: + description: Retrieve details of a specific DNSSEC from a DNS Zone in your account. + operationId: retrieve_dnssec + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DNSSECResponse" + description: DNSSEC details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a DNSSEC + tags: + - DNS - DNSSEC + patch: + description: Update one or more fields of an existing DNSSEC without affecting + other fields. + operationId: partial_update_dnssec + parameters: + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedDNSSECRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DNSSECResponse" + description: DNSSEC partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a DNSSEC + tags: + - DNS - DNSSEC + put: + description: Update an existing a DNSSEC. This replaces the entire DNSSEC with + the new data provided. + operationId: update_dnssec + parameters: + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DNSSECRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DNSSECResponse" + description: DNSSEC updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a DNSSEC + tags: + - DNS - DNSSEC + /workspace/dns/zones/{zone_id}/records: + get: + description: List all DNS Records from a DNS Zone owned by your account. + operationId: list_dns_records + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRecordList" + description: List of DNS records retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List DNS Records + tags: + - DNS - Records + post: + description: Create a new DNS Record in a DNS Zone for your account. + operationId: create_dns_record + parameters: + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RecordRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordResponse" + description: DNS record created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a DNS Record + tags: + - DNS - Records + /workspace/dns/zones/{zone_id}/records/{record_id}: + delete: + description: Delete a specific DNS Record from a DNS Zone in your account. + operationId: delete_dns_record + parameters: + - description: A unique integer value identifying the DNS Record. + explode: false + in: path + name: record_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: DNS record deletion accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a DNS Record + tags: + - DNS - Records + get: + description: Retrieve details of a specific DNS Record from a DNS Zone in your + account. + operationId: retrieve_dns_record + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the DNS Record. + explode: false + in: path + name: record_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordResponse" + description: DNS record details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a DNS Record + tags: + - DNS - Records + patch: + description: Update one or more fields of an existing DNS Record without affecting + other fields. + operationId: partial_update_dns_record + parameters: + - description: A unique integer value identifying the DNS Record. + explode: false + in: path + name: record_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedRecordRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordResponse" + description: DNS record partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a DNS Record + tags: + - DNS - Records + put: + description: Update an existing a DNS Record. This replaces the entire DNS Record + with the new data provided. + operationId: update_dns_record + parameters: + - description: A unique integer value identifying the DNS Record. + explode: false + in: path + name: record_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RecordRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/RecordResponse" + description: DNS record updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a DNS Record + tags: + - DNS - Records + /workspace/dns/zones: + get: + description: List all DNS Zones owned by your account. + operationId: list_dns_zones + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Filter by domain (exact match). + explode: true + in: query + name: domain + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by name (exact match). + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedZoneList" + description: List of DNS zones retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List DNS Zones + tags: + - DNS - Zones + post: + description: Create a new DNS Zone for your account. + operationId: create_dns_zone + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ZoneRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ZoneResponse" + description: DNS zone created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a DNS Zone + tags: + - DNS - Zones + /workspace/dns/zones/{zone_id}: + delete: + description: Delete a specific DNS Zone in your account. + operationId: delete_dns_zone + parameters: + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: DNS zone deletion accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a DNS Zone + tags: + - DNS - Zones + get: + description: Retrieve details of a specific DNS Zone in your account. + operationId: retrieve_dns_zone + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ZoneResponse" + description: DNS zone details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a DNS Zone + tags: + - DNS - Zones + patch: + description: Update one or more fields of an existing DNS Zone without affecting + other fields. + operationId: partial_update_dns_zone + parameters: + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedUpdateZoneRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ZoneResponse" + description: DNS zone partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a DNS Zone + tags: + - DNS - Zones + put: + description: Update an existing a DNS Zone. This replaces the entire DNS Zone + with the new data provided. + operationId: update_dns_zone + parameters: + - description: A unique integer value identifying the DNS Zone. + explode: false + in: path + name: zone_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateZoneRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ZoneResponse" + description: DNS zone updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a DNS Zone + tags: + - DNS - Zones + /workspace/stream/data_sources: + get: + description: List all Data Sources. + operationId: list_data_sources + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "Filter by slug (case-insensitive, exact match)." + explode: true + in: query + name: slug + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDataSourceList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of Data Sources + tags: + - Data Stream - Data Sources + /workspace/stream/streams: + get: + description: List all Data Streams owned by your account. + operationId: list_data_streams + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Filter by data set id (accepts comma-separated values). + explode: true + in: query + name: data_set_id + required: false + schema: + format: int64 + type: integer + style: form + - description: Filter by data source (accepts comma-separated values). + explode: true + in: query + name: data_source + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDataStreamList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Data Streams + tags: + - Data Stream - Streams + post: + description: Create a new Data Stream in your account. + operationId: create_data_stream + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DataStreamRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/DataStreamResponse" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Data Stream + tags: + - Data Stream - Streams + /workspace/stream/streams/{stream_id}: + delete: + description: Delete a specific Data Stream in your account. + operationId: delete_data_stream + parameters: + - description: A unique integer value identifying the data stream. + explode: false + in: path + name: stream_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Data Stream + tags: + - Data Stream - Streams + get: + description: Retrieve details from a specific Data Stream in your account. + operationId: retrieve_data_stream + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the data stream. + explode: false + in: path + name: stream_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DataStreamResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Data Stream + tags: + - Data Stream - Streams + patch: + description: Update one or more fields of an existing Data Stream. + operationId: partial_update_data_stream + parameters: + - description: A unique integer value identifying the data stream. + explode: false + in: path + name: stream_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedDataStreamRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DataStreamResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Data Stream + tags: + - Data Stream - Streams + put: + description: Update an existing Data Stream. + operationId: update_data_stream + parameters: + - description: A unique integer value identifying the data stream. + explode: false + in: path + name: stream_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DataStreamRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DataStreamResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Data Stream + tags: + - Data Stream - Streams + /workspace/stream/templates: + get: + description: List all Templates owned by your account. + operationId: list_templates + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: "Filter by custom status (true for custom templates, false for\ + \ default templates)." + explode: true + in: query + name: custom + required: false + schema: + type: boolean + style: form + - description: "Filter by data set (case-insensitive, partial match)." + explode: true + in: query + name: data_set + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedTemplateList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Templates + tags: + - Data Stream - Templates + post: + description: Create a new custom Template in your account. + operationId: create_template + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TemplateRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/TemplateResponse" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Template + tags: + - Data Stream - Templates + /workspace/stream/templates/{template_id}: + delete: + description: Delete a specific custom Template in your account. + operationId: delete_template + parameters: + - description: A unique integer value identifying the template. + explode: false + in: path + name: template_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Template + tags: + - Data Stream - Templates + get: + description: Retrieve details from a specific Template in your account. + operationId: retrieve_template + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the template. + explode: false + in: path + name: template_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TemplateResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Template + tags: + - Data Stream - Templates + patch: + description: Update one or more fields of an existing custom Template. + operationId: partial_update_template + parameters: + - description: A unique integer value identifying the template. + explode: false + in: path + name: template_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedTemplateRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TemplateResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Template + tags: + - Data Stream - Templates + put: + description: Update an existing custom Template. + operationId: update_template + parameters: + - description: A unique integer value identifying the template. + explode: false + in: path + name: template_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TemplateRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/TemplateResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Template + tags: + - Data Stream - Templates + /workspace/tls/crls: + get: + description: List all certificate revocation lists (CRL) owned by your account. + operationId: list_certificate_revocation_lists + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by CRL ID (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by issuer (case-insensitive, partial match)." + explode: true + in: query + name: issuer + required: false + schema: + type: string + style: form + - description: Filter by exact last modified date and time. + explode: true + in: query + name: last_modified + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by exact last update date and time. + explode: true + in: query + name: last_update + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last update date (greater than or equal). + explode: true + in: query + name: last_update__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last update date (less than or equal). + explode: true + in: query + name: last_update__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by CRL name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Filter by exact next update date and time. + explode: true + in: query + name: next_update + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by next update date (greater than or equal). + explode: true + in: query + name: next_update__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by next update date (less than or equal). + explode: true + in: query + name: next_update__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedCertificateRevocationList" + description: List of certificate revocation lists retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List certificate revocation lists (CRL) + tags: + - Digital Certificates - Certificate Revocation Lists + post: + description: Create a new certificate revocation lists (CRL) for your account. + operationId: create_certificate_revocation_list + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRevocationList" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRevocationListResponse" + description: Certificate revocation list created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a certificate revocation lists (CRL) + tags: + - Digital Certificates - Certificate Revocation Lists + /workspace/tls/crls/{crl_id}: + delete: + description: Delete a specific certificate revocation list in your account. + operationId: delete_certificate_revocation_list + parameters: + - description: The unique identifier of the certificate revocation list + explode: false + in: path + name: crl_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Certificate revocation list deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a certificate revocation list + tags: + - Digital Certificates - Certificate Revocation Lists + get: + description: Retrieve details from a specific certificate revocation lists (CRL) + in your account. + operationId: retrieve_certificate_revocation_list + parameters: + - description: The unique identifier of the certificate revocation list + explode: false + in: path + name: crl_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRevocationListResponse" + description: Certificate revocation list details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a certificate revocation lists (CRL) + tags: + - Digital Certificates - Certificate Revocation Lists + patch: + description: Update one or more fields of an existing certificate revocation + lists (CRL) without affecting other fields. + operationId: partial_update_certificate_revocation_list + parameters: + - description: The unique identifier of the certificate revocation list + explode: false + in: path + name: crl_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedCertificateRevocationList" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRevocationListResponse" + description: Certificate revocation list partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a certificate revocation lists (CRL) + tags: + - Digital Certificates - Certificate Revocation Lists + put: + description: Update an existing certificate revocation lists (CRL). This replaces + the entire certificate with the new data provided. + operationId: update_certificate_revocation_list + parameters: + - description: The unique identifier of the certificate revocation list + explode: false + in: path + name: crl_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRevocationList" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRevocationListResponse" + description: Certificate revocation list updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a certificate revocation lists (CRL) + tags: + - Digital Certificates - Certificate Revocation Lists + /workspace/tls/csr: + post: + description: Create a new certificate signing request (CSR) for your account. + operationId: create_certificate_signing_request + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateSigningRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateResponse" + description: Certificate signing request created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a certificate signing request (CSR) + tags: + - Digital Certificates - Certificate Signing Requests + /workspace/tls/certificates: + get: + description: List all certificates owned by your account. + operationId: list_certificates + parameters: + - description: Filter by certificate type (accepts comma-separated values). + explode: true + in: query + name: certificate_type + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by certificate ID (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by issuer (case-insensitive, partial match)." + explode: true + in: query + name: issuer + required: false + schema: + type: string + style: form + - description: Filter by exact last modified date and time. + explode: true + in: query + name: last_modified + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by managed status. + explode: true + in: query + name: managed + required: false + schema: + type: boolean + style: form + - description: "Filter by certificate name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: Filter by exact renewed date and time. + explode: true + in: query + name: renewed_at + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by renewed date (greater than or equal). + explode: true + in: query + name: renewed_at__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by renewed date (less than or equal). + explode: true + in: query + name: renewed_at__lte + required: false + schema: + format: date-time + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedCertificateList" + description: List of certificates retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List certificates + tags: + - Digital Certificates - Certificates + post: + description: Create a new certificate for your account. + operationId: create_certificate + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Certificate" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateResponse" + description: Certificate created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a certificate + tags: + - Digital Certificates - Certificates + /workspace/tls/certificates/{certificate_id}: + delete: + description: Delete a specific certificate in your account. + operationId: delete_certificate + parameters: + - description: The unique identifier of the certificate + explode: false + in: path + name: certificate_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Certificate deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a certificate + tags: + - Digital Certificates - Certificates + get: + description: Retrieve details from a specific certificate in your account. + operationId: retrieve_certificate + parameters: + - description: The unique identifier of the certificate + explode: false + in: path + name: certificate_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateResponse" + description: Certificate details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a certificate + tags: + - Digital Certificates - Certificates + patch: + description: Update one or more fields of an existing certificate without affecting + other fields. + operationId: partial_update_certificate + parameters: + - description: The unique identifier of the certificate + explode: false + in: path + name: certificate_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedCertificate" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a certificate + tags: + - Digital Certificates - Certificates + put: + description: Update an existing certificate. This replaces the entire certificate + with the new data provided. + operationId: update_certificate + parameters: + - description: The unique identifier of the certificate + explode: false + in: path + name: certificate_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Certificate" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateResponse" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a certificate + tags: + - Digital Certificates - Certificates + /workspace/tls/certificates/request: + post: + description: Request a new certificate for your account. + operationId: request_certificate + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CertificateResponse" + description: Certificate request submitted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Request a certificate + tags: + - Digital Certificates - Request a Certificate + /identity/user/favorites: + get: + description: List all favorites by your account. + operationId: list_favorites + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: true + in: query + name: type + required: false + schema: + type: string + style: form + - explode: true + in: query + name: uri + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFavoriteList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the favorites + tags: + - Favorites + post: + description: Create a new favorite for your account. + operationId: create_favorite + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FavoriteRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseFavorite" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseFavorite" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new favorite + tags: + - Favorites + /identity/user/favorites/{favorite_id}: + delete: + description: Delete a specific favorite in your account. + operationId: delete_favorite + parameters: + - description: A unique integer value identifying this Favorite. + explode: false + in: path + name: favorite_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteFavorite" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteFavorite" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a favorite + tags: + - Favorites + /workspace/firewalls: + get: + description: List all Firewalls owned by your account. + operationId: list_firewalls + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Filter by debug rules status. + explode: true + in: query + name: debug + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFirewallList" + description: List of firewalls retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Firewalls + tags: + - Firewalls + post: + description: Create a new Firewall for your account. + operationId: create_firewall + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallResponse" + description: Firewall created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Firewall + tags: + - Firewalls + /workspace/firewalls/{firewall_id}: + delete: + description: Delete a specific Firewall in your account. + operationId: delete_firewall + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Firewall deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Firewall + tags: + - Firewalls + get: + description: Retrieve details from a specific Firewall in your account. + operationId: retrieve_firewall + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallResponse" + description: Firewall details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a Firewall + tags: + - Firewalls + patch: + description: Update one or more fields of an existing Firewall without affecting + other fields. + operationId: partial_update_firewall + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedFirewallRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallResponse" + description: Firewall partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Firewall + tags: + - Firewalls + put: + description: Update an existing Firewall. This replaces the entire Firewall + with the new data provided. + operationId: update_firewall + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallResponse" + description: Firewall updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Firewall + tags: + - Firewalls + /workspace/firewalls/{firewall_id}/clone: + post: + description: "Create a new Firewall by performing a deep copy of an existing\ + \ Firewall, including its Function Instances and Rules Engine." + operationId: clone_firewall + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CloneFirewallRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallResponse" + description: Firewall cloned successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Clone a Firewall + tags: + - Firewalls + /workspace/firewalls/{firewall_id}/functions: + get: + description: List all Function Instances for a specific Firewall owned by your + account. + operationId: list_firewall_function + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFirewallFunctionInstanceList" + description: List of firewall function instances retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Firewall Function + tags: + - Firewalls - Function + post: + description: Create a new Function Instance for a specific Firewall in your + account. + operationId: create_firewall_function + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallFunctionInstanceRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallFunctionInstanceResponse" + description: Firewall function instance created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Firewall Function + tags: + - Firewalls - Function + /workspace/firewalls/{firewall_id}/functions/{function_id}: + delete: + description: Delete a specific Firewall Function Instance in your account. + operationId: delete_firewall_function + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Firewall function instance deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Firewall Function + tags: + - Firewalls - Function + get: + description: Retrieve details of a specific Firewall Function Instance in your + account. + operationId: retrieve_firewall_function + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallFunctionInstanceResponse" + description: Firewall function instance details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Firewall Function + tags: + - Firewalls - Function + patch: + description: Update one or more fields of an existing Firewall Function Instance + without affecting other fields. + operationId: partial_update_firewall_function + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedFirewallFunctionInstanceRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallFunctionInstanceResponse" + description: Firewall function instance partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Firewall Function + tags: + - Firewalls - Function + put: + description: Update an existing Firewall Function Instance. This replaces the + entire Function Instance with the new data provided. + operationId: update_firewall_function + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the function instance. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallFunctionInstanceRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallFunctionInstanceResponse" + description: Firewall function instance updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Firewall Function + tags: + - Firewalls - Function + /workspace/firewalls/{firewall_id}/request_rules: + get: + description: List all Rules for a specific Firewall owned by your account. + operationId: list_firewall_rules + parameters: + - description: "Filter by description (case-insensitive, partial match)." + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Filter by order (greater than or equal). + explode: true + in: query + name: order__gte + required: false + schema: + format: int64 + type: integer + style: form + - description: Filter by order (less than or equal). + explode: true + in: query + name: order__lte + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFirewallRuleList" + description: List of firewall rules retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Firewall Rules + tags: + - Firewalls - Rules Engine + post: + description: Create a new Rule for a specific Firewall in your account. + operationId: create_firewall_rule + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleResponse" + description: Firewall rule created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Firewall Rule + tags: + - Firewalls - Rules Engine + /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id}: + delete: + description: Delete a specific Rule in your account. + operationId: delete_firewall_rule + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Firewall rule deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Firewall Rule + tags: + - Firewalls - Rules Engine + get: + description: Retrieve details of a specific Rule in your account. + operationId: retrieve_firewall_rule + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleResponse" + description: Firewall rule details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Firewall Rule + tags: + - Firewalls - Rules Engine + patch: + description: Update one or more fields of an existing Firewall Rule without + affecting other fields. + operationId: partial_update_firewall_rule + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedFirewallRuleRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleResponse" + description: Firewall rule partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Firewall Rule + tags: + - Firewalls - Rules Engine + put: + description: Update an existing Rule. This replaces the entire Rule with the + new data provided. + operationId: update_firewall_rule + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the request rule. + explode: false + in: path + name: request_rule_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleResponse" + description: Firewall rule updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Firewall Rule + tags: + - Firewalls - Rules Engine + /workspace/firewalls/{firewall_id}/request_rules/order: + put: + description: Reoder all Rules for a specific Firewall owned by your account. + operationId: order_firewall_rules + parameters: + - description: A unique integer value identifying the firewall. + explode: false + in: path + name: firewall_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FirewallRuleEngineOrderRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFirewallRuleList" + description: Firewall rules order updated successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Ordering Firewall Rules + tags: + - Firewalls - Rules Engine + /workspace/functions: + get: + description: List all Functions owned by your account. + operationId: list_functions + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: Filter by language (accepts comma-separated values). + explode: true + in: query + name: language__in + required: false + schema: + type: string + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: Filter by runtime environment (accepts comma-separated values). + explode: true + in: query + name: runtime_environment__in + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFunctionsList" + description: List of functions retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Functions + tags: + - Functions + post: + description: Create a new Function in your account. + operationId: create_function + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionsRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionResponse" + description: Function created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Function + tags: + - Functions + /workspace/functions/{function_id}: + delete: + description: Delete a specific Function in your account. + operationId: delete_function + parameters: + - description: A unique integer value identifying the function. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Function deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Function + tags: + - Functions + get: + description: Retrieve details of a specific Function in your account. + operationId: retrieve_function + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the function. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionResponse" + description: Function details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Function + tags: + - Functions + patch: + description: Update one or more fields of an existing Function without affecting + other fields. + operationId: partial_update_function + parameters: + - description: A unique integer value identifying the function. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedFunctionsRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionResponse" + description: Function partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Function + tags: + - Functions + put: + description: Update an existing Function. This replaces the entire Function + with the new data provided. + operationId: update_function + parameters: + - description: A unique integer value identifying the function. + explode: false + in: path + name: function_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionsRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/FunctionResponse" + description: Function updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Function + tags: + - Functions + /identity/grants: + get: + description: Retrieves a list of all grants associated with the logged-in account + or its descendant accounts. + operationId: ListGrants + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedGrantList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List grants for the account + tags: + - Identity - Grants + post: + description: "Creates a new grant, optionally linked to an identity, for the\ + \ logged-in account or its descendant accounts." + operationId: CreateGrant + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GrantRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGrant" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGrant" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new grant + tags: + - Identity - Grants + /identity/grants/{grant_id}: + delete: + description: Delete a specific grant from the logged-in account or its descendant + accounts. + operationId: DeleteGrant + parameters: + - explode: false + in: path + name: grant_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteGrant" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteGrant" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a grant + tags: + - Identity - Grants + get: + description: Fetches detailed information about a specific grant within the + logged-in account or its descendant accounts. + operationId: RetrieveGrant + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: grant_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveGrant" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve grant details + tags: + - Identity - Grants + patch: + description: "Updates specific fields of an existing grant within the logged-in\ + \ account or its descendant accounts, leaving other fields unchanged." + operationId: PartialUpdateGrant + parameters: + - explode: false + in: path + name: grant_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedGrantRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGrant" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGrant" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a grant + tags: + - Identity - Grants + put: + description: Updates an existing grant within the logged-in account or its descendant + accounts. This operation replaces the entire grant with the provided data. + operationId: UpdateGrant + parameters: + - explode: false + in: path + name: grant_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GrantRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGrant" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGrant" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a grant + tags: + - Identity - Grants + /identity/groups/{id}/members: + get: + description: Retrieve members from a specific group in your account. + operationId: RetrieveMembersGroup + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveGroupMembers" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve members from a group + tags: + - Identity - Group Members + put: + description: Update all members from a group. This replaces the entire group + members with the new data provided. + operationId: UpdateMembersGroup + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupMembersRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroupMembers" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroupMembers" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update members from a group + tags: + - Identity - Group Members + /identity/groups: + get: + description: List all groups owned by your account. + operationId: ListGroup + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedGroupList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the account groups + tags: + - Identity - Groups + post: + description: Create a group for your account. + operationId: CreateGroup + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroup" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroup" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new group + tags: + - Identity - Groups + /identity/groups/{group_id}: + delete: + description: Delete a specific group in your account. + operationId: DeleteGroup + parameters: + - explode: false + in: path + name: group_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteGroup" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteGroup" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a group + tags: + - Identity - Groups + get: + description: Retrieve details from a specific group in your account. + operationId: RetrieveGroup + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: group_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveGroup" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a group + tags: + - Identity - Groups + patch: + description: Update one or more fields of an existing group without affecting + other fields. + operationId: PartialUpdateGroup + parameters: + - explode: false + in: path + name: group_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedGroupRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroup" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroup" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a group + tags: + - Identity - Groups + put: + description: Update an existing group. This replaces the entire group with the + new data provided. + operationId: UpdateGroup + parameters: + - explode: false + in: path + name: group_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GroupRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroup" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseGroup" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a group + tags: + - Identity - Groups + /identity/user: + get: + description: Retrieve details from the logged user. + operationId: ListLoggedUser + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveUser" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from the currently logged-in user + tags: + - Identity - Logged In User + patch: + description: Update one or more fields of the logged user without affecting + other fields. + operationId: PartialUpdateLoggedUser + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedUserRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update the currently logged-in user + tags: + - Identity - Logged In User + put: + description: Update the logged user. This replaces the entire user with the + new data provided. + operationId: UpdateLoggedUser + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update the currently logged-in user + tags: + - Identity - Logged In User + /identity/service-tokens/{id}/renew: + post: + description: Renews a service token for your account. + operationId: RenewServiceToken + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceTokenRenewRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseServiceTokenRenew" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseServiceTokenRenew" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Renews a service token + tags: + - Identity - Service Token Renew + /identity/service-tokens: + get: + description: List all services tokens owned by your account. + operationId: ListServiceToken + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedServiceTokenList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the account service tokens + tags: + - Identity - Service Tokens + post: + description: Create a new service token for your account. + operationId: CreateServiceToken + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceTokenCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + ResponseExample: + description: This is the response format for a successful service + token creation. + summary: Response example + value: + state: executed + data: + id: 1 + name: "N)AZ~n%b)o}&3`jVg p/}8l^3I8DhGLNKKZAZ$w&;e0\\c~TJ-<%O#tB)IT9sn!R" + email: user@example.com + created: 2024-12-12T17:56:17.614Z + last_editor: "4[]Zu4voLh-R3^'>1I+.xz[x=D(9f ,(rk" + last_modified: 2024-12-12T17:56:17.614Z + active: true + account_id: 1 + description: string + expires: 2024-12-12T17:56:17.614Z + last_used: 2024-12-12T17:56:17.614Z + token: string + schema: + $ref: "#/components/schemas/ResponseServiceTokenCreate" + description: "" + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new service token + tags: + - Identity - Service Tokens + /identity/service-tokens/{token_id}: + delete: + description: Delete a specific service token in your account. + operationId: DeleteServiceToken + parameters: + - explode: false + in: path + name: token_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteServiceToken" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteServiceToken" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a service token + tags: + - Identity - Service Tokens + get: + description: Retrieve details from a specific service token in your account. + operationId: RetrieveServiceToken + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: token_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveServiceToken" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a service token + tags: + - Identity - Service Tokens + patch: + description: Update one or more fields of an existing service token without + affecting other fields. + operationId: PartialUpdateServiceToken + parameters: + - explode: false + in: path + name: token_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedServiceTokenUpdateRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseServiceToken" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseServiceToken" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a service token + tags: + - Identity - Service Tokens + put: + description: Update an existing service token. This replaces the entire service + token with the new data provided. + operationId: UpdateServiceToken + parameters: + - explode: false + in: path + name: token_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceTokenUpdateRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseServiceToken" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseServiceToken" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a service token + tags: + - Identity - Service Tokens + /identity/users/{id}/info: + get: + description: Retrieve info from a specific user in your account. + operationId: RetrieveUserInfo + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveUserInfo" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve user info + tags: + - Identity - User info + put: + description: Update info from an existing user. This replaces the entire user + info with the new data provided. + operationId: UpdateUserInfo + parameters: + - explode: false + in: path + name: id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UpdateUserInfo_request" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUserInfo" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUserInfo" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an user info + tags: + - Identity - User info + /identity/users: + get: + description: List all users owned by your account. + operationId: ListUsers + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: |- + Filters users by locked status. + - `true`: Returns only locked users. + - `false`: Returns only unlocked users. + - (not provided): Returns all users. + explode: true + in: query + name: locked + required: false + schema: + type: boolean + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedUserList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the account users + tags: + - Identity - Users + post: + description: Create a new user for your account. + operationId: CreateUser + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new user + tags: + - Identity - Users + /identity/users/{user_id}: + delete: + description: Delete a specific user in your account. + operationId: DeleteUser + parameters: + - explode: false + in: path + name: user_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteUser" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteUser" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an user + tags: + - Identity - Users + get: + description: Retrieve details from a specific user in your account. + operationId: RetrieveUser + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: user_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveUser" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from an user + tags: + - Identity - Users + patch: + description: Update one or more fields of an existing user without affecting + other fields. + operationId: PartialUpdateUser + parameters: + - explode: false + in: path + name: user_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedUserRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an user + tags: + - Identity - Users + put: + description: Update an existing user. This replaces the entire user with the + new data provided. + operationId: UpdateUser + parameters: + - explode: false + in: path + name: user_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/UserRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseUser" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an user + tags: + - Identity - Users + /workspace/kv/namespaces: + get: + description: Returns a paginated list of namespaces for the authenticated account. + operationId: list_namespaces + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/NamespaceList" + description: Paginated list of namespaces + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List namespaces + tags: + - KV - Namespaces + post: + description: Creates a new namespace in the authenticated account. + operationId: create_namespace + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NamespaceCreateRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/Namespace" + description: Namespace created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create namespace + tags: + - KV - Namespaces + /workspace/kv/namespaces/{namespace}: + get: + description: "Returns a specific namespace by name, if it belongs to the authenticated\ + \ account." + operationId: retrieve_namespace + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier (name) of the namespace + explode: false + in: path + name: namespace + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Namespace" + description: Namespace details + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve namespace + tags: + - KV - Namespaces + /metrics/folders/{folder_id}/dashboards: + get: + description: List all dashboards for your user. + operationId: list_dashboards + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + minLength: 1 + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDashboardList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the dashboards + tags: + - Metrics - Dashboard + post: + description: Create a new dashboard in a given scope. + operationId: create_dashboard + parameters: + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DashboardRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDashboard" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDashboard" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new dashboard + tags: + - Metrics - Dashboard + /metrics/folders/{folder_id}/dashboards/{dashboard_id}: + delete: + description: Delete a specific dashboard. + operationId: delete_dashboard + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteDashboard" + description: Successful deletion + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a dashboard + tags: + - Metrics - Dashboard + get: + description: Retrieve details from a specific dashboard. + operationId: retrieve_dashboard + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveDashboard" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a dashboard + tags: + - Metrics - Dashboard + patch: + description: Update one or more fields of an existing dashboard without affecting + other fields. + operationId: partial_update_dashboard + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedDashboardRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDashboard" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDashboard" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a dashboard + tags: + - Metrics - Dashboard + put: + description: Update an existing dashboard. This replaces the entire dashboard + with the new data provided. + operationId: update_dashboard + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DashboardRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDashboard" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDashboard" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a dashboard + tags: + - Metrics - Dashboard + /metrics/folders: + get: + description: List all folders for your user. + operationId: list_folders + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + minLength: 1 + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFolderList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the folders + tags: + - Metrics - Folders + post: + description: Create a new folder in a given scope. + operationId: create_folder + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FolderRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseFolder" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncFolder" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new folder + tags: + - Metrics - Folders + /metrics/folders/{folder_id}: + delete: + description: Delete a specific folder. + operationId: delete_folder + parameters: + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteFolder" + description: Successful deletion + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a folder + tags: + - Metrics - Folders + get: + description: Retrieve details from a specific folder. + operationId: retrieve_folder + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveFolder" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a folder + tags: + - Metrics - Folders + patch: + description: Update one or more fields of an existing folder without affecting + other fields. + operationId: partial_update_folder + parameters: + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedFolderRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseFolder" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncFolder" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a folder + tags: + - Metrics - Folders + put: + description: Update an existing folder. This replaces the entire folder with + the new data provided. + operationId: update_folder + parameters: + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FolderRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseFolder" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncFolder" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a folder + tags: + - Metrics - Folders + /metrics/library/reports: + get: + description: List all library reports for your user. + operationId: list_library_reports + parameters: + - description: Filter by aggregation type (accepts comma-separated values). + explode: true + in: query + name: aggregation_type + required: false + schema: + minLength: 1 + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + minLength: 1 + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Filter by type (accepts comma-separated values). + explode: true + in: query + name: type + required: false + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedReportList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of library reports + tags: + - Metrics - Library Reports + post: + description: Create a new library report in a given scope. + operationId: create_library_report + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LibraryReportRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseReport" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncReport" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new library report + tags: + - Metrics - Library Reports + /metrics/library/reports/{library_report_id}: + delete: + description: Delete a specific library report. + operationId: delete_library_report + parameters: + - description: The unique identifier of the library report + explode: false + in: path + name: library_report_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteReport" + description: Successful deletion + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a library report + tags: + - Metrics - Library Reports + get: + description: Retrieve details from a specific library report. + operationId: retrieve_library_report + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the library report + explode: false + in: path + name: library_report_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveReport" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a library report + tags: + - Metrics - Library Reports + put: + description: Update an existing library report. This replaces the entire report + with the new data provided. + operationId: update_library_report + parameters: + - description: The unique identifier of the library report + explode: false + in: path + name: library_report_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LibraryReportRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseReport" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncReport" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a library report + tags: + - Metrics - Library Reports + /metrics/recommendations: + get: + description: List all recommendations for your user. + operationId: list_recommendations + parameters: + - description: Filter by dashboard ID (accepts comma-separated values). + explode: true + in: query + name: dashboard + required: false + schema: + minLength: 1 + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by recommendation ID (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + minLength: 1 + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedFolderList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the recommendations + tags: + - Metrics - Recommendations + post: + description: Create a new recommendation. + operationId: create_recommendation + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RecommendationRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseFolder" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncFolder" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new recommendation + tags: + - Metrics - Recommendations + /metrics/recommendations/{recommendation_id}: + delete: + description: Delete a specific recommendation. + operationId: delete_recommendation + parameters: + - description: The unique identifier of the recommendation + explode: false + in: path + name: recommendation_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteRecommendation" + description: Successful deletion + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a recommendation + tags: + - Metrics - Recommendations + /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports: + get: + description: List all reports for your user. + operationId: list_reports + parameters: + - description: Filter by aggregation type (accepts comma-separated values). + explode: true + in: query + name: aggregation_type + required: false + schema: + minLength: 1 + type: string + style: form + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + minLength: 1 + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Filter by type (accepts comma-separated values). + explode: true + in: query + name: type + required: false + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedReportList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of reports + tags: + - Metrics - Reports + post: + description: Create a new report in a given scope. + operationId: create_report + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ReportRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseReport" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncReport" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new report + tags: + - Metrics - Reports + /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id}: + delete: + description: Delete a specific report. + operationId: delete_report + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the report + explode: false + in: path + name: report_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteReport" + description: Successful deletion + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a report + tags: + - Metrics - Reports + get: + description: Retrieve details from a specific report. + operationId: retrieve_report + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the report + explode: false + in: path + name: report_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveReport" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a report + tags: + - Metrics - Reports + put: + description: Update an existing report. This replaces the entire report with + the new data provided. + operationId: update_report + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the report + explode: false + in: path + name: report_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ReportRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseReport" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncReport" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a report + tags: + - Metrics - Reports + /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/order: + put: + description: Reorder all reports for a specific Row. + operationId: ordering_report + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrderRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseOrder" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncOrder" + description: "" + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Ordering reports in row + tags: + - Metrics - Reports + /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows: + get: + description: List all rows in dashboards. + operationId: list_rows + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "Filter by title (case-insensitive, partial match)." + explode: true + in: query + name: title + required: false + schema: + minLength: 1 + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRowList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of the rows + tags: + - Metrics - Rows + post: + description: Create a new row in dashboard. + operationId: create_row + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RowRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRow" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncRow" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new row + tags: + - Metrics - Rows + /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}: + delete: + description: Delete a specific row. + operationId: delete_row + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteRow" + description: Successful deletion + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a row + tags: + - Metrics - Rows + get: + description: Retrieve details from a specific row. + operationId: retrieve_row + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveRow" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a row + tags: + - Metrics - Rows + put: + description: 'Update an existing row. ' + operationId: update_row + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the row + explode: false + in: path + name: row_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RowRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRow" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncRow" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a row + tags: + - Metrics - Rows + /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/order: + put: + description: Reorder all rows for a specific Dahsboard. + operationId: ordering_row + parameters: + - description: The unique identifier of the dashboard + explode: false + in: path + name: dashboard_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + - description: The unique identifier of the folder + explode: false + in: path + name: folder_id + required: true + schema: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/OrderRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseOrder" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncOrder" + description: "" + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Ordering rows in dashboard + tags: + - Metrics - Rows + /workspace/network_lists: + get: + description: List all Network Lists owned by your account. + operationId: list_network_lists + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by list type (accepts comma-separated values). + explode: true + in: query + name: list_type__in + required: false + schema: + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedNetworkListSummaryList" + description: List of network lists retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Network Lists + tags: + - Network Lists + post: + description: Create a new Network List in your account. + operationId: create_network_list + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkListRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkListResponse" + description: Network list created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Network List + tags: + - Network Lists + /workspace/network_lists/{network_list_id}: + delete: + description: Delete a specific Network List in your account. + operationId: delete_network_list + parameters: + - description: A unique integer value identifying the network list. + explode: false + in: path + name: network_list_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Network list deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Network List + tags: + - Network Lists + get: + description: Retrieve details of a specific Network List in your account. + operationId: retrieve_network_list + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by IPv4. Only applicable for network lists of type 'ip_cidr'. + explode: true + in: query + name: ipv4 + required: false + schema: + type: boolean + style: form + - description: Filter by IPv6. Only applicable for network lists of type 'ip_cidr'. + explode: true + in: query + name: ipv6 + required: false + schema: + type: boolean + style: form + - description: A unique integer value identifying the network list. + explode: false + in: path + name: network_list_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkListResponse" + description: Network list details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Network List + tags: + - Network Lists + patch: + description: Update one or more fields of an existing Network List without affecting + other fields. + operationId: partial_update_network_list + parameters: + - description: A unique integer value identifying the network list. + explode: false + in: path + name: network_list_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedNetworkListRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkListResponse" + description: Network list partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Network List + tags: + - Network Lists + put: + description: Update an existing Network List. This replaces the entire Network + List with the new data provided. + operationId: update_network_list + parameters: + - description: A unique integer value identifying the network list. + explode: false + in: path + name: network_list_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkListRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/NetworkListResponse" + description: Network list updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Network List + tags: + - Network Lists + /orchestrator/nodes/{node_id}/groups: + get: + description: List all Groups of an Node. + operationId: list Node Groups by ID + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedNodeGroupsByIdList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Node Groups by id + tags: + - Orchestrator - Node Groups + post: + description: Create a bind between Node and Group. + operationId: bind Node Group + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NodeGroupsByIdRequest" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodeGroupsById" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodeGroupsById" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Bind Node Group + tags: + - Orchestrator - Node Groups + /orchestrator/nodes/groups: + get: + description: List all Groups of an Node. + operationId: list Node Groups + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedNodeGroupsList" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Node Groups + tags: + - Orchestrator - Node Groups + post: + description: Create an Node Group. + operationId: create Node Group + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NodeGroupsRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/NodeGroups" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create Node Group + tags: + - Orchestrator - Node Groups + /orchestrator/nodes/groups/{group_id}: + delete: + description: Remove an Node Group. + operationId: remove Node Group + parameters: + - explode: false + in: path + name: group_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "204": + description: No response body + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Remove Node Group + tags: + - Orchestrator - Node Groups + /orchestrator/nodes/{node_id}/services: + get: + description: List all Services from an Node. + operationId: list Node Services + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedNodeServicesList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Node Services + tags: + - Orchestrator - Node Services + post: + description: Create a bind between Node and Service. + operationId: bind Node Services + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NodeServicesRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodeServices" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodeServices" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Bind Node Service + tags: + - Orchestrator - Node Services + /orchestrator/nodes/{node_id}/services/{bind_id}: + delete: + description: Remove the bind between Node and Service. + operationId: unbind Node Service + parameters: + - explode: false + in: path + name: bind_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteNodeServiceBind" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteNodeServiceBind" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Unbind Node Service + tags: + - Orchestrator - Node Services + get: + description: Retrieve details of a specific Node Service Bind in your account. + operationId: retrieve Node Service Bind + parameters: + - explode: false + in: path + name: bind_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveNodeServiceBind" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Node Service Bind + tags: + - Orchestrator - Node Services + /orchestrator/nodes: + get: + description: List all Nodes of your account. + operationId: list Nodes + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Search by hash_id + explode: true + in: query + name: hash_id + required: false + schema: + type: string + style: form + - description: Search by name + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedNodesList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Nodes + tags: + - Orchestrator - Nodes + /orchestrator/nodes/{node_id}: + delete: + description: Delete an Node. + operationId: delete Node + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteNodes" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteNodes" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Node + tags: + - Orchestrator - Nodes + get: + description: Retrieve details of a specific Node in your account. + operationId: retrieve Node + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: node_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveNodes" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Node + tags: + - Orchestrator - Nodes + patch: + description: Update one or more fields of an existing Node without affecting + other fields. + operationId: partial update Node + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedNodesRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Node + tags: + - Orchestrator - Nodes + put: + description: Update an existing Node. This replaces the entire Node with the + new data provided. + operationId: update Node + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NodesRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Node + tags: + - Orchestrator - Nodes + /orchestrator/nodes/{node_id}/: + get: + description: Retrieve details of a specific Node in your account. + operationId: retrieve Node2 + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveNodes" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Node + tags: + - Orchestrator - Nodes + patch: + description: Update one or more fields of an existing Node without affecting + other fields. + operationId: partial update Node2 + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedNodesRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Node + tags: + - Orchestrator - Nodes + put: + description: Update an existing Node. This replaces the entire Node with the + new data provided. + operationId: update Node2 + parameters: + - explode: false + in: path + name: node_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/NodesRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncNodes" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Node + tags: + - Orchestrator - Nodes + /orchestrator/services/{service_id}/resources: + get: + description: List all resources of a Service owned by your account. + operationId: list Resources of a Service + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedServiceResourceList" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Service Resources + tags: + - Orchestrator - Service Resources + post: + description: Create a Resource on a Service. + operationId: create Resource + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceResourceRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceResource" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create Service Resource + tags: + - Orchestrator - Service Resources + /orchestrator/services/{service_id}/resources/{resource_id}: + delete: + description: Delete Resource from your account. + operationId: delete Resource + parameters: + - explode: false + in: path + name: resource_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "204": + description: No response body + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete Resource + tags: + - Orchestrator - Service Resources + get: + description: Retrieve details of a specific Resource in your account. + operationId: retrieve Resource + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: resource_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceResourceId" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Resource + tags: + - Orchestrator - Service Resources + put: + description: Update Resource in your account. + operationId: update Resource + parameters: + - explode: false + in: path + name: resource_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceResourceIdRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ServiceResourceId" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update Resource + tags: + - Orchestrator - Service Resources + /orchestrator/services/{service_id}/resources/{resource_id}/content: + get: + description: Retrieve content of a resource. + operationId: retrieve Resource Content + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: resource_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Content" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve content of a Resource + tags: + - Orchestrator - Service Resources + put: + description: Upload content of a Resource. + operationId: upload Resource Content + parameters: + - explode: false + in: path + name: resource_id + required: true + schema: + format: int64 + type: integer + style: simple + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/Content" + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Upload content of a Resource + tags: + - Orchestrator - Service Resources + /orchestrator/services: + get: + description: Get the list of Services of your account. + operationId: list Services + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Search by name + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedServicesList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Services + tags: + - Orchestrator - Services + post: + description: Create an Service. + operationId: create Service + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServicesRequest" + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncServices" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncServices" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create Service + tags: + - Orchestrator - Services + /orchestrator/services/{service_id}: + delete: + description: Destruction of a specific Service in your account. + operationId: destroy Service + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteServices" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteServices" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Destroy an Service + tags: + - Orchestrator - Services + get: + description: Retrieve details of a specific Service in your account. + operationId: retrieve Service + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveServices" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Service + tags: + - Orchestrator - Services + patch: + description: Update one or more fields of an existing Service without affecting + other fields. + operationId: partial update Service + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedServicesRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncServices" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncServices" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Service + tags: + - Orchestrator - Services + put: + description: Update an existing Service replacing all fields. + operationId: update Service + parameters: + - explode: false + in: path + name: service_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ServicesRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncServices" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncServices" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Service + tags: + - Orchestrator - Services + /auth/policies/lockout: + get: + description: Get Lockout Policy for the current account. + operationId: retrieve_lockout_policy + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LockoutPolicyResponse" + description: Lockout policy details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Get Lockout Policy + tags: + - Policy - Lockout Policy + put: + description: Put Lockout Policy for the current account. + operationId: update_lockout_policy + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/LockoutPolicyRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/LockoutPolicyResponse" + description: Lockout policy updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Put Lockout Policy + tags: + - Policy - Lockout Policy + /auth/policies: + get: + description: List all your account policies. + operationId: list_policy + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedPolicyList" + description: List of policies retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List of account policies + tags: + - Policy - Policies + post: + description: Create a new policy for your account. + operationId: create_policy + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyResponse" + description: Policy created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new policy + tags: + - Policy - Policies + /auth/policies/{policy_id}: + delete: + description: Delete a specific policy from your account. + operationId: delete_policy + parameters: + - description: A unique integer value identifying the policy. + explode: false + in: path + name: policy_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Policy deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a policy + tags: + - Policy - Policies + get: + description: Retrieve details from a specific policy from your account. + operationId: retrieve_policy + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the policy. + explode: false + in: path + name: policy_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyResponse" + description: Policy details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a policy + tags: + - Policy - Policies + patch: + description: Update one or more fields of an existing policy without affecting + other fields. + operationId: partial_update_policy + parameters: + - description: A unique integer value identifying the policy. + explode: false + in: path + name: policy_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedPolicyRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyResponse" + description: Policy partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a policy + tags: + - Policy - Policies + put: + description: Update an existing policy. This replaces all policy rules with + the new data provided. + operationId: update_policy + parameters: + - description: A unique integer value identifying the policy. + explode: false + in: path + name: policy_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PolicyResponse" + description: Policy updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a policy + tags: + - Policy - Policies + /auth/policies/session: + get: + description: Get Session Timeout Policy for the current account. + operationId: retrieve_session_timeout_policy + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SessionTimeoutPolicyResponse" + description: Session timeout policy details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Get Session Timeout Policy + tags: + - Policy - Session Timeout Policy + put: + description: Put Session Timeout Policy for the current account. + operationId: update_session_timeout_policy + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SessionTimeoutPolicyRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SessionTimeoutPolicyResponse" + description: Session timeout policy updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Put Session Timeout Policy + tags: + - Policy - Session Timeout Policy + /marketplace/publisher: + get: + description: Get details of the publisher associated with the authenticated + user's organization + operationId: getPublisherDetails + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrievePublisher" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Get publisher details + tags: + - Publisher Management + put: + description: Update details of the publisher associated with the authenticated + user's organization + operationId: updatePublisherDetails + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PublisherRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePublisher" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponsePublisher" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update publisher details + tags: + - Publisher Management + /workspace/purge/{purge_type}: + post: + description: Create a new Purge Request in your account. + operationId: create_purge_request + parameters: + - description: "type of purge: URL, Wildcard or Cachekey" + explode: false + in: path + name: purge_type + required: true + schema: + type: string + x-extensible-enum: + - cachekey + - url + - wildcard + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PurgeRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/PurgeResponse" + description: Purge request created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Purge Request + tags: + - Purge + /workspace/sql/databases: + get: + description: List all databases owned by your account. + operationId: list_databases + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Filter by created_at (greater than or equal). + explode: true + in: query + name: created_at__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by created_at (less than or equal). + explode: true + in: query + name: created_at__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Filter by status (accepts comma-separated values). + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: Filter by updated_at (greater than or equal). + explode: true + in: query + name: updated_at__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by updated_at (less than or equal). + explode: true + in: query + name: updated_at__lte + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedDatabaseDetailList" + description: List of databases retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List databases + tags: + - SQL + post: + description: Create a new database for your account. + operationId: create_database + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseDetailResponse" + description: Database created successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseDetailResponse" + description: Database creation request accepted and is being processed asynchronously. + "422": + content: + application/json: + examples: + Error-10073: + description: Unprocessable entity. + summary: Unprocessable Entity + value: + errors: + - status: "422" + code: "10073" + title: Unprocessable Entity + detail: Unprocessable entity. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a database + tags: + - SQL + /workspace/sql/databases/{database_id}: + delete: + description: Schedule the deletion of a specific database in your account. + operationId: delete_database + parameters: + - description: A unique integer value identifying this database. + explode: false + in: path + name: database_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Database deleted successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Database deletion request accepted and is being processed asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a database + tags: + - SQL + get: + description: Retrieve details from a specific database in your account. + operationId: retrieve_database + parameters: + - description: A unique integer value identifying this database. + explode: false + in: path + name: database_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseDetailResponse" + description: Database details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a database + tags: + - SQL + /workspace/sql/databases/{database_id}/query: + post: + description: Execute a query into a database for your account. + operationId: execute_query + parameters: + - description: A unique integer value identifying this database. + explode: false + in: path + name: database_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SQLStatementsRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SQLResultResponse" + description: SQL query executed successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/SQLResultResponse" + description: SQL query execution request accepted and is being processed + asynchronously. + "422": + content: + application/json: + examples: + Error-10073: + description: Unprocessable entity. + summary: Unprocessable Entity + value: + errors: + - status: "422" + code: "10073" + title: Unprocessable Entity + detail: Unprocessable entity. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Unprocessable Entity + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Execute a query into a database + tags: + - SQL + /workspace/storage/buckets: + get: + description: List all buckets. + operationId: list_buckets + parameters: + - description: Filter by bucket (exact match). + explode: true + in: query + name: bucket + required: false + schema: + type: string + style: form + - description: Filter by creation date (exact match). + explode: true + in: query + name: created + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by creation date (greater than or equal). + explode: true + in: query + name: created__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by creation date (less than or equal). + explode: true + in: query + name: created__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by description (case-insensitive, partial match)." + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (exact match). + explode: true + in: query + name: last_modified + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Filter by status (accepts comma-separated values). + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: Filter by workloads access (accepts comma-separated values). + explode: true + in: query + name: workloads_access + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedBucketList" + description: List of buckets retrieved successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List buckets + tags: + - Storage - Buckets + post: + description: Create a new bucket. + operationId: create_bucket + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/BucketCreateRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/BucketCreateResponse" + description: Bucket created successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/BucketCreateResponse" + description: Bucket creation request accepted and is being processed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new bucket + tags: + - Storage - Buckets + /workspace/storage/buckets/{bucket_name}: + delete: + description: Delete a specific bucket. + operationId: delete_bucket + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Bucket deleted successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Bucket deletion request accepted and is being processed. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a bucket + tags: + - Storage - Buckets + get: + description: Retrieve details from a specific bucket. + operationId: retrieve_bucket + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/BucketCreateResponse" + description: Bucket details retrieved successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve a bucket + tags: + - Storage - Buckets + patch: + description: Update bucket information (bucket name cannot be changed) + operationId: update_bucket + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedBucketRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/BucketCreateResponse" + description: Bucket updated successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/BucketCreateResponse" + description: Bucket update request accepted and is being processed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update bucket info + tags: + - Storage - Buckets + /workspace/storage/credentials: + get: + description: List all credentials. + operationId: list_credentials + parameters: + - description: Filter by access key (exact match). + explode: true + in: query + name: access_key + required: false + schema: + type: string + style: form + - description: Filter by bucket name (exact match). + explode: true + in: query + name: buckets + required: false + schema: + type: string + style: form + - description: Filter by multiple bucket names (comma-separated). + explode: true + in: query + name: buckets__in + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (exact match). + explode: true + in: query + name: last_modified + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedCredentialList" + description: List of credentials retrieved successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List credentials + tags: + - Storage - Credentials + post: + description: Create a new credential. + operationId: create_credential + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialCreateRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialResponse" + description: Credential created successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialResponse" + description: Credential creation request accepted and is being processed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a new credential + tags: + - Storage - Credentials + /workspace/storage/credentials/{credential_id}: + delete: + description: Delete a specific credential. + operationId: delete_credential + parameters: + - description: The unique identifier of the credential + explode: false + in: path + name: credential_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Credential deleted successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Credential deletion request accepted and is being processed. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a credential + tags: + - Storage - Credentials + get: + description: Retrieve details from a specific credential. + operationId: retrieve_credential + parameters: + - description: The unique identifier of the credential + explode: false + in: path + name: credential_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/CredentialResponse" + description: Credential details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a credential + tags: + - Storage - Credentials + /workspace/storage/buckets/{bucket_name}/objects: + get: + description: List objects from bucket + operationId: list_objects + parameters: + - description: "If true, lists objects recursively. If false, lists only the\ + \ first level using Delimiter='/' (default: true)." + explode: true + in: query + name: all_levels + required: false + schema: + type: boolean + style: form + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: A continuation token for the next page of records. + explode: true + in: query + name: continuation_token + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Number of results to be returned on the page. Limited to 1000 + objects. + explode: true + in: query + name: max_object_count + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter objects by key prefix. If empty, lists from the bucket\ + \ root (default: empty)." + explode: true + in: query + name: prefix + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseBucketObject" + description: List of bucket objects retrieved successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List objects from bucket + tags: + - Storage - Objects + /workspace/storage/buckets/{bucket_name}/objects/{object_key}: + delete: + description: "Upon a successful deletion request, the object will be permanentlydeleted\ + \ after a 24-hour grace period." + operationId: delete_object_key + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: The key/path of the object within the bucket + explode: false + in: path + name: object_key + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Object deleted successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Object deletion request accepted and is being processed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete object key + tags: + - Storage - Objects + get: + description: Download the object key from bucket. + operationId: download_object + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: The key/path of the object within the bucket + explode: false + in: path + name: object_key + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/octet-stream: + schema: + format: binary + type: string + description: Object downloaded successfully. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Download object + tags: + - Storage - Objects + post: + description: "Create a new object key in the bucket. The object's Content-Type\ + \ is defined by the Content-Type header. If this header is not included, the\ + \ Content-Type will be automatically detected." + operationId: create_object_key + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: The key/path of the object within the bucket + explode: false + in: path + name: object_key + required: true + schema: + type: string + style: simple + - description: The MIME type of the object being uploaded + explode: false + in: header + name: Content-Type + required: false + schema: + type: string + style: simple + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessObjectOperation" + description: Object created successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessObjectOperationAsync" + description: Object creation request accepted and is being processed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create new object key. + tags: + - Storage - Objects + put: + description: "Update the object key from bucket. The object's Content-Type is\ + \ defined by the Content-Type header. If this header is not included, the\ + \ Content-Type will be automatically detected." + operationId: update_object_key + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: The key/path of the object within the bucket + explode: false + in: path + name: object_key + required: true + schema: + type: string + style: simple + - description: The MIME type of the object being uploaded + explode: false + in: header + name: Content-Type + required: false + schema: + type: string + style: simple + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessObjectOperation" + description: Object updated successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/SuccessObjectOperationAsync" + description: Object update request accepted and is being processed. + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update the object key. + tags: + - Storage - Objects + /workspace/storage/buckets/{bucket_name}/objects/{object_key}/copy/{new_object_key}: + post: + description: Copy an object to a new key within the same bucket. + operationId: copy_object_key + parameters: + - description: The name of the bucket + explode: false + in: path + name: bucket_name + required: true + schema: + type: string + style: simple + - description: The key/path of the destination object within the bucket + explode: false + in: path + name: new_object_key + required: true + schema: + type: string + style: simple + - description: The key/path of the source object within the bucket + explode: false + in: path + name: object_key + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: {} + responses: + "201": + content: + application/json: + schema: + description: Object copied successfully + description: "" + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Copy object to new key + tags: + - Storage - Objects + /identity/users/{user_id}/lockout: + delete: + description: Destroy Lockout info from user. + operationId: destroy_lockout_user + parameters: + - description: A unique integer value identifying the user. + explode: false + in: path + name: user_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + description: No response body + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Unlock user + tags: + - Users - Lockout + /vcs/continuous_deployments/{continuous_deployment_id}/executions: + get: + description: List all continuous deployment executions. + operationId: list_executions + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Filter by created date (greater than or equal). + explode: true + in: query + name: created_at__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by created date (less than or equal). + explode: true + in: query + name: created_at__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: Filter by status (accepts comma-separated values). + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: Filter by updated date (greater than or equal). + explode: true + in: query + name: updated_at__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by updated date (less than or equal). + explode: true + in: query + name: updated_at__lte + required: false + schema: + format: date-time + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedExecutionList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List executions + tags: + - VCS - Continuous Deployment Executions + post: + description: Create a new continuous deployment execution. + operationId: create_execution + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + type: object + description: No request body required + required: false + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseExecution" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncExecution" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a execution + tags: + - VCS - Continuous Deployment Executions + /vcs/continuous_deployments/{continuous_deployment_id}/executor: + get: + description: Retrieve details from a specific continuous deployment executor. + operationId: retrieve_executor + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveExecutor" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a executor + tags: + - VCS - Continuous Deployment Executor + put: + description: Update continuous deployment executor information. + operationId: update_executor + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + type: object + description: No request body required + required: false + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseExecutor" + description: "" + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncExecutor" + description: "" + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a executor + tags: + - VCS - Continuous Deployment Executor + /vcs/continuous_deployments: + get: + description: List all continuous deployments. + operationId: list_continuous_deployments + parameters: + - description: Filter by branch (exact match). + explode: true + in: query + name: branch + required: false + schema: + type: string + style: form + - description: Filter by created date (greater than or equal). + explode: true + in: query + name: created__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by created date (less than or equal). + explode: true + in: query + name: created__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: "Filter by repository (case-insensitive, partial match)." + explode: true + in: query + name: repository + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedContinuousDeploymentList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List continuous deployments + tags: + - VCS - Continuous Deployments + post: + description: Create a new continuous deployment. + operationId: create_continuous_deployment + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContinuousDeploymentRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseContinuousDeployment" + description: Created + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncContinuousDeployment" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a continuous deployment + tags: + - VCS - Continuous Deployments + /vcs/continuous_deployments/{continuous_deployment_id}: + delete: + description: Delete a specific continuous deployment. + operationId: delete_continuous_deployment + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteContinuousDeployment" + description: Ok + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteContinuousDeployment" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a continuous deployment + tags: + - VCS - Continuous Deployments + get: + description: Retrieve details from a specific continuous deployment. + operationId: retrieve_continuous_deployment + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + type: string + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveContinuousDeployment" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a continuous deployment + tags: + - VCS - Continuous Deployments + patch: + description: Partialy update continuous deployment information. + operationId: partial_update_continuous_deployment + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchContinuousDeploymentRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseContinuousDeployment" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncContinuousDeployment" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partialy update a continuous deployment + tags: + - VCS - Continuous Deployments + put: + description: Update continuous deployment information. + operationId: update_continuous_deployment + parameters: + - description: Unique identifier of the continuous deployment + explode: false + in: path + name: continuous_deployment_id + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContinuousDeploymentRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseContinuousDeployment" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncContinuousDeployment" + description: Accepted + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a continuous deployment + tags: + - VCS - Continuous Deployments + /vcs/execution_scripts: + get: + description: List all execution scripts. + operationId: list_execution_scripts + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedExecutionScriptList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List execution scripts + tags: + - VCS - Execution Scripts + /vcs/execution_scripts/{execution_script_id}: + get: + description: Retrieve details from a specific execution script. + operationId: retrieve_execution_script + parameters: + - description: A unique integer value identifying this execution script. + explode: false + in: path + name: execution_script_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveExecutionScript" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a execution script + tags: + - VCS - Execution Scripts + /vcs/integrations: + get: + description: List all account integrations. + operationId: list_integrations + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: Filter by platform id (exact match). + explode: true + in: query + name: platform + required: false + schema: + type: string + style: form + - description: "Filter by scope (case-insensitive, partial match)." + explode: true + in: query + name: scope + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedIntegrationList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List integrations + tags: + - VCS - Integrations + /vcs/integrations/{integration_id}: + delete: + description: Delete a specific account integration. + operationId: delete_integration + parameters: + - description: Unique identifier of the integration + explode: false + in: path + name: integration_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseDeleteIntegration" + description: Ok + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseAsyncDeleteIntegration" + description: Accepted + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an integration + tags: + - VCS - Integrations + get: + description: Retrieve details from a specific account integration. + operationId: retrieve_integration + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Unique identifier of the integration + explode: false + in: path + name: integration_id + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/ResponseRetrieveIntegration" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a integration + tags: + - VCS - Integrations + /vcs/integrations/{integration_id}/repositories: + get: + description: Retrieve repositories for a specific integration. + operationId: list_repositories + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Unique identifier of the integration + explode: false + in: path + name: integration_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedRepositoryList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List integration repositories. + tags: + - VCS - Integrations + /vcs/providers: + get: + description: List all providers. + operationId: list_providers + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedPlatformList" + description: Ok + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List providers + tags: + - VCS - Providers + /workspace/wafs: + get: + description: List all WAFs owned by your account. + operationId: list_wafs + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedWAFList" + description: List of WAFs retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Web Application Firewalls (WAFs) + tags: + - WAFs + post: + description: Create a new WAF for your account. + operationId: create_waf + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFResponse" + description: WAF created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Web Application Firewall (WAF) + tags: + - WAFs + /workspace/wafs/{waf_id}: + delete: + description: Delete a specific WAF in your account. + operationId: delete_waf + parameters: + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: WAF deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Web Application Firewall (WAF) + tags: + - WAFs + get: + description: Retrieve details from a specific WAF in your account. + operationId: retrieve_waf + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFResponse" + description: WAF details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details from a Web Application Firewall (WAF) + tags: + - WAFs + patch: + description: Update one or more fields of an existing WAF without affecting + other fields. + operationId: partial_update_waf + parameters: + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedWAFRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFResponse" + description: WAF partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Web Application Firewall (WAF) + tags: + - WAFs + put: + description: Update an existing WAF. This replaces the entire WAF with the new + data provided. + operationId: update_waf + parameters: + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFResponse" + description: WAF updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Web Application Firewall (WAF) + tags: + - WAFs + /workspace/wafs/{waf_id}/clone: + post: + description: "Create a new WAF by performing a deep copy of an existing WAF,\ + \ including its Exceptions." + operationId: clone_waf + parameters: + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/CloneWAFRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFResponse" + description: WAF cloned successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Clone a Web Application Firewall (WAF) + tags: + - WAFs + /workspace/wafs/{waf_id}/exceptions: + get: + description: List all Exceptions associated with a specific WAF owned by your + account. + operationId: list_waf_exceptions + parameters: + - description: Filter by creation date (greater than or equal). + explode: true + in: query + name: created_at__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by creation date (less than or equal). + explode: true + in: query + name: created_at__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by description (case-insensitive, partial match)." + explode: true + in: query + name: description + required: false + schema: + type: string + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: "Filter by path (case-insensitive, partial match)." + explode: true + in: query + name: path + required: false + schema: + type: string + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedWAFRuleList" + description: List of WAF rules retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Exceptions for a Web Application Firewall (WAF) + tags: + - WAFs - Exceptions + post: + description: Create a new Exception for a specific WAF in your account. + operationId: create_waf_exception + parameters: + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRuleRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRuleResponse" + description: WAF rule created successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Exception for a Web Application Firewall (WAF) + tags: + - WAFs - Exceptions + /workspace/wafs/{waf_id}/exceptions/{exception_id}: + delete: + description: Remove a specific Exception from a WAF in your account. + operationId: delete_waf_exception + parameters: + - description: A unique integer value identifying the WAF exception. + explode: false + in: path + name: exception_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: WAF rule deleted successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Exception from a Web Application Firewall (WAF) + tags: + - WAFs - Exceptions + get: + description: Retrieve details of a specific Exception from a WAF in your account. + operationId: retrieve_waf_exception + parameters: + - description: A unique integer value identifying the WAF exception. + explode: false + in: path + name: exception_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRuleResponse" + description: WAF rule details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Exception from a Web Application Firewall (WAF) + tags: + - WAFs - Exceptions + patch: + description: Update one or more fields of an existing exception for a WAF without + affecting other fields. + operationId: partial_update_waf_exception + parameters: + - description: A unique integer value identifying the WAF exception. + explode: false + in: path + name: exception_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedWAFRuleRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRuleResponse" + description: WAF rule partially updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Exception for a Web Application Firewall (WAF) + tags: + - WAFs - Exceptions + put: + description: Update an existing Exception for a WAF. This replaces the entire + rule with the new data provided. + operationId: update_waf_exception + parameters: + - description: A unique integer value identifying the WAF exception. + explode: false + in: path + name: exception_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the WAF. + explode: false + in: path + name: waf_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRuleRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WAFRuleResponse" + description: WAF rule updated successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Exception for a Web Application Firewall (WAF) + tags: + - WAFs - Exceptions + /workspace/workloads/{workload_id}/deployments: + get: + description: List all Workload Deployments related to your account's Workloads. + operationId: list_workload_deployments + parameters: + - description: Filter by current status. + explode: true + in: query + name: current + required: false + schema: + type: boolean + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + - description: "Filter by tag (case-insensitive, partial match)." + explode: true + in: query + name: tag + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedWorkloadDeploymentList" + description: List of workload deployments retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Workload Deployments + tags: + - Workload Deployments + post: + description: Create a new Workload Deployment in your account. + operationId: create_workload_deployment + parameters: + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment created successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment creation accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create a Workload Deployment + tags: + - Workload Deployments + /workspace/workloads/{workload_id}/deployments/{deployment_id}: + delete: + description: Delete a specific Workload Deployment in your account. + operationId: delete_workload_deployment + parameters: + - description: A unique integer value identifying the deployment. + explode: false + in: path + name: deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Workload deployment deleted successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Workload deployment deletion accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete a Workload Deployment + tags: + - Workload Deployments + get: + description: Retrieve details of a specific Workload Deployment in your account. + operationId: retrieve_workload_deployment + parameters: + - description: A unique integer value identifying the deployment. + explode: false + in: path + name: deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of a Workload Deployment + tags: + - Workload Deployments + patch: + description: Update one or more fields of an existing Workload Deployment without + affecting other fields. + operationId: partial_update_workload_deployment + parameters: + - description: A unique integer value identifying the deployment. + explode: false + in: path + name: deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedWorkloadDeploymentRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment partially updated successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment partial update accepted and processing + asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update a Workload Deployment + tags: + - Workload Deployments + put: + description: Update an existing Workload Deployment. This replaces the entire + Workload Deployment with the new data provided. + operationId: update_workload_deployment + parameters: + - description: A unique integer value identifying the deployment. + explode: false + in: path + name: deployment_id + required: true + schema: + format: int64 + type: integer + style: simple + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment updated successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadDeploymentResponse" + description: Workload deployment update accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update a Workload Deployment + tags: + - Workload Deployments + /workspace/workloads: + get: + description: List all Workloads owned by your account. + operationId: list_workloads + parameters: + - description: Filter by active status. + explode: true + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: Filter by digital certificate id (accepts comma-separated values). + explode: true + in: query + name: digital_certificate_id + required: false + schema: + format: int64 + type: integer + style: form + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: Filter by id (accepts comma-separated values). + explode: true + in: query + name: id + required: false + schema: + format: int64 + type: integer + style: form + - description: Filter by infrastructure (accepts comma-separated values). + explode: true + in: query + name: infrastructure + required: false + schema: + type: string + style: form + - description: "Filter by last editor (case-insensitive, partial match)." + explode: true + in: query + name: last_editor + required: false + schema: + type: string + style: form + - description: Filter by last modified date (greater than or equal). + explode: true + in: query + name: last_modified__gte + required: false + schema: + format: date-time + type: string + style: form + - description: Filter by last modified date (less than or equal). + explode: true + in: query + name: last_modified__lte + required: false + schema: + format: date-time + type: string + style: form + - description: "Filter by map name (case-insensitive, partial match)." + explode: true + in: query + name: map_name + required: false + schema: + type: string + style: form + - description: Filter by mTLS trusted CA certificate id (accepts comma-separated + values). + explode: true + in: query + name: mtls_trusted_ca_certificate_id + required: false + schema: + format: int64 + type: integer + style: form + - description: "Filter by name (case-insensitive, partial match)." + explode: true + in: query + name: name + required: false + schema: + type: string + style: form + - description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + - description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + - description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + - description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/PaginatedWorkloadList" + description: List of workloads retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: List Workloads + tags: + - Workloads + post: + description: Create a new Workload in your account. + operationId: create_workload + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadRequest" + required: true + responses: + "201": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload created successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload creation accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Create an Workload + tags: + - Workloads + /workspace/workloads/{workload_id}: + delete: + description: Delete a specific Workload in your account. + operationId: delete_workload + parameters: + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Workload deleted successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/DeleteResponse" + description: Workload deletion accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Delete an Workload + tags: + - Workloads + get: + description: Retrieve details of a specific Workload in your account. + operationId: retrieve_workload + parameters: + - description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload details retrieved successfully. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Retrieve details of an Workload + tags: + - Workloads + patch: + description: Update one or more fields of an existing Workload without affecting + other fields. + operationId: partial_update_workload + parameters: + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PatchedWorkloadRequest" + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload partially updated successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload partial update accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Partially update an Workload + tags: + - Workloads + put: + description: Update an existing Workload. This replaces the entire Workload + with the new data provided. + operationId: update_workload + parameters: + - description: A unique integer value identifying the workload. + explode: false + in: path + name: workload_id + required: true + schema: + format: int64 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadRequest" + required: true + responses: + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload updated successfully. + "202": + content: + application/json: + schema: + $ref: "#/components/schemas/WorkloadResponse" + description: Workload update accepted and processing asynchronously. + "401": + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + "403": + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + "400": + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + "404": + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + "405": + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + "406": + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + "429": + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + "500": + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + security: + - TokenAuth: [] + - BearerAuth: [] + summary: Update an Workload + tags: + - Workloads +components: + parameters: + PageParam: + description: A page number within the paginated result set. + explode: true + in: query + name: page + required: false + schema: + type: integer + style: form + PageSizeParam: + description: A numeric value that indicates the number of items per page. + explode: true + in: query + name: page_size + required: false + schema: + type: integer + style: form + OrderingParam: + description: Which field to use when ordering the results. + explode: true + in: query + name: ordering + required: false + schema: + type: string + style: form + SearchParam: + description: A search term. + explode: true + in: query + name: search + required: false + schema: + type: string + style: form + FieldsParam: + description: Comma-separated list of field names to include in the response. + Nested fields can be accessed using dot notation. + explode: true + in: query + name: fields + required: false + schema: + type: string + style: form + responses: + BadRequest: + content: + application/json: + examples: + Error-10000: + description: Invalid data provided in the request. + summary: Validation Error + value: + errors: + - status: "400" + code: "10000" + title: Validation Error + detail: Invalid data provided in the request. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Validation Error + Unauthorized: + content: + application/json: + examples: + Error-10001: + description: Invalid authentication credentials. + summary: Authentication Failed + value: + errors: + - status: "401" + code: "10001" + title: Authentication Failed + detail: Invalid authentication credentials. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Authentication Failed + Forbidden: + content: + application/json: + examples: + Error-10003: + description: You do not have permission to perform this action. + summary: Permission Denied + value: + errors: + - status: "403" + code: "10003" + title: Permission Denied + detail: You do not have permission to perform this action. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Permission Denied + NotFound: + content: + application/json: + examples: + Error-10004: + description: Not found. + summary: Not Found + value: + errors: + - status: "404" + code: "10004" + title: Not Found + detail: Not found. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Found + MethodNotAllowed: + content: + application/json: + examples: + Error-10005: + description: Method not allowed. + summary: Method Not Allowed + value: + errors: + - status: "405" + code: "10005" + title: Method Not Allowed + detail: Method not allowed. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Method Not Allowed + NotAcceptable: + content: + application/json: + examples: + Error-10006: + description: Could not satisfy the request Accept header. + summary: Not Acceptable + value: + errors: + - status: "406" + code: "10006" + title: Not Acceptable + detail: Could not satisfy the request Accept header. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Not Acceptable + TooManyRequests: + content: + application/json: + examples: + Error-10010: + description: Request was throttled. + summary: Throttled + value: + errors: + - status: "429" + code: "10010" + title: Throttled + detail: Request was throttled. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Throttled + InternalServerError: + content: + application/json: + examples: + Error-10500: + description: An unexpected error occurred. Please try again later. + summary: Internal Server Error + value: + errors: + - status: "500" + code: "10500" + title: Internal Server Error + detail: An unexpected error occurred. Please try again later. + schema: + $ref: "#/components/schemas/ErrorResponse" + description: Internal Server Error + schemas: + Account: + discriminator: + mapping: + Brand: "#/components/schemas/Brand" + Organization: "#/components/schemas/Organization" + Reseller: "#/components/schemas/Reseller" + Workspace: "#/components/schemas/Workspace" + propertyName: type + oneOf: + - $ref: "#/components/schemas/Brand" + - $ref: "#/components/schemas/Organization" + - $ref: "#/components/schemas/Reseller" + - $ref: "#/components/schemas/Workspace" + AccountInfo: + example: + info: + key: "" + properties: + info: + additionalProperties: {} + nullable: true + type: object + required: + - info + type: object + AccountRequest: + discriminator: + mapping: + Brand: "#/components/schemas/BrandRequest" + Organization: "#/components/schemas/OrganizationRequest" + Reseller: "#/components/schemas/ResellerRequest" + Workspace: "#/components/schemas/WorkspaceRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/BrandRequest" + - $ref: "#/components/schemas/OrganizationRequest" + - $ref: "#/components/schemas/ResellerRequest" + - $ref: "#/components/schemas/WorkspaceRequest" + Brand: + example: + parent_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + info: + key: "" + properties: + id: + format: int64 + type: integer + name: + maxLength: 150 + minLength: 1 + type: string + active: + type: boolean + last_editor: + type: string + last_modified: + format: date-time + type: string + parent_id: + format: int64 + type: integer + created: + format: date-time + type: string + info: + additionalProperties: {} + type: object + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - active + - created + - id + - info + - last_editor + - last_modified + - name + - parent_id + - type + type: object + BrandRequest: + example: + name: name + type: type + properties: + name: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - name + - type + type: object + CreateAccountRequest: + discriminator: + mapping: + Brand: "#/components/schemas/CreateBrandRequest" + Organization: "#/components/schemas/CreateOrganizationRequest" + Reseller: "#/components/schemas/CreateResellerRequest" + Workspace: "#/components/schemas/CreateWorkspaceRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/CreateBrandRequest" + - $ref: "#/components/schemas/CreateOrganizationRequest" + - $ref: "#/components/schemas/CreateResellerRequest" + - $ref: "#/components/schemas/CreateWorkspaceRequest" + CreateBrandRequest: + description: |- + Mixin to validate parent-child relationships between different account types. + + Rules: + - Brand: Can only have Reseller children and no parent + - Reseller: Can only have Organization children and Brand parent + - Organization: Can only have Workspace children and Reseller parent + - Workspace: Cannot have children, parent must be an Organization + example: + parent_id: 171976545 + name: name + type: type + properties: + name: + maxLength: 150 + minLength: 1 + type: string + parent_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - name + - parent_id + - type + type: object + CreateOrganizationRequest: + description: |- + Mixin to validate parent-child relationships between different account types. + + Rules: + - Brand: Can only have Reseller children and no parent + - Reseller: Can only have Organization children and Brand parent + - Organization: Can only have Workspace children and Reseller parent + - Workspace: Cannot have children, parent must be an Organization + properties: + name: + maxLength: 150 + minLength: 1 + type: string + parent_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - name + - parent_id + - type + type: object + CreateResellerRequest: + description: |- + Mixin to validate parent-child relationships between different account types. + + Rules: + - Brand: Can only have Reseller children and no parent + - Reseller: Can only have Organization children and Brand parent + - Organization: Can only have Workspace children and Reseller parent + - Workspace: Cannot have children, parent must be an Organization + properties: + name: + maxLength: 150 + minLength: 1 + type: string + parent_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + currency_iso_code: + description: |- + * `USD` - USD + * `BRL` - BRL + type: string + x-extensible-enum: + - USD + - BRL + terms_of_service_url: + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - currency_iso_code + - name + - parent_id + - type + type: object + CreateWorkspaceRequest: + description: |- + Mixin to validate parent-child relationships between different account types. + + Rules: + - Brand: Can only have Reseller children and no parent + - Reseller: Can only have Organization children and Brand parent + - Organization: Can only have Workspace children and Reseller parent + - Workspace: Cannot have children, parent must be an Organization + properties: + name: + maxLength: 150 + minLength: 1 + type: string + parent_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - name + - parent_id + - type + type: object + Organization: + properties: + id: + format: int64 + type: integer + name: + maxLength: 150 + minLength: 1 + type: string + active: + type: boolean + last_editor: + type: string + last_modified: + format: date-time + type: string + parent_id: + format: int64 + type: integer + created: + format: date-time + type: string + info: + additionalProperties: {} + type: object + status: + description: |- + * `active` - Active account status, can be used for regular operations. + * `suspended` - Suspended account status, for accounts with limited access to support and payments only. + * `disabled` - Disabled account status, services are offline, user can only access support. + * `closed` - Closed account status, services are offline but can be reactivated. + type: string + x-extensible-enum: + - active + - suspended + - disabled + - closed + reason: + description: |- + * `trial` - Trial account status, currently on a trial period. + * `online` - Online account status, used for online sales operations. + * `regular` - Regular account status, indicates the customer has an active contract. + * `overdue` - Overdue status, the account failed necessary payments after retries. + * `quarantine` - Quarantine status, the account is suspended due to suspected misuse or security breach. + * `violation` - Violation status, temporarily suspended due to administrative, technical, security, or policy violations. + * `idle` - Idle status, the account was removed due to inactivity. + * `terminated` - Terminated status, the account was shut down by the service provider. + * `voluntary` - Voluntary status, the account was canceled by its owner. + type: string + x-extensible-enum: + - trial + - online + - regular + - overdue + - quarantine + - violation + - idle + - terminated + - voluntary + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - active + - created + - id + - info + - last_editor + - last_modified + - name + - parent_id + - reason + - status + - type + type: object + OrganizationRequest: + properties: + name: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - name + - type + type: object + PatchedAccountRequest: + discriminator: + mapping: + Brand: "#/components/schemas/PatchedBrandRequest" + Organization: "#/components/schemas/PatchedOrganizationRequest" + Reseller: "#/components/schemas/PatchedResellerRequest" + Workspace: "#/components/schemas/PatchedWorkspaceRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/PatchedBrandRequest" + - $ref: "#/components/schemas/PatchedOrganizationRequest" + - $ref: "#/components/schemas/PatchedResellerRequest" + - $ref: "#/components/schemas/PatchedWorkspaceRequest" + PatchedBrandRequest: + example: + name: name + type: type + properties: + name: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - type + type: object + PatchedOrganizationRequest: + properties: + name: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - type + type: object + PatchedResellerRequest: + properties: + name: + maxLength: 150 + minLength: 1 + type: string + currency_iso_code: + description: |- + * `USD` - USD + * `BRL` - BRL + type: string + x-extensible-enum: + - USD + - BRL + terms_of_service_url: + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - type + type: object + PatchedWorkspaceRequest: + properties: + name: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - type + type: object + Reseller: + properties: + id: + format: int64 + type: integer + name: + maxLength: 150 + minLength: 1 + type: string + active: + type: boolean + last_editor: + type: string + last_modified: + format: date-time + type: string + parent_id: + format: int64 + type: integer + created: + format: date-time + type: string + info: + additionalProperties: {} + type: object + currency_iso_code: + description: |- + * `USD` - USD + * `BRL` - BRL + type: string + x-extensible-enum: + - USD + - BRL + terms_of_service_url: + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - active + - created + - currency_iso_code + - id + - info + - last_editor + - last_modified + - name + - parent_id + - type + type: object + ResellerRequest: + properties: + name: + maxLength: 150 + minLength: 1 + type: string + currency_iso_code: + description: |- + * `USD` - USD + * `BRL` - BRL + type: string + x-extensible-enum: + - USD + - BRL + terms_of_service_url: + maxLength: 255 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - currency_iso_code + - name + - type + type: object + ResponseAccount: + example: + data: + parent_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + info: + key: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Account" + required: + - data + type: object + ResponseAccountInfo: + example: + data: + info: + key: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/AccountInfo" + required: + - data + type: object + ResponseAsyncAccount: + example: + data: + parent_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + info: + key: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Account" + required: + - data + type: object + ResponseAsyncAccountInfo: + example: + data: + info: + key: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/AccountInfo" + required: + - data + type: object + ResponseListAccount: + discriminator: + mapping: + Brand: "#/components/schemas/Brand" + Organization: "#/components/schemas/Organization" + Reseller: "#/components/schemas/Reseller" + Workspace: "#/components/schemas/Workspace" + propertyName: type + oneOf: + - $ref: "#/components/schemas/Brand" + - $ref: "#/components/schemas/Organization" + - $ref: "#/components/schemas/Reseller" + - $ref: "#/components/schemas/Workspace" + ResponseRetrieveAccount: + example: + data: + parent_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + info: + key: "" + properties: + data: + $ref: "#/components/schemas/Account" + required: + - data + type: object + ResponseRetrieveAccountInfo: + example: + data: + info: + key: "" + properties: + data: + $ref: "#/components/schemas/AccountInfo" + required: + - data + type: object + Workspace: + properties: + id: + format: int64 + type: integer + name: + maxLength: 150 + minLength: 1 + type: string + active: + type: boolean + last_editor: + type: string + last_modified: + format: date-time + type: string + parent_id: + format: int64 + type: integer + created: + format: date-time + type: string + info: + additionalProperties: {} + type: object + workspace_id: + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - active + - created + - id + - info + - last_editor + - last_modified + - name + - parent_id + - type + - workspace_id + type: object + WorkspaceRequest: + properties: + name: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `Brand` - Brand + * `Reseller` - Reseller + * `Organization` - Organization + * `Workspace` - Workspace + type: string + x-extensible-enum: + - Brand + - Reseller + - Organization + - Workspace + required: + - name + - type + type: object + PaginatedAccountList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - parent_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + info: + key: "" + - parent_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + info: + key: "" + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListAccount" + type: array + type: object + ChatThread: + additionalProperties: false + example: + thread_id: 0 + account_id: 6 + last_editor: last_editor + name: name + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + thread_id: + format: int64 + type: integer + account_id: + format: int64 + nullable: true + type: integer + name: + maxLength: 255 + type: string + description: + type: string + last_modified: + format: date-time + type: string + last_editor: + type: string + required: + - account_id + - last_editor + - last_modified + - thread_id + title: ChatThread + type: object + ChatThreadRequest: + additionalProperties: false + example: + name: name + description: description + properties: + name: + maxLength: 255 + type: string + description: + type: string + title: ChatThreadRequest + type: object + Chunk: + additionalProperties: false + example: + metadata: + key: "" + name: name + description: description + embedding: + key: "" + document_id: 6 + chunk_id: 0 + content: content + properties: + chunk_id: + format: int64 + type: integer + document_id: + format: int64 + type: integer + name: + maxLength: 255 + type: string + description: + type: string + embedding: + additionalProperties: {} + type: object + metadata: + additionalProperties: {} + type: object + content: + type: string + required: + - chunk_id + - content + - document_id + title: Chunk + type: object + Document: + additionalProperties: false + example: + kb_id: 6 + last_editor: last_editor + name: name + description: description + chunk_strategy: + key: "" + document_id: 0 + type: type + source_uri: source_uri + last_modified: 2000-01-23T04:56:07.000+00:00 + status: "" + properties: + document_id: + format: int64 + type: integer + kb_id: + format: int64 + type: integer + name: + type: string + description: + type: string + type: + type: string + source_uri: + maxLength: 1024 + type: string + chunk_strategy: + additionalProperties: {} + type: object + status: + allOf: + - $ref: "#/components/schemas/StatusEnum" + last_modified: + format: date-time + type: string + last_editor: + type: string + required: + - document_id + - kb_id + - last_editor + - last_modified + - status + title: Document + type: object + DocumentRequest: + additionalProperties: false + properties: + name: + type: string + description: + type: string + type: + type: string + source_uri: + maxLength: 1024 + type: string + chunk_strategy: + additionalProperties: {} + type: object + title: DocumentRequest + type: object + EmbeddingModelEnum: + description: '* `text-embedding-3-small` - text-embedding-3-small' + title: EmbeddingModelEnum + type: string + x-extensible-enum: + - text-embedding-3-small + KBAskResponse: + additionalProperties: false + example: + answer: answer + context: + - similarity: 0.8008281904610115 + source: source + title: title + search_type: search_type + chunk_id: chunk_id + content: content + - similarity: 0.8008281904610115 + source: source + title: title + search_type: search_type + chunk_id: chunk_id + content: content + properties: + answer: + type: string + context: + items: + $ref: "#/components/schemas/KBQueryResult" + type: array + required: + - answer + - context + title: KBAskResponse + type: object + KBQueryResponse: + additionalProperties: false + example: + results: + - similarity: 0.8008281904610115 + source: source + title: title + search_type: search_type + chunk_id: chunk_id + content: content + - similarity: 0.8008281904610115 + source: source + title: title + search_type: search_type + chunk_id: chunk_id + content: content + properties: + results: + items: + $ref: "#/components/schemas/KBQueryResult" + type: array + required: + - results + title: KBQueryResponse + type: object + KBQueryResult: + additionalProperties: false + example: + similarity: 0.8008281904610115 + source: source + title: title + search_type: search_type + chunk_id: chunk_id + content: content + properties: + chunk_id: + type: string + title: + type: string + content: + type: string + source: + type: string + similarity: + format: double + nullable: true + type: number + search_type: + type: string + required: + - chunk_id + - content + - search_type + - source + - title + title: KBQueryResult + type: object + KnowledgeBase: + additionalProperties: false + example: + kb_id: 0 + account_id: 6 + sql_id: sql_id + storage_name: storage_name + sql_db_name: sql_db_name + last_editor: last_editor + name: name + embedding_model: "" + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + kb_id: + format: int64 + type: integer + account_id: + format: int64 + nullable: true + type: integer + name: + type: string + description: + type: string + embedding_model: + allOf: + - $ref: "#/components/schemas/EmbeddingModelEnum" + sql_id: + type: string + sql_db_name: + type: string + storage_name: + type: string + last_modified: + format: date-time + type: string + last_editor: + type: string + required: + - account_id + - kb_id + - last_editor + - last_modified + - name + - sql_db_name + - sql_id + - storage_name + title: KnowledgeBase + type: object + KnowledgeBaseRequest: + additionalProperties: false + example: + name: name + embedding_model: "" + description: description + properties: + name: + minLength: 1 + type: string + description: + type: string + embedding_model: + allOf: + - $ref: "#/components/schemas/EmbeddingModelEnum" + required: + - name + title: KnowledgeBaseRequest + type: object + Message: + additionalProperties: false + example: + thread_id: 6 + metadata: + key: "" + last_editor: last_editor + name: name + description: description + message_id: 0 + message: + key: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + message_id: + format: int64 + type: integer + thread_id: + format: int64 + type: integer + last_editor: + type: string + name: + maxLength: 255 + type: string + description: + type: string + message: + additionalProperties: {} + type: object + metadata: + additionalProperties: {} + type: object + last_modified: + format: date-time + type: string + required: + - last_editor + - last_modified + - message + - message_id + - thread_id + title: Message + type: object + MessageRequest: + additionalProperties: false + example: + metadata: + key: "" + name: name + description: description + message: + key: "" + properties: + name: + maxLength: 255 + type: string + description: + type: string + message: + additionalProperties: {} + type: object + metadata: + additionalProperties: {} + type: object + required: + - message + title: MessageRequest + type: object + PaginatedChatThreadList: + additionalProperties: false + example: + count: 123 + results: + - thread_id: 0 + account_id: 6 + last_editor: last_editor + name: name + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + - thread_id: 0 + account_id: 6 + last_editor: last_editor + name: name + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ChatThread" + type: array + title: PaginatedChatThreadList + type: object + PaginatedChunkList: + additionalProperties: false + example: + count: 123 + results: + - metadata: + key: "" + name: name + description: description + embedding: + key: "" + document_id: 6 + chunk_id: 0 + content: content + - metadata: + key: "" + name: name + description: description + embedding: + key: "" + document_id: 6 + chunk_id: 0 + content: content + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/Chunk" + type: array + title: PaginatedChunkList + type: object + PaginatedDocumentList: + additionalProperties: false + example: + count: 123 + results: + - kb_id: 6 + last_editor: last_editor + name: name + description: description + chunk_strategy: + key: "" + document_id: 0 + type: type + source_uri: source_uri + last_modified: 2000-01-23T04:56:07.000+00:00 + status: "" + - kb_id: 6 + last_editor: last_editor + name: name + description: description + chunk_strategy: + key: "" + document_id: 0 + type: type + source_uri: source_uri + last_modified: 2000-01-23T04:56:07.000+00:00 + status: "" + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/Document" + type: array + title: PaginatedDocumentList + type: object + PaginatedKnowledgeBaseList: + additionalProperties: false + example: + count: 123 + results: + - kb_id: 0 + account_id: 6 + sql_id: sql_id + storage_name: storage_name + sql_db_name: sql_db_name + last_editor: last_editor + name: name + embedding_model: "" + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + - kb_id: 0 + account_id: 6 + sql_id: sql_id + storage_name: storage_name + sql_db_name: sql_db_name + last_editor: last_editor + name: name + embedding_model: "" + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/KnowledgeBase" + type: array + title: PaginatedKnowledgeBaseList + type: object + PaginatedMessageList: + additionalProperties: false + example: + count: 123 + results: + - thread_id: 6 + metadata: + key: "" + last_editor: last_editor + name: name + description: description + message_id: 0 + message: + key: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + - thread_id: 6 + metadata: + key: "" + last_editor: last_editor + name: name + description: description + message_id: 0 + message: + key: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/Message" + type: array + title: PaginatedMessageList + type: object + PaginatedToolList: + additionalProperties: false + example: + count: 123 + results: + - json_schema: + key: "" + last_editor: last_editor + name: name + tool_id: 0 + description: description + active: true + type: type + kbs: kbs + last_modified: 2000-01-23T04:56:07.000+00:00 + - json_schema: + key: "" + last_editor: last_editor + name: name + tool_id: 0 + description: description + active: true + type: type + kbs: kbs + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/Tool" + type: array + title: PaginatedToolList + type: object + PatchedChatThreadRequest: + additionalProperties: false + example: + name: name + description: description + properties: + name: + maxLength: 255 + type: string + description: + type: string + title: PatchedChatThreadRequest + type: object + PatchedKnowledgeBaseRequest: + additionalProperties: false + example: + name: name + embedding_model: "" + description: description + properties: + name: + minLength: 1 + type: string + description: + type: string + embedding_model: + allOf: + - $ref: "#/components/schemas/EmbeddingModelEnum" + title: PatchedKnowledgeBaseRequest + type: object + PatchedToolRequest: + additionalProperties: false + example: + json_schema: + key: "" + name: name + description: description + active: true + type: type + properties: + name: + maxLength: 255 + minLength: 1 + type: string + description: + type: string + type: + maxLength: 100 + minLength: 1 + type: string + json_schema: + additionalProperties: {} + type: object + active: + type: boolean + title: PatchedToolRequest + type: object + ResponseAsyncChatThread: + additionalProperties: false + example: + data: + thread_id: 0 + account_id: 6 + last_editor: last_editor + name: name + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ChatThread" + required: + - data + title: ResponseAsyncChatThread + type: object + ResponseAsyncDeleteChatThread: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteChatThread + type: object + ResponseAsyncDeleteDocument: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteDocument + type: object + ResponseAsyncDeleteKnowledgeBase: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteKnowledgeBase + type: object + ResponseAsyncDeleteMessage: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteMessage + type: object + ResponseAsyncDeleteTool: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteTool + type: object + ResponseAsyncDocument: + additionalProperties: false + example: + data: + kb_id: 6 + last_editor: last_editor + name: name + description: description + chunk_strategy: + key: "" + document_id: 0 + type: type + source_uri: source_uri + last_modified: 2000-01-23T04:56:07.000+00:00 + status: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Document" + required: + - data + title: ResponseAsyncDocument + type: object + ResponseAsyncKnowledgeBase: + additionalProperties: false + example: + data: + kb_id: 0 + account_id: 6 + sql_id: sql_id + storage_name: storage_name + sql_db_name: sql_db_name + last_editor: last_editor + name: name + embedding_model: "" + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/KnowledgeBase" + required: + - data + title: ResponseAsyncKnowledgeBase + type: object + ResponseAsyncMessage: + additionalProperties: false + example: + data: + thread_id: 6 + metadata: + key: "" + last_editor: last_editor + name: name + description: description + message_id: 0 + message: + key: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Message" + required: + - data + title: ResponseAsyncMessage + type: object + ResponseAsyncTool: + additionalProperties: false + example: + data: + json_schema: + key: "" + last_editor: last_editor + name: name + tool_id: 0 + description: description + active: true + type: type + kbs: kbs + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Tool" + required: + - data + title: ResponseAsyncTool + type: object + ResponseChatThread: + additionalProperties: false + example: + data: + thread_id: 0 + account_id: 6 + last_editor: last_editor + name: name + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ChatThread" + required: + - data + title: ResponseChatThread + type: object + ResponseDeleteChatThread: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseDeleteChatThread + type: object + ResponseDeleteDocument: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseDeleteDocument + type: object + ResponseDeleteKnowledgeBase: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseDeleteKnowledgeBase + type: object + ResponseDeleteMessage: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseDeleteMessage + type: object + ResponseDeleteTool: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseDeleteTool + type: object + ResponseDocument: + additionalProperties: false + example: + data: + kb_id: 6 + last_editor: last_editor + name: name + description: description + chunk_strategy: + key: "" + document_id: 0 + type: type + source_uri: source_uri + last_modified: 2000-01-23T04:56:07.000+00:00 + status: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Document" + required: + - data + title: ResponseDocument + type: object + ResponseKnowledgeBase: + additionalProperties: false + example: + data: + kb_id: 0 + account_id: 6 + sql_id: sql_id + storage_name: storage_name + sql_db_name: sql_db_name + last_editor: last_editor + name: name + embedding_model: "" + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/KnowledgeBase" + required: + - data + title: ResponseKnowledgeBase + type: object + ResponseMessage: + additionalProperties: false + example: + data: + thread_id: 6 + metadata: + key: "" + last_editor: last_editor + name: name + description: description + message_id: 0 + message: + key: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Message" + required: + - data + title: ResponseMessage + type: object + ResponseRetrieveChatThread: + additionalProperties: false + example: + data: + thread_id: 0 + account_id: 6 + last_editor: last_editor + name: name + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: "#/components/schemas/ChatThread" + required: + - data + title: ResponseRetrieveChatThread + type: object + ResponseRetrieveDocument: + additionalProperties: false + example: + data: + kb_id: 6 + last_editor: last_editor + name: name + description: description + chunk_strategy: + key: "" + document_id: 0 + type: type + source_uri: source_uri + last_modified: 2000-01-23T04:56:07.000+00:00 + status: "" + properties: + data: + $ref: "#/components/schemas/Document" + required: + - data + title: ResponseRetrieveDocument + type: object + ResponseRetrieveKnowledgeBase: + additionalProperties: false + example: + data: + kb_id: 0 + account_id: 6 + sql_id: sql_id + storage_name: storage_name + sql_db_name: sql_db_name + last_editor: last_editor + name: name + embedding_model: "" + description: description + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: "#/components/schemas/KnowledgeBase" + required: + - data + title: ResponseRetrieveKnowledgeBase + type: object + ResponseRetrieveMessage: + additionalProperties: false + example: + data: + thread_id: 6 + metadata: + key: "" + last_editor: last_editor + name: name + description: description + message_id: 0 + message: + key: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: "#/components/schemas/Message" + required: + - data + title: ResponseRetrieveMessage + type: object + ResponseRetrieveTool: + additionalProperties: false + example: + data: + json_schema: + key: "" + last_editor: last_editor + name: name + tool_id: 0 + description: description + active: true + type: type + kbs: kbs + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: "#/components/schemas/Tool" + required: + - data + title: ResponseRetrieveTool + type: object + ResponseTool: + additionalProperties: false + example: + data: + json_schema: + key: "" + last_editor: last_editor + name: name + tool_id: 0 + description: description + active: true + type: type + kbs: kbs + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Tool" + required: + - data + title: ResponseTool + type: object + StatusEnum: + description: |- + * `waiting_authorization` - waiting_authorization + * `authorized` - authorized + title: StatusEnum + type: string + x-extensible-enum: + - waiting_authorization + - authorized + Tool: + additionalProperties: false + example: + json_schema: + key: "" + last_editor: last_editor + name: name + tool_id: 0 + description: description + active: true + type: type + kbs: kbs + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + tool_id: + format: int64 + type: integer + name: + maxLength: 255 + type: string + description: + type: string + type: + maxLength: 100 + type: string + json_schema: + additionalProperties: {} + type: object + active: + type: boolean + kbs: + type: string + last_modified: + format: date-time + type: string + last_editor: + type: string + required: + - kbs + - last_editor + - last_modified + - name + - tool_id + - type + title: Tool + type: object + ToolKBLink: + additionalProperties: false + example: + kb_id: 6 + tool_kb_id: 0 + properties: + tool_kb_id: + format: int64 + type: integer + kb_id: + format: int64 + type: integer + required: + - kb_id + - tool_kb_id + title: ToolKBLink + type: object + ToolRequest: + additionalProperties: false + example: + json_schema: + key: "" + name: name + description: description + active: true + type: type + properties: + name: + maxLength: 255 + minLength: 1 + type: string + description: + type: string + type: + maxLength: 100 + minLength: 1 + type: string + json_schema: + additionalProperties: {} + type: object + active: + type: boolean + required: + - name + - type + title: ToolRequest + type: object + KBAskRequest: + additionalProperties: false + example: + question: question + top_k: 1 + model: model + properties: + question: + minLength: 1 + type: string + top_k: + format: int64 + minimum: 1 + type: integer + model: + nullable: true + type: string + required: + - question + title: KBAskRequest + type: object + KBQueryRequest: + additionalProperties: false + example: + query: query + top_k: 1 + properties: + query: + minLength: 1 + type: string + top_k: + format: int64 + minimum: 1 + type: integer + required: + - query + title: KBQueryRequest + type: object + DeleteResponse: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: DeleteResponse + type: object + LockoutPolicy: + example: + max_attempts: 8 + blocking_period: 868 + active: true + properties: + active: + type: boolean + max_attempts: + description: Maximum number of failed login attempts before lockout + format: int64 + maximum: 100 + minimum: 1 + type: integer + blocking_period: + description: Blocking period in minutes + format: int64 + maximum: 1440 + minimum: 1 + type: integer + required: + - active + - blocking_period + - max_attempts + type: object + LockoutPolicyRequest: + example: + max_attempts: 8 + blocking_period: 868 + active: true + properties: + active: + type: boolean + max_attempts: + description: Maximum number of failed login attempts before lockout + format: int64 + maximum: 100 + minimum: 1 + type: integer + blocking_period: + description: Blocking period in minutes + format: int64 + maximum: 1440 + minimum: 1 + type: integer + required: + - active + - blocking_period + - max_attempts + type: object + LockoutPolicyResponse: + example: + data: + max_attempts: 8 + blocking_period: 868 + active: true + properties: + data: + $ref: "#/components/schemas/LockoutPolicy" + required: + - data + type: object + LoginRequest: + example: + password: password + account_id: 0 + email: email + properties: + email: + format: email + minLength: 1 + type: string + writeOnly: true + password: + description: User password + maxLength: 128 + minLength: 1 + type: string + writeOnly: true + account_id: + format: int64 + nullable: true + type: integer + writeOnly: true + required: + - email + - password + type: object + LoginResponse: + additionalProperties: false + discriminator: + mapping: + TokenPair: "#/components/schemas/TokenPair" + MFAToken: "#/components/schemas/MFAToken" + propertyName: response_type + oneOf: + - $ref: "#/components/schemas/TokenPair" + - $ref: "#/components/schemas/MFAToken" + MFAToken: + description: |- + Used when user has MFA enabled. Returns a temporary MFA token that must be + verified with a TOTP code before receiving full access tokens. + properties: + access_token: + description: "The access_token is a short-lived token (e.g., 10 minutes)\ + \ used for API authentication in the Authorization: Bearer \ + \ header." + type: string + two_factor_required: + description: Specifies the type of two-factor authentication configured. + Currently supports 'TOTP' (Time-based One-Time Password). + type: boolean + two_factor_type: + description: "Indicates whether the user has an active TOTP device configured.\ + \ If false, the user must register a device before using MFA authentication." + type: string + has_active_device: + description: "Indicates whether the user already has an active TOTP device\ + \ configured.If false, the user needs to set up a new device before using\ + \ MFA authentication." + type: boolean + response_type: + description: Discriminator field for LoginResponse + type: string + required: + - access_token + - has_active_device + - response_type + - two_factor_required + - two_factor_type + type: object + PaginatedPolicyList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - last_editor: last_editor + name: name + active: true + rules: + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + - last_editor: last_editor + name: name + active: true + rules: + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/Policy" + type: array + type: object + PatchedPolicyRequest: + example: + name: name + active: true + rules: + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + rules: + items: + $ref: "#/components/schemas/PolicyRuleRequest" + type: array + type: object + Policy: + example: + last_editor: last_editor + name: name + active: true + rules: + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + rules: + items: + $ref: "#/components/schemas/PolicyRule" + type: array + required: + - active + - id + - last_editor + - last_modified + - name + - rules + type: object + PolicyRequest: + example: + name: name + active: true + rules: + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + rules: + items: + $ref: "#/components/schemas/PolicyRuleRequest" + type: array + required: + - active + - name + - rules + type: object + PolicyResponse: + example: + data: + last_editor: last_editor + name: name + active: true + rules: + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + - condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Policy" + required: + - data + type: object + PolicyRule: + example: + condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + properties: + name: + maxLength: 255 + minLength: 1 + type: string + effect: + description: |- + * `allow` - allow + * `deny` - deny + type: string + x-extensible-enum: + - allow + - deny + resource: + description: Resource pattern (regex supported) + maxLength: 500 + minLength: 1 + type: string + actions: + items: + type: string + type: array + condition: + $ref: "#/components/schemas/PolicyRuleCondition" + required: + - actions + - condition + - effect + - name + - resource + type: object + PolicyRuleCondition: + example: + ip_address: + - ip_address + - ip_address + properties: + ip_address: + items: + type: string + minItems: 1 + type: array + required: + - ip_address + type: object + PolicyRuleConditionRequest: + example: + ip_address: + - ip_address + - ip_address + properties: + ip_address: + items: + minLength: 1 + type: string + minItems: 1 + type: array + required: + - ip_address + type: object + PolicyRuleRequest: + example: + condition: + ip_address: + - ip_address + - ip_address + resource: resource + effect: effect + name: name + actions: + - actions + - actions + properties: + name: + maxLength: 255 + minLength: 1 + type: string + effect: + description: |- + * `allow` - allow + * `deny` - deny + type: string + x-extensible-enum: + - allow + - deny + resource: + description: Resource pattern (regex supported) + maxLength: 500 + minLength: 1 + type: string + actions: + items: + minLength: 1 + type: string + type: array + condition: + $ref: "#/components/schemas/PolicyRuleConditionRequest" + required: + - actions + - condition + - effect + - name + - resource + type: object + ResponseLogin: + example: + data: + access_token: access_token + refresh_token: refresh_token + response_type: response_type + state: state + properties: + data: + $ref: "#/components/schemas/LoginResponse" + state: + maxLength: 8 + minLength: 1 + type: string + required: + - data + type: object + SessionTimeoutPolicy: + example: + max_session_time: 13021 + max_idle_time: 116 + properties: + max_idle_time: + format: int64 + maximum: 1440 + minimum: 1 + type: integer + max_session_time: + format: int64 + maximum: 21600 + minimum: 5 + type: integer + required: + - max_idle_time + - max_session_time + type: object + SessionTimeoutPolicyRequest: + example: + max_session_time: 13021 + max_idle_time: 116 + properties: + max_idle_time: + format: int64 + maximum: 1440 + minimum: 1 + type: integer + max_session_time: + format: int64 + maximum: 21600 + minimum: 5 + type: integer + required: + - max_idle_time + - max_session_time + type: object + SessionTimeoutPolicyResponse: + example: + data: + max_session_time: 13021 + max_idle_time: 116 + properties: + data: + $ref: "#/components/schemas/SessionTimeoutPolicy" + required: + - data + type: object + StateExecutedResponse: + example: + state: state + properties: + state: + description: State of the operation (lowercase with underscores) + maxLength: 50 + minLength: 1 + type: string + type: object + TOTPDevice: + example: + url: url + properties: + url: + maxLength: 255 + minLength: 0 + type: string + required: + - url + type: object + TOTPDeviceList: + example: + user_id: 6 + name: name + id: 0 + confirmed: true + email: email + properties: + id: + format: int64 + type: integer + name: + description: "User's full name (alphanumeric, spaces, hyphens, dots)" + maxLength: 255 + minLength: 1 + type: string + email: + description: User's email address + format: email + maxLength: 255 + minLength: 5 + type: string + confirmed: + description: Is this device ready for use? + type: boolean + user_id: + description: The user that this device belongs to. + format: int64 + type: integer + required: + - email + - id + - name + - user_id + type: object + TOTPDeviceResponse: + example: + data: + url: url + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/TOTPDevice" + required: + - data + type: object + TOTPVerificationRequest: + description: |- + Serializer for TOTP verification process. + + Handles the verification of TOTP codes for MFA-enabled users. + On successful verification, returns access and refresh tokens. + example: + code: code + properties: + code: + description: 6-digit TOTP code + maxLength: 6 + minLength: 6 + type: string + writeOnly: true + required: + - code + type: object + Token: + example: + access_token: access_token + properties: + access_token: + maxLength: 255 + minLength: 0 + type: string + required: + - access_token + type: object + TokenPair: + description: |- + Used when user does not have MFA enabled or after successful MFA verification. + Returns both access and refresh tokens for API authentication. + example: + access_token: access_token + refresh_token: refresh_token + response_type: response_type + properties: + access_token: + description: "The access_token is a short-lived token (e.g., 10 minutes)\ + \ used for API authentication in the Authorization: Bearer \ + \ header." + type: string + refresh_token: + description: A long-lived JWT token used to refresh the access_token without + requiring the user to authenticate again. + type: string + response_type: + description: Discriminator field for LoginResponse + type: string + required: + - access_token + - refresh_token + - response_type + type: object + TokenPairResponse: + example: + data: + access_token: access_token + refresh_token: refresh_token + response_type: response_type + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/TokenPair" + required: + - data + type: object + TokenRequest: + example: + account_id: 0 + properties: + account_id: + format: int64 + nullable: true + type: integer + writeOnly: true + type: object + TokenResponse: + example: + data: + access_token: access_token + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Token" + required: + - data + type: object + UserLoginMethodResponse: + example: + method: method + url: https://openapi-generator.tech + properties: + method: + description: Login method type (lowercase with underscores) + maxLength: 50 + minLength: 1 + type: string + url: + format: uri + type: string + required: + - method + - url + type: object + PaginatedTOTPDeviceList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - user_id: 6 + name: name + id: 0 + confirmed: true + email: email + - user_id: 6 + name: name + id: 0 + confirmed: true + email: email + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/TOTPDeviceList" + type: array + type: object + AWSKinesisFirehoseEndpoint: + additionalProperties: false + properties: + access_key: + maxLength: 150 + minLength: 1 + type: string + stream_name: + maxLength: 64 + minLength: 1 + type: string + region: + maxLength: 50 + minLength: 1 + type: string + secret_key: + maxLength: 150 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (aws_kinesis_firehose) + type: string + x-extensible-enum: + - aws_kinesis_firehose + required: + - access_key + - region + - secret_key + - stream_name + - type + title: AWSKinesisFirehoseEndpoint + type: object + AWSKinesisFirehoseEndpointRequest: + additionalProperties: false + properties: + access_key: + maxLength: 150 + minLength: 1 + type: string + stream_name: + maxLength: 64 + minLength: 1 + type: string + region: + maxLength: 50 + minLength: 1 + type: string + secret_key: + maxLength: 150 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (aws_kinesis_firehose) + type: string + x-extensible-enum: + - aws_kinesis_firehose + required: + - access_key + - region + - secret_key + - stream_name + - type + title: AWSKinesisFirehoseEndpointRequest + type: object + AzureBlobStorageEndpoint: + additionalProperties: false + properties: + storage_account: + maxLength: 100 + minLength: 1 + type: string + container_name: + maxLength: 150 + minLength: 1 + type: string + blob_sas_token: + maxLength: 250 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (azure_blob_storage) + type: string + x-extensible-enum: + - azure_blob_storage + required: + - blob_sas_token + - container_name + - storage_account + - type + title: AzureBlobStorageEndpoint + type: object + AzureBlobStorageEndpointRequest: + additionalProperties: false + properties: + storage_account: + maxLength: 100 + minLength: 1 + type: string + container_name: + maxLength: 150 + minLength: 1 + type: string + blob_sas_token: + maxLength: 250 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (azure_blob_storage) + type: string + x-extensible-enum: + - azure_blob_storage + required: + - blob_sas_token + - container_name + - storage_account + - type + title: AzureBlobStorageEndpointRequest + type: object + AzureMonitorEndpoint: + additionalProperties: false + properties: + log_type: + maxLength: 100 + minLength: 1 + type: string + shared_key: + maxLength: 150 + minLength: 1 + type: string + time_generated_field: + maxLength: 50 + minLength: 1 + nullable: true + type: string + workspace_id: + maxLength: 150 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (azure_monitor) + type: string + x-extensible-enum: + - azure_monitor + required: + - log_type + - shared_key + - type + - workspace_id + title: AzureMonitorEndpoint + type: object + AzureMonitorEndpointRequest: + additionalProperties: false + properties: + log_type: + maxLength: 100 + minLength: 1 + type: string + shared_key: + maxLength: 150 + minLength: 1 + type: string + time_generated_field: + maxLength: 50 + minLength: 1 + nullable: true + type: string + workspace_id: + maxLength: 150 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (azure_monitor) + type: string + x-extensible-enum: + - azure_monitor + required: + - log_type + - shared_key + - type + - workspace_id + title: AzureMonitorEndpointRequest + type: object + BigQueryEndpoint: + additionalProperties: false + properties: + dataset_id: + maxLength: 1024 + minLength: 1 + type: string + project_id: + maxLength: 100 + minLength: 1 + type: string + table_id: + maxLength: 1024 + minLength: 1 + type: string + service_account_key: + maxLength: 65535 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (big_query) + type: string + x-extensible-enum: + - big_query + required: + - dataset_id + - project_id + - service_account_key + - table_id + - type + title: BigQueryEndpoint + type: object + BigQueryEndpointRequest: + additionalProperties: false + properties: + dataset_id: + maxLength: 1024 + minLength: 1 + type: string + project_id: + maxLength: 100 + minLength: 1 + type: string + table_id: + maxLength: 1024 + minLength: 1 + type: string + service_account_key: + maxLength: 65535 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (big_query) + type: string + x-extensible-enum: + - big_query + required: + - dataset_id + - project_id + - service_account_key + - table_id + - type + title: BigQueryEndpointRequest + type: object + ContentTypeEnum: + description: |- + * `plain/text` - plain/text + * `application/gzip` - application/gzip + title: ContentTypeEnum + type: string + x-extensible-enum: + - plain/text + - application/gzip + DataSource: + additionalProperties: false + example: + name: name + active: true + slug: slug + properties: + slug: + type: string + name: + title: DataSource Name + type: string + active: + title: Is Active + type: boolean + required: + - active + - name + - slug + title: DataSource + type: object + DataSourceEnum: + description: |- + * `http` - Applications + * `waf` - WAF Events + * `functions` - Functions + * `activity` - Activity History + title: DataSourceEnum + type: string + x-extensible-enum: + - http + - waf + - functions + - activity + DataStream: + additionalProperties: false + example: + outputs: + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + product_version: product_version + transform: + - attributes: + rate: 60 + type: type + - attributes: + rate: 60 + type: type + inputs: + - null + - null + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + last_editor: + maxLength: 100 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + inputs: + items: + $ref: "#/components/schemas/Input" + type: array + transform: + items: + $ref: "#/components/schemas/Transform" + type: array + outputs: + items: + $ref: "#/components/schemas/Output" + type: array + required: + - id + - inputs + - last_editor + - last_modified + - name + - outputs + - product_version + - transform + title: DataStream + type: object + DataStreamRequest: + additionalProperties: false + example: + outputs: + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 1294783612 + type: type + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 1294783612 + type: type + transform: + - attributes: + rate: 8 + type: type + - attributes: + rate: 8 + type: type + inputs: + - null + - null + name: name + active: true + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + inputs: + items: + $ref: "#/components/schemas/InputRequest" + type: array + transform: + items: + $ref: "#/components/schemas/TransformRequest" + type: array + outputs: + items: + $ref: "#/components/schemas/OutputRequest" + type: array + required: + - inputs + - name + - outputs + - transform + title: DataStreamRequest + type: object + DataStreamResponse: + additionalProperties: false + example: + data: + outputs: + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + product_version: product_version + transform: + - attributes: + rate: 60 + type: type + - attributes: + rate: 60 + type: type + inputs: + - null + - null + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/DataStream" + required: + - data + title: DataStreamResponse + type: object + DatadogEndpoint: + additionalProperties: false + properties: + url: + format: uri + type: string + api_key: + maxLength: 255 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (datadog) + type: string + x-extensible-enum: + - datadog + required: + - api_key + - type + - url + title: DatadogEndpoint + type: object + DatadogEndpointRequest: + additionalProperties: false + properties: + url: + format: uri + minLength: 1 + type: string + api_key: + maxLength: 255 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (datadog) + type: string + x-extensible-enum: + - datadog + required: + - api_key + - type + - url + title: DatadogEndpointRequest + type: object + ElasticsearchEndpoint: + additionalProperties: false + properties: + url: + format: uri + type: string + api_key: + maxLength: 255 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (elasticsearch) + type: string + x-extensible-enum: + - elasticsearch + required: + - api_key + - type + - url + title: ElasticsearchEndpoint + type: object + ElasticsearchEndpointRequest: + additionalProperties: false + properties: + url: + format: uri + minLength: 1 + type: string + api_key: + maxLength: 255 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (elasticsearch) + type: string + x-extensible-enum: + - elasticsearch + required: + - api_key + - type + - url + title: ElasticsearchEndpointRequest + type: object + HttpPostEndpoint: + additionalProperties: false + example: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + properties: + url: + format: uri + type: string + log_line_separator: + maxLength: 100 + minLength: 1 + type: string + payload_format: + maxLength: 250 + minLength: 1 + type: string + max_size: + format: int64 + maximum: 2147483647 + minimum: 1000000 + nullable: true + type: integer + headers: + additionalProperties: + maxLength: 1024 + minLength: 1 + type: string + type: object + type: + description: Type identifier for this endpoint (standard) + type: string + x-extensible-enum: + - standard + required: + - headers + - type + - url + title: HttpPostEndpoint + type: object + HttpPostEndpointRequest: + additionalProperties: false + example: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 1294783612 + properties: + url: + format: uri + minLength: 1 + type: string + log_line_separator: + maxLength: 100 + minLength: 1 + type: string + payload_format: + maxLength: 250 + minLength: 1 + type: string + max_size: + format: int64 + maximum: 2147483647 + minimum: 1000000 + nullable: true + type: integer + headers: + additionalProperties: + maxLength: 1024 + minLength: 1 + type: string + type: object + type: + description: Type identifier for this endpoint (standard) + type: string + x-extensible-enum: + - standard + required: + - headers + - type + - url + title: HttpPostEndpointRequest + type: object + InputDataSource: + additionalProperties: false + properties: + data_source: + description: |- + * `http` - Applications + * `waf` - WAF Events + * `functions` - Functions + * `activity` - Activity History + title: DataSourceEnum + type: string + x-extensible-enum: + - http + - waf + - functions + - activity + required: + - data_source + title: InputDataSource + type: object + InputDataSourceAttributes: + additionalProperties: true + properties: + type: + description: '* `raw_logs` - Raw Logs' + title: InputDataSourceAttributesTypeEnum + type: string + x-extensible-enum: + - raw_logs + attributes: + $ref: "#/components/schemas/InputDataSource" + required: + - attributes + - type + title: InputDataSourceAttributes + type: object + InputDataSourceAttributesRequest: + additionalProperties: true + properties: + type: + description: '* `raw_logs` - Raw Logs' + title: InputDataSourceAttributesTypeEnum + type: string + x-extensible-enum: + - raw_logs + attributes: + $ref: "#/components/schemas/InputDataSourceRequest" + required: + - attributes + - type + title: InputDataSourceAttributesRequest + type: object + InputDataSourceAttributesTypeEnum: + description: '* `raw_logs` - Raw Logs' + title: InputDataSourceAttributesTypeEnum + type: string + x-extensible-enum: + - raw_logs + InputDataSourceRequest: + additionalProperties: false + properties: + data_source: + description: |- + * `http` - Applications + * `waf` - WAF Events + * `functions` - Functions + * `activity` - Activity History + title: DataSourceEnum + type: string + x-extensible-enum: + - http + - waf + - functions + - activity + required: + - data_source + title: InputDataSourceRequest + type: object + KafkaEndpoint: + additionalProperties: false + properties: + bootstrap_servers: + maxLength: 150 + minLength: 1 + type: string + kafka_topic: + maxLength: 150 + minLength: 1 + type: string + use_tls: + type: boolean + type: + description: Type identifier for this endpoint (kafka) + type: string + x-extensible-enum: + - kafka + required: + - bootstrap_servers + - kafka_topic + - type + - use_tls + title: KafkaEndpoint + type: object + KafkaEndpointRequest: + additionalProperties: false + properties: + bootstrap_servers: + maxLength: 150 + minLength: 1 + type: string + kafka_topic: + maxLength: 150 + minLength: 1 + type: string + use_tls: + type: boolean + type: + description: Type identifier for this endpoint (kafka) + type: string + x-extensible-enum: + - kafka + required: + - bootstrap_servers + - kafka_topic + - type + - use_tls + title: KafkaEndpointRequest + type: object + Output: + additionalProperties: false + example: + attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + properties: + type: + description: |- + * `standard` - Standard HTTP/HTTPS POST + * `kafka` - Apache Kafka + * `s3` - Simple Storage Service (S3) + * `big_query` - Google BigQuery + * `elasticsearch` - Elasticsearch + * `splunk` - Splunk + * `aws_kinesis_firehose` - AWS Kinesis Data Firehose + * `datadog` - Datadog + * `qradar` - IBM QRadar + * `azure_monitor` - Azure Monitor + * `azure_blob_storage` - Azure Blob Storage + title: OutputTypeEnum + type: string + x-extensible-enum: + - standard + - kafka + - s3 + - big_query + - elasticsearch + - splunk + - aws_kinesis_firehose + - datadog + - qradar + - azure_monitor + - azure_blob_storage + attributes: + $ref: "#/components/schemas/Output2" + required: + - attributes + - type + title: Output + type: object + OutputRequest: + additionalProperties: false + example: + attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 1294783612 + type: type + properties: + type: + description: |- + * `standard` - Standard HTTP/HTTPS POST + * `kafka` - Apache Kafka + * `s3` - Simple Storage Service (S3) + * `big_query` - Google BigQuery + * `elasticsearch` - Elasticsearch + * `splunk` - Splunk + * `aws_kinesis_firehose` - AWS Kinesis Data Firehose + * `datadog` - Datadog + * `qradar` - IBM QRadar + * `azure_monitor` - Azure Monitor + * `azure_blob_storage` - Azure Blob Storage + title: OutputTypeEnum + type: string + x-extensible-enum: + - standard + - kafka + - s3 + - big_query + - elasticsearch + - splunk + - aws_kinesis_firehose + - datadog + - qradar + - azure_monitor + - azure_blob_storage + attributes: + $ref: "#/components/schemas/OutputRequest2" + required: + - attributes + - type + title: OutputRequest + type: object + OutputTypeEnum: + description: |- + * `standard` - Standard HTTP/HTTPS POST + * `kafka` - Apache Kafka + * `s3` - Simple Storage Service (S3) + * `big_query` - Google BigQuery + * `elasticsearch` - Elasticsearch + * `splunk` - Splunk + * `aws_kinesis_firehose` - AWS Kinesis Data Firehose + * `datadog` - Datadog + * `qradar` - IBM QRadar + * `azure_monitor` - Azure Monitor + * `azure_blob_storage` - Azure Blob Storage + title: OutputTypeEnum + type: string + x-extensible-enum: + - standard + - kafka + - s3 + - big_query + - elasticsearch + - splunk + - aws_kinesis_firehose + - datadog + - qradar + - azure_monitor + - azure_blob_storage + PaginatedDataSourceList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - name: name + active: true + slug: slug + - name: name + active: true + slug: slug + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/DataSource" + type: array + title: PaginatedDataSourceList + type: object + PaginatedDataStreamList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - outputs: + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + product_version: product_version + transform: + - attributes: + rate: 60 + type: type + - attributes: + rate: 60 + type: type + inputs: + - null + - null + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + - outputs: + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + - attributes: + headers: + key: headers + log_line_separator: log_line_separator + payload_format: payload_format + type: type + url: https://openapi-generator.tech + max_size: 315634359 + type: type + product_version: product_version + transform: + - attributes: + rate: 60 + type: type + - attributes: + rate: 60 + type: type + inputs: + - null + - null + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/DataStream" + type: array + title: PaginatedDataStreamList + type: object + PaginatedTemplateList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - last_editor: last_editor + custom: true + name: name + active: true + data_set: data_set + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + - last_editor: last_editor + custom: true + name: name + active: true + data_set: data_set + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Template" + type: array + title: PaginatedTemplateList + type: object + PatchedDataStreamRequest: + additionalProperties: false + example: + transform: + - attributes: + rate: 8 + type: type + - attributes: + rate: 8 + type: type + inputs: + - null + - null + name: name + active: true + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + inputs: + items: + $ref: "#/components/schemas/InputRequest" + type: array + transform: + items: + $ref: "#/components/schemas/TransformRequest" + type: array + title: PatchedDataStreamRequest + type: object + PatchedTemplateRequest: + additionalProperties: false + example: + name: name + active: true + data_set: data_set + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + data_set: + maxLength: 65535 + minLength: 1 + type: string + title: PatchedTemplateRequest + type: object + QRadarEndpoint: + additionalProperties: false + properties: + url: + format: uri + type: string + type: + description: Type identifier for this endpoint (qradar) + type: string + x-extensible-enum: + - qradar + required: + - type + - url + title: QRadarEndpoint + type: object + QRadarEndpointRequest: + additionalProperties: false + properties: + url: + format: uri + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (qradar) + type: string + x-extensible-enum: + - qradar + required: + - type + - url + title: QRadarEndpointRequest + type: object + S3Endpoint: + additionalProperties: false + properties: + access_key: + maxLength: 150 + minLength: 1 + type: string + secret_key: + maxLength: 150 + minLength: 1 + type: string + region: + maxLength: 50 + minLength: 1 + type: string + object_key_prefix: + maxLength: 150 + minLength: 1 + nullable: true + type: string + bucket_name: + maxLength: 150 + minLength: 1 + type: string + content_type: + description: |- + * `plain/text` - plain/text + * `application/gzip` - application/gzip + title: ContentTypeEnum + type: string + x-extensible-enum: + - plain/text + - application/gzip + host_url: + format: uri + maxLength: 200 + type: string + type: + description: Type identifier for this endpoint (s3) + type: string + x-extensible-enum: + - s3 + required: + - access_key + - bucket_name + - content_type + - host_url + - region + - secret_key + - type + title: S3Endpoint + type: object + S3EndpointRequest: + additionalProperties: false + properties: + access_key: + maxLength: 150 + minLength: 1 + type: string + secret_key: + maxLength: 150 + minLength: 1 + type: string + region: + maxLength: 50 + minLength: 1 + type: string + object_key_prefix: + maxLength: 150 + minLength: 1 + nullable: true + type: string + bucket_name: + maxLength: 150 + minLength: 1 + type: string + content_type: + description: |- + * `plain/text` - plain/text + * `application/gzip` - application/gzip + title: ContentTypeEnum + type: string + x-extensible-enum: + - plain/text + - application/gzip + host_url: + format: uri + maxLength: 200 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (s3) + type: string + x-extensible-enum: + - s3 + required: + - access_key + - bucket_name + - content_type + - host_url + - region + - secret_key + - type + title: S3EndpointRequest + type: object + SplunkEndpoint: + additionalProperties: false + properties: + url: + format: uri + type: string + api_key: + maxLength: 255 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (splunk) + type: string + x-extensible-enum: + - splunk + required: + - api_key + - type + - url + title: SplunkEndpoint + type: object + SplunkEndpointRequest: + additionalProperties: false + properties: + url: + format: uri + minLength: 1 + type: string + api_key: + maxLength: 255 + minLength: 1 + type: string + type: + description: Type identifier for this endpoint (splunk) + type: string + x-extensible-enum: + - splunk + required: + - api_key + - type + - url + title: SplunkEndpointRequest + type: object + Template: + additionalProperties: false + example: + last_editor: last_editor + custom: true + name: name + active: true + data_set: data_set + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + last_editor: + maxLength: 100 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + custom: + type: boolean + active: + type: boolean + data_set: + maxLength: 65535 + minLength: 1 + type: string + required: + - custom + - data_set + - id + - last_editor + - last_modified + - name + title: Template + type: object + TemplateRequest: + additionalProperties: false + example: + name: name + active: true + data_set: data_set + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + data_set: + maxLength: 65535 + minLength: 1 + type: string + required: + - data_set + - name + title: TemplateRequest + type: object + TemplateResponse: + additionalProperties: false + example: + data: + last_editor: last_editor + custom: true + name: name + active: true + data_set: data_set + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Template" + required: + - data + title: TemplateResponse + type: object + TransformFilterWorkloads: + additionalProperties: false + description: Serializer for filter_workloads transform attributes. + properties: + workloads: + items: + format: int64 + minimum: 1 + type: integer + maxItems: 600 + minItems: 1 + type: array + required: + - workloads + title: TransformFilterWorkloads + type: object + TransformFilterWorkloadsAttributes: + additionalProperties: true + properties: + type: + description: '* `filter_workloads` - Filter Workloads' + title: TransformFilterWorkloadsAttributesTypeEnum + type: string + x-extensible-enum: + - filter_workloads + attributes: + $ref: "#/components/schemas/TransformFilterWorkloads" + required: + - attributes + - type + title: TransformFilterWorkloadsAttributes + type: object + TransformFilterWorkloadsAttributesRequest: + additionalProperties: true + properties: + type: + description: '* `filter_workloads` - Filter Workloads' + title: TransformFilterWorkloadsAttributesTypeEnum + type: string + x-extensible-enum: + - filter_workloads + attributes: + $ref: "#/components/schemas/TransformFilterWorkloadsRequest" + required: + - attributes + - type + title: TransformFilterWorkloadsAttributesRequest + type: object + TransformFilterWorkloadsAttributesTypeEnum: + description: '* `filter_workloads` - Filter Workloads' + title: TransformFilterWorkloadsAttributesTypeEnum + type: string + x-extensible-enum: + - filter_workloads + TransformFilterWorkloadsRequest: + additionalProperties: false + description: Serializer for filter_workloads transform attributes. + properties: + workloads: + items: + format: int64 + minimum: 1 + type: integer + maxItems: 600 + minItems: 1 + type: array + required: + - workloads + title: TransformFilterWorkloadsRequest + type: object + TransformRenderTemplate: + additionalProperties: false + description: Serializer for render_template transform attributes. + properties: + template: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - template + title: TransformRenderTemplate + type: object + TransformRenderTemplateAttributes: + additionalProperties: true + properties: + type: + description: '* `render_template` - Render Template' + title: TransformRenderTemplateAttributesTypeEnum + type: string + x-extensible-enum: + - render_template + attributes: + $ref: "#/components/schemas/TransformRenderTemplate" + required: + - attributes + - type + title: TransformRenderTemplateAttributes + type: object + TransformRenderTemplateAttributesRequest: + additionalProperties: true + properties: + type: + description: '* `render_template` - Render Template' + title: TransformRenderTemplateAttributesTypeEnum + type: string + x-extensible-enum: + - render_template + attributes: + $ref: "#/components/schemas/TransformRenderTemplateRequest" + required: + - attributes + - type + title: TransformRenderTemplateAttributesRequest + type: object + TransformRenderTemplateAttributesTypeEnum: + description: '* `render_template` - Render Template' + title: TransformRenderTemplateAttributesTypeEnum + type: string + x-extensible-enum: + - render_template + TransformRenderTemplateRequest: + additionalProperties: false + description: Serializer for render_template transform attributes. + properties: + template: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - template + title: TransformRenderTemplateRequest + type: object + TransformSampling: + additionalProperties: false + description: Serializer for sampling transform attributes. + example: + rate: 60 + properties: + rate: + format: int64 + maximum: 100 + minimum: 1 + type: integer + required: + - rate + title: TransformSampling + type: object + TransformSamplingAttributes: + additionalProperties: true + properties: + type: + description: '* `sampling` - Sampling' + title: TransformSamplingAttributesTypeEnum + type: string + x-extensible-enum: + - sampling + attributes: + $ref: "#/components/schemas/TransformSampling" + required: + - attributes + - type + title: TransformSamplingAttributes + type: object + TransformSamplingAttributesRequest: + additionalProperties: true + properties: + type: + description: '* `sampling` - Sampling' + title: TransformSamplingAttributesTypeEnum + type: string + x-extensible-enum: + - sampling + attributes: + $ref: "#/components/schemas/TransformSamplingRequest" + required: + - attributes + - type + title: TransformSamplingAttributesRequest + type: object + TransformSamplingAttributesTypeEnum: + description: '* `sampling` - Sampling' + title: TransformSamplingAttributesTypeEnum + type: string + x-extensible-enum: + - sampling + TransformSamplingRequest: + additionalProperties: false + description: Serializer for sampling transform attributes. + example: + rate: 8 + properties: + rate: + format: int64 + maximum: 100 + minimum: 1 + type: integer + required: + - rate + title: TransformSamplingRequest + type: object + Input: + $ref: "#/components/schemas/InputInputDataSourceAttributes" + InputInputDataSourceAttributes: + allOf: + - $ref: "#/components/schemas/InputShared" + - $ref: "#/components/schemas/InputDataSourceAttributes" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (raw_logs) + type: string + x-extensible-enum: + - raw_logs + required: + - type + title: InputInputDataSourceAttributes + type: object + example: null + example: null + InputInputDataSourceAttributesRequest: + allOf: + - $ref: "#/components/schemas/InputShared" + - $ref: "#/components/schemas/InputDataSourceAttributesRequest" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (raw_logs) + type: string + x-extensible-enum: + - raw_logs + required: + - type + title: InputInputDataSourceAttributesRequest + type: object + example: null + example: null + InputRequest: + $ref: "#/components/schemas/InputInputDataSourceAttributesRequest" + InputShared: + additionalProperties: true + properties: + type: + maxLength: 255 + minLength: 1 + type: string + required: + - type + title: InputShared + type: object + Output2: + additionalProperties: false + discriminator: + mapping: + standard: "#/components/schemas/HttpPostEndpoint" + kafka: "#/components/schemas/KafkaEndpoint" + s3: "#/components/schemas/S3Endpoint" + big_query: "#/components/schemas/BigQueryEndpoint" + elasticsearch: "#/components/schemas/ElasticsearchEndpoint" + aws_kinesis_firehose: "#/components/schemas/AWSKinesisFirehoseEndpoint" + datadog: "#/components/schemas/DatadogEndpoint" + qradar: "#/components/schemas/QRadarEndpoint" + azure_monitor: "#/components/schemas/AzureMonitorEndpoint" + azure_blob_storage: "#/components/schemas/AzureBlobStorageEndpoint" + splunk: "#/components/schemas/SplunkEndpoint" + propertyName: type + oneOf: + - $ref: "#/components/schemas/HttpPostEndpoint" + - $ref: "#/components/schemas/KafkaEndpoint" + - $ref: "#/components/schemas/S3Endpoint" + - $ref: "#/components/schemas/BigQueryEndpoint" + - $ref: "#/components/schemas/ElasticsearchEndpoint" + - $ref: "#/components/schemas/AWSKinesisFirehoseEndpoint" + - $ref: "#/components/schemas/DatadogEndpoint" + - $ref: "#/components/schemas/QRadarEndpoint" + - $ref: "#/components/schemas/AzureMonitorEndpoint" + - $ref: "#/components/schemas/AzureBlobStorageEndpoint" + - $ref: "#/components/schemas/SplunkEndpoint" + title: Output2 + OutputRequest2: + additionalProperties: false + discriminator: + mapping: + standard: "#/components/schemas/HttpPostEndpointRequest" + kafka: "#/components/schemas/KafkaEndpointRequest" + s3: "#/components/schemas/S3EndpointRequest" + big_query: "#/components/schemas/BigQueryEndpointRequest" + elasticsearch: "#/components/schemas/ElasticsearchEndpointRequest" + aws_kinesis_firehose: "#/components/schemas/AWSKinesisFirehoseEndpointRequest" + datadog: "#/components/schemas/DatadogEndpointRequest" + qradar: "#/components/schemas/QRadarEndpointRequest" + azure_monitor: "#/components/schemas/AzureMonitorEndpointRequest" + azure_blob_storage: "#/components/schemas/AzureBlobStorageEndpointRequest" + splunk: "#/components/schemas/SplunkEndpointRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/HttpPostEndpointRequest" + - $ref: "#/components/schemas/KafkaEndpointRequest" + - $ref: "#/components/schemas/S3EndpointRequest" + - $ref: "#/components/schemas/BigQueryEndpointRequest" + - $ref: "#/components/schemas/ElasticsearchEndpointRequest" + - $ref: "#/components/schemas/AWSKinesisFirehoseEndpointRequest" + - $ref: "#/components/schemas/DatadogEndpointRequest" + - $ref: "#/components/schemas/QRadarEndpointRequest" + - $ref: "#/components/schemas/AzureMonitorEndpointRequest" + - $ref: "#/components/schemas/AzureBlobStorageEndpointRequest" + - $ref: "#/components/schemas/SplunkEndpointRequest" + title: OutputRequest2 + Transform: + additionalProperties: false + discriminator: + mapping: + sampling: "#/components/schemas/TransformTransformSamplingAttributes" + filter_workloads: "#/components/schemas/TransformTransformFilterWorkloadsAttributes" + render_template: "#/components/schemas/TransformTransformRenderTemplateAttributes" + propertyName: type + oneOf: + - $ref: "#/components/schemas/TransformTransformSamplingAttributes" + - $ref: "#/components/schemas/TransformTransformFilterWorkloadsAttributes" + - $ref: "#/components/schemas/TransformTransformRenderTemplateAttributes" + title: Transform + TransformRequest: + additionalProperties: false + discriminator: + mapping: + sampling: "#/components/schemas/TransformTransformSamplingAttributesRequest" + filter_workloads: "#/components/schemas/TransformTransformFilterWorkloadsAttributesRequest" + render_template: "#/components/schemas/TransformTransformRenderTemplateAttributesRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/TransformTransformSamplingAttributesRequest" + - $ref: "#/components/schemas/TransformTransformFilterWorkloadsAttributesRequest" + - $ref: "#/components/schemas/TransformTransformRenderTemplateAttributesRequest" + title: TransformRequest + TransformShared: + additionalProperties: true + properties: + type: + maxLength: 255 + minLength: 1 + type: string + required: + - type + title: TransformShared + type: object + TransformTransformFilterWorkloadsAttributes: + allOf: + - $ref: "#/components/schemas/TransformShared" + - $ref: "#/components/schemas/TransformFilterWorkloadsAttributes" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (filter_workloads) + type: string + x-extensible-enum: + - filter_workloads + required: + - type + title: TransformTransformFilterWorkloadsAttributes + type: object + example: null + example: null + TransformTransformFilterWorkloadsAttributesRequest: + allOf: + - $ref: "#/components/schemas/TransformShared" + - $ref: "#/components/schemas/TransformFilterWorkloadsAttributesRequest" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (filter_workloads) + type: string + x-extensible-enum: + - filter_workloads + required: + - type + title: TransformTransformFilterWorkloadsAttributesRequest + type: object + example: null + example: null + TransformTransformRenderTemplateAttributes: + allOf: + - $ref: "#/components/schemas/TransformShared" + - $ref: "#/components/schemas/TransformRenderTemplateAttributes" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (render_template) + type: string + x-extensible-enum: + - render_template + required: + - type + title: TransformTransformRenderTemplateAttributes + type: object + example: null + example: null + TransformTransformRenderTemplateAttributesRequest: + allOf: + - $ref: "#/components/schemas/TransformShared" + - $ref: "#/components/schemas/TransformRenderTemplateAttributesRequest" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (render_template) + type: string + x-extensible-enum: + - render_template + required: + - type + title: TransformTransformRenderTemplateAttributesRequest + type: object + example: null + example: null + TransformTransformSamplingAttributes: + allOf: + - $ref: "#/components/schemas/TransformShared" + - $ref: "#/components/schemas/TransformSamplingAttributes" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (sampling) + type: string + x-extensible-enum: + - sampling + required: + - type + title: TransformTransformSamplingAttributes + type: object + example: null + example: + attributes: + rate: 60 + type: type + TransformTransformSamplingAttributesRequest: + allOf: + - $ref: "#/components/schemas/TransformShared" + - $ref: "#/components/schemas/TransformSamplingAttributesRequest" + - additionalProperties: true + properties: + type: + description: Type identifier for this endpoint (sampling) + type: string + x-extensible-enum: + - sampling + required: + - type + title: TransformTransformSamplingAttributesRequest + type: object + example: null + example: + attributes: + rate: 8 + type: type + AlgType: + properties: + id: + format: int64 + maximum: 4294967295 + minimum: 1 + type: integer + slug: + maxLength: 100 + minLength: 1 + type: string + required: + - id + - slug + type: object + DNSSEC: + example: + delegation_signer: "{}" + enabled: true + status: status + properties: + enabled: + type: boolean + status: + description: |- + * `unconfigured` - unconfigured + * `waiting` - waiting + * `ready` - ready + type: string + x-extensible-enum: + - unconfigured + - waiting + - ready + delegation_signer: + allOf: + - $ref: "#/components/schemas/DelegationSigner" + nullable: true + type: object + required: + - delegation_signer + - enabled + - status + type: object + DNSSECRequest: + example: + enabled: true + properties: + enabled: + type: boolean + required: + - enabled + type: object + DNSSECResponse: + example: + data: + delegation_signer: "{}" + enabled: true + status: status + properties: + data: + $ref: "#/components/schemas/DNSSEC" + required: + - data + type: object + DelegationSigner: + properties: + algorithm_type: + $ref: "#/components/schemas/AlgType" + digest: + maxLength: 100 + minLength: 1 + type: string + digest_type: + $ref: "#/components/schemas/AlgType" + key_tag: + format: int64 + maximum: 65535 + minimum: 1 + type: integer + required: + - algorithm_type + - digest + - digest_type + - key_tag + type: object + PaginatedRecordList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - name: name + description: description + rdata: + - rdata + - rdata + weight: 37 + id: 0 + type: type + ttl: 1294386359 + policy: policy + - name: name + description: description + rdata: + - rdata + - rdata + weight: 37 + id: 0 + type: type + ttl: 1294386359 + policy: policy + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Record" + type: array + type: object + PaginatedZoneList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + nameservers: + - nameservers + - nameservers + domain: domain + name: name + active: true + id: 0 + - product_version: product_version + nameservers: + - nameservers + - nameservers + domain: domain + name: name + active: true + id: 0 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Zone" + type: array + type: object + PatchedDNSSECRequest: + example: + enabled: true + properties: + enabled: + type: boolean + type: object + PatchedRecordRequest: + example: + name: name + description: description + rdata: + - rdata + - rdata + weight: 153 + type: type + ttl: 171976545 + policy: policy + properties: + description: + maxLength: 45 + minLength: 0 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + ttl: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: + description: |- + * `A` - A + * `AAAA` - AAAA + * `ANAME` - ANAME + * `CNAME` - CNAME + * `MX` - MX + * `NS` - NS + * `PTR` - PTR + * `SRV` - SRV + * `TXT` - TXT + * `CAA` - CAA + * `DS` - DS + type: string + x-extensible-enum: + - A + - AAAA + - ANAME + - CNAME + - MX + - NS + - PTR + - SRV + - TXT + - CAA + - DS + rdata: + items: + minLength: 1 + type: string + type: array + policy: + description: |- + * `simple` - simple + * `weighted` - weighted + type: string + x-extensible-enum: + - simple + - weighted + weight: + format: int64 + maximum: 255 + minimum: 0 + type: integer + type: object + PatchedUpdateZoneRequest: + example: + name: name + active: true + properties: + name: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + type: object + Record: + example: + name: name + description: description + rdata: + - rdata + - rdata + weight: 37 + id: 0 + type: type + ttl: 1294386359 + policy: policy + properties: + id: + format: int64 + type: integer + description: + maxLength: 45 + minLength: 0 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + ttl: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: + description: |- + * `A` - A + * `AAAA` - AAAA + * `ANAME` - ANAME + * `CNAME` - CNAME + * `MX` - MX + * `NS` - NS + * `PTR` - PTR + * `SRV` - SRV + * `TXT` - TXT + * `CAA` - CAA + * `DS` - DS + type: string + x-extensible-enum: + - A + - AAAA + - ANAME + - CNAME + - MX + - NS + - PTR + - SRV + - TXT + - CAA + - DS + rdata: + items: + type: string + type: array + policy: + description: |- + * `simple` - simple + * `weighted` - weighted + type: string + x-extensible-enum: + - simple + - weighted + weight: + format: int64 + maximum: 255 + minimum: 0 + type: integer + required: + - id + - name + - rdata + - type + type: object + RecordRequest: + example: + name: name + description: description + rdata: + - rdata + - rdata + weight: 153 + type: type + ttl: 171976545 + policy: policy + properties: + description: + maxLength: 45 + minLength: 0 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + ttl: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: + description: |- + * `A` - A + * `AAAA` - AAAA + * `ANAME` - ANAME + * `CNAME` - CNAME + * `MX` - MX + * `NS` - NS + * `PTR` - PTR + * `SRV` - SRV + * `TXT` - TXT + * `CAA` - CAA + * `DS` - DS + type: string + x-extensible-enum: + - A + - AAAA + - ANAME + - CNAME + - MX + - NS + - PTR + - SRV + - TXT + - CAA + - DS + rdata: + items: + minLength: 1 + type: string + type: array + policy: + description: |- + * `simple` - simple + * `weighted` - weighted + type: string + x-extensible-enum: + - simple + - weighted + weight: + format: int64 + maximum: 255 + minimum: 0 + type: integer + required: + - name + - rdata + - type + type: object + RecordResponse: + example: + data: + name: name + description: description + rdata: + - rdata + - rdata + weight: 37 + id: 0 + type: type + ttl: 1294386359 + policy: policy + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Record" + required: + - data + type: object + UpdateZoneRequest: + example: + name: name + active: true + properties: + name: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + required: + - active + - name + type: object + Zone: + example: + product_version: product_version + nameservers: + - nameservers + - nameservers + domain: domain + name: name + active: true + id: 0 + properties: + id: + format: int64 + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + domain: + maxLength: 200 + minLength: 1 + type: string + active: + type: boolean + nameservers: + items: + type: string + type: array + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - active + - domain + - id + - name + - nameservers + - product_version + type: object + ZoneRequest: + example: + domain: domain + name: name + active: true + properties: + name: + maxLength: 50 + minLength: 1 + type: string + domain: + maxLength: 200 + minLength: 1 + type: string + active: + type: boolean + required: + - active + - domain + - name + type: object + ZoneResponse: + example: + data: + product_version: product_version + nameservers: + - nameservers + - nameservers + domain: domain + name: name + active: true + id: 0 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Zone" + required: + - data + type: object + AWS4HMAC: + additionalProperties: false + properties: + type: + allOf: + - $ref: "#/components/schemas/AWS4HMACTypeEnum" + attributes: + $ref: "#/components/schemas/AWS4HMACAttributes" + required: + - attributes + title: AWS4HMAC + type: object + AWS4HMACAttributes: + additionalProperties: false + properties: + region: + maxLength: 255 + minLength: 1 + type: string + service: + maxLength: 255 + minLength: 1 + type: string + access_key: + maxLength: 255 + minLength: 1 + type: string + secret_key: + maxLength: 255 + minLength: 1 + type: string + required: + - access_key + - region + - secret_key + title: AWS4HMACAttributes + type: object + AWS4HMACAttributesRequest: + additionalProperties: false + properties: + region: + maxLength: 255 + minLength: 1 + type: string + service: + maxLength: 255 + minLength: 1 + type: string + access_key: + maxLength: 255 + minLength: 1 + type: string + secret_key: + maxLength: 255 + minLength: 1 + type: string + required: + - access_key + - region + - secret_key + title: AWS4HMACAttributesRequest + type: object + AWS4HMACRequest: + additionalProperties: false + properties: + type: + allOf: + - $ref: "#/components/schemas/AWS4HMACTypeEnum" + attributes: + $ref: "#/components/schemas/AWS4HMACAttributesRequest" + required: + - attributes + title: AWS4HMACRequest + type: object + AWS4HMACTypeEnum: + description: '* `aws4_hmac_sha256` - AWS for HMAC - SHA256' + title: AWS4HMACTypeEnum + type: string + x-extensible-enum: + - aws4_hmac_sha256 + Address: + additionalProperties: false + example: + https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + properties: + active: + description: Indicates if the address is active for use + type: boolean + address: + description: IPv4/IPv6 address or CNAME to resolve + maxLength: 255 + minLength: 1 + type: string + http_port: + description: Port number for HTTP connections + format: int64 + maximum: 65535 + minimum: 1 + type: integer + https_port: + description: Port number for HTTPS connections + format: int64 + maximum: 65535 + minimum: 1 + type: integer + modules: + allOf: + - $ref: "#/components/schemas/AddressModules" + nullable: true + type: object + required: + - address + title: Address + type: object + AddressLoadBalancerModule: + additionalProperties: false + properties: + server_role: + allOf: + - $ref: "#/components/schemas/ServerRoleEnum" + description: |- + Role of the address in load balancing + + * `primary` - Primary + * `backup` - Backup + weight: + description: Weight used in load balancing strategy + format: int64 + maximum: 100 + minimum: 1 + type: integer + title: AddressLoadBalancerModule + type: object + AddressLoadBalancerModuleRequest: + additionalProperties: false + properties: + server_role: + allOf: + - $ref: "#/components/schemas/ServerRoleEnum" + description: |- + Role of the address in load balancing + + * `primary` - Primary + * `backup` - Backup + weight: + description: Weight used in load balancing strategy + format: int64 + maximum: 100 + minimum: 1 + type: integer + title: AddressLoadBalancerModuleRequest + type: object + AddressModules: + additionalProperties: false + properties: + load_balancer: + $ref: "#/components/schemas/AddressLoadBalancerModule" + title: AddressModules + type: object + AddressModulesRequest: + additionalProperties: false + properties: + load_balancer: + $ref: "#/components/schemas/AddressLoadBalancerModuleRequest" + title: AddressModulesRequest + type: object + AddressRequest: + additionalProperties: false + example: + https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + properties: + active: + description: Indicates if the address is active for use + type: boolean + address: + description: IPv4/IPv6 address or CNAME to resolve + maxLength: 255 + minLength: 1 + type: string + http_port: + description: Port number for HTTP connections + format: int64 + maximum: 65535 + minimum: 1 + type: integer + https_port: + description: Port number for HTTPS connections + format: int64 + maximum: 65535 + minimum: 1 + type: integer + modules: + allOf: + - $ref: "#/components/schemas/AddressModulesRequest" + nullable: true + type: object + required: + - address + title: AddressRequest + type: object + Application: + additionalProperties: false + example: + product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + last_editor: + maxLength: 250 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + modules: + $ref: "#/components/schemas/ApplicationModules" + active: + type: boolean + debug: + type: boolean + product_version: + type: string + required: + - id + - last_editor + - last_modified + - name + - product_version + title: Application + type: object + ApplicationAcceleratorModule: + additionalProperties: false + properties: + enabled: + type: boolean + title: ApplicationAcceleratorModule + type: object + ApplicationAcceleratorModuleRequest: + additionalProperties: false + properties: + enabled: + type: boolean + title: ApplicationAcceleratorModuleRequest + type: object + ApplicationModules: + additionalProperties: false + example: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + properties: + cache: + allOf: + - $ref: "#/components/schemas/CacheModule" + functions: + allOf: + - $ref: "#/components/schemas/FunctionModule" + application_accelerator: + allOf: + - $ref: "#/components/schemas/ApplicationAcceleratorModule" + image_processor: + allOf: + - $ref: "#/components/schemas/ImageProcessorModule" + title: ApplicationModules + type: object + ApplicationModulesRequest: + additionalProperties: false + example: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + properties: + cache: + allOf: + - $ref: "#/components/schemas/CacheModuleRequest" + functions: + allOf: + - $ref: "#/components/schemas/FunctionModuleRequest" + application_accelerator: + allOf: + - $ref: "#/components/schemas/ApplicationAcceleratorModuleRequest" + image_processor: + allOf: + - $ref: "#/components/schemas/ImageProcessorModuleRequest" + title: ApplicationModulesRequest + type: object + ApplicationRequest: + additionalProperties: false + example: + debug: true + name: name + active: true + modules: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + properties: + name: + maxLength: 100 + minLength: 1 + type: string + modules: + $ref: "#/components/schemas/ApplicationModulesRequest" + active: + type: boolean + debug: + type: boolean + required: + - name + title: ApplicationRequest + type: object + ApplicationResponse: + additionalProperties: false + example: + data: + product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Application" + required: + - data + title: ApplicationResponse + type: object + ApplicationResponsePhaseRuleEngineOrderRequest: + additionalProperties: false + example: + order: + - 738633633822310400 + - 738633633822310400 + properties: + order: + items: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + type: array + required: + - order + title: ApplicationResponsePhaseRuleEngineOrderRequest + type: object + BehaviorCaptureMatchGroupsAttributes: + additionalProperties: false + properties: + subject: + maxLength: 50 + minLength: 4 + type: string + regex: + maxLength: 255 + minLength: 1 + type: string + captured_array: + maxLength: 10 + minLength: 1 + type: string + required: + - captured_array + - regex + - subject + title: BehaviorCaptureMatchGroupsAttributes + type: object + BehaviorNoArgs: + additionalProperties: false + description: Behaviors without arguments + example: + type: type + properties: + type: + description: |- + * `deny` - deny + * `no_content` - no_content + * `deliver` - deliver + * `finish_request_phase` - finish_request_phase + * `forward_cookies` - forward_cookies + * `optimize_images` - optimize_images + * `bypass_cache` - bypass_cache + * `enable_gzip` - enable_gzip + * `redirect_http_to_https` - redirect_http_to_https + title: BehaviorNoArgsTypeEnum + type: string + x-extensible-enum: + - deny + - no_content + - deliver + - finish_request_phase + - forward_cookies + - optimize_images + - bypass_cache + - enable_gzip + - redirect_http_to_https + required: + - type + title: BehaviorNoArgs + type: object + BehaviorNoArgsTypeEnum: + description: |- + * `deny` - deny + * `no_content` - no_content + * `deliver` - deliver + * `finish_request_phase` - finish_request_phase + * `forward_cookies` - forward_cookies + * `optimize_images` - optimize_images + * `bypass_cache` - bypass_cache + * `enable_gzip` - enable_gzip + * `redirect_http_to_https` - redirect_http_to_https + title: BehaviorNoArgsTypeEnum + type: string + x-extensible-enum: + - deny + - no_content + - deliver + - finish_request_phase + - forward_cookies + - optimize_images + - bypass_cache + - enable_gzip + - redirect_http_to_https + BlankEnum: + title: BlankEnum + type: string + x-extensible-enum: + - "" + BrowserCacheModule: + additionalProperties: false + example: + max_age: 19008185 + behavior: "" + properties: + behavior: + allOf: + - $ref: "#/components/schemas/BrowserCacheModuleBehaviorEnum" + max_age: + format: int64 + maximum: 31536000 + minimum: 0 + type: integer + title: BrowserCacheModule + type: object + BrowserCacheModuleBehaviorEnum: + description: |- + * `override` - override + * `honor` - honor + * `no-cache` - no-cache + title: BrowserCacheModuleBehaviorEnum + type: string + x-extensible-enum: + - override + - honor + - no-cache + BrowserCacheModuleRequest: + additionalProperties: false + example: + max_age: 2525491 + behavior: "" + properties: + behavior: + allOf: + - $ref: "#/components/schemas/BrowserCacheModuleBehaviorEnum" + max_age: + format: int64 + maximum: 31536000 + minimum: 0 + type: integer + title: BrowserCacheModuleRequest + type: object + CacheModule: + additionalProperties: false + properties: + enabled: + type: boolean + title: CacheModule + type: object + CacheModuleRequest: + additionalProperties: false + properties: + enabled: + type: boolean + title: CacheModuleRequest + type: object + CacheSetting: + additionalProperties: false + example: + browser_cache: + max_age: 19008185 + behavior: "" + name: name + id: 0 + modules: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 4622587 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + browser_cache: + $ref: "#/components/schemas/BrowserCacheModule" + modules: + $ref: "#/components/schemas/CacheSettingsModules" + required: + - id + - name + title: CacheSetting + type: object + CacheSettingRequest: + additionalProperties: false + example: + browser_cache: + max_age: 2525491 + behavior: "" + name: name + modules: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 19008185 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + name: + maxLength: 250 + minLength: 1 + type: string + browser_cache: + $ref: "#/components/schemas/BrowserCacheModuleRequest" + modules: + $ref: "#/components/schemas/CacheSettingsModulesRequest" + required: + - name + title: CacheSettingRequest + type: object + CacheSettingResponse: + additionalProperties: false + example: + data: + browser_cache: + max_age: 19008185 + behavior: "" + name: name + id: 0 + modules: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 4622587 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/CacheSetting" + required: + - data + title: CacheSettingResponse + type: object + CacheSettingsApplicationAcceleratorModule: + additionalProperties: false + example: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + properties: + cache_vary_by_method: + items: + $ref: "#/components/schemas/CacheVaryByMethodEnum" + maxItems: 2 + type: array + cache_vary_by_querystring: + $ref: "#/components/schemas/CacheVaryByQuerystringModule" + cache_vary_by_cookies: + $ref: "#/components/schemas/CacheVaryByCookiesModule" + cache_vary_by_devices: + $ref: "#/components/schemas/CacheVaryByDevicesModule" + title: CacheSettingsApplicationAcceleratorModule + type: object + CacheSettingsApplicationAcceleratorModuleRequest: + additionalProperties: false + example: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + properties: + cache_vary_by_method: + items: + $ref: "#/components/schemas/CacheVaryByMethodEnum" + maxItems: 2 + type: array + cache_vary_by_querystring: + $ref: "#/components/schemas/CacheVaryByQuerystringModuleRequest" + cache_vary_by_cookies: + $ref: "#/components/schemas/CacheVaryByCookiesModuleRequest" + cache_vary_by_devices: + $ref: "#/components/schemas/CacheVaryByDevicesModuleRequest" + title: CacheSettingsApplicationAcceleratorModuleRequest + type: object + CacheSettingsCacheModule: + additionalProperties: false + example: + max_age: 4622587 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + behavior: + allOf: + - $ref: "#/components/schemas/CacheSettingsCacheModuleBehaviorEnum" + max_age: + description: "To use a value lower than 60s, the Application Acceleration\ + \ module must be enabled on the Application." + format: int64 + maximum: 31536000 + minimum: 0 + type: integer + stale_cache: + $ref: "#/components/schemas/StateCacheModule" + large_file_cache: + $ref: "#/components/schemas/LargeFileCacheModule" + tiered_cache: + allOf: + - $ref: "#/components/schemas/CacheSettingsTieredCacheModule" + nullable: true + type: object + title: CacheSettingsCacheModule + type: object + CacheSettingsCacheModuleBehaviorEnum: + description: |- + * `honor` - Honor Origin Cache Settings + * `override` - Override Cache Settings + title: CacheSettingsCacheModuleBehaviorEnum + type: string + x-extensible-enum: + - honor + - override + CacheSettingsCacheModuleRequest: + additionalProperties: false + example: + max_age: 19008185 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + behavior: + allOf: + - $ref: "#/components/schemas/CacheSettingsCacheModuleBehaviorEnum" + max_age: + description: "To use a value lower than 60s, the Application Acceleration\ + \ module must be enabled on the Application." + format: int64 + maximum: 31536000 + minimum: 0 + type: integer + stale_cache: + $ref: "#/components/schemas/StateCacheModuleRequest" + large_file_cache: + $ref: "#/components/schemas/LargeFileCacheModuleRequest" + tiered_cache: + allOf: + - $ref: "#/components/schemas/CacheSettingsTieredCacheModuleRequest" + nullable: true + type: object + title: CacheSettingsCacheModuleRequest + type: object + CacheSettingsModules: + additionalProperties: false + example: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 4622587 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + cache: + $ref: "#/components/schemas/CacheSettingsCacheModule" + application_accelerator: + $ref: "#/components/schemas/CacheSettingsApplicationAcceleratorModule" + title: CacheSettingsModules + type: object + CacheSettingsModulesRequest: + additionalProperties: false + example: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 19008185 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + cache: + $ref: "#/components/schemas/CacheSettingsCacheModuleRequest" + application_accelerator: + $ref: "#/components/schemas/CacheSettingsApplicationAcceleratorModuleRequest" + title: CacheSettingsModulesRequest + type: object + CacheSettingsTieredCacheModule: + additionalProperties: false + properties: + topology: + description: |- + * `nearest-region` - nearest-region + * `br-east-1` - br-east-1 + * `us-east-1` - us-east-1 + title: TopologyEnum + type: string + x-extensible-enum: + - nearest-region + - br-east-1 + - us-east-1 + enabled: + type: boolean + title: CacheSettingsTieredCacheModule + type: object + CacheSettingsTieredCacheModuleRequest: + additionalProperties: false + properties: + topology: + description: |- + * `nearest-region` - nearest-region + * `br-east-1` - br-east-1 + * `us-east-1` - us-east-1 + title: TopologyEnum + type: string + x-extensible-enum: + - nearest-region + - br-east-1 + - us-east-1 + enabled: + type: boolean + title: CacheSettingsTieredCacheModuleRequest + type: object + CacheVaryByCookiesModule: + additionalProperties: false + example: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + properties: + behavior: + allOf: + - $ref: "#/components/schemas/FirewallBehaviorModeEnum" + cookie_names: + items: + type: string + type: array + title: CacheVaryByCookiesModule + type: object + CacheVaryByCookiesModuleRequest: + additionalProperties: false + example: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + properties: + behavior: + allOf: + - $ref: "#/components/schemas/FirewallBehaviorModeEnum" + cookie_names: + items: + type: string + type: array + title: CacheVaryByCookiesModuleRequest + type: object + CacheVaryByDevicesModule: + additionalProperties: false + example: + device_group: + - 5 + - 5 + behavior: "" + properties: + behavior: + allOf: + - $ref: "#/components/schemas/CacheVaryByDevicesModuleBehaviorEnum" + device_group: + items: + format: int64 + type: integer + type: array + title: CacheVaryByDevicesModule + type: object + CacheVaryByDevicesModuleBehaviorEnum: + description: |- + * `ignore` - ignore + * `allowlist` - allowlist + title: CacheVaryByDevicesModuleBehaviorEnum + type: string + x-extensible-enum: + - ignore + - allowlist + CacheVaryByDevicesModuleRequest: + additionalProperties: false + example: + device_group: + - 5 + - 5 + behavior: "" + properties: + behavior: + allOf: + - $ref: "#/components/schemas/CacheVaryByDevicesModuleBehaviorEnum" + device_group: + items: + format: int64 + type: integer + type: array + title: CacheVaryByDevicesModuleRequest + type: object + CacheVaryByMethodEnum: + description: |- + * `options` - options + * `post` - post + title: CacheVaryByMethodEnum + type: string + x-extensible-enum: + - options + - post + CacheVaryByQuerystringModule: + additionalProperties: false + example: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + properties: + behavior: + allOf: + - $ref: "#/components/schemas/FirewallBehaviorModeEnum" + fields: + items: + type: string + type: array + sort_enabled: + type: boolean + title: CacheVaryByQuerystringModule + type: object + CacheVaryByQuerystringModuleRequest: + additionalProperties: false + example: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + properties: + behavior: + allOf: + - $ref: "#/components/schemas/FirewallBehaviorModeEnum" + fields: + items: + type: string + type: array + sort_enabled: + type: boolean + title: CacheVaryByQuerystringModuleRequest + type: object + CiphersEnum: + description: |- + * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 + * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 + * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 + * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 + * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA + * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 + * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 + * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 + format: int64 + title: CiphersEnum + type: integer + x-extensible-enum: + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + CloneApplicationRequest: + additionalProperties: false + example: + name: name + properties: + name: + maxLength: 100 + minLength: 1 + type: string + required: + - name + title: CloneApplicationRequest + type: object + CloneFirewallRequest: + additionalProperties: false + example: + name: name + properties: + name: + maxLength: 250 + minLength: 1 + type: string + required: + - name + title: CloneFirewallRequest + type: object + CloneWAFRequest: + additionalProperties: false + example: + name: name + properties: + name: + maxLength: 250 + minLength: 1 + type: string + required: + - name + title: CloneWAFRequest + type: object + CodeEnum: + description: |- + * `default` - default + * `400` - Bad Request + * `401` - Unauthorized + * `403` - Forbidden + * `404` - Not Found + * `405` - Method Not Allowed + * `406` - Not Acceptable + * `408` - Request Timeout + * `409` - Conflict + * `410` - Gone + * `411` - Length Required + * `414` - URI Too Long + * `415` - Unsupported Media Type + * `416` - Range Not Satisfiable + * `426` - Upgrade Required + * `429` - Too Many Requests + * `431` - Request Header Fields Too Large + * `500` - Internal Server Error + * `501` - Not Implemented + * `502` - Bad Gateway + * `503` - Service Unavailable + * `504` - Gateway Timeout + * `505` - HTTP Version Not Supported + title: CodeEnum + type: string + x-extensible-enum: + - default + - "400" + - "401" + - "403" + - "404" + - "405" + - "406" + - "408" + - "409" + - "410" + - "411" + - "414" + - "415" + - "416" + - "426" + - "429" + - "431" + - "500" + - "501" + - "502" + - "503" + - "504" + - "505" + ConditionalEnum: + description: |- + * `if` - if + * `or` - or + * `and` - and + title: ConditionalEnum + type: string + x-extensible-enum: + - if + - or + - and + Connector: + additionalProperties: false + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + last_editor: + maxLength: 250 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + type: + allOf: + - $ref: "#/components/schemas/OriginTypeEnum" + description: |- + Type of the connector + + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + attributes: + $ref: "#/components/schemas/ConnectorStorageAttributes" + required: + - attributes + - id + - last_editor + - last_modified + - name + - product_version + - type + title: Connector + type: object + ConnectorHTTP: + additionalProperties: false + example: + product_version: product_version + last_editor: last_editor + name: name + active: true + attributes: + addresses: + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + connection_options: "" + modules: "" + id: 0 + type: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + last_editor: + maxLength: 250 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + type: + allOf: + - $ref: "#/components/schemas/OriginTypeEnum" + description: |- + Type of the connector + + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + attributes: + $ref: "#/components/schemas/ConnectorHTTPAttributes" + required: + - attributes + - id + - last_editor + - last_modified + - name + - product_version + - type + title: ConnectorHTTP + type: object + ConnectorHTTPAttributes: + additionalProperties: false + example: + addresses: + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + connection_options: "" + modules: "" + properties: + addresses: + items: + $ref: "#/components/schemas/Address" + type: array + connection_options: + allOf: + - $ref: "#/components/schemas/HTTPConnectionOptions" + modules: + allOf: + - $ref: "#/components/schemas/HTTPModules" + required: + - addresses + title: ConnectorHTTPAttributes + type: object + ConnectorHTTPAttributesRequest: + additionalProperties: false + example: + addresses: + - https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + - https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + connection_options: "" + modules: "" + properties: + addresses: + items: + $ref: "#/components/schemas/AddressRequest" + type: array + connection_options: + allOf: + - $ref: "#/components/schemas/HTTPConnectionOptionsRequest" + modules: + allOf: + - $ref: "#/components/schemas/HTTPModulesRequest" + required: + - addresses + title: ConnectorHTTPAttributesRequest + type: object + ConnectorHTTPRequest: + additionalProperties: false + example: + name: name + active: true + attributes: + addresses: + - https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + - https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + connection_options: "" + modules: "" + type: "" + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + type: + allOf: + - $ref: "#/components/schemas/OriginTypeEnum" + description: |- + Type of the connector + + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + attributes: + $ref: "#/components/schemas/ConnectorHTTPAttributesRequest" + required: + - attributes + - name + - type + title: ConnectorHTTPRequest + type: object + ConnectorRequest: + additionalProperties: false + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + type: + allOf: + - $ref: "#/components/schemas/OriginTypeEnum" + description: |- + Type of the connector + + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + attributes: + $ref: "#/components/schemas/ConnectorStorageAttributesRequest" + required: + - attributes + - name + - type + title: ConnectorRequest + type: object + ConnectorStorageAttributes: + additionalProperties: false + properties: + bucket: + maxLength: 255 + minLength: 1 + type: string + prefix: + maxLength: 255 + minLength: 1 + type: string + required: + - bucket + title: ConnectorStorageAttributes + type: object + ConnectorStorageAttributesRequest: + additionalProperties: false + properties: + bucket: + maxLength: 255 + minLength: 1 + type: string + prefix: + maxLength: 255 + minLength: 1 + type: string + required: + - bucket + title: ConnectorStorageAttributesRequest + type: object + CustomPage: + additionalProperties: false + example: + product_version: product_version + pages: + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + last_editor: + maxLength: 255 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + pages: + items: + $ref: "#/components/schemas/Page" + type: array + required: + - id + - last_editor + - last_modified + - name + - pages + - product_version + title: CustomPage + type: object + CustomPageRequest: + additionalProperties: false + example: + pages: + - code: code + page: + attributes: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + type: type + - code: code + page: + attributes: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + type: type + name: name + active: true + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + pages: + items: + $ref: "#/components/schemas/PageRequest" + type: array + required: + - name + - pages + title: CustomPageRequest + type: object + CustomPageResponse: + additionalProperties: false + example: + data: + product_version: product_version + pages: + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/CustomPage" + required: + - data + title: CustomPageResponse + type: object + DefaultDeploymentStrategy: + additionalProperties: true + properties: + attributes: + $ref: "#/components/schemas/DefaultDeploymentStrategyAttrs" + required: + - attributes + title: DefaultDeploymentStrategy + type: object + DefaultDeploymentStrategyAttrs: + additionalProperties: false + example: + application: 5559347081229897728 + firewall: 1 + custom_page: 1 + properties: + application: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + firewall: + format: int64 + nullable: true + type: integer + custom_page: + format: int64 + minimum: 1 + nullable: true + type: integer + required: + - application + title: DefaultDeploymentStrategyAttrs + type: object + DefaultDeploymentStrategyAttrsRequest: + additionalProperties: false + example: + application: 738633633822310400 + firewall: 6 + custom_page: 1 + properties: + application: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + firewall: + format: int64 + nullable: true + type: integer + custom_page: + format: int64 + minimum: 1 + nullable: true + type: integer + required: + - application + title: DefaultDeploymentStrategyAttrsRequest + type: object + DefaultDeploymentStrategyRequest: + additionalProperties: true + properties: + attributes: + $ref: "#/components/schemas/DefaultDeploymentStrategyAttrsRequest" + required: + - attributes + title: DefaultDeploymentStrategyRequest + type: object + DeploymentStrategy: + $ref: "#/components/schemas/DeploymentStrategyDefaultDeploymentStrategy" + DeploymentStrategyDefaultDeploymentStrategy: + allOf: + - $ref: "#/components/schemas/DeploymentStrategyShared" + - $ref: "#/components/schemas/DefaultDeploymentStrategy" + - additionalProperties: true + properties: + type: + description: Discriminator field for DeploymentStrategy + type: string + required: + - type + title: DeploymentStrategyDefaultDeploymentStrategy + type: object + example: null + example: + attributes: + application: 5559347081229897728 + firewall: 1 + custom_page: 1 + type: type + DeploymentStrategyDefaultDeploymentStrategyRequest: + allOf: + - $ref: "#/components/schemas/DeploymentStrategyShared" + - $ref: "#/components/schemas/DefaultDeploymentStrategyRequest" + - additionalProperties: true + properties: + type: + description: Discriminator field for DeploymentStrategyRequest + type: string + required: + - type + title: DeploymentStrategyDefaultDeploymentStrategyRequest + type: object + example: null + example: + attributes: + application: 738633633822310400 + firewall: 6 + custom_page: 1 + type: type + DeploymentStrategyRequest: + $ref: "#/components/schemas/DeploymentStrategyDefaultDeploymentStrategyRequest" + DeploymentStrategyShared: + additionalProperties: true + description: Deployment strategy. + properties: + type: + maxLength: 255 + minLength: 1 + type: string + required: + - type + title: DeploymentStrategyShared + type: object + DeviceGroup: + additionalProperties: false + example: + name: name + id: 0 + user_agent: user_agent + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + user_agent: + description: Enter a valid regular expression pattern to identify user agents. + maxLength: 512 + minLength: 1 + type: string + required: + - id + - name + - user_agent + title: DeviceGroup + type: object + DeviceGroupRequest: + additionalProperties: false + example: + name: name + user_agent: user_agent + properties: + name: + maxLength: 250 + minLength: 1 + type: string + user_agent: + description: Enter a valid regular expression pattern to identify user agents. + maxLength: 512 + minLength: 1 + type: string + required: + - name + - user_agent + title: DeviceGroupRequest + type: object + DeviceGroupResponse: + additionalProperties: false + example: + data: + name: name + id: 0 + user_agent: user_agent + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/DeviceGroup" + required: + - data + title: DeviceGroupResponse + type: object + DnsResolutionEnum: + description: |- + * `both` - Both + * `force_ipv4` - Force IPv4 + title: DnsResolutionEnum + type: string + x-extensible-enum: + - both + - force_ipv4 + FunctionModule: + additionalProperties: false + properties: + enabled: + type: boolean + title: FunctionModule + type: object + FunctionModuleRequest: + additionalProperties: false + properties: + enabled: + type: boolean + title: FunctionModuleRequest + type: object + Functions: + additionalProperties: false + example: + product_version: product_version + code: code + last_editor: last_editor + active: true + runtime: "" + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + version: version + default_args: "" + vendor: vendor + name: name + execution_environment: "" + id: 0 + reference_count: 6 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + last_editor: + maxLength: 250 + type: string + last_modified: + format: date-time + type: string + product_version: + maxLength: 50 + type: string + active: + type: boolean + runtime: + allOf: + - $ref: "#/components/schemas/RuntimeEnum" + execution_environment: + allOf: + - $ref: "#/components/schemas/ExecutionEnvironmentEnum" + code: + description: "String containing the function code. Maximum size: 20MB." + maxLength: 52428800 + minLength: 1 + type: string + default_args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + reference_count: + format: int64 + type: integer + version: + description: "Installed version, which may not be the latest if the vendor\ + \ has released updates since installation." + type: string + vendor: + type: string + required: + - code + - id + - last_editor + - last_modified + - name + - product_version + - reference_count + - vendor + - version + title: Functions + type: object + FunctionsRequest: + additionalProperties: false + example: + code: code + name: name + active: true + runtime: "" + execution_environment: "" + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + default_args: "" + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + runtime: + allOf: + - $ref: "#/components/schemas/RuntimeEnum" + execution_environment: + allOf: + - $ref: "#/components/schemas/ExecutionEnvironmentEnum" + code: + description: "String containing the function code. Maximum size: 20MB." + maxLength: 52428800 + minLength: 1 + type: string + default_args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + required: + - code + - name + title: FunctionsRequest + type: object + EngineVersionEnum: + description: '* `2021-Q3` - 2021-Q3' + title: EngineVersionEnum + type: string + x-extensible-enum: + - 2021-Q3 + ExecutionEnvironmentEnum: + description: |- + * `firewall` - Firewall + * `application` - Application + title: ExecutionEnvironmentEnum + type: string + x-extensible-enum: + - firewall + - application + Firewall: + additionalProperties: false + example: + product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + ddos_protection: "" + functions: "" + network_protection: "" + waf: "" + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + modules: + $ref: "#/components/schemas/FirewallModules" + debug: + type: boolean + active: + type: boolean + last_editor: + maxLength: 250 + type: string + last_modified: + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - id + - last_editor + - last_modified + - name + - product_version + title: Firewall + type: object + FirewallBehavior: + additionalProperties: true + discriminator: + mapping: + deny: "#/components/schemas/FirewallBehaviorNoArgs" + drop: "#/components/schemas/FirewallBehaviorNoArgs" + set_custom_response: "#/components/schemas/FirewallBehaviorSetCustomResponse" + set_rate_limit: "#/components/schemas/FirewallBehaviorSetRateLimit" + set_waf: "#/components/schemas/FirewallBehaviorSetWaf" + run_function: "#/components/schemas/FirewallBehaviorRunFunction" + propertyName: type + oneOf: + - $ref: "#/components/schemas/FirewallBehaviorNoArgs" + - $ref: "#/components/schemas/FirewallBehaviorSetCustomResponse" + - $ref: "#/components/schemas/FirewallBehaviorSetRateLimit" + - $ref: "#/components/schemas/FirewallBehaviorSetWaf" + - $ref: "#/components/schemas/FirewallBehaviorRunFunction" + title: FirewallBehavior + FirewallBehaviorNoArgs: + additionalProperties: true + description: Behaviors without arguments + example: + type: type + properties: + type: + description: |- + * `deny` - deny + * `drop` - drop + title: FirewallBehaviorNoArgsTypeEnum + type: string + x-extensible-enum: + - deny + - drop + required: + - type + title: FirewallBehaviorNoArgs + type: object + FirewallBehaviorNoArgsRequest: + additionalProperties: true + description: Behaviors without arguments + example: + type: type + properties: + type: + description: |- + * `deny` - deny + * `drop` - drop + title: FirewallBehaviorNoArgsTypeEnum + type: string + x-extensible-enum: + - deny + - drop + required: + - type + title: FirewallBehaviorNoArgsRequest + type: object + FirewallBehaviorNoArgsTypeEnum: + description: |- + * `deny` - deny + * `drop` - drop + title: FirewallBehaviorNoArgsTypeEnum + type: string + x-extensible-enum: + - deny + - drop + FirewallBehaviorRequest: + additionalProperties: true + discriminator: + mapping: + deny: "#/components/schemas/FirewallBehaviorNoArgsRequest" + drop: "#/components/schemas/FirewallBehaviorNoArgsRequest" + set_custom_response: "#/components/schemas/FirewallBehaviorSetCustomResponseRequest" + set_rate_limit: "#/components/schemas/FirewallBehaviorSetRateLimitRequest" + set_waf: "#/components/schemas/FirewallBehaviorSetWafRequest" + run_function: "#/components/schemas/FirewallBehaviorRunFunctionRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/FirewallBehaviorNoArgsRequest" + - $ref: "#/components/schemas/FirewallBehaviorSetCustomResponseRequest" + - $ref: "#/components/schemas/FirewallBehaviorSetRateLimitRequest" + - $ref: "#/components/schemas/FirewallBehaviorSetWafRequest" + - $ref: "#/components/schemas/FirewallBehaviorRunFunctionRequest" + title: FirewallBehaviorRequest + FirewallBehaviorRunFunction: + additionalProperties: true + description: Run a function + properties: + type: + description: '* `run_function` - run_function' + title: BehaviorTypeEnum + type: string + x-extensible-enum: + - run_function + attributes: + $ref: "#/components/schemas/FirewallBehaviorRunFunctionAttributes" + required: + - attributes + - type + title: FirewallBehaviorRunFunction + type: object + FirewallBehaviorRunFunctionAttributes: + additionalProperties: true + properties: + value: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + required: + - value + title: FirewallBehaviorRunFunctionAttributes + type: object + FirewallBehaviorRunFunctionAttributesRequest: + additionalProperties: true + properties: + value: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + required: + - value + title: FirewallBehaviorRunFunctionAttributesRequest + type: object + FirewallBehaviorRunFunctionRequest: + additionalProperties: true + description: Run a function + properties: + type: + description: '* `run_function` - run_function' + title: BehaviorTypeEnum + type: string + x-extensible-enum: + - run_function + attributes: + $ref: "#/components/schemas/FirewallBehaviorRunFunctionAttributesRequest" + required: + - attributes + - type + title: FirewallBehaviorRunFunctionRequest + type: object + FirewallBehaviorSetCustomResponse: + additionalProperties: true + description: Set a custom response + properties: + type: + description: '* `set_custom_response` - set_custom_response' + title: FirewallBehaviorSetCustomResponseTypeEnum + type: string + x-extensible-enum: + - set_custom_response + attributes: + $ref: "#/components/schemas/FirewallBehaviorSetCustomResponseAttributes" + required: + - attributes + - type + title: FirewallBehaviorSetCustomResponse + type: object + FirewallBehaviorSetCustomResponseAttributes: + additionalProperties: true + properties: + status_code: + format: int64 + maximum: 499 + minimum: 200 + type: integer + content_type: + maxLength: 255 + minLength: 0 + type: string + content_body: + maxLength: 500 + minLength: 0 + type: string + required: + - status_code + title: FirewallBehaviorSetCustomResponseAttributes + type: object + FirewallBehaviorSetCustomResponseAttributesRequest: + additionalProperties: true + properties: + status_code: + format: int64 + maximum: 499 + minimum: 200 + type: integer + content_type: + maxLength: 255 + minLength: 0 + type: string + content_body: + maxLength: 500 + minLength: 0 + type: string + required: + - status_code + title: FirewallBehaviorSetCustomResponseAttributesRequest + type: object + FirewallBehaviorSetCustomResponseRequest: + additionalProperties: true + description: Set a custom response + properties: + type: + description: '* `set_custom_response` - set_custom_response' + title: FirewallBehaviorSetCustomResponseTypeEnum + type: string + x-extensible-enum: + - set_custom_response + attributes: + $ref: "#/components/schemas/FirewallBehaviorSetCustomResponseAttributesRequest" + required: + - attributes + - type + title: FirewallBehaviorSetCustomResponseRequest + type: object + FirewallBehaviorSetCustomResponseTypeEnum: + description: '* `set_custom_response` - set_custom_response' + title: FirewallBehaviorSetCustomResponseTypeEnum + type: string + x-extensible-enum: + - set_custom_response + FirewallBehaviorSetRateLimit: + additionalProperties: true + description: Set a rate limit + properties: + type: + description: '* `set_rate_limit` - set_rate_limit' + title: FirewallBehaviorSetRateLimitTypeEnum + type: string + x-extensible-enum: + - set_rate_limit + attributes: + $ref: "#/components/schemas/FirewallBehaviorSetRateLimitAttributes" + required: + - attributes + - type + title: FirewallBehaviorSetRateLimit + type: object + FirewallBehaviorSetRateLimitAttributes: + additionalProperties: true + properties: + type: + allOf: + - $ref: "#/components/schemas/FirewallBehaviorSetRateLimitAttributesTypeEnum" + limit_by: + description: |- + * `client_ip` - client_ip + * `global` - global + title: LimitByEnum + type: string + x-extensible-enum: + - client_ip + - global + average_rate_limit: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + maximum_burst_size: + format: int64 + maximum: 2147483647 + minimum: 1 + nullable: true + type: integer + required: + - average_rate_limit + - limit_by + title: FirewallBehaviorSetRateLimitAttributes + type: object + FirewallBehaviorSetRateLimitAttributesRequest: + additionalProperties: true + properties: + type: + allOf: + - $ref: "#/components/schemas/FirewallBehaviorSetRateLimitAttributesTypeEnum" + limit_by: + description: |- + * `client_ip` - client_ip + * `global` - global + title: LimitByEnum + type: string + x-extensible-enum: + - client_ip + - global + average_rate_limit: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + maximum_burst_size: + format: int64 + maximum: 2147483647 + minimum: 1 + nullable: true + type: integer + required: + - average_rate_limit + - limit_by + title: FirewallBehaviorSetRateLimitAttributesRequest + type: object + FirewallBehaviorSetRateLimitAttributesTypeEnum: + description: |- + * `second` - second + * `minute` - minute + title: FirewallBehaviorSetRateLimitAttributesTypeEnum + type: string + x-extensible-enum: + - second + - minute + FirewallBehaviorSetRateLimitRequest: + additionalProperties: true + description: Set a rate limit + properties: + type: + description: '* `set_rate_limit` - set_rate_limit' + title: FirewallBehaviorSetRateLimitTypeEnum + type: string + x-extensible-enum: + - set_rate_limit + attributes: + $ref: "#/components/schemas/FirewallBehaviorSetRateLimitAttributesRequest" + required: + - attributes + - type + title: FirewallBehaviorSetRateLimitRequest + type: object + FirewallBehaviorSetRateLimitTypeEnum: + description: '* `set_rate_limit` - set_rate_limit' + title: FirewallBehaviorSetRateLimitTypeEnum + type: string + x-extensible-enum: + - set_rate_limit + FirewallBehaviorSetWaf: + additionalProperties: true + description: Set a WAF + properties: + type: + description: '* `set_waf` - set_waf' + title: FirewallBehaviorSetWafTypeEnum + type: string + x-extensible-enum: + - set_waf + attributes: + $ref: "#/components/schemas/FirewallBehaviorSetWafAttributes" + required: + - attributes + - type + title: FirewallBehaviorSetWaf + type: object + FirewallBehaviorSetWafAttributes: + additionalProperties: true + properties: + waf_id: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + mode: + description: |- + * `logging` - logging + * `blocking` - blocking + title: ModeEnum + type: string + x-extensible-enum: + - logging + - blocking + required: + - mode + - waf_id + title: FirewallBehaviorSetWafAttributes + type: object + FirewallBehaviorSetWafAttributesRequest: + additionalProperties: true + properties: + waf_id: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + mode: + description: |- + * `logging` - logging + * `blocking` - blocking + title: ModeEnum + type: string + x-extensible-enum: + - logging + - blocking + required: + - mode + - waf_id + title: FirewallBehaviorSetWafAttributesRequest + type: object + FirewallBehaviorSetWafRequest: + additionalProperties: true + description: Set a WAF + properties: + type: + description: '* `set_waf` - set_waf' + title: FirewallBehaviorSetWafTypeEnum + type: string + x-extensible-enum: + - set_waf + attributes: + $ref: "#/components/schemas/FirewallBehaviorSetWafAttributesRequest" + required: + - attributes + - type + title: FirewallBehaviorSetWafRequest + type: object + FirewallBehaviorSetWafTypeEnum: + description: '* `set_waf` - set_waf' + title: FirewallBehaviorSetWafTypeEnum + type: string + x-extensible-enum: + - set_waf + FirewallFunctionInstance: + additionalProperties: false + description: Serializer for Firewall Function Instances + example: + args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + function: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + active: + type: boolean + last_editor: + maxLength: 250 + type: string + last_modified: + format: date-time + type: string + required: + - function + - id + - last_editor + - last_modified + - name + title: FirewallFunctionInstance + type: object + FirewallFunctionInstanceRequest: + additionalProperties: false + description: Serializer for Firewall Function Instances + example: + args: "" + function: 738633633822310400 + name: name + active: true + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + properties: + name: + maxLength: 100 + minLength: 1 + type: string + args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + function: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + active: + type: boolean + required: + - function + - name + title: FirewallFunctionInstanceRequest + type: object + FirewallFunctionInstanceResponse: + additionalProperties: false + example: + data: + args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/FirewallFunctionInstance" + required: + - data + title: FirewallFunctionInstanceResponse + type: object + FirewallModule: + additionalProperties: false + description: |- + Serializer for individual modules in Firewall. + + Handles serialization and deserialization of module settings with an enabled flag. + properties: + enabled: + type: boolean + title: FirewallModule + type: object + FirewallModuleRequest: + additionalProperties: false + description: |- + Serializer for individual modules in Firewall. + + Handles serialization and deserialization of module settings with an enabled flag. + properties: + enabled: + type: boolean + title: FirewallModuleRequest + type: object + FirewallModules: + additionalProperties: false + example: + ddos_protection: "" + functions: "" + network_protection: "" + waf: "" + properties: + ddos_protection: + allOf: + - $ref: "#/components/schemas/FirewallModule" + functions: + allOf: + - $ref: "#/components/schemas/FirewallModule" + network_protection: + allOf: + - $ref: "#/components/schemas/FirewallModule" + waf: + allOf: + - $ref: "#/components/schemas/FirewallModule" + required: + - ddos_protection + title: FirewallModules + type: object + FirewallModulesRequest: + additionalProperties: false + example: + functions: "" + network_protection: "" + waf: "" + properties: + functions: + allOf: + - $ref: "#/components/schemas/FirewallModuleRequest" + network_protection: + allOf: + - $ref: "#/components/schemas/FirewallModuleRequest" + waf: + allOf: + - $ref: "#/components/schemas/FirewallModuleRequest" + title: FirewallModulesRequest + type: object + FirewallRequest: + additionalProperties: false + example: + debug: true + name: name + active: true + modules: + functions: "" + network_protection: "" + waf: "" + properties: + name: + maxLength: 250 + minLength: 1 + type: string + modules: + $ref: "#/components/schemas/FirewallModulesRequest" + debug: + type: boolean + active: + type: boolean + required: + - name + title: FirewallRequest + type: object + FirewallResponse: + additionalProperties: false + example: + data: + product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + ddos_protection: "" + functions: "" + network_protection: "" + waf: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Firewall" + required: + - data + title: FirewallResponse + type: object + FirewallRule: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + last_editor: + maxLength: 255 + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/FirewallCriterionField" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/FirewallBehavior" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + order: + format: int64 + maximum: 199 + minimum: 0 + type: integer + required: + - behaviors + - criteria + - id + - last_editor + - last_modified + - name + - order + title: FirewallRule + type: object + FirewallRuleEngineOrderRequest: + additionalProperties: false + example: + order: + - 738633633822310400 + - 738633633822310400 + properties: + order: + items: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + type: array + required: + - order + title: FirewallRuleEngineOrderRequest + type: object + FirewallRuleRequest: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + name: name + active: true + description: description + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/FirewallCriterionFieldRequest" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/FirewallBehaviorRequest" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + required: + - behaviors + - criteria + - name + title: FirewallRuleRequest + type: object + FirewallRuleResponse: + additionalProperties: false + example: + data: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/FirewallRule" + required: + - data + title: FirewallRuleResponse + type: object + FunctionInstance: + additionalProperties: false + description: Serializer for Application Function Instances + example: + args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + function: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + active: + type: boolean + last_editor: + maxLength: 250 + type: string + last_modified: + format: date-time + type: string + required: + - function + - id + - last_editor + - last_modified + - name + title: FunctionInstance + type: object + FunctionInstanceRequest: + additionalProperties: false + description: Serializer for Application Function Instances + example: + args: "" + function: 738633633822310400 + name: name + active: true + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + properties: + name: + maxLength: 100 + minLength: 1 + type: string + args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + function: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + active: + type: boolean + required: + - function + - name + title: FunctionInstanceRequest + type: object + FunctionInstanceResponse: + additionalProperties: false + example: + data: + args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/FunctionInstance" + required: + - data + title: FunctionInstanceResponse + type: object + FunctionResponse: + additionalProperties: false + example: + data: + product_version: product_version + code: code + last_editor: last_editor + active: true + runtime: "" + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + version: version + default_args: "" + vendor: vendor + name: name + execution_environment: "" + id: 0 + reference_count: 6 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Functions" + required: + - data + title: FunctionResponse + type: object + HMAC: + additionalProperties: false + properties: + enabled: + type: boolean + config: + allOf: + - $ref: "#/components/schemas/AWS4HMAC" + nullable: true + type: object + required: + - enabled + title: HMAC + type: object + HMACRequest: + additionalProperties: false + properties: + enabled: + type: boolean + config: + allOf: + - $ref: "#/components/schemas/AWS4HMACRequest" + nullable: true + type: object + required: + - enabled + title: HMACRequest + type: object + HTTPConnectionOptions: + additionalProperties: false + properties: + dns_resolution: + allOf: + - $ref: "#/components/schemas/DnsResolutionEnum" + description: |- + DNS resolution policy: force IPv4 or both (IPv4 and IPv6) when connecting. + + * `both` - Both + * `force_ipv4` - Force IPv4 + transport_policy: + allOf: + - $ref: "#/components/schemas/TransportPolicyEnum" + description: |- + Transport protocol policy: preserve current scheme, force HTTP, or force HTTPS. + + * `preserve` - Preserve + * `force_https` - Force HTTPS + * `force_http` - Force HTTP + http_version_policy: + allOf: + - $ref: "#/components/schemas/HttpVersionPolicyEnum" + description: |- + Defines the HTTP version preference for outbound connections (e.g., HTTP/1.1). + + * `http1_1` - HTTP/1.1 + host: + description: Optional custom host used to override the default target hostname + during connection. + maxLength: 255 + minLength: 1 + type: string + path_prefix: + description: "Optional prefix to add to all request paths (e.g., '/v1')." + maxLength: 255 + minLength: 0 + type: string + following_redirect: + description: "If true, automatically follows HTTP redirects from the target\ + \ server." + type: boolean + real_ip_header: + description: Header name used to forward the original client IP address. + maxLength: 100 + minLength: 1 + type: string + real_port_header: + description: Header name used to forward the original client port. + maxLength: 100 + minLength: 1 + type: string + title: HTTPConnectionOptions + type: object + HTTPConnectionOptionsRequest: + additionalProperties: false + properties: + dns_resolution: + allOf: + - $ref: "#/components/schemas/DnsResolutionEnum" + description: |- + DNS resolution policy: force IPv4 or both (IPv4 and IPv6) when connecting. + + * `both` - Both + * `force_ipv4` - Force IPv4 + transport_policy: + allOf: + - $ref: "#/components/schemas/TransportPolicyEnum" + description: |- + Transport protocol policy: preserve current scheme, force HTTP, or force HTTPS. + + * `preserve` - Preserve + * `force_https` - Force HTTPS + * `force_http` - Force HTTP + http_version_policy: + allOf: + - $ref: "#/components/schemas/HttpVersionPolicyEnum" + description: |- + Defines the HTTP version preference for outbound connections (e.g., HTTP/1.1). + + * `http1_1` - HTTP/1.1 + host: + description: Optional custom host used to override the default target hostname + during connection. + maxLength: 255 + minLength: 1 + type: string + path_prefix: + description: "Optional prefix to add to all request paths (e.g., '/v1')." + maxLength: 255 + minLength: 0 + type: string + following_redirect: + description: "If true, automatically follows HTTP redirects from the target\ + \ server." + type: boolean + real_ip_header: + description: Header name used to forward the original client IP address. + maxLength: 100 + minLength: 1 + type: string + real_port_header: + description: Header name used to forward the original client port. + maxLength: 100 + minLength: 1 + type: string + title: HTTPConnectionOptionsRequest + type: object + HTTPModules: + additionalProperties: false + properties: + load_balancer: + allOf: + - $ref: "#/components/schemas/LoadBalancerModule" + origin_shield: + allOf: + - $ref: "#/components/schemas/OriginShieldModule" + title: HTTPModules + type: object + HTTPModulesRequest: + additionalProperties: false + properties: + load_balancer: + allOf: + - $ref: "#/components/schemas/LoadBalancerModuleRequest" + origin_shield: + allOf: + - $ref: "#/components/schemas/OriginShieldModuleRequest" + title: HTTPModulesRequest + type: object + HttpProtocol: + additionalProperties: false + properties: + versions: + items: + maxLength: 30 + type: string + maxItems: 3 + type: array + http_ports: + items: + format: int64 + type: integer + maxItems: 4 + minItems: 1 + type: array + https_ports: + items: + format: int64 + type: integer + maxItems: 12 + minItems: 1 + nullable: true + type: array + quic_ports: + items: + format: int64 + type: integer + maxItems: 12 + nullable: true + type: array + title: HttpProtocol + type: object + HttpProtocolRequest: + additionalProperties: false + properties: + versions: + items: + maxLength: 30 + minLength: 1 + type: string + maxItems: 3 + type: array + http_ports: + items: + format: int64 + type: integer + maxItems: 4 + minItems: 1 + type: array + https_ports: + items: + format: int64 + type: integer + maxItems: 12 + minItems: 1 + nullable: true + type: array + quic_ports: + items: + format: int64 + type: integer + maxItems: 12 + nullable: true + type: array + title: HttpProtocolRequest + type: object + HttpVersionPolicyEnum: + description: '* `http1_1` - HTTP/1.1' + title: HttpVersionPolicyEnum + type: string + x-extensible-enum: + - http1_1 + ImageProcessorModule: + additionalProperties: false + properties: + enabled: + type: boolean + title: ImageProcessorModule + type: object + ImageProcessorModuleRequest: + additionalProperties: false + properties: + enabled: + type: boolean + title: ImageProcessorModuleRequest + type: object + InfrastructureEnum: + description: |- + * `1` - Production Infrastructure (All Locations) + * `2` - Staging Infrastructure + format: int64 + title: InfrastructureEnum + type: integer + x-extensible-enum: + - 1 + - 2 + LargeFileCacheModule: + additionalProperties: false + example: + offset: 1024 + enabled: true + properties: + enabled: + type: boolean + offset: + format: int64 + maximum: 1024 + minimum: 1024 + type: integer + title: LargeFileCacheModule + type: object + LargeFileCacheModuleRequest: + additionalProperties: false + example: + offset: 1024 + enabled: true + properties: + enabled: + type: boolean + offset: + format: int64 + maximum: 1024 + minimum: 1024 + type: integer + title: LargeFileCacheModuleRequest + type: object + LayerEnum: + description: |- + * `cache` - Cache + * `tiered_cache` - Tiered Cache + title: LayerEnum + type: string + x-extensible-enum: + - cache + - tiered_cache + LimitByEnum: + description: |- + * `client_ip` - client_ip + * `global` - global + title: LimitByEnum + type: string + x-extensible-enum: + - client_ip + - global + LoadBalancerModule: + additionalProperties: false + properties: + enabled: + type: boolean + config: + allOf: + - $ref: "#/components/schemas/LoadBalancerModuleConfig" + nullable: true + type: object + title: LoadBalancerModule + type: object + LoadBalancerModuleConfig: + additionalProperties: false + properties: + method: + allOf: + - $ref: "#/components/schemas/MethodEnum" + description: |- + Load balancing method to use (e.g., round-robin, least_conn). + + * `round_robin` - Round Robin + * `least_conn` - Least Connections + * `ip_hash` - IP Hash + max_retries: + description: Maximum number of retry attempts on connection failure. + format: int64 + maximum: 20 + minimum: 0 + type: integer + connection_timeout: + description: Maximum time (in seconds) to wait for a connection to be established. + format: int64 + maximum: 300 + minimum: 1 + type: integer + read_write_timeout: + description: Maximum time (in seconds) to wait for data read/write after + connection. + format: int64 + maximum: 600 + minimum: 1 + type: integer + title: LoadBalancerModuleConfig + type: object + LoadBalancerModuleConfigRequest: + additionalProperties: false + properties: + method: + allOf: + - $ref: "#/components/schemas/MethodEnum" + description: |- + Load balancing method to use (e.g., round-robin, least_conn). + + * `round_robin` - Round Robin + * `least_conn` - Least Connections + * `ip_hash` - IP Hash + max_retries: + description: Maximum number of retry attempts on connection failure. + format: int64 + maximum: 20 + minimum: 0 + type: integer + connection_timeout: + description: Maximum time (in seconds) to wait for a connection to be established. + format: int64 + maximum: 300 + minimum: 1 + type: integer + read_write_timeout: + description: Maximum time (in seconds) to wait for data read/write after + connection. + format: int64 + maximum: 600 + minimum: 1 + type: integer + title: LoadBalancerModuleConfigRequest + type: object + LoadBalancerModuleRequest: + additionalProperties: false + properties: + enabled: + type: boolean + config: + allOf: + - $ref: "#/components/schemas/LoadBalancerModuleConfigRequest" + nullable: true + type: object + title: LoadBalancerModuleRequest + type: object + MTLS: + additionalProperties: false + properties: + enabled: + nullable: true + type: boolean + config: + allOf: + - $ref: "#/components/schemas/MTLSConfig" + nullable: true + type: object + title: MTLS + type: object + MTLSConfig: + additionalProperties: false + properties: + certificate: + format: int64 + minimum: 1 + nullable: true + type: integer + crl: + items: + format: int64 + minimum: 1 + type: integer + maxItems: 100 + nullable: true + type: array + verification: + allOf: + - $ref: "#/components/schemas/VerificationEnum" + nullable: true + title: MTLSConfig + type: object + MTLSConfigRequest: + additionalProperties: false + properties: + certificate: + format: int64 + minimum: 1 + nullable: true + type: integer + crl: + items: + format: int64 + minimum: 1 + type: integer + maxItems: 100 + nullable: true + type: array + verification: + allOf: + - $ref: "#/components/schemas/VerificationEnum" + nullable: true + title: MTLSConfigRequest + type: object + MTLSRequest: + additionalProperties: false + properties: + enabled: + nullable: true + type: boolean + config: + allOf: + - $ref: "#/components/schemas/MTLSConfigRequest" + nullable: true + type: object + title: MTLSRequest + type: object + MethodEnum: + description: |- + * `round_robin` - Round Robin + * `least_conn` - Least Connections + * `ip_hash` - IP Hash + title: MethodEnum + type: string + x-extensible-enum: + - round_robin + - least_conn + - ip_hash + MinimumVersionEnum: + description: |- + * `` - None + * `tls_1_0` - TLS 1.0 + * `tls_1_1` - TLS 1.1 + * `tls_1_2` - TLS 1.2 + * `tls_1_3` - TLS 1.3 + title: MinimumVersionEnum + type: string + x-extensible-enum: + - tls_1_0 + - tls_1_1 + - tls_1_2 + - tls_1_3 + ModeEnum: + description: |- + * `logging` - logging + * `blocking` - blocking + title: ModeEnum + type: string + x-extensible-enum: + - logging + - blocking + NetworkList: + additionalProperties: false + description: |- + A Network List item can be one of the following formats: + + + 1. IP Addresses (IPv4/IPv6): + + - Simple IPv4: 192.168.0.1 + + - IPv4 with CIDR: 192.168.0.1/24 + + - Simple IPv6: 2001:db8:3333:4444:5555:6666:7777:8888 + + - IPv6 with CIDR: 2001:db8::/32 + + - IP with expiration date: 192.168.0.1 --LT2025-05-29T12:25:23Z + + (The expiration date format is --LT followed by ISO8601 date in UTC timezone) + + + 2. Country Codes: + + - Two-character uppercase alphanumeric country code (ISO 3166-1 alpha-2) + + - Examples: BR, US, DE, JP + + + 3. Autonomous System Numbers (ASN): + + - Number composed of digits only + + - Examples: 1234, 5678, 13335 + example: + last_editor: last_editor + name: name + active: true + id: 0 + type: type + items: + - items + - items + - items + - items + - items + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + type: + description: |- + * `asn` - ASN + * `countries` - Countries + * `ip_cidr` - IP/CIDR + title: NetworkListTypeEnum + type: string + x-extensible-enum: + - asn + - countries + - ip_cidr + items: + items: + maxLength: 250 + minLength: 0 + type: string + maxItems: 20000 + minItems: 1 + type: array + last_editor: + maxLength: 250 + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + required: + - id + - items + - last_editor + - last_modified + - name + - type + title: NetworkList + type: object + NetworkListRequest: + additionalProperties: false + description: |- + A Network List item can be one of the following formats: + + + 1. IP Addresses (IPv4/IPv6): + + - Simple IPv4: 192.168.0.1 + + - IPv4 with CIDR: 192.168.0.1/24 + + - Simple IPv6: 2001:db8:3333:4444:5555:6666:7777:8888 + + - IPv6 with CIDR: 2001:db8::/32 + + - IP with expiration date: 192.168.0.1 --LT2025-05-29T12:25:23Z + + (The expiration date format is --LT followed by ISO8601 date in UTC timezone) + + + 2. Country Codes: + + - Two-character uppercase alphanumeric country code (ISO 3166-1 alpha-2) + + - Examples: BR, US, DE, JP + + + 3. Autonomous System Numbers (ASN): + + - Number composed of digits only + + - Examples: 1234, 5678, 13335 + example: + name: name + active: true + type: type + items: + - items + - items + - items + - items + - items + properties: + name: + maxLength: 250 + minLength: 1 + type: string + type: + description: |- + * `asn` - ASN + * `countries` - Countries + * `ip_cidr` - IP/CIDR + title: NetworkListTypeEnum + type: string + x-extensible-enum: + - asn + - countries + - ip_cidr + items: + items: + maxLength: 250 + minLength: 1 + type: string + maxItems: 20000 + minItems: 1 + type: array + active: + type: boolean + required: + - items + - name + - type + title: NetworkListRequest + type: object + NetworkListResponse: + additionalProperties: false + example: + data: + last_editor: last_editor + name: name + active: true + id: 0 + type: type + items: + - items + - items + - items + - items + - items + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/NetworkList" + required: + - data + title: NetworkListResponse + type: object + NetworkListSummary: + additionalProperties: false + example: + last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + type: + description: |- + * `asn` - ASN + * `countries` - Countries + * `ip_cidr` - IP/CIDR + title: NetworkListTypeEnum + type: string + x-extensible-enum: + - asn + - countries + - ip_cidr + last_editor: + maxLength: 250 + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + required: + - id + - last_editor + - last_modified + - name + - type + title: NetworkListSummary + type: object + NullEnum: + title: NullEnum + x-extensible-enum: + - null + OriginIPACL: + additionalProperties: false + properties: + enabled: + type: boolean + title: OriginIPACL + type: object + OriginIPACLRequest: + additionalProperties: false + properties: + enabled: + type: boolean + title: OriginIPACLRequest + type: object + OriginShieldConfig: + additionalProperties: false + properties: + origin_ip_acl: + $ref: "#/components/schemas/OriginIPACL" + hmac: + $ref: "#/components/schemas/HMAC" + title: OriginShieldConfig + type: object + OriginShieldConfigRequest: + additionalProperties: false + properties: + origin_ip_acl: + $ref: "#/components/schemas/OriginIPACLRequest" + hmac: + $ref: "#/components/schemas/HMACRequest" + title: OriginShieldConfigRequest + type: object + OriginShieldModule: + additionalProperties: false + properties: + enabled: + type: boolean + config: + allOf: + - $ref: "#/components/schemas/OriginShieldConfig" + nullable: true + type: object + title: OriginShieldModule + type: object + OriginShieldModuleRequest: + additionalProperties: false + properties: + enabled: + type: boolean + config: + allOf: + - $ref: "#/components/schemas/OriginShieldConfigRequest" + nullable: true + type: object + title: OriginShieldModuleRequest + type: object + Page: + additionalProperties: false + example: + code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + properties: + code: + description: |- + * `default` - default + * `400` - Bad Request + * `401` - Unauthorized + * `403` - Forbidden + * `404` - Not Found + * `405` - Method Not Allowed + * `406` - Not Acceptable + * `408` - Request Timeout + * `409` - Conflict + * `410` - Gone + * `411` - Length Required + * `414` - URI Too Long + * `415` - Unsupported Media Type + * `416` - Range Not Satisfiable + * `426` - Upgrade Required + * `429` - Too Many Requests + * `431` - Request Header Fields Too Large + * `500` - Internal Server Error + * `501` - Not Implemented + * `502` - Bad Gateway + * `503` - Service Unavailable + * `504` - Gateway Timeout + * `505` - HTTP Version Not Supported + title: CodeEnum + type: string + x-extensible-enum: + - default + - "400" + - "401" + - "403" + - "404" + - "405" + - "406" + - "408" + - "409" + - "410" + - "411" + - "414" + - "415" + - "416" + - "426" + - "429" + - "431" + - "500" + - "501" + - "502" + - "503" + - "504" + - "505" + page: + $ref: "#/components/schemas/PageConnector" + required: + - code + - page + title: Page + type: object + PageConnector: + additionalProperties: false + example: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + properties: + type: + maxLength: 255 + minLength: 1 + type: string + attributes: + $ref: "#/components/schemas/PageConnectorAttributes" + required: + - attributes + - type + title: PageConnector + type: object + PageConnectorAttributes: + additionalProperties: false + example: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + properties: + connector: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + ttl: + format: int64 + maximum: 31536000 + minimum: 0 + type: integer + uri: + maxLength: 250 + minLength: 1 + nullable: true + type: string + custom_status_code: + format: int64 + maximum: 599 + minimum: 100 + nullable: true + type: integer + required: + - connector + title: PageConnectorAttributes + type: object + PageConnectorAttributesRequest: + additionalProperties: false + example: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + properties: + connector: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + ttl: + format: int64 + maximum: 31536000 + minimum: 0 + type: integer + uri: + maxLength: 250 + minLength: 1 + nullable: true + type: string + custom_status_code: + format: int64 + maximum: 599 + minimum: 100 + nullable: true + type: integer + required: + - connector + title: PageConnectorAttributesRequest + type: object + PageConnectorRequest: + additionalProperties: false + example: + attributes: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + type: type + properties: + type: + maxLength: 255 + minLength: 1 + type: string + attributes: + $ref: "#/components/schemas/PageConnectorAttributesRequest" + required: + - attributes + - type + title: PageConnectorRequest + type: object + PageRequest: + additionalProperties: false + example: + code: code + page: + attributes: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + type: type + properties: + code: + description: |- + * `default` - default + * `400` - Bad Request + * `401` - Unauthorized + * `403` - Forbidden + * `404` - Not Found + * `405` - Method Not Allowed + * `406` - Not Acceptable + * `408` - Request Timeout + * `409` - Conflict + * `410` - Gone + * `411` - Length Required + * `414` - URI Too Long + * `415` - Unsupported Media Type + * `416` - Range Not Satisfiable + * `426` - Upgrade Required + * `429` - Too Many Requests + * `431` - Request Header Fields Too Large + * `500` - Internal Server Error + * `501` - Not Implemented + * `502` - Bad Gateway + * `503` - Service Unavailable + * `504` - Gateway Timeout + * `505` - HTTP Version Not Supported + title: CodeEnum + type: string + x-extensible-enum: + - default + - "400" + - "401" + - "403" + - "404" + - "405" + - "406" + - "408" + - "409" + - "410" + - "411" + - "414" + - "415" + - "416" + - "426" + - "429" + - "431" + - "500" + - "501" + - "502" + - "503" + - "504" + - "505" + page: + $ref: "#/components/schemas/PageConnectorRequest" + required: + - code + - page + title: PageRequest + type: object + PaginatedApplicationList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + - product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Application" + type: array + title: PaginatedApplicationList + type: object + PaginatedCacheSettingList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - browser_cache: + max_age: 19008185 + behavior: "" + name: name + id: 0 + modules: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 4622587 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + - browser_cache: + max_age: 19008185 + behavior: "" + name: name + id: 0 + modules: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 4622587 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/CacheSetting" + type: array + title: PaginatedCacheSettingList + type: object + PaginatedCustomPageList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + pages: + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + pages: + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + - code: code + page: + attributes: + connector: 1294386359 + custom_status_code: 397 + ttl: 4622587 + uri: uri + type: type + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/CustomPage" + type: array + title: PaginatedCustomPageList + type: object + PaginatedDeviceGroupList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - name: name + id: 0 + user_agent: user_agent + - name: name + id: 0 + user_agent: user_agent + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/DeviceGroup" + type: array + title: PaginatedDeviceGroupList + type: object + PaginatedFunctionsList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + code: code + last_editor: last_editor + active: true + runtime: "" + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + version: version + default_args: "" + vendor: vendor + name: name + execution_environment: "" + id: 0 + reference_count: 6 + last_modified: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + code: code + last_editor: last_editor + active: true + runtime: "" + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + version: version + default_args: "" + vendor: vendor + name: name + execution_environment: "" + id: 0 + reference_count: 6 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Functions" + type: array + title: PaginatedFunctionsList + type: object + PaginatedFirewallFunctionInstanceList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + - args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/FirewallFunctionInstance" + type: array + title: PaginatedFirewallFunctionInstanceList + type: object + PaginatedFirewallList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + ddos_protection: "" + functions: "" + network_protection: "" + waf: "" + - product_version: product_version + debug: true + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + modules: + ddos_protection: "" + functions: "" + network_protection: "" + waf: "" + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Firewall" + type: array + title: PaginatedFirewallList + type: object + PaginatedFirewallRuleList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + - criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/FirewallRule" + type: array + title: PaginatedFirewallRuleList + type: object + PaginatedFunctionInstanceList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + - args: "" + function: 5559347081229897728 + last_editor: last_editor + name: name + active: true + id: 0 + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the + beginning for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/FunctionInstance" + type: array + title: PaginatedFunctionInstanceList + type: object + PaginatedNetworkListSummaryList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + - last_editor: last_editor + name: name + active: true + id: 0 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/NetworkListSummary" + type: array + title: PaginatedNetworkListSummaryList + type: object + PaginatedRequestPhaseRuleList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + - criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/RequestPhaseRule" + type: array + title: PaginatedRequestPhaseRuleList + type: object + PaginatedResponsePhaseRuleList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + - criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/ResponsePhaseRule" + type: array + title: PaginatedResponsePhaseRuleList + type: object + PaginatedWAFList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + last_editor: last_editor + name: name + engine_settings: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + last_editor: last_editor + name: name + engine_settings: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/WAF" + type: array + title: PaginatedWAFList + type: object + PaginatedWAFRuleList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - rule_id: "" + path: path + last_editor: last_editor + name: name + active: true + id: 0 + conditions: + - match: match + - match: match + last_modified: 2000-01-23T04:56:07.000+00:00 + operator: "" + - rule_id: "" + path: path + last_editor: last_editor + name: name + active: true + id: 0 + conditions: + - match: match + - match: match + last_modified: 2000-01-23T04:56:07.000+00:00 + operator: "" + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/WAFRule" + type: array + title: PaginatedWAFRuleList + type: object + PaginatedWorkloadDeploymentList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - current: true + last_editor: last_editor + name: name + active: true + id: 0 + strategy: + attributes: + application: 5559347081229897728 + firewall: 1 + custom_page: 1 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + - current: true + last_editor: last_editor + name: name + active: true + id: 0 + strategy: + attributes: + application: 5559347081229897728 + firewall: 1 + custom_page: 1 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/WorkloadDeployment" + type: array + title: PaginatedWorkloadDeploymentList + type: object + PaginatedWorkloadList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + last_editor: last_editor + active: true + domains: + - domains + - domains + workload_domain: workload_domain + infrastructure: "" + name: name + workload_domain_allow_access: true + tls: "" + id: 0 + protocols: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + mtls: "" + - product_version: product_version + last_editor: last_editor + active: true + domains: + - domains + - domains + workload_domain: workload_domain + infrastructure: "" + name: name + workload_domain_allow_access: true + tls: "" + id: 0 + protocols: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + mtls: "" + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Workload" + type: array + title: PaginatedWorkloadList + type: object + PatchedApplicationRequest: + additionalProperties: false + example: + debug: true + name: name + active: true + modules: + application_accelerator: "" + cache: "" + functions: "" + image_processor: "" + properties: + name: + maxLength: 100 + minLength: 1 + type: string + modules: + $ref: "#/components/schemas/ApplicationModulesRequest" + active: + type: boolean + debug: + type: boolean + title: PatchedApplicationRequest + type: object + PatchedCacheSettingRequest: + additionalProperties: false + example: + browser_cache: + max_age: 2525491 + behavior: "" + name: name + modules: + application_accelerator: + cache_vary_by_querystring: + behavior: "" + fields: + - fields + - fields + sort_enabled: true + cache_vary_by_devices: + device_group: + - 5 + - 5 + behavior: "" + cache_vary_by_method: + - null + - null + cache_vary_by_cookies: + cookie_names: + - cookie_names + - cookie_names + behavior: "" + cache: + max_age: 19008185 + large_file_cache: + offset: 1024 + enabled: true + tiered_cache: "{}" + behavior: "" + stale_cache: + enabled: true + properties: + name: + maxLength: 250 + minLength: 1 + type: string + browser_cache: + $ref: "#/components/schemas/BrowserCacheModuleRequest" + modules: + $ref: "#/components/schemas/CacheSettingsModulesRequest" + title: PatchedCacheSettingRequest + type: object + PatchedConnectorHTTPRequest: + additionalProperties: false + example: + name: name + active: true + attributes: + addresses: + - https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + - https_port: 39501 + address: address + active: true + http_port: 5249 + modules: "{}" + connection_options: "" + modules: "" + type: "" + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + type: + allOf: + - $ref: "#/components/schemas/OriginTypeEnum" + description: |- + Type of the connector + + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + attributes: + $ref: "#/components/schemas/ConnectorHTTPAttributesRequest" + required: + - type + title: PatchedConnectorHTTPRequest + type: object + PatchedConnectorRequest: + additionalProperties: false + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + type: + allOf: + - $ref: "#/components/schemas/OriginTypeEnum" + description: |- + Type of the connector + + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + attributes: + $ref: "#/components/schemas/ConnectorStorageAttributesRequest" + required: + - type + title: PatchedConnectorRequest + type: object + PatchedCustomPageRequest: + additionalProperties: false + example: + pages: + - code: code + page: + attributes: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + type: type + - code: code + page: + attributes: + connector: 171976545 + custom_status_code: 173 + ttl: 19008185 + uri: uri + type: type + name: name + active: true + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + pages: + items: + $ref: "#/components/schemas/PageRequest" + type: array + title: PatchedCustomPageRequest + type: object + PatchedDeviceGroupRequest: + additionalProperties: false + example: + name: name + user_agent: user_agent + properties: + name: + maxLength: 250 + minLength: 1 + type: string + user_agent: + description: Enter a valid regular expression pattern to identify user agents. + maxLength: 512 + minLength: 1 + type: string + title: PatchedDeviceGroupRequest + type: object + PatchedFunctionsRequest: + additionalProperties: false + example: + code: code + name: name + active: true + runtime: "" + execution_environment: "" + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + default_args: "" + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + runtime: + allOf: + - $ref: "#/components/schemas/RuntimeEnum" + execution_environment: + allOf: + - $ref: "#/components/schemas/ExecutionEnvironmentEnum" + code: + description: "String containing the function code. Maximum size: 20MB." + maxLength: 52428800 + minLength: 1 + type: string + default_args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + title: PatchedFunctionsRequest + type: object + PatchedFirewallFunctionInstanceRequest: + additionalProperties: false + description: Serializer for Firewall Function Instances + example: + args: "" + function: 738633633822310400 + name: name + active: true + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + properties: + name: + maxLength: 100 + minLength: 1 + type: string + args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + function: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + active: + type: boolean + title: PatchedFirewallFunctionInstanceRequest + type: object + PatchedFirewallRequest: + additionalProperties: false + example: + debug: true + name: name + active: true + modules: + functions: "" + network_protection: "" + waf: "" + properties: + name: + maxLength: 250 + minLength: 1 + type: string + modules: + $ref: "#/components/schemas/FirewallModulesRequest" + debug: + type: boolean + active: + type: boolean + title: PatchedFirewallRequest + type: object + PatchedFirewallRuleRequest: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + name: name + active: true + description: description + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/FirewallCriterionFieldRequest" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/FirewallBehaviorRequest" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + title: PatchedFirewallRuleRequest + type: object + PatchedFunctionInstanceRequest: + additionalProperties: false + description: Serializer for Application Function Instances + example: + args: "" + function: 738633633822310400 + name: name + active: true + azion_form: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + properties: + name: + maxLength: 100 + minLength: 1 + type: string + args: {} + azion_form: + $ref: "#/components/schemas/Functions_azion_form" + function: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + active: + type: boolean + title: PatchedFunctionInstanceRequest + type: object + PatchedNetworkListRequest: + additionalProperties: false + description: |- + A Network List item can be one of the following formats: + + + 1. IP Addresses (IPv4/IPv6): + + - Simple IPv4: 192.168.0.1 + + - IPv4 with CIDR: 192.168.0.1/24 + + - Simple IPv6: 2001:db8:3333:4444:5555:6666:7777:8888 + + - IPv6 with CIDR: 2001:db8::/32 + + - IP with expiration date: 192.168.0.1 --LT2025-05-29T12:25:23Z + + (The expiration date format is --LT followed by ISO8601 date in UTC timezone) + + + 2. Country Codes: + + - Two-character uppercase alphanumeric country code (ISO 3166-1 alpha-2) + + - Examples: BR, US, DE, JP + + + 3. Autonomous System Numbers (ASN): + + - Number composed of digits only + + - Examples: 1234, 5678, 13335 + example: + name: name + active: true + type: type + items: + - items + - items + - items + - items + - items + properties: + name: + maxLength: 250 + minLength: 1 + type: string + type: + description: |- + * `asn` - ASN + * `countries` - Countries + * `ip_cidr` - IP/CIDR + title: NetworkListTypeEnum + type: string + x-extensible-enum: + - asn + - countries + - ip_cidr + items: + items: + maxLength: 250 + minLength: 1 + type: string + maxItems: 20000 + minItems: 1 + type: array + active: + type: boolean + title: PatchedNetworkListRequest + type: object + PatchedResponsePhaseRuleRequest: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + name: name + active: true + description: description + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/ApplicationCriterionFieldRequest" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/ResponsePhaseBehaviorRequest" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + title: PatchedResponsePhaseRuleRequest + type: object + PatchedWAFRequest: + additionalProperties: false + example: + product_version: product_version + name: name + engine_settings: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + active: true + properties: + active: + type: boolean + name: + maxLength: 250 + minLength: 1 + type: string + product_version: + maxLength: 50 + minLength: 3 + nullable: true + type: string + engine_settings: + $ref: "#/components/schemas/WAFEngineSettingsFieldRequest" + title: PatchedWAFRequest + type: object + PatchedWAFRuleRequest: + additionalProperties: false + example: + rule_id: "" + path: path + name: name + active: true + conditions: + - match: match + - match: match + operator: "" + properties: + rule_id: + allOf: + - $ref: "#/components/schemas/RuleIdEnum" + description: |- + 0 - All Rules
+ 1 - Validation of protocol compliance: weird request, unable to parse
+ 2 - Request too big, stored on disk and not parsed
+ 10 - Validation of protocol compliance: invalid HEX encoding (null bytes)
+ 11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)
+ 12 - Validation of protocol compliance: invalid formatted URL
+ 13 - Validation of protocol compliance: invalid POST format
+ 14 - Validation of protocol compliance: invalid POST boundary
+ 15 - Validation of protocol compliance: invalid JSON
+ 16 - Validation of protocol compliance: POST with no body
+ 17 - Possible SQL Injection attack: validation with libinjection_sql
+ 18 - Possible XSS attack: validation with libinjection_xss
+ 1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies
+ 1001 - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies
+ 1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies
+ 1003 - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies
+ 1004 - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies
+ 1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies
+ 1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies
+ 1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies
+ 1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String
+ 1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String
+ 1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies
+ 1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies
+ 1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies
+ 1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies
+ 1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies
+ 1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies
+ 1100 - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies
+ 1101 - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies
+ 1102 - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies
+ 1103 - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies
+ 1104 - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies
+ 1105 - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies
+ 1106 - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies
+ 1107 - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies
+ 1108 - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies
+ 1109 - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies
+ 1110 - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies
+ 1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR
+ 1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies
+ 1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies
+ 1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies
+ 1203 - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies
+ 1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies
+ 1205 - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies
+ 1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies
+ 1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies
+ 1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies
+ 1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies
+ 1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies
+ 1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies
+ 1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies
+ 1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies
+ 1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies
+ 1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies
+ 1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies
+ 1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies
+ 1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies
+ 1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies
+ 1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies
+ 1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file
+ 2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + + * `0` - All Rules + * `1` - Validation of protocol compliance: weird request, unable to parse + * `2` - Request too big, stored on disk and not parsed + * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) + * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) + * `12` - Validation of protocol compliance: invalid formatted URL + * `13` - Validation of protocol compliance: invalid POST format + * `14` - Validation of protocol compliance: invalid POST boundary + * `15` - Validation of protocol compliance: invalid JSON + * `16` - Validation of protocol compliance: POST with no body + * `17` - Possible SQL Injection attack: validation with libinjection_sql + * `18` - Possible XSS attack: validation with libinjection_xss + * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies + * `1001` - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies + * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies + * `1003` - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies + * `1004` - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies + * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies + * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies + * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies + * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String + * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String + * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies + * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies + * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies + * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies + * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies + * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies + * `1100` - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies + * `1101` - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies + * `1102` - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies + * `1103` - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies + * `1104` - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies + * `1105` - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies + * `1106` - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies + * `1107` - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies + * `1108` - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies + * `1109` - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies + * `1110` - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies + * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR + * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies + * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies + * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies + * `1203` - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies + * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies + * `1205` - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies + * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies + * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies + * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies + * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies + * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies + * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies + * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies + * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies + * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies + * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies + * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies + * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies + * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies + * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies + * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies + * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file + * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + name: + maxLength: 255 + minLength: 1 + type: string + path: + maxLength: 255 + minLength: 0 + nullable: true + type: string + conditions: + items: + $ref: "#/components/schemas/WAFExceptionConditionRequest" + minItems: 1 + type: array + operator: + allOf: + - $ref: "#/components/schemas/WAFRuleOperatorEnum" + active: + type: boolean + title: PatchedWAFRuleRequest + type: object + PatchedWorkloadDeploymentRequest: + additionalProperties: false + example: + current: true + name: name + active: true + strategy: + attributes: + application: 738633633822310400 + firewall: 6 + custom_page: 1 + type: type + properties: + name: + maxLength: 254 + minLength: 1 + type: string + current: + type: boolean + active: + type: boolean + strategy: + $ref: "#/components/schemas/DeploymentStrategyDefaultDeploymentStrategyRequest" + title: PatchedWorkloadDeploymentRequest + type: object + PatchedWorkloadRequest: + additionalProperties: false + example: + infrastructure: "" + name: name + active: true + domains: + - domains + - domains + workload_domain_allow_access: true + tls: "" + protocols: "" + mtls: "" + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + infrastructure: + allOf: + - $ref: "#/components/schemas/InfrastructureEnum" + tls: + allOf: + - $ref: "#/components/schemas/TLSWorkloadRequest" + protocols: + allOf: + - $ref: "#/components/schemas/ProtocolsRequest" + mtls: + allOf: + - $ref: "#/components/schemas/MTLSRequest" + domains: + items: + minLength: 1 + type: string + type: array + workload_domain_allow_access: + type: boolean + title: PatchedWorkloadRequest + type: object + Protocols: + additionalProperties: false + properties: + http: + allOf: + - $ref: "#/components/schemas/HttpProtocol" + title: Protocols + type: object + ProtocolsRequest: + additionalProperties: false + properties: + http: + allOf: + - $ref: "#/components/schemas/HttpProtocolRequest" + title: ProtocolsRequest + type: object + Purge: + additionalProperties: false + description: Serialize the incoming purge request. + example: + items: + - https://openapi-generator.tech + - https://openapi-generator.tech + layer: "" + properties: + items: + items: + format: uri + minLength: 1 + type: string + minItems: 1 + type: array + layer: + allOf: + - $ref: "#/components/schemas/LayerEnum" + required: + - items + title: Purge + type: object + PurgeRequest: + additionalProperties: false + description: Serialize the incoming purge request. + example: + items: + - https://openapi-generator.tech + - https://openapi-generator.tech + layer: "" + properties: + items: + items: + format: uri + minLength: 1 + type: string + minItems: 1 + type: array + layer: + allOf: + - $ref: "#/components/schemas/LayerEnum" + required: + - items + title: PurgeRequest + type: object + PurgeResponse: + additionalProperties: false + example: + data: + items: + - https://openapi-generator.tech + - https://openapi-generator.tech + layer: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Purge" + required: + - data + title: PurgeResponse + type: object + RequestPhaseBehavior: + additionalProperties: true + discriminator: + mapping: + deny: "#/components/schemas/BehaviorNoArgs" + no_content: "#/components/schemas/BehaviorNoArgs" + deliver: "#/components/schemas/BehaviorNoArgs" + finish_request_phase: "#/components/schemas/BehaviorNoArgs" + forward_cookies: "#/components/schemas/BehaviorNoArgs" + optimize_images: "#/components/schemas/BehaviorNoArgs" + bypass_cache: "#/components/schemas/BehaviorNoArgs" + enable_gzip: "#/components/schemas/BehaviorNoArgs" + redirect_http_to_https: "#/components/schemas/BehaviorNoArgs" + redirect_to_301: "#/components/schemas/BehaviorArgs" + redirect_to_302: "#/components/schemas/BehaviorArgs" + rewrite_request: "#/components/schemas/BehaviorArgs" + add_request_header: "#/components/schemas/BehaviorArgs" + filter_request_header: "#/components/schemas/BehaviorArgs" + add_request_cookie: "#/components/schemas/BehaviorArgs" + filter_request_cookie: "#/components/schemas/BehaviorArgs" + set_origin: "#/components/schemas/BehaviorArgs" + run_function: "#/components/schemas/BehaviorArgs" + set_connector: "#/components/schemas/BehaviorArgs" + set_cache_policy: "#/components/schemas/BehaviorArgs" + capture_match_groups: "#/components/schemas/BehaviorCapture" + propertyName: type + oneOf: + - $ref: "#/components/schemas/BehaviorNoArgs" + - $ref: "#/components/schemas/BehaviorArgs" + - $ref: "#/components/schemas/BehaviorCapture" + title: RequestPhaseBehavior + RequestPhaseRule: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/ApplicationCriterionField" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/RequestPhaseBehavior" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + order: + format: int64 + maximum: 199 + minimum: 0 + type: integer + last_editor: + maxLength: 255 + nullable: true + type: string + last_modified: + format: date-time + nullable: true + type: string + required: + - behaviors + - criteria + - id + - last_editor + - last_modified + - name + - order + title: RequestPhaseRule + type: object + RequestPhaseRuleResponse: + additionalProperties: false + example: + data: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/RequestPhaseRule" + required: + - data + title: RequestPhaseRuleResponse + type: object + ResponsePhaseBehavior: + additionalProperties: true + discriminator: + mapping: + enable_gzip: "#/components/schemas/BehaviorNoArgs" + deliver: "#/components/schemas/BehaviorNoArgs" + redirect_to_301: "#/components/schemas/BehaviorArgs" + redirect_to_302: "#/components/schemas/BehaviorArgs" + filter_response_cookie: "#/components/schemas/BehaviorArgs" + set_cookie: "#/components/schemas/BehaviorArgs" + add_response_header: "#/components/schemas/BehaviorArgs" + filter_response_header: "#/components/schemas/BehaviorArgs" + run_function: "#/components/schemas/BehaviorArgs" + capture_match_groups: "#/components/schemas/BehaviorCapture" + propertyName: type + oneOf: + - $ref: "#/components/schemas/BehaviorNoArgs" + - $ref: "#/components/schemas/BehaviorArgs" + - $ref: "#/components/schemas/BehaviorCapture" + title: ResponsePhaseBehavior + ResponsePhaseBehaviorRequest: + additionalProperties: true + discriminator: + mapping: + enable_gzip: "#/components/schemas/BehaviorNoArgs" + deliver: "#/components/schemas/BehaviorNoArgs" + redirect_to_301: "#/components/schemas/BehaviorArgs" + redirect_to_302: "#/components/schemas/BehaviorArgs" + filter_response_cookie: "#/components/schemas/BehaviorArgs" + set_cookie: "#/components/schemas/BehaviorArgs" + add_response_header: "#/components/schemas/BehaviorArgs" + filter_response_header: "#/components/schemas/BehaviorArgs" + run_function: "#/components/schemas/BehaviorArgs" + capture_match_groups: "#/components/schemas/BehaviorCapture" + propertyName: type + oneOf: + - $ref: "#/components/schemas/BehaviorNoArgs" + - $ref: "#/components/schemas/BehaviorArgs" + - $ref: "#/components/schemas/BehaviorCapture" + title: ResponsePhaseBehaviorRequest + ResponsePhaseRule: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/ApplicationCriterionField" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/ResponsePhaseBehavior" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + order: + format: int64 + maximum: 199 + minimum: 0 + type: integer + last_editor: + maxLength: 255 + nullable: true + type: string + last_modified: + format: date-time + nullable: true + type: string + required: + - behaviors + - criteria + - id + - last_editor + - last_modified + - name + - order + title: ResponsePhaseRule + type: object + ResponsePhaseRuleRequest: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + name: name + active: true + description: description + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/ApplicationCriterionFieldRequest" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/ResponsePhaseBehaviorRequest" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + required: + - behaviors + - criteria + - name + title: ResponsePhaseRuleRequest + type: object + ResponsePhaseRuleResponse: + additionalProperties: false + example: + data: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + last_editor: last_editor + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + order: 119 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ResponsePhaseRule" + required: + - data + title: ResponsePhaseRuleResponse + type: object + RuleIdEnum: + description: |- + * `0` - All Rules + * `1` - Validation of protocol compliance: weird request, unable to parse + * `2` - Request too big, stored on disk and not parsed + * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) + * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) + * `12` - Validation of protocol compliance: invalid formatted URL + * `13` - Validation of protocol compliance: invalid POST format + * `14` - Validation of protocol compliance: invalid POST boundary + * `15` - Validation of protocol compliance: invalid JSON + * `16` - Validation of protocol compliance: POST with no body + * `17` - Possible SQL Injection attack: validation with libinjection_sql + * `18` - Possible XSS attack: validation with libinjection_xss + * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies + * `1001` - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies + * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies + * `1003` - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies + * `1004` - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies + * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies + * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies + * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies + * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String + * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String + * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies + * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies + * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies + * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies + * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies + * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies + * `1100` - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies + * `1101` - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies + * `1102` - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies + * `1103` - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies + * `1104` - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies + * `1105` - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies + * `1106` - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies + * `1107` - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies + * `1108` - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies + * `1109` - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies + * `1110` - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies + * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR + * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies + * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies + * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies + * `1203` - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies + * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies + * `1205` - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies + * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies + * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies + * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies + * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies + * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies + * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies + * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies + * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies + * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies + * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies + * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies + * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies + * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies + * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies + * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies + * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file + * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + format: int64 + title: RuleIdEnum + type: integer + x-extensible-enum: + - 0 + - 1 + - 2 + - 10 + - 11 + - 12 + - 13 + - 14 + - 15 + - 16 + - 17 + - 18 + - 1000 + - 1001 + - 1002 + - 1003 + - 1004 + - 1005 + - 1006 + - 1007 + - 1008 + - 1009 + - 1010 + - 1011 + - 1013 + - 1015 + - 1016 + - 1017 + - 1100 + - 1101 + - 1102 + - 1103 + - 1104 + - 1105 + - 1106 + - 1107 + - 1108 + - 1109 + - 1110 + - 1198 + - 1199 + - 1200 + - 1202 + - 1203 + - 1204 + - 1205 + - 1206 + - 1207 + - 1208 + - 1209 + - 1210 + - 1302 + - 1303 + - 1310 + - 1311 + - 1312 + - 1314 + - 1315 + - 1400 + - 1401 + - 1402 + - 1500 + - 2001 + RulesetsEnum: + description: '* `1` - Azion WAF Score Ruleset' + format: int64 + title: RulesetsEnum + type: integer + x-extensible-enum: + - 1 + RuntimeEnum: + description: '* `azion_js` - Azion JavaScript' + title: RuntimeEnum + type: string + x-extensible-enum: + - azion_js + SensitivityEnum: + description: |- + * `highest` - Highest + * `high` - High + * `medium` - Medium + * `low` - Low + * `lowest` - Lowest + title: SensitivityEnum + type: string + x-extensible-enum: + - highest + - high + - medium + - low + - lowest + ServerRoleEnum: + description: |- + * `primary` - Primary + * `backup` - Backup + title: ServerRoleEnum + type: string + x-extensible-enum: + - primary + - backup + StateCacheModule: + additionalProperties: false + example: + enabled: true + properties: + enabled: + type: boolean + title: StateCacheModule + type: object + StateCacheModuleRequest: + additionalProperties: false + example: + enabled: true + properties: + enabled: + type: boolean + title: StateCacheModuleRequest + type: object + TLSWorkload: + additionalProperties: false + properties: + certificate: + format: int64 + minimum: 1 + nullable: true + type: integer + ciphers: + allOf: + - $ref: "#/components/schemas/CiphersEnum" + description: |- + Allow to configure which set of ciphers will be used when TLS ciphers negotiation. + + * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 + * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 + * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 + * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 + * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA + * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 + * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 + * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 + minimum_version: + $ref: "#/components/schemas/TLSWorkload_minimum_version" + title: TLSWorkload + type: object + TLSWorkloadRequest: + additionalProperties: false + properties: + certificate: + format: int64 + minimum: 1 + nullable: true + type: integer + ciphers: + allOf: + - $ref: "#/components/schemas/CiphersEnum" + description: |- + Allow to configure which set of ciphers will be used when TLS ciphers negotiation. + + * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 + * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 + * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 + * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 + * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA + * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 + * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 + * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 + minimum_version: + $ref: "#/components/schemas/TLSWorkload_minimum_version" + title: TLSWorkloadRequest + type: object + ThreatEnum: + description: |- + * `cross_site_scripting` - cross_site_scripting + * `directory_traversal` - directory_traversal + * `evading_tricks` - evading_tricks + * `file_upload` - file_upload + * `identified_attack` - identified_attack + * `remote_file_inclusion` - remote_file_inclusion + * `sql_injection` - sql_injection + * `unwanted_access` - unwanted_access + title: ThreatEnum + type: string + x-extensible-enum: + - cross_site_scripting + - directory_traversal + - evading_tricks + - file_upload + - identified_attack + - remote_file_inclusion + - sql_injection + - unwanted_access + ThresholdsConfigField: + additionalProperties: false + example: + threat: threat + sensitivity: "" + properties: + threat: + description: |- + * `cross_site_scripting` - cross_site_scripting + * `directory_traversal` - directory_traversal + * `evading_tricks` - evading_tricks + * `file_upload` - file_upload + * `identified_attack` - identified_attack + * `remote_file_inclusion` - remote_file_inclusion + * `sql_injection` - sql_injection + * `unwanted_access` - unwanted_access + title: ThreatEnum + type: string + x-extensible-enum: + - cross_site_scripting + - directory_traversal + - evading_tricks + - file_upload + - identified_attack + - remote_file_inclusion + - sql_injection + - unwanted_access + sensitivity: + allOf: + - $ref: "#/components/schemas/SensitivityEnum" + required: + - threat + title: ThresholdsConfigField + type: object + ThresholdsConfigFieldRequest: + additionalProperties: false + example: + threat: threat + sensitivity: "" + properties: + threat: + description: |- + * `cross_site_scripting` - cross_site_scripting + * `directory_traversal` - directory_traversal + * `evading_tricks` - evading_tricks + * `file_upload` - file_upload + * `identified_attack` - identified_attack + * `remote_file_inclusion` - remote_file_inclusion + * `sql_injection` - sql_injection + * `unwanted_access` - unwanted_access + title: ThreatEnum + type: string + x-extensible-enum: + - cross_site_scripting + - directory_traversal + - evading_tricks + - file_upload + - identified_attack + - remote_file_inclusion + - sql_injection + - unwanted_access + sensitivity: + allOf: + - $ref: "#/components/schemas/SensitivityEnum" + required: + - threat + title: ThresholdsConfigFieldRequest + type: object + TopologyEnum: + description: |- + * `nearest-region` - nearest-region + * `br-east-1` - br-east-1 + * `us-east-1` - us-east-1 + title: TopologyEnum + type: string + x-extensible-enum: + - nearest-region + - br-east-1 + - us-east-1 + TransportPolicyEnum: + description: |- + * `preserve` - Preserve + * `force_https` - Force HTTPS + * `force_http` - Force HTTP + title: TransportPolicyEnum + type: string + x-extensible-enum: + - preserve + - force_https + - force_http + VerificationEnum: + description: |- + * `enforce` - Enforce + * `permissive` - Permissive + title: VerificationEnum + type: string + x-extensible-enum: + - enforce + - permissive + WAF: + additionalProperties: false + example: + product_version: product_version + last_editor: last_editor + name: name + engine_settings: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + active: + type: boolean + name: + maxLength: 250 + minLength: 1 + type: string + last_editor: + maxLength: 250 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 3 + nullable: true + type: string + engine_settings: + $ref: "#/components/schemas/WAFEngineSettingsField" + required: + - id + - last_editor + - last_modified + - name + title: WAF + type: object + WAFEngineSettingsAttributesField: + additionalProperties: false + example: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + properties: + rulesets: + items: + $ref: "#/components/schemas/RulesetsEnum" + type: array + thresholds: + items: + $ref: "#/components/schemas/ThresholdsConfigField" + maxItems: 8 + type: array + title: WAFEngineSettingsAttributesField + type: object + WAFEngineSettingsAttributesFieldRequest: + additionalProperties: false + example: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + properties: + rulesets: + items: + $ref: "#/components/schemas/RulesetsEnum" + type: array + thresholds: + items: + $ref: "#/components/schemas/ThresholdsConfigFieldRequest" + maxItems: 8 + type: array + title: WAFEngineSettingsAttributesFieldRequest + type: object + WAFEngineSettingsField: + additionalProperties: false + example: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + properties: + engine_version: + allOf: + - $ref: "#/components/schemas/EngineVersionEnum" + type: + allOf: + - $ref: "#/components/schemas/WAFEngineSettingsFieldTypeEnum" + attributes: + $ref: "#/components/schemas/WAFEngineSettingsAttributesField" + title: WAFEngineSettingsField + type: object + WAFEngineSettingsFieldRequest: + additionalProperties: false + example: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + properties: + engine_version: + allOf: + - $ref: "#/components/schemas/EngineVersionEnum" + type: + allOf: + - $ref: "#/components/schemas/WAFEngineSettingsFieldTypeEnum" + attributes: + $ref: "#/components/schemas/WAFEngineSettingsAttributesFieldRequest" + title: WAFEngineSettingsFieldRequest + type: object + WAFEngineSettingsFieldTypeEnum: + description: '* `score` - score' + title: WAFEngineSettingsFieldTypeEnum + type: string + x-extensible-enum: + - score + WAFExceptionGenericCondition: + additionalProperties: false + example: + match: match + properties: + match: + description: |- + * `any_http_header_name` - any_http_header_name + * `any_http_header_value` - any_http_header_value + * `any_query_string_name` - any_query_string_name + * `any_query_string_value` - any_query_string_value + * `any_url` - any_url + * `body_form_field_name` - body_form_field_name + * `body_form_field_value` - body_form_field_value + * `file_extension` - file_extension + * `raw_body` - raw_body + title: WAFExceptionGenericConditionMatchEnum + type: string + x-extensible-enum: + - any_http_header_name + - any_http_header_value + - any_query_string_name + - any_query_string_value + - any_url + - body_form_field_name + - body_form_field_value + - file_extension + - raw_body + required: + - match + title: WAFExceptionGenericCondition + type: object + WAFExceptionGenericConditionMatchEnum: + description: |- + * `any_http_header_name` - any_http_header_name + * `any_http_header_value` - any_http_header_value + * `any_query_string_name` - any_query_string_name + * `any_query_string_value` - any_query_string_value + * `any_url` - any_url + * `body_form_field_name` - body_form_field_name + * `body_form_field_value` - body_form_field_value + * `file_extension` - file_extension + * `raw_body` - raw_body + title: WAFExceptionGenericConditionMatchEnum + type: string + x-extensible-enum: + - any_http_header_name + - any_http_header_value + - any_query_string_name + - any_query_string_value + - any_url + - body_form_field_name + - body_form_field_value + - file_extension + - raw_body + WAFExceptionGenericConditionRequest: + additionalProperties: false + example: + match: match + properties: + match: + description: |- + * `any_http_header_name` - any_http_header_name + * `any_http_header_value` - any_http_header_value + * `any_query_string_name` - any_query_string_name + * `any_query_string_value` - any_query_string_value + * `any_url` - any_url + * `body_form_field_name` - body_form_field_name + * `body_form_field_value` - body_form_field_value + * `file_extension` - file_extension + * `raw_body` - raw_body + title: WAFExceptionGenericConditionMatchEnum + type: string + x-extensible-enum: + - any_http_header_name + - any_http_header_value + - any_query_string_name + - any_query_string_value + - any_url + - body_form_field_name + - body_form_field_value + - file_extension + - raw_body + required: + - match + title: WAFExceptionGenericConditionRequest + type: object + WAFExceptionSpecificConditionOnName: + additionalProperties: false + properties: + match: + description: |- + * `specific_body_form_field_name` - specific_body_form_field_name + * `specific_http_header_name` - specific_http_header_name + * `specific_query_string_name` - specific_query_string_name + title: WAFExceptionSpecificConditionOnNameMatchEnum + type: string + x-extensible-enum: + - specific_body_form_field_name + - specific_http_header_name + - specific_query_string_name + name: + maxLength: 255 + minLength: 1 + type: string + required: + - match + - name + title: WAFExceptionSpecificConditionOnName + type: object + WAFExceptionSpecificConditionOnNameMatchEnum: + description: |- + * `specific_body_form_field_name` - specific_body_form_field_name + * `specific_http_header_name` - specific_http_header_name + * `specific_query_string_name` - specific_query_string_name + title: WAFExceptionSpecificConditionOnNameMatchEnum + type: string + x-extensible-enum: + - specific_body_form_field_name + - specific_http_header_name + - specific_query_string_name + WAFExceptionSpecificConditionOnNameRequest: + additionalProperties: false + properties: + match: + description: |- + * `specific_body_form_field_name` - specific_body_form_field_name + * `specific_http_header_name` - specific_http_header_name + * `specific_query_string_name` - specific_query_string_name + title: WAFExceptionSpecificConditionOnNameMatchEnum + type: string + x-extensible-enum: + - specific_body_form_field_name + - specific_http_header_name + - specific_query_string_name + name: + maxLength: 255 + minLength: 1 + type: string + required: + - match + - name + title: WAFExceptionSpecificConditionOnNameRequest + type: object + WAFExceptionSpecificConditionOnValue: + additionalProperties: false + properties: + match: + description: |- + * `specific_body_form_field_value` - specific_body_form_field_value + * `specific_http_header_value` - specific_http_header_value + * `specific_query_string_value` - specific_query_string_value + title: WAFExceptionSpecificConditionOnValueMatchEnum + type: string + x-extensible-enum: + - specific_body_form_field_value + - specific_http_header_value + - specific_query_string_value + value: + maxLength: 255 + minLength: 1 + type: string + required: + - match + - value + title: WAFExceptionSpecificConditionOnValue + type: object + WAFExceptionSpecificConditionOnValueMatchEnum: + description: |- + * `specific_body_form_field_value` - specific_body_form_field_value + * `specific_http_header_value` - specific_http_header_value + * `specific_query_string_value` - specific_query_string_value + title: WAFExceptionSpecificConditionOnValueMatchEnum + type: string + x-extensible-enum: + - specific_body_form_field_value + - specific_http_header_value + - specific_query_string_value + WAFExceptionSpecificConditionOnValueRequest: + additionalProperties: false + properties: + match: + description: |- + * `specific_body_form_field_value` - specific_body_form_field_value + * `specific_http_header_value` - specific_http_header_value + * `specific_query_string_value` - specific_query_string_value + title: WAFExceptionSpecificConditionOnValueMatchEnum + type: string + x-extensible-enum: + - specific_body_form_field_value + - specific_http_header_value + - specific_query_string_value + value: + maxLength: 255 + minLength: 1 + type: string + required: + - match + - value + title: WAFExceptionSpecificConditionOnValueRequest + type: object + WAFRequest: + additionalProperties: false + example: + product_version: product_version + name: name + engine_settings: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + active: true + properties: + active: + type: boolean + name: + maxLength: 250 + minLength: 1 + type: string + product_version: + maxLength: 50 + minLength: 3 + nullable: true + type: string + engine_settings: + $ref: "#/components/schemas/WAFEngineSettingsFieldRequest" + required: + - name + title: WAFRequest + type: object + WAFResponse: + additionalProperties: false + example: + data: + product_version: product_version + last_editor: last_editor + name: name + engine_settings: + attributes: + rulesets: + - null + - null + thresholds: + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + - threat: threat + sensitivity: "" + engine_version: "" + type: "" + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/WAF" + required: + - data + title: WAFResponse + type: object + WAFRule: + additionalProperties: false + example: + rule_id: "" + path: path + last_editor: last_editor + name: name + active: true + id: 0 + conditions: + - match: match + - match: match + last_modified: 2000-01-23T04:56:07.000+00:00 + operator: "" + properties: + id: + format: int64 + type: integer + rule_id: + allOf: + - $ref: "#/components/schemas/RuleIdEnum" + description: |- + 0 - All Rules
+ 1 - Validation of protocol compliance: weird request, unable to parse
+ 2 - Request too big, stored on disk and not parsed
+ 10 - Validation of protocol compliance: invalid HEX encoding (null bytes)
+ 11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)
+ 12 - Validation of protocol compliance: invalid formatted URL
+ 13 - Validation of protocol compliance: invalid POST format
+ 14 - Validation of protocol compliance: invalid POST boundary
+ 15 - Validation of protocol compliance: invalid JSON
+ 16 - Validation of protocol compliance: POST with no body
+ 17 - Possible SQL Injection attack: validation with libinjection_sql
+ 18 - Possible XSS attack: validation with libinjection_xss
+ 1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies
+ 1001 - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies
+ 1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies
+ 1003 - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies
+ 1004 - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies
+ 1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies
+ 1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies
+ 1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies
+ 1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String
+ 1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String
+ 1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies
+ 1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies
+ 1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies
+ 1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies
+ 1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies
+ 1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies
+ 1100 - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies
+ 1101 - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies
+ 1102 - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies
+ 1103 - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies
+ 1104 - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies
+ 1105 - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies
+ 1106 - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies
+ 1107 - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies
+ 1108 - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies
+ 1109 - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies
+ 1110 - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies
+ 1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR
+ 1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies
+ 1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies
+ 1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies
+ 1203 - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies
+ 1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies
+ 1205 - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies
+ 1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies
+ 1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies
+ 1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies
+ 1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies
+ 1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies
+ 1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies
+ 1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies
+ 1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies
+ 1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies
+ 1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies
+ 1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies
+ 1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies
+ 1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies
+ 1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies
+ 1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies
+ 1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file
+ 2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + + * `0` - All Rules + * `1` - Validation of protocol compliance: weird request, unable to parse + * `2` - Request too big, stored on disk and not parsed + * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) + * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) + * `12` - Validation of protocol compliance: invalid formatted URL + * `13` - Validation of protocol compliance: invalid POST format + * `14` - Validation of protocol compliance: invalid POST boundary + * `15` - Validation of protocol compliance: invalid JSON + * `16` - Validation of protocol compliance: POST with no body + * `17` - Possible SQL Injection attack: validation with libinjection_sql + * `18` - Possible XSS attack: validation with libinjection_xss + * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies + * `1001` - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies + * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies + * `1003` - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies + * `1004` - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies + * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies + * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies + * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies + * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String + * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String + * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies + * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies + * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies + * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies + * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies + * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies + * `1100` - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies + * `1101` - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies + * `1102` - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies + * `1103` - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies + * `1104` - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies + * `1105` - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies + * `1106` - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies + * `1107` - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies + * `1108` - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies + * `1109` - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies + * `1110` - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies + * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR + * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies + * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies + * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies + * `1203` - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies + * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies + * `1205` - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies + * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies + * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies + * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies + * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies + * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies + * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies + * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies + * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies + * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies + * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies + * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies + * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies + * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies + * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies + * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies + * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file + * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + name: + maxLength: 255 + minLength: 0 + type: string + path: + maxLength: 255 + minLength: 0 + nullable: true + type: string + conditions: + items: + $ref: "#/components/schemas/WAFExceptionCondition" + minItems: 1 + type: array + operator: + allOf: + - $ref: "#/components/schemas/WAFRuleOperatorEnum" + active: + type: boolean + last_editor: + type: string + last_modified: + format: date-time + type: string + required: + - conditions + - id + - last_editor + - last_modified + - name + title: WAFRule + type: object + WAFRuleOperatorEnum: + description: |- + * `regex` - regex + * `contains` - contains + title: WAFRuleOperatorEnum + type: string + x-extensible-enum: + - regex + - contains + WAFRuleRequest: + additionalProperties: false + example: + rule_id: "" + path: path + name: name + active: true + conditions: + - match: match + - match: match + operator: "" + properties: + rule_id: + allOf: + - $ref: "#/components/schemas/RuleIdEnum" + description: |- + 0 - All Rules
+ 1 - Validation of protocol compliance: weird request, unable to parse
+ 2 - Request too big, stored on disk and not parsed
+ 10 - Validation of protocol compliance: invalid HEX encoding (null bytes)
+ 11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)
+ 12 - Validation of protocol compliance: invalid formatted URL
+ 13 - Validation of protocol compliance: invalid POST format
+ 14 - Validation of protocol compliance: invalid POST boundary
+ 15 - Validation of protocol compliance: invalid JSON
+ 16 - Validation of protocol compliance: POST with no body
+ 17 - Possible SQL Injection attack: validation with libinjection_sql
+ 18 - Possible XSS attack: validation with libinjection_xss
+ 1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies
+ 1001 - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies
+ 1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies
+ 1003 - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies
+ 1004 - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies
+ 1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies
+ 1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies
+ 1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies
+ 1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String
+ 1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String
+ 1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies
+ 1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies
+ 1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies
+ 1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies
+ 1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies
+ 1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies
+ 1100 - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies
+ 1101 - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies
+ 1102 - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies
+ 1103 - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies
+ 1104 - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies
+ 1105 - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies
+ 1106 - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies
+ 1107 - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies
+ 1108 - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies
+ 1109 - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies
+ 1110 - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies
+ 1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR
+ 1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies
+ 1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies
+ 1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies
+ 1203 - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies
+ 1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies
+ 1205 - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies
+ 1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies
+ 1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies
+ 1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies
+ 1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies
+ 1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies
+ 1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies
+ 1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies
+ 1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies
+ 1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies
+ 1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies
+ 1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies
+ 1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies
+ 1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies
+ 1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies
+ 1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies
+ 1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file
+ 2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + + * `0` - All Rules + * `1` - Validation of protocol compliance: weird request, unable to parse + * `2` - Request too big, stored on disk and not parsed + * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) + * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) + * `12` - Validation of protocol compliance: invalid formatted URL + * `13` - Validation of protocol compliance: invalid POST format + * `14` - Validation of protocol compliance: invalid POST boundary + * `15` - Validation of protocol compliance: invalid JSON + * `16` - Validation of protocol compliance: POST with no body + * `17` - Possible SQL Injection attack: validation with libinjection_sql + * `18` - Possible XSS attack: validation with libinjection_xss + * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies + * `1001` - Possible SQL Injection or XSS attack: double quote (") found in Body, Path, Query String or Cookies + * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies + * `1003` - Possible SQL Injection attack: MySQL comment (/*) found in Body, Path, Query String or Cookies + * `1004` - Possible SQL Injection attack: MySQL comment (*/) found in Body, Path, Query String or Cookies + * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies + * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies + * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies + * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String + * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String + * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies + * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies + * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies + * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies + * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies + * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies + * `1100` - Possible RFI attack: scheme "http://" found in Body, Query String or Cookies + * `1101` - Possible RFI attack: scheme "https://" found in Body, Query String or Cookies + * `1102` - Possible RFI attack: scheme "ftp://" found in Body, Query String or Cookies + * `1103` - Possible RFI attack: scheme "php://" found in Body, Query String or Cookies + * `1104` - Possible RFI attack: scheme "sftp://" found in Body, Query String or Cookies + * `1105` - Possible RFI attack: scheme "zlib://" found in Body, Query String or Cookies + * `1106` - Possible RFI attack: scheme "data://" found in Body, Query String or Cookies + * `1107` - Possible RFI attack: scheme "glob://" found in Body, Query String or Cookies + * `1108` - Possible RFI attack: scheme "phar://" found in Body, Query String or Cookies + * `1109` - Possible RFI attack: scheme "file://" found in Body, Query String or Cookies + * `1110` - Possible RFI attack: scheme "gopher://" found in Body, Query String or Cookies + * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR + * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies + * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies + * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies + * `1203` - Possible Directory Traversal attack: obvious windows path (c:\) found in Body, Path, Query String or Cookies + * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies + * `1205` - Possible Directory Traversal attack: backslash (\) found in Body, Path, Query String or Cookies + * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies + * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies + * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies + * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies + * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies + * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies + * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies + * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies + * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies + * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies + * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies + * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies + * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies + * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies + * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies + * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file + * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + name: + maxLength: 255 + minLength: 1 + type: string + path: + maxLength: 255 + minLength: 0 + nullable: true + type: string + conditions: + items: + $ref: "#/components/schemas/WAFExceptionConditionRequest" + minItems: 1 + type: array + operator: + allOf: + - $ref: "#/components/schemas/WAFRuleOperatorEnum" + active: + type: boolean + required: + - conditions + - name + title: WAFRuleRequest + type: object + WAFRuleResponse: + additionalProperties: false + example: + data: + rule_id: "" + path: path + last_editor: last_editor + name: name + active: true + id: 0 + conditions: + - match: match + - match: match + last_modified: 2000-01-23T04:56:07.000+00:00 + operator: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/WAFRule" + required: + - data + title: WAFRuleResponse + type: object + Workload: + additionalProperties: false + example: + product_version: product_version + last_editor: last_editor + active: true + domains: + - domains + - domains + workload_domain: workload_domain + infrastructure: "" + name: name + workload_domain_allow_access: true + tls: "" + id: 0 + protocols: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + mtls: "" + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + last_editor: + maxLength: 250 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + infrastructure: + allOf: + - $ref: "#/components/schemas/InfrastructureEnum" + tls: + allOf: + - $ref: "#/components/schemas/TLSWorkload" + protocols: + allOf: + - $ref: "#/components/schemas/Protocols" + mtls: + allOf: + - $ref: "#/components/schemas/MTLS" + domains: + items: + type: string + type: array + workload_domain_allow_access: + type: boolean + workload_domain: + type: string + product_version: + type: string + required: + - id + - last_editor + - last_modified + - name + - product_version + - workload_domain + title: Workload + type: object + WorkloadDeployment: + additionalProperties: false + example: + current: true + last_editor: last_editor + name: name + active: true + id: 0 + strategy: + attributes: + application: 5559347081229897728 + firewall: 1 + custom_page: 1 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 254 + minLength: 1 + type: string + current: + type: boolean + active: + type: boolean + strategy: + $ref: "#/components/schemas/DeploymentStrategyDefaultDeploymentStrategy" + last_editor: + maxLength: 250 + minLength: 1 + type: string + last_modified: + format: date-time + type: string + required: + - id + - last_editor + - last_modified + - name + - strategy + title: WorkloadDeployment + type: object + WorkloadDeploymentRequest: + additionalProperties: false + example: + current: true + name: name + active: true + strategy: + attributes: + application: 738633633822310400 + firewall: 6 + custom_page: 1 + type: type + properties: + name: + maxLength: 254 + minLength: 1 + type: string + current: + type: boolean + active: + type: boolean + strategy: + $ref: "#/components/schemas/DeploymentStrategyDefaultDeploymentStrategyRequest" + required: + - name + - strategy + title: WorkloadDeploymentRequest + type: object + WorkloadDeploymentResponse: + additionalProperties: false + example: + data: + current: true + last_editor: last_editor + name: name + active: true + id: 0 + strategy: + attributes: + application: 5559347081229897728 + firewall: 1 + custom_page: 1 + type: type + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/WorkloadDeployment" + required: + - data + title: WorkloadDeploymentResponse + type: object + WorkloadRequest: + additionalProperties: false + example: + infrastructure: "" + name: name + active: true + domains: + - domains + - domains + workload_domain_allow_access: true + tls: "" + protocols: "" + mtls: "" + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + infrastructure: + allOf: + - $ref: "#/components/schemas/InfrastructureEnum" + tls: + allOf: + - $ref: "#/components/schemas/TLSWorkloadRequest" + protocols: + allOf: + - $ref: "#/components/schemas/ProtocolsRequest" + mtls: + allOf: + - $ref: "#/components/schemas/MTLSRequest" + domains: + items: + minLength: 1 + type: string + type: array + workload_domain_allow_access: + type: boolean + required: + - name + title: WorkloadRequest + type: object + WorkloadResponse: + additionalProperties: false + example: + data: + product_version: product_version + last_editor: last_editor + active: true + domains: + - domains + - domains + workload_domain: workload_domain + infrastructure: "" + name: name + workload_domain_allow_access: true + tls: "" + id: 0 + protocols: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + mtls: "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Workload" + required: + - data + title: WorkloadResponse + type: object + BehaviorArgsAttributes: + additionalProperties: false + description: Behavior attributes containing the value parameter + properties: + value: + $ref: "#/components/schemas/BehaviorArgsAttributes_value" + required: + - value + type: object + BehaviorArgs: + additionalProperties: false + description: Behaviors with arguments (string or integer) + properties: + type: + description: Behavior type + type: string + x-enum-descriptions: + add_request_cookie: Expects string value + add_request_header: Expects string value + add_response_header: Expects string value + filter_request_cookie: Expects string value + filter_request_header: Expects string value + filter_response_cookie: Expects string value + filter_response_header: Expects string value + redirect_to_301: Expects string value + redirect_to_302: Expects string value + rewrite_request: Expects string value + run_function: Expects integer value + set_cache_policy: Expects integer value + set_connector: Expects integer value + set_cookie: Expects string value + set_origin: Expects integer value + x-extensible-enum: + - add_request_cookie + - add_request_header + - add_response_header + - filter_request_cookie + - filter_request_header + - filter_response_cookie + - filter_response_header + - redirect_to_301 + - redirect_to_302 + - rewrite_request + - run_function + - set_cache_policy + - set_connector + - set_cookie + - set_origin + attributes: + $ref: "#/components/schemas/BehaviorArgsAttributes" + required: + - attributes + - type + title: BehaviorArgs + type: object + BehaviorCapture: + additionalProperties: true + description: Behaviors for capturing match groups + properties: + type: + type: string + x-extensible-enum: + - capture_match_groups + attributes: + $ref: "#/components/schemas/BehaviorCaptureMatchGroupsAttributes" + required: + - attributes + - type + title: BehaviorCapture + type: object + FirewallBehaviorModeEnum: + description: |- + * `ignore` - ignore + * `all` - all + * `allowlist` - allowlist + * `denylist` - denylist + title: FirewallBehaviorModeEnum + type: string + x-extensible-enum: + - ignore + - all + - allowlist + - denylist + CriterionOperatorEnum: + description: |- + * `does_not_exist` - does_not_exist + * `does_not_match` - does_not_match + * `does_not_start_with` - does_not_start_with + * `exists` - exists + * `is_equal` - is_equal + * `is_in_list` - is_in_list + * `is_not_equal` - is_not_equal + * `is_not_in_list` - is_not_in_list + * `matches` - matches + * `starts_with` - starts_with + title: CriterionOperatorEnum + type: string + x-extensible-enum: + - does_not_exist + - does_not_match + - does_not_start_with + - exists + - is_equal + - is_in_list + - is_not_equal + - is_not_in_list + - matches + - starts_with + OriginTypeEnum: + description: |- + * `http` - HTTP + * `storage` - Storage + * `live_ingest` - Live Ingest + title: OriginTypeEnum + type: string + x-extensible-enum: + - http + - storage + - live_ingest + NetworkListTypeEnum: + description: |- + * `asn` - ASN + * `countries` - Countries + * `ip_cidr` - IP/CIDR + title: NetworkListTypeEnum + type: string + x-extensible-enum: + - asn + - countries + - ip_cidr + BehaviorTypeEnum: + description: '* `run_function` - run_function' + title: BehaviorTypeEnum + type: string + x-extensible-enum: + - run_function + ApplicationRequestPhaseRuleEngineOrder: + additionalProperties: false + example: + order: + - 738633633822310400 + - 738633633822310400 + properties: + order: + items: + format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + type: array + required: + - order + title: ApplicationRequestPhaseRuleEngineOrder + type: object + Connector2: + additionalProperties: true + discriminator: + mapping: + http: "#/components/schemas/ConnectorHTTP" + storage: "#/components/schemas/Connector" + live_ingest: "#/components/schemas/Connector" + propertyName: type + oneOf: + - $ref: "#/components/schemas/ConnectorHTTP" + - $ref: "#/components/schemas/Connector" + - $ref: "#/components/schemas/Connector" + title: Connector2 + ConnectorRequest2: + additionalProperties: true + discriminator: + mapping: + http: "#/components/schemas/ConnectorHTTPRequest" + storage: "#/components/schemas/ConnectorRequest" + live_ingest: "#/components/schemas/ConnectorRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/ConnectorHTTPRequest" + - $ref: "#/components/schemas/ConnectorRequest" + - $ref: "#/components/schemas/ConnectorRequest" + title: ConnectorRequest2 + ConnectorResponse: + additionalProperties: false + example: + data: + product_version: product_version + last_editor: last_editor + name: name + active: true + attributes: + addresses: + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + connection_options: "" + modules: "" + id: 0 + type: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Connector2" + required: + - data + title: ConnectorResponse + type: object + ApplicationCriterionField: + additionalProperties: false + description: |- + The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. + + | Variable | Description | Phase | Operators | Argument | + | -------- | ----------- | ----- | --------- | ---------| + | ${arg_<name>} | Use this variable to match a query param. Replace <name> with the specific query param you want to match, replacing any '-' with '_'. Examples: ${arg_search}, ${arg_next}. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${args} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${cookie_<name>} | Use this variable to match cookies sent by the browser Cookie headers.Replace <name> with the specific cookie name you want to match, replacing any '-' with '_'. Examples: cookie_session_id, cookie_user_pref. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${device_group} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_region_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_region} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${host} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${domain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${http_<header_name>} | Use this variable to match HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${remote_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${remote_user} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request_method} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request_uri} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${scheme} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${sent_http_<header_name>} | Use this variable to match HTTP headers sent to origin server. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_addr} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_cookie_<name>} | Use this variable to match cookies sent by the origin server in Set-Cookie headers.Replace <name> with the specific cookie you want to match, replacing any '-' with '_'. Examples: ${upstream_cookie_mycookie}, ${upstream_cookie_user_info}. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_http_<header_name>} | Use this variable to match origin HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. If many origins are consulted while the request is processed, only headers from the last origin are stored. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${uri} | The normalized (urldecoded) URI of the request. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${server_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${server_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_escaped_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_fingerprint} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_i_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_s_dn_parsed} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_s_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_serial} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_v_end} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_v_remain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_v_start} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_verify} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${tcpinfo_rtt} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${remote_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request_body} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + + + About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. + example: + argument: "{}" + conditional: conditional + variable: variable + operator: operator + properties: + conditional: + description: |- + * `if` - if + * `or` - or + * `and` - and + title: ConditionalEnum + type: string + x-extensible-enum: + - if + - or + - and + variable: + description: |- + * `${arg_}` - ${arg_} + * `${args}` - ${args} + * `${cookie_}` - ${cookie_} + * `${device_group}` - ${device_group} + * `${geoip_city_continent_code}` - ${geoip_city_continent_code} + * `${geoip_city_country_code}` - ${geoip_city_country_code} + * `${geoip_city_country_name}` - ${geoip_city_country_name} + * `${geoip_city}` - ${geoip_city} + * `${geoip_continent_code}` - ${geoip_continent_code} + * `${geoip_country_code}` - ${geoip_country_code} + * `${geoip_country_name}` - ${geoip_country_name} + * `${geoip_region_name}` - ${geoip_region_name} + * `${geoip_region}` - ${geoip_region} + * `${host}` - ${host} + * `${domain}` - ${domain} + * `${http_}` - ${http_} + * `${remote_addr}` - ${remote_addr} + * `${remote_user}` - ${remote_user} + * `${request_method}` - ${request_method} + * `${request_uri}` - ${request_uri} + * `${request}` - ${request} + * `${scheme}` - ${scheme} + * `${sent_http_}` - ${sent_http_} + * `${status}` - ${status} + * `${upstream_addr}` - ${upstream_addr} + * `${upstream_cookie_}` - ${upstream_cookie_} + * `${upstream_http_}` - ${upstream_http_} + * `${upstream_status}` - ${upstream_status} + * `${uri}` - ${uri} + * `${server_addr}` - ${server_addr} + * `${server_port}` - ${server_port} + * `${ssl_client_cert}` - ${ssl_client_cert} + * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} + * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} + * `${ssl_client_i_dn}` - ${ssl_client_i_dn} + * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} + * `${ssl_client_s_dn}` - ${ssl_client_s_dn} + * `${ssl_client_serial}` - ${ssl_client_serial} + * `${ssl_client_v_end}` - ${ssl_client_v_end} + * `${ssl_client_v_remain}` - ${ssl_client_v_remain} + * `${ssl_client_v_start}` - ${ssl_client_v_start} + * `${ssl_client_verify}` - ${ssl_client_verify} + * `${tcpinfo_rtt}` - ${tcpinfo_rtt} + * `${remote_port}` - ${remote_port} + * `${request_body}` - ${request_body} + title: ApplicationCriterionFieldVariableEnum + type: string + x-extensible-enum: + - "${arg_}" + - "${args}" + - "${cookie_}" + - "${device_group}" + - "${geoip_city_continent_code}" + - "${geoip_city_country_code}" + - "${geoip_city_country_name}" + - "${geoip_city}" + - "${geoip_continent_code}" + - "${geoip_country_code}" + - "${geoip_country_name}" + - "${geoip_region_name}" + - "${geoip_region}" + - "${host}" + - "${domain}" + - "${http_}" + - "${remote_addr}" + - "${remote_user}" + - "${request_method}" + - "${request_uri}" + - "${request}" + - "${scheme}" + - "${sent_http_}" + - "${status}" + - "${upstream_addr}" + - "${upstream_cookie_}" + - "${upstream_http_}" + - "${upstream_status}" + - "${uri}" + - "${server_addr}" + - "${server_port}" + - "${ssl_client_cert}" + - "${ssl_client_escaped_cert}" + - "${ssl_client_fingerprint}" + - "${ssl_client_i_dn}" + - "${ssl_client_s_dn_parsed}" + - "${ssl_client_s_dn}" + - "${ssl_client_serial}" + - "${ssl_client_v_end}" + - "${ssl_client_v_remain}" + - "${ssl_client_v_start}" + - "${ssl_client_verify}" + - "${tcpinfo_rtt}" + - "${remote_port}" + - "${request_body}" + operator: + description: |- + * `does_not_exist` - does_not_exist + * `does_not_match` - does_not_match + * `does_not_start_with` - does_not_start_with + * `exists` - exists + * `is_equal` - is_equal + * `is_in_list` - is_in_list + * `is_not_equal` - is_not_equal + * `is_not_in_list` - is_not_in_list + * `matches` - matches + * `starts_with` - starts_with + title: CriterionOperatorEnum + type: string + x-extensible-enum: + - does_not_exist + - does_not_match + - does_not_start_with + - exists + - is_equal + - is_in_list + - is_not_equal + - is_not_in_list + - matches + - starts_with + argument: + allOf: + - $ref: "#/components/schemas/ApplicationCriterionArgument" + nullable: true + type: object + required: + - conditional + - operator + - variable + title: ApplicationCriterionField + type: object + ApplicationCriterionFieldRequest: + additionalProperties: false + description: |- + The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. + + | Variable | Description | Phase | Operators | Argument | + | -------- | ----------- | ----- | --------- | ---------| + | ${arg_<name>} | Use this variable to match a query param. Replace <name> with the specific query param you want to match, replacing any '-' with '_'. Examples: ${arg_search}, ${arg_next}. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${args} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${cookie_<name>} | Use this variable to match cookies sent by the browser Cookie headers.Replace <name> with the specific cookie name you want to match, replacing any '-' with '_'. Examples: cookie_session_id, cookie_user_pref. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${device_group} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_city} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_region_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${geoip_region} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${host} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${domain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${http_<header_name>} | Use this variable to match HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${remote_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${remote_user} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request_method} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request_uri} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${scheme} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${sent_http_<header_name>} | Use this variable to match HTTP headers sent to origin server. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_addr} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_cookie_<name>} | Use this variable to match cookies sent by the origin server in Set-Cookie headers.Replace <name> with the specific cookie you want to match, replacing any '-' with '_'. Examples: ${upstream_cookie_mycookie}, ${upstream_cookie_user_info}. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_http_<header_name>} | Use this variable to match origin HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. If many origins are consulted while the request is processed, only headers from the last origin are stored. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${upstream_status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${uri} | The normalized (urldecoded) URI of the request. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${server_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${server_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_escaped_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_fingerprint} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_i_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_s_dn_parsed} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_s_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_serial} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_v_end} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_v_remain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_v_start} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${ssl_client_verify} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${tcpinfo_rtt} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${remote_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + | ${request_body} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | + + + About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. + example: + argument: "{}" + conditional: conditional + variable: variable + operator: operator + properties: + conditional: + description: |- + * `if` - if + * `or` - or + * `and` - and + title: ConditionalEnum + type: string + x-extensible-enum: + - if + - or + - and + variable: + description: |- + * `${arg_}` - ${arg_} + * `${args}` - ${args} + * `${cookie_}` - ${cookie_} + * `${device_group}` - ${device_group} + * `${geoip_city_continent_code}` - ${geoip_city_continent_code} + * `${geoip_city_country_code}` - ${geoip_city_country_code} + * `${geoip_city_country_name}` - ${geoip_city_country_name} + * `${geoip_city}` - ${geoip_city} + * `${geoip_continent_code}` - ${geoip_continent_code} + * `${geoip_country_code}` - ${geoip_country_code} + * `${geoip_country_name}` - ${geoip_country_name} + * `${geoip_region_name}` - ${geoip_region_name} + * `${geoip_region}` - ${geoip_region} + * `${host}` - ${host} + * `${domain}` - ${domain} + * `${http_}` - ${http_} + * `${remote_addr}` - ${remote_addr} + * `${remote_user}` - ${remote_user} + * `${request_method}` - ${request_method} + * `${request_uri}` - ${request_uri} + * `${request}` - ${request} + * `${scheme}` - ${scheme} + * `${sent_http_}` - ${sent_http_} + * `${status}` - ${status} + * `${upstream_addr}` - ${upstream_addr} + * `${upstream_cookie_}` - ${upstream_cookie_} + * `${upstream_http_}` - ${upstream_http_} + * `${upstream_status}` - ${upstream_status} + * `${uri}` - ${uri} + * `${server_addr}` - ${server_addr} + * `${server_port}` - ${server_port} + * `${ssl_client_cert}` - ${ssl_client_cert} + * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} + * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} + * `${ssl_client_i_dn}` - ${ssl_client_i_dn} + * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} + * `${ssl_client_s_dn}` - ${ssl_client_s_dn} + * `${ssl_client_serial}` - ${ssl_client_serial} + * `${ssl_client_v_end}` - ${ssl_client_v_end} + * `${ssl_client_v_remain}` - ${ssl_client_v_remain} + * `${ssl_client_v_start}` - ${ssl_client_v_start} + * `${ssl_client_verify}` - ${ssl_client_verify} + * `${tcpinfo_rtt}` - ${tcpinfo_rtt} + * `${remote_port}` - ${remote_port} + * `${request_body}` - ${request_body} + title: ApplicationCriterionFieldVariableEnum + type: string + x-extensible-enum: + - "${arg_}" + - "${args}" + - "${cookie_}" + - "${device_group}" + - "${geoip_city_continent_code}" + - "${geoip_city_country_code}" + - "${geoip_city_country_name}" + - "${geoip_city}" + - "${geoip_continent_code}" + - "${geoip_country_code}" + - "${geoip_country_name}" + - "${geoip_region_name}" + - "${geoip_region}" + - "${host}" + - "${domain}" + - "${http_}" + - "${remote_addr}" + - "${remote_user}" + - "${request_method}" + - "${request_uri}" + - "${request}" + - "${scheme}" + - "${sent_http_}" + - "${status}" + - "${upstream_addr}" + - "${upstream_cookie_}" + - "${upstream_http_}" + - "${upstream_status}" + - "${uri}" + - "${server_addr}" + - "${server_port}" + - "${ssl_client_cert}" + - "${ssl_client_escaped_cert}" + - "${ssl_client_fingerprint}" + - "${ssl_client_i_dn}" + - "${ssl_client_s_dn_parsed}" + - "${ssl_client_s_dn}" + - "${ssl_client_serial}" + - "${ssl_client_v_end}" + - "${ssl_client_v_remain}" + - "${ssl_client_v_start}" + - "${ssl_client_verify}" + - "${tcpinfo_rtt}" + - "${remote_port}" + - "${request_body}" + operator: + description: |- + * `does_not_exist` - does_not_exist + * `does_not_match` - does_not_match + * `does_not_start_with` - does_not_start_with + * `exists` - exists + * `is_equal` - is_equal + * `is_in_list` - is_in_list + * `is_not_equal` - is_not_equal + * `is_not_in_list` - is_not_in_list + * `matches` - matches + * `starts_with` - starts_with + title: CriterionOperatorEnum + type: string + x-extensible-enum: + - does_not_exist + - does_not_match + - does_not_start_with + - exists + - is_equal + - is_in_list + - is_not_equal + - is_not_in_list + - matches + - starts_with + argument: + allOf: + - $ref: "#/components/schemas/ApplicationCriterionArgumentRequest" + nullable: true + type: object + required: + - conditional + - operator + - variable + title: ApplicationCriterionFieldRequest + type: object + ApplicationCriterionFieldVariableEnum: + description: |- + * `${arg_}` - ${arg_} + * `${args}` - ${args} + * `${cookie_}` - ${cookie_} + * `${device_group}` - ${device_group} + * `${geoip_city_continent_code}` - ${geoip_city_continent_code} + * `${geoip_city_country_code}` - ${geoip_city_country_code} + * `${geoip_city_country_name}` - ${geoip_city_country_name} + * `${geoip_city}` - ${geoip_city} + * `${geoip_continent_code}` - ${geoip_continent_code} + * `${geoip_country_code}` - ${geoip_country_code} + * `${geoip_country_name}` - ${geoip_country_name} + * `${geoip_region_name}` - ${geoip_region_name} + * `${geoip_region}` - ${geoip_region} + * `${host}` - ${host} + * `${domain}` - ${domain} + * `${http_}` - ${http_} + * `${remote_addr}` - ${remote_addr} + * `${remote_user}` - ${remote_user} + * `${request_method}` - ${request_method} + * `${request_uri}` - ${request_uri} + * `${request}` - ${request} + * `${scheme}` - ${scheme} + * `${sent_http_}` - ${sent_http_} + * `${status}` - ${status} + * `${upstream_addr}` - ${upstream_addr} + * `${upstream_cookie_}` - ${upstream_cookie_} + * `${upstream_http_}` - ${upstream_http_} + * `${upstream_status}` - ${upstream_status} + * `${uri}` - ${uri} + * `${server_addr}` - ${server_addr} + * `${server_port}` - ${server_port} + * `${ssl_client_cert}` - ${ssl_client_cert} + * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} + * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} + * `${ssl_client_i_dn}` - ${ssl_client_i_dn} + * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} + * `${ssl_client_s_dn}` - ${ssl_client_s_dn} + * `${ssl_client_serial}` - ${ssl_client_serial} + * `${ssl_client_v_end}` - ${ssl_client_v_end} + * `${ssl_client_v_remain}` - ${ssl_client_v_remain} + * `${ssl_client_v_start}` - ${ssl_client_v_start} + * `${ssl_client_verify}` - ${ssl_client_verify} + * `${tcpinfo_rtt}` - ${tcpinfo_rtt} + * `${remote_port}` - ${remote_port} + * `${request_body}` - ${request_body} + title: ApplicationCriterionFieldVariableEnum + type: string + x-extensible-enum: + - "${arg_}" + - "${args}" + - "${cookie_}" + - "${device_group}" + - "${geoip_city_continent_code}" + - "${geoip_city_country_code}" + - "${geoip_city_country_name}" + - "${geoip_city}" + - "${geoip_continent_code}" + - "${geoip_country_code}" + - "${geoip_country_name}" + - "${geoip_region_name}" + - "${geoip_region}" + - "${host}" + - "${domain}" + - "${http_}" + - "${remote_addr}" + - "${remote_user}" + - "${request_method}" + - "${request_uri}" + - "${request}" + - "${scheme}" + - "${sent_http_}" + - "${status}" + - "${upstream_addr}" + - "${upstream_cookie_}" + - "${upstream_http_}" + - "${upstream_status}" + - "${uri}" + - "${server_addr}" + - "${server_port}" + - "${ssl_client_cert}" + - "${ssl_client_escaped_cert}" + - "${ssl_client_fingerprint}" + - "${ssl_client_i_dn}" + - "${ssl_client_s_dn_parsed}" + - "${ssl_client_s_dn}" + - "${ssl_client_serial}" + - "${ssl_client_v_end}" + - "${ssl_client_v_remain}" + - "${ssl_client_v_start}" + - "${ssl_client_verify}" + - "${tcpinfo_rtt}" + - "${remote_port}" + - "${request_body}" + ApplicationCriterionArgument: + additionalProperties: false + oneOf: + - format: int64 + nullable: true + type: integer + - nullable: true + type: string + title: ApplicationCriterionArgument + ApplicationCriterionArgumentRequest: + additionalProperties: false + oneOf: + - format: int64 + nullable: true + type: integer + - nullable: true + type: string + title: ApplicationCriterionArgumentRequest + FirewallCriterionField: + additionalProperties: false + description: |- + The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. + + | Variable | Description | Operators | Argument | + | -------- | ----------- | --------- | ---------| + | ${header_accept} | | matches, does_not_match | string | + | ${header_accept_encoding} | | matches, does_not_match | string | + | ${header_accept_language} | | matches, does_not_match | string | + | ${header_cookie} | | matches, does_not_match | string | + | ${header_origin} | | matches, does_not_match | string | + | ${header_referer} | | matches, does_not_match | string | + | ${header_user_agent} | | matches, does_not_match | string | + | ${host} | | is_equal, is_not_equal, matches, does_not_match | string | + | ${network} | | is_in_list, is_not_in_list | string | + | ${request_args} | | is_equal, is_not_equal, matches, does_not_match, exists, does_not_exist | string | + | ${request_method} | | is_equal, is_not_equal | string | + | ${request_uri} | | starts_with, does_not_starts_with, is_equal, is_not_equal, matches, does_not_match | string | + | ${scheme} | | is_equal, is_not_equal | string | + | ${ssl_verification_status} | | is_equal, is_not_equal | SUCCESS, CERTIFICATE_VERIFICATION_ERROR, MISSING_CLIENT_CERTIFICATE | + | ${client_certificate_validation} | | is_equal, is_not_equal | string | + + + About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. + example: + argument: "{}" + conditional: conditional + variable: variable + operator: operator + properties: + conditional: + description: |- + * `if` - if + * `or` - or + * `and` - and + title: ConditionalEnum + type: string + x-extensible-enum: + - if + - or + - and + variable: + description: |- + * `${header_accept}` - ${header_accept} + * `${header_accept_encoding}` - ${header_accept_encoding} + * `${header_accept_language}` - ${header_accept_language} + * `${header_cookie}` - ${header_cookie} + * `${header_origin}` - ${header_origin} + * `${header_referer}` - ${header_referer} + * `${header_user_agent}` - ${header_user_agent} + * `${host}` - ${host} + * `${network}` - ${network} + * `${request_args}` - ${request_args} + * `${request_method}` - ${request_method} + * `${request_uri}` - ${request_uri} + * `${scheme}` - ${scheme} + * `${ssl_verification_status}` - ${ssl_verification_status} + * `${client_certificate_validation}` - ${client_certificate_validation} + title: FirewallCriterionFieldVariableEnum + type: string + x-extensible-enum: + - "${header_accept}" + - "${header_accept_encoding}" + - "${header_accept_language}" + - "${header_cookie}" + - "${header_origin}" + - "${header_referer}" + - "${header_user_agent}" + - "${host}" + - "${network}" + - "${request_args}" + - "${request_method}" + - "${request_uri}" + - "${scheme}" + - "${ssl_verification_status}" + - "${client_certificate_validation}" + operator: + description: |- + * `does_not_exist` - does_not_exist + * `does_not_match` - does_not_match + * `does_not_start_with` - does_not_start_with + * `exists` - exists + * `is_equal` - is_equal + * `is_in_list` - is_in_list + * `is_not_equal` - is_not_equal + * `is_not_in_list` - is_not_in_list + * `matches` - matches + * `starts_with` - starts_with + title: CriterionOperatorEnum + type: string + x-extensible-enum: + - does_not_exist + - does_not_match + - does_not_start_with + - exists + - is_equal + - is_in_list + - is_not_equal + - is_not_in_list + - matches + - starts_with + argument: + allOf: + - $ref: "#/components/schemas/FirewallCriterionArgument" + nullable: true + type: object + required: + - conditional + - operator + - variable + title: FirewallCriterionField + type: object + FirewallCriterionFieldRequest: + additionalProperties: false + description: |- + The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. + + | Variable | Description | Operators | Argument | + | -------- | ----------- | --------- | ---------| + | ${header_accept} | | matches, does_not_match | string | + | ${header_accept_encoding} | | matches, does_not_match | string | + | ${header_accept_language} | | matches, does_not_match | string | + | ${header_cookie} | | matches, does_not_match | string | + | ${header_origin} | | matches, does_not_match | string | + | ${header_referer} | | matches, does_not_match | string | + | ${header_user_agent} | | matches, does_not_match | string | + | ${host} | | is_equal, is_not_equal, matches, does_not_match | string | + | ${network} | | is_in_list, is_not_in_list | string | + | ${request_args} | | is_equal, is_not_equal, matches, does_not_match, exists, does_not_exist | string | + | ${request_method} | | is_equal, is_not_equal | string | + | ${request_uri} | | starts_with, does_not_starts_with, is_equal, is_not_equal, matches, does_not_match | string | + | ${scheme} | | is_equal, is_not_equal | string | + | ${ssl_verification_status} | | is_equal, is_not_equal | SUCCESS, CERTIFICATE_VERIFICATION_ERROR, MISSING_CLIENT_CERTIFICATE | + | ${client_certificate_validation} | | is_equal, is_not_equal | string | + + + About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. + example: + argument: "{}" + conditional: conditional + variable: variable + operator: operator + properties: + conditional: + description: |- + * `if` - if + * `or` - or + * `and` - and + title: ConditionalEnum + type: string + x-extensible-enum: + - if + - or + - and + variable: + description: |- + * `${header_accept}` - ${header_accept} + * `${header_accept_encoding}` - ${header_accept_encoding} + * `${header_accept_language}` - ${header_accept_language} + * `${header_cookie}` - ${header_cookie} + * `${header_origin}` - ${header_origin} + * `${header_referer}` - ${header_referer} + * `${header_user_agent}` - ${header_user_agent} + * `${host}` - ${host} + * `${network}` - ${network} + * `${request_args}` - ${request_args} + * `${request_method}` - ${request_method} + * `${request_uri}` - ${request_uri} + * `${scheme}` - ${scheme} + * `${ssl_verification_status}` - ${ssl_verification_status} + * `${client_certificate_validation}` - ${client_certificate_validation} + title: FirewallCriterionFieldVariableEnum + type: string + x-extensible-enum: + - "${header_accept}" + - "${header_accept_encoding}" + - "${header_accept_language}" + - "${header_cookie}" + - "${header_origin}" + - "${header_referer}" + - "${header_user_agent}" + - "${host}" + - "${network}" + - "${request_args}" + - "${request_method}" + - "${request_uri}" + - "${scheme}" + - "${ssl_verification_status}" + - "${client_certificate_validation}" + operator: + description: |- + * `does_not_exist` - does_not_exist + * `does_not_match` - does_not_match + * `does_not_start_with` - does_not_start_with + * `exists` - exists + * `is_equal` - is_equal + * `is_in_list` - is_in_list + * `is_not_equal` - is_not_equal + * `is_not_in_list` - is_not_in_list + * `matches` - matches + * `starts_with` - starts_with + title: CriterionOperatorEnum + type: string + x-extensible-enum: + - does_not_exist + - does_not_match + - does_not_start_with + - exists + - is_equal + - is_in_list + - is_not_equal + - is_not_in_list + - matches + - starts_with + argument: + allOf: + - $ref: "#/components/schemas/FirewallCriterionArgumentRequest" + nullable: true + type: object + required: + - conditional + - operator + - variable + title: FirewallCriterionFieldRequest + type: object + FirewallCriterionFieldVariableEnum: + description: |- + * `${header_accept}` - ${header_accept} + * `${header_accept_encoding}` - ${header_accept_encoding} + * `${header_accept_language}` - ${header_accept_language} + * `${header_cookie}` - ${header_cookie} + * `${header_origin}` - ${header_origin} + * `${header_referer}` - ${header_referer} + * `${header_user_agent}` - ${header_user_agent} + * `${host}` - ${host} + * `${network}` - ${network} + * `${request_args}` - ${request_args} + * `${request_method}` - ${request_method} + * `${request_uri}` - ${request_uri} + * `${scheme}` - ${scheme} + * `${ssl_verification_status}` - ${ssl_verification_status} + * `${client_certificate_validation}` - ${client_certificate_validation} + title: FirewallCriterionFieldVariableEnum + type: string + x-extensible-enum: + - "${header_accept}" + - "${header_accept_encoding}" + - "${header_accept_language}" + - "${header_cookie}" + - "${header_origin}" + - "${header_referer}" + - "${header_user_agent}" + - "${host}" + - "${network}" + - "${request_args}" + - "${request_method}" + - "${request_uri}" + - "${scheme}" + - "${ssl_verification_status}" + - "${client_certificate_validation}" + FirewallCriterionArgument: + additionalProperties: false + oneOf: + - description: "These values are only valid when using ${ssl_verification_status}\ + \ variable." + nullable: true + type: string + x-extensible-enum: + - SUCCESS + - CERTIFICATE_VERIFICATION_ERROR + - MISSING_CLIENT_CERTIFICATE + - format: int64 + nullable: true + type: integer + - nullable: true + type: string + title: FirewallCriterionArgument + FirewallCriterionArgumentRequest: + additionalProperties: false + oneOf: + - description: "These values are only valid when using ${ssl_verification_status}\ + \ variable." + nullable: true + type: string + x-extensible-enum: + - SUCCESS + - CERTIFICATE_VERIFICATION_ERROR + - MISSING_CLIENT_CERTIFICATE + - format: int64 + nullable: true + type: integer + - nullable: true + type: string + title: FirewallCriterionArgumentRequest + Page2: + $ref: "#/components/schemas/PageConnector" + PageRequest2: + $ref: "#/components/schemas/PageConnectorRequest" + PaginatedConnectorList: + additionalProperties: false + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + last_editor: last_editor + name: name + active: true + attributes: + addresses: + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + connection_options: "" + modules: "" + id: 0 + type: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + last_editor: last_editor + name: name + active: true + attributes: + addresses: + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + - https_port: 9607 + address: address + active: true + http_port: 39501 + modules: "{}" + connection_options: "" + modules: "" + id: 0 + type: "" + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Connector2" + type: array + title: PaginatedConnectorList + type: object + PatchedConnectorRequest2: + additionalProperties: true + discriminator: + mapping: + http: "#/components/schemas/PatchedConnectorHTTPRequest" + storage: "#/components/schemas/PatchedConnectorRequest" + live_ingest: "#/components/schemas/PatchedConnectorRequest" + propertyName: type + oneOf: + - $ref: "#/components/schemas/PatchedConnectorHTTPRequest" + - $ref: "#/components/schemas/PatchedConnectorRequest" + - $ref: "#/components/schemas/PatchedConnectorRequest" + title: PatchedConnectorRequest2 + PatchedRequestPhaseRule: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + name: name + active: true + description: description + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/ApplicationCriterionFieldRequest" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/RequestPhaseBehavior2" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + title: PatchedRequestPhaseRule + type: object + RequestPhaseBehavior2: + additionalProperties: true + discriminator: + mapping: + deny: "#/components/schemas/BehaviorNoArgs" + no_content: "#/components/schemas/BehaviorNoArgs" + deliver: "#/components/schemas/BehaviorNoArgs" + finish_request_phase: "#/components/schemas/BehaviorNoArgs" + forward_cookies: "#/components/schemas/BehaviorNoArgs" + optimize_images: "#/components/schemas/BehaviorNoArgs" + bypass_cache: "#/components/schemas/BehaviorNoArgs" + enable_gzip: "#/components/schemas/BehaviorNoArgs" + redirect_http_to_https: "#/components/schemas/BehaviorNoArgs" + redirect_to_301: "#/components/schemas/BehaviorArgs" + redirect_to_302: "#/components/schemas/BehaviorArgs" + rewrite_request: "#/components/schemas/BehaviorArgs" + add_request_header: "#/components/schemas/BehaviorArgs" + filter_request_header: "#/components/schemas/BehaviorArgs" + add_request_cookie: "#/components/schemas/BehaviorArgs" + filter_request_cookie: "#/components/schemas/BehaviorArgs" + set_origin: "#/components/schemas/BehaviorArgs" + run_function: "#/components/schemas/BehaviorArgs" + set_connector: "#/components/schemas/BehaviorArgs" + set_cache_policy: "#/components/schemas/BehaviorArgs" + capture_match_groups: "#/components/schemas/BehaviorCapture" + propertyName: type + oneOf: + - $ref: "#/components/schemas/BehaviorNoArgs" + - $ref: "#/components/schemas/BehaviorArgs" + - $ref: "#/components/schemas/BehaviorCapture" + title: RequestPhaseBehavior2 + RequestPhaseRule2: + additionalProperties: false + example: + criteria: + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + - argument: "{}" + conditional: conditional + variable: variable + operator: operator + behaviors: + - type: type + - type: type + - type: type + - type: type + - type: type + name: name + active: true + description: description + properties: + name: + maxLength: 250 + minLength: 1 + type: string + active: + type: boolean + criteria: + items: + items: + $ref: "#/components/schemas/ApplicationCriterionFieldRequest" + maxItems: 10 + minItems: 1 + type: array + maxItems: 5 + minItems: 1 + type: array + behaviors: + items: + $ref: "#/components/schemas/RequestPhaseBehavior2" + maxItems: 10 + minItems: 1 + type: array + description: + maxLength: 1000 + minLength: 0 + type: string + required: + - behaviors + - criteria + - name + title: RequestPhaseRule2 + type: object + WAFExceptionCondition: + additionalProperties: true + discriminator: + mapping: + any_http_header_name: "#/components/schemas/WAFExceptionGenericCondition" + any_http_header_value: "#/components/schemas/WAFExceptionGenericCondition" + any_query_string_name: "#/components/schemas/WAFExceptionGenericCondition" + any_query_string_value: "#/components/schemas/WAFExceptionGenericCondition" + any_url: "#/components/schemas/WAFExceptionGenericCondition" + body_form_field_name: "#/components/schemas/WAFExceptionGenericCondition" + body_form_field_value: "#/components/schemas/WAFExceptionGenericCondition" + file_extension: "#/components/schemas/WAFExceptionGenericCondition" + raw_body: "#/components/schemas/WAFExceptionGenericCondition" + specific_body_form_field_name: "#/components/schemas/WAFExceptionSpecificConditionOnName" + specific_body_form_field_value: "#/components/schemas/WAFExceptionSpecificConditionOnValue" + specific_http_header_name: "#/components/schemas/WAFExceptionSpecificConditionOnName" + specific_http_header_value: "#/components/schemas/WAFExceptionSpecificConditionOnValue" + specific_query_string_name: "#/components/schemas/WAFExceptionSpecificConditionOnName" + specific_query_string_value: "#/components/schemas/WAFExceptionSpecificConditionOnValue" + propertyName: match + oneOf: + - $ref: "#/components/schemas/WAFExceptionGenericCondition" + - $ref: "#/components/schemas/WAFExceptionSpecificConditionOnName" + - $ref: "#/components/schemas/WAFExceptionSpecificConditionOnValue" + title: WAFExceptionCondition + WAFExceptionConditionRequest: + additionalProperties: true + discriminator: + mapping: + any_http_header_name: "#/components/schemas/WAFExceptionGenericConditionRequest" + any_http_header_value: "#/components/schemas/WAFExceptionGenericConditionRequest" + any_query_string_name: "#/components/schemas/WAFExceptionGenericConditionRequest" + any_query_string_value: "#/components/schemas/WAFExceptionGenericConditionRequest" + any_url: "#/components/schemas/WAFExceptionGenericConditionRequest" + body_form_field_name: "#/components/schemas/WAFExceptionGenericConditionRequest" + body_form_field_value: "#/components/schemas/WAFExceptionGenericConditionRequest" + file_extension: "#/components/schemas/WAFExceptionGenericConditionRequest" + raw_body: "#/components/schemas/WAFExceptionGenericConditionRequest" + specific_body_form_field_name: "#/components/schemas/WAFExceptionSpecificConditionOnNameRequest" + specific_body_form_field_value: "#/components/schemas/WAFExceptionSpecificConditionOnValueRequest" + specific_http_header_name: "#/components/schemas/WAFExceptionSpecificConditionOnNameRequest" + specific_http_header_value: "#/components/schemas/WAFExceptionSpecificConditionOnValueRequest" + specific_query_string_name: "#/components/schemas/WAFExceptionSpecificConditionOnNameRequest" + specific_query_string_value: "#/components/schemas/WAFExceptionSpecificConditionOnValueRequest" + propertyName: match + oneOf: + - $ref: "#/components/schemas/WAFExceptionGenericConditionRequest" + - $ref: "#/components/schemas/WAFExceptionSpecificConditionOnNameRequest" + - $ref: "#/components/schemas/WAFExceptionSpecificConditionOnValueRequest" + title: WAFExceptionConditionRequest + DatabaseDetail: + description: Detailed database representation with extended status information. + example: + product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + properties: + id: + description: Unique identifier for the database + format: int64 + type: integer + name: + description: Name of the database + maxLength: 50 + minLength: 6 + type: string + status: + description: |- + Current status of the database + + * `creating` - creating + * `created` - created + * `deleting` - deleting + type: string + x-extensible-enum: + - creating + - created + - deleting + active: + description: Whether the database is active + type: boolean + last_modified: + description: Last modification timestamp + format: date-time + type: string + last_editor: + description: Last editor of the schema. + nullable: true + type: string + product_version: + description: Product version + type: string + required: + - id + - last_editor + - last_modified + - name + - product_version + - status + type: object + DatabaseDetailResponse: + example: + data: + product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/DatabaseDetail" + required: + - data + type: object + DatabaseRequest: + example: + name: name + active: true + properties: + name: + description: Name of the database + maxLength: 50 + minLength: 6 + type: string + active: + description: Whether the database is active + type: boolean + required: + - name + type: object + JSONAPIErrorObject: + description: Serializer for a single JSON:API error object. + example: + code: code + meta: + key: "" + detail: detail + source: "" + title: title + status: status + properties: + status: + description: The HTTP status code applicable to this problem + maxLength: 3 + minLength: 3 + type: string + code: + description: An application-specific error code + maxLength: 5 + minLength: 5 + type: string + title: + description: "A short, human-readable summary of the problem" + maxLength: 4096 + minLength: 1 + type: string + detail: + description: A human-readable explanation specific to this occurrence of + the problem + maxLength: 4096 + minLength: 1 + type: string + source: + allOf: + - $ref: "#/components/schemas/JSONAPIErrorSource" + description: References to the primary source of the error + meta: + additionalProperties: {} + description: Non-standard meta-information about the error + type: object + type: object + JSONAPIErrorSource: + description: Serializer for the 'source' object in a JSON:API error. + properties: + pointer: + description: JSON Pointer to the value in the request document that caused + the error + maxLength: 4096 + minLength: 1 + type: string + parameter: + description: URI query parameter that caused the error + maxLength: 4096 + minLength: 1 + type: string + header: + description: Request header name that caused the error + maxLength: 4096 + minLength: 1 + type: string + type: object + PaginatedDatabaseDetailList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + - product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/DatabaseDetail" + type: array + type: object + SQLResult: + example: + columns: + - "" + - "" + rows: + - "" + - "" + properties: + columns: + description: List of column names + items: {} + type: array + rows: + description: List of result rows + items: {} + type: array + required: + - columns + - rows + type: object + SQLResultResponse: + example: + data: + columns: + - "" + - "" + rows: + - "" + - "" + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/SQLResult" + required: + - data + type: object + SQLStatementsRequest: + example: + statements: + - statements + - statements + - statements + - statements + - statements + properties: + statements: + description: List of SQL statements to execute + items: + minLength: 1 + type: string + maxItems: 1000 + type: array + required: + - statements + type: object + ErrorResponse: + description: Serializer for a JSON:API error response. + example: + errors: + - code: code + meta: + key: "" + detail: detail + source: "" + title: title + status: status + - code: code + meta: + key: "" + detail: detail + source: "" + title: title + status: status + properties: + errors: + description: Array of error objects + items: + $ref: "#/components/schemas/JSONAPIErrorObject" + type: array + required: + - errors + type: object + Favorite: + additionalProperties: false + example: + name: name + id: 0 + type: type + uri: uri + properties: + id: + format: int64 + type: integer + uri: + maxLength: 255 + minLength: 1 + type: string + type: + description: Favorite type + type: string + name: + type: string + required: + - id + - name + - type + - uri + title: Favorite + type: object + FavoriteRequest: + additionalProperties: false + example: + uri: uri + properties: + uri: + maxLength: 255 + minLength: 1 + type: string + required: + - uri + title: FavoriteRequest + type: object + Grant: + additionalProperties: false + example: + owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1210617418 + identity: 6 + roles: + - 1 + - 1 + policies: + - 5 + - 5 + id: 0 + properties: + id: + format: int64 + type: integer + identity: + format: int64 + nullable: true + type: integer + roles: + items: + format: int64 + type: integer + type: array + policies: + items: + format: int64 + type: integer + type: array + expires: + format: date-time + type: string + owner: + type: boolean + account_id: + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + required: + - account_id + - id + - owner + title: Grant + type: object + GrantRequest: + additionalProperties: false + example: + owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1280358508 + identity: 0 + roles: + - 6 + - 6 + policies: + - 1 + - 1 + properties: + identity: + format: int64 + nullable: true + type: integer + roles: + items: + format: int64 + type: integer + type: array + policies: + items: + format: int64 + type: integer + type: array + expires: + format: date-time + type: string + owner: + type: boolean + account_id: + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + required: + - account_id + - owner + title: GrantRequest + type: object + Group: + additionalProperties: false + example: + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + required: + - account_id + - created + - email + - id + - last_editor + - last_modified + - name + title: Group + type: object + GroupMembers: + additionalProperties: false + example: + members: + - 0 + - 0 + properties: + members: + description: List of the users' IDs. + items: + format: int64 + type: integer + type: array + required: + - members + title: GroupMembers + type: object + GroupMembersRequest: + additionalProperties: false + example: + members: + - 0 + - 0 + properties: + members: + description: List of the users' IDs. + items: + format: int64 + type: integer + type: array + required: + - members + title: GroupMembersRequest + type: object + GroupRequest: + additionalProperties: false + example: + name: name + active: true + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + required: + - name + title: GroupRequest + type: object + PatchedGrantRequest: + additionalProperties: false + example: + owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1280358508 + identity: 0 + roles: + - 6 + - 6 + policies: + - 1 + - 1 + properties: + identity: + format: int64 + nullable: true + type: integer + roles: + items: + format: int64 + type: integer + type: array + policies: + items: + format: int64 + type: integer + type: array + expires: + format: date-time + type: string + owner: + type: boolean + account_id: + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + title: PatchedGrantRequest + type: object + PatchedGroupRequest: + additionalProperties: false + example: + name: name + active: true + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + title: PatchedGroupRequest + type: object + PatchedServiceTokenUpdateRequest: + additionalProperties: false + example: + name: name + active: true + description: description + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + description: + maxLength: 255 + minLength: 1 + type: string + title: PatchedServiceTokenUpdateRequest + type: object + PatchedUserRequest: + additionalProperties: false + example: + two_factor_enabled: true + preferences: + key: "" + phone: phone + name: name + active: true + email: email + properties: + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + two_factor_enabled: + type: boolean + preferences: + additionalProperties: {} + description: User-specific preferences in JSON format. + type: object + phone: + maxLength: 31 + minLength: 1 + type: string + title: PatchedUserRequest + type: object + ResponseDeleteFavorite: + additionalProperties: false + example: + data: "{}" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + allOf: + - $ref: "#/components/schemas/Favorite" + nullable: true + type: object + required: + - data + - state + title: ResponseDeleteFavorite + type: object + ResponseDeleteGrant: + additionalProperties: false + example: + data: "{}" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + allOf: + - $ref: "#/components/schemas/Grant" + nullable: true + type: object + required: + - data + - state + title: ResponseDeleteGrant + type: object + ResponseDeleteGroup: + additionalProperties: false + example: + data: "{}" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + allOf: + - $ref: "#/components/schemas/Group" + nullable: true + type: object + required: + - data + - state + title: ResponseDeleteGroup + type: object + ResponseDeleteServiceToken: + additionalProperties: false + example: + data: "{}" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + allOf: + - $ref: "#/components/schemas/ServiceToken" + nullable: true + type: object + required: + - data + - state + title: ResponseDeleteServiceToken + type: object + ResponseDeleteUser: + additionalProperties: false + example: + data: "{}" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + allOf: + - $ref: "#/components/schemas/User" + nullable: true + type: object + required: + - data + - state + title: ResponseDeleteUser + type: object + ResponseFavorite: + additionalProperties: false + example: + data: + name: name + id: 0 + type: type + uri: uri + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/Favorite" + required: + - data + - state + title: ResponseFavorite + type: object + ResponseGrant: + additionalProperties: false + example: + data: + owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1210617418 + identity: 6 + roles: + - 1 + - 1 + policies: + - 5 + - 5 + id: 0 + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/Grant" + required: + - data + - state + title: ResponseGrant + type: object + ResponseGroup: + additionalProperties: false + example: + data: + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/Group" + required: + - data + - state + title: ResponseGroup + type: object + ResponseGroupMembers: + additionalProperties: false + example: + data: + members: + - 0 + - 0 + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/GroupMembers" + required: + - data + - state + title: ResponseGroupMembers + type: object + ResponseListFavorite: + additionalProperties: false + example: + name: name + id: 0 + type: type + uri: uri + properties: + id: + format: int64 + type: integer + uri: + maxLength: 255 + minLength: 1 + type: string + type: + description: Favorite type + type: string + name: + type: string + required: + - id + - name + - type + - uri + title: ResponseListFavorite + type: object + ResponseListGrant: + additionalProperties: false + example: + owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1210617418 + identity: 6 + roles: + - 1 + - 1 + policies: + - 5 + - 5 + id: 0 + properties: + id: + format: int64 + type: integer + identity: + format: int64 + nullable: true + type: integer + roles: + items: + format: int64 + type: integer + type: array + policies: + items: + format: int64 + type: integer + type: array + expires: + format: date-time + type: string + owner: + type: boolean + account_id: + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + required: + - account_id + - id + - owner + title: ResponseListGrant + type: object + ResponseListGroup: + additionalProperties: false + example: + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + required: + - account_id + - created + - email + - id + - last_editor + - last_modified + - name + title: ResponseListGroup + type: object + ResponseListServiceToken: + additionalProperties: false + example: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + description: + maxLength: 255 + minLength: 1 + type: string + expires: + format: date-time + type: string + last_used: + format: date-time + type: string + required: + - account_id + - created + - email + - expires + - id + - last_editor + - last_modified + - last_used + - name + title: ResponseListServiceToken + type: object + ResponseListUser: + additionalProperties: false + example: + two_factor_enabled: true + preferences: + key: "" + created: 2000-01-23T04:56:07.000+00:00 + last_login: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + active: true + account_id: 6 + lockout: lockout + phone: phone + name: name + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + info: + key: "" + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + maxLength: 255 + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + last_login: + format: date-time + type: string + two_factor_enabled: + type: boolean + preferences: + additionalProperties: {} + description: User-specific preferences in JSON format. + type: object + phone: + maxLength: 31 + minLength: 1 + type: string + info: + additionalProperties: {} + type: object + lockout: + type: string + required: + - account_id + - created + - email + - id + - info + - last_editor + - last_login + - last_modified + - lockout + - name + title: ResponseListUser + type: object + ResponseRetrieveGrant: + additionalProperties: false + example: + data: + owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1210617418 + identity: 6 + roles: + - 1 + - 1 + policies: + - 5 + - 5 + id: 0 + properties: + data: + $ref: "#/components/schemas/Grant" + required: + - data + title: ResponseRetrieveGrant + type: object + ResponseRetrieveGroup: + additionalProperties: false + example: + data: + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + data: + $ref: "#/components/schemas/Group" + required: + - data + title: ResponseRetrieveGroup + type: object + ResponseRetrieveGroupMembers: + additionalProperties: false + example: + data: + members: + - 0 + - 0 + properties: + data: + $ref: "#/components/schemas/GroupMembers" + required: + - data + title: ResponseRetrieveGroupMembers + type: object + ResponseRetrieveServiceToken: + additionalProperties: false + example: + data: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + data: + $ref: "#/components/schemas/ServiceToken" + required: + - data + title: ResponseRetrieveServiceToken + type: object + ResponseRetrieveUser: + additionalProperties: false + example: + data: + two_factor_enabled: true + preferences: + key: "" + created: 2000-01-23T04:56:07.000+00:00 + last_login: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + active: true + account_id: 6 + lockout: lockout + phone: phone + name: name + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + info: + key: "" + properties: + data: + $ref: "#/components/schemas/User" + required: + - data + title: ResponseRetrieveUser + type: object + ResponseRetrieveUserInfo: + additionalProperties: false + example: + data: + info: + key: "" + properties: + data: + $ref: "#/components/schemas/UserInfo" + required: + - data + title: ResponseRetrieveUserInfo + type: object + ResponseServiceToken: + additionalProperties: false + example: + data: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/ServiceToken" + required: + - data + - state + title: ResponseServiceToken + type: object + ResponseServiceTokenCreate: + additionalProperties: false + example: + data: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + token: token + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/ServiceTokenCreate" + required: + - data + - state + title: ResponseServiceTokenCreate + type: object + ResponseServiceTokenRenew: + additionalProperties: false + example: + data: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + token: token + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/ServiceTokenRenew" + required: + - data + - state + title: ResponseServiceTokenRenew + type: object + ResponseUser: + additionalProperties: false + example: + data: + two_factor_enabled: true + preferences: + key: "" + created: 2000-01-23T04:56:07.000+00:00 + last_login: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + active: true + account_id: 6 + lockout: lockout + phone: phone + name: name + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + info: + key: "" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/User" + required: + - data + - state + title: ResponseUser + type: object + ResponseUserInfo: + additionalProperties: false + example: + data: + info: + key: "" + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/UserInfo" + required: + - data + - state + title: ResponseUserInfo + type: object + ServiceToken: + additionalProperties: false + example: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + description: + maxLength: 255 + minLength: 1 + type: string + expires: + format: date-time + type: string + last_used: + format: date-time + type: string + required: + - account_id + - created + - email + - expires + - id + - last_editor + - last_modified + - last_used + - name + title: ServiceToken + type: object + ServiceTokenCreate: + additionalProperties: false + example: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + token: token + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + description: + maxLength: 255 + minLength: 1 + type: string + expires: + format: date-time + type: string + last_used: + format: date-time + type: string + token: + type: string + required: + - account_id + - created + - email + - expires + - id + - last_editor + - last_modified + - last_used + - name + - token + title: ServiceTokenCreate + type: object + ServiceTokenCreateRequest: + additionalProperties: false + example: + expires: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + description: + maxLength: 255 + minLength: 1 + type: string + expires: + format: date-time + type: string + required: + - expires + - name + title: ServiceTokenCreateRequest + type: object + ServiceTokenRenew: + additionalProperties: false + example: + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + token: token + properties: + id: + format: int64 + type: integer + name: + minLength: 1 + type: string + email: + format: email + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + description: + minLength: 1 + type: string + expires: + format: date-time + type: string + last_used: + format: date-time + type: string + token: + type: string + required: + - account_id + - active + - created + - description + - email + - expires + - id + - last_editor + - last_modified + - last_used + - name + - token + title: ServiceTokenRenew + type: object + ServiceTokenRenewRequest: + additionalProperties: false + example: + expires: 2000-01-23T04:56:07.000+00:00 + properties: + expires: + format: date-time + type: string + required: + - expires + title: ServiceTokenRenewRequest + type: object + ServiceTokenUpdateRequest: + additionalProperties: false + example: + name: name + active: true + description: description + properties: + name: + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + description: + maxLength: 255 + minLength: 1 + type: string + required: + - name + title: ServiceTokenUpdateRequest + type: object + StateEnum: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + User: + additionalProperties: false + example: + two_factor_enabled: true + preferences: + key: "" + created: 2000-01-23T04:56:07.000+00:00 + last_login: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + active: true + account_id: 6 + lockout: lockout + phone: phone + name: name + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + info: + key: "" + properties: + id: + format: int64 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + maxLength: 255 + type: string + created: + format: date-time + type: string + last_editor: + type: string + last_modified: + format: date-time + type: string + active: + type: boolean + account_id: + format: int64 + type: integer + last_login: + format: date-time + type: string + two_factor_enabled: + type: boolean + preferences: + additionalProperties: {} + description: User-specific preferences in JSON format. + type: object + phone: + maxLength: 31 + minLength: 1 + type: string + info: + additionalProperties: {} + type: object + lockout: + type: string + required: + - account_id + - created + - email + - id + - info + - last_editor + - last_login + - last_modified + - lockout + - name + title: User + type: object + UserInfo: + additionalProperties: false + example: + info: + key: "" + properties: + info: + additionalProperties: {} + type: object + required: + - info + title: UserInfo + type: object + UserRequest: + additionalProperties: false + example: + two_factor_enabled: true + preferences: + key: "" + phone: phone + name: name + active: true + email: email + properties: + name: + maxLength: 255 + minLength: 1 + type: string + email: + format: email + maxLength: 255 + minLength: 1 + type: string + active: + type: boolean + two_factor_enabled: + type: boolean + preferences: + additionalProperties: {} + description: User-specific preferences in JSON format. + type: object + phone: + maxLength: 31 + minLength: 1 + type: string + required: + - email + - name + title: UserRequest + type: object + PaginatedFavoriteList: + additionalProperties: false + example: + count: 123 + results: + - name: name + id: 0 + type: type + uri: uri + - name: name + id: 0 + type: type + uri: uri + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListFavorite" + type: array + title: PaginatedFavoriteList + type: object + PaginatedGrantList: + additionalProperties: false + example: + count: 123 + results: + - owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1210617418 + identity: 6 + roles: + - 1 + - 1 + policies: + - 5 + - 5 + id: 0 + - owner: true + expires: 2000-01-23T04:56:07.000+00:00 + account_id: 1210617418 + identity: 6 + roles: + - 1 + - 1 + policies: + - 5 + - 5 + id: 0 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListGrant" + type: array + title: PaginatedGrantList + type: object + PaginatedGroupList: + additionalProperties: false + example: + count: 123 + results: + - account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + - account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListGroup" + type: array + title: PaginatedGroupList + type: object + PaginatedServiceTokenList: + additionalProperties: false + example: + count: 123 + results: + - expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + - expires: 2000-01-23T04:56:07.000+00:00 + account_id: 6 + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + last_used: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + description: description + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListServiceToken" + type: array + title: PaginatedServiceTokenList + type: object + PaginatedUserList: + additionalProperties: false + example: + count: 123 + results: + - two_factor_enabled: true + preferences: + key: "" + created: 2000-01-23T04:56:07.000+00:00 + last_login: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + active: true + account_id: 6 + lockout: lockout + phone: phone + name: name + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + info: + key: "" + - two_factor_enabled: true + preferences: + key: "" + created: 2000-01-23T04:56:07.000+00:00 + last_login: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + active: true + account_id: 6 + lockout: lockout + phone: phone + name: name + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + info: + key: "" + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListUser" + type: array + title: PaginatedUserList + type: object + Namespace: + example: + name: name + created_at: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + name: + maxLength: 63 + minLength: 3 + type: string + created_at: + format: date-time + nullable: true + type: string + last_modified: + format: date-time + nullable: true + type: string + required: + - created_at + - last_modified + - name + type: object + NamespaceCreateRequest: + example: + name: name + properties: + name: + maxLength: 63 + minLength: 3 + type: string + required: + - name + type: object + NamespaceList: + example: + pagination: + has_previous: true + total_count: 146581297 + has_next: true + page: 80083 + total_pages: 596212 + page_size: 603 + results: + - name: name + created_at: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + - name: name + created_at: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + results: + items: + $ref: "#/components/schemas/Namespace" + type: array + pagination: + $ref: "#/components/schemas/Pagination" + required: + - pagination + - results + type: object + Pagination: + example: + has_previous: true + total_count: 146581297 + has_next: true + page: 80083 + total_pages: 596212 + page_size: 603 + properties: + page: + format: int64 + maximum: 999999 + minimum: 1 + type: integer + page_size: + format: int64 + maximum: 1000 + minimum: 1 + type: integer + total_count: + format: int64 + maximum: 999999999 + minimum: 0 + type: integer + total_pages: + format: int64 + maximum: 999999 + minimum: 0 + type: integer + has_next: + type: boolean + has_previous: + type: boolean + required: + - has_next + - has_previous + - page + - page_size + - total_count + - total_pages + type: object + Publisher: + additionalProperties: false + description: |- + Serializer for Publisher model in the public API. + + Handles validation and serialization of Publisher instances for publishers + to manage their own information. + example: + created: 2000-01-23T04:56:07.000+00:00 + vendor: true + organization_id: 6 + last_editor: last_editor + icon: https://openapi-generator.tech + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + icon: + format: uri + maxLength: 200 + type: string + organization_id: + format: int64 + type: integer + created: + format: date-time + type: string + last_modified: + format: date-time + type: string + last_editor: + type: string + vendor: + type: boolean + required: + - created + - icon + - id + - last_editor + - last_modified + - organization_id + - vendor + title: Publisher + type: object + PublisherRequest: + additionalProperties: false + description: |- + Serializer for Publisher model in the public API. + + Handles validation and serialization of Publisher instances for publishers + to manage their own information. + example: + icon: https://openapi-generator.tech + properties: + icon: + format: uri + maxLength: 200 + minLength: 1 + type: string + required: + - icon + title: PublisherRequest + type: object + ResponsePublisher: + additionalProperties: false + example: + data: + created: 2000-01-23T04:56:07.000+00:00 + vendor: true + organization_id: 6 + last_editor: last_editor + icon: https://openapi-generator.tech + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + description: |- + * `pending` - pending + * `executed` - executed + title: StateEnum + type: string + x-extensible-enum: + - pending + - executed + data: + $ref: "#/components/schemas/Publisher" + required: + - data + - state + title: ResponsePublisher + type: object + ResponseRetrievePublisher: + additionalProperties: false + example: + data: + created: 2000-01-23T04:56:07.000+00:00 + vendor: true + organization_id: 6 + last_editor: last_editor + icon: https://openapi-generator.tech + id: 0 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: "#/components/schemas/Publisher" + required: + - data + title: ResponseRetrievePublisher + type: object + AggregatedField: + example: + variable: variable + aggregation: aggregation + properties: + aggregation: + maxLength: 255 + minLength: 1 + type: string + variable: + maxLength: 255 + minLength: 1 + type: string + required: + - aggregation + - variable + type: object + AggregatedFieldRequest: + example: + variable: variable + aggregation: aggregation + properties: + aggregation: + maxLength: 255 + minLength: 1 + type: string + variable: + maxLength: 255 + minLength: 1 + type: string + required: + - aggregation + - variable + type: object + BaseQuery: + description: |- + Base Serializer for validating and processing queries associated with reports. + Contains generic validations applied to all types of reports. + example: + max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + dataset: + maxLength: 150 + minLength: 1 + type: string + filters: + additionalProperties: {} + type: object + group_by: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + limit: + format: int64 + maximum: 10000 + minimum: 0 + type: integer + aggregated_fields: + items: + $ref: "#/components/schemas/AggregatedField" + type: array + calculated_fields: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + order_direction: + description: |- + * `asc` - Ascending order, sets the order from smallest to largest. + * `desc` - Descending order, sets the order from largest to smallest. + type: string + x-extensible-enum: + - asc + - desc + top_x: + type: boolean + max_y_axis: + format: int64 + maximum: 2147483647 + minimum: 1 + nullable: true + type: integer + required: + - dataset + - id + - limit + - order_direction + type: object + BaseQueryRequest: + description: |- + Base Serializer for validating and processing queries associated with reports. + Contains generic validations applied to all types of reports. + example: + max_y_axis: 1294386359 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 800 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + properties: + dataset: + maxLength: 150 + minLength: 1 + type: string + filters: + additionalProperties: {} + type: object + group_by: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + limit: + format: int64 + maximum: 10000 + minimum: 0 + type: integer + aggregated_fields: + items: + $ref: "#/components/schemas/AggregatedFieldRequest" + type: array + calculated_fields: + items: + maxLength: 255 + minLength: 1 + type: string + type: array + order_direction: + description: |- + * `asc` - Ascending order, sets the order from smallest to largest. + * `desc` - Descending order, sets the order from largest to smallest. + type: string + x-extensible-enum: + - asc + - desc + top_x: + type: boolean + max_y_axis: + format: int64 + maximum: 2147483647 + minimum: 1 + nullable: true + type: integer + required: + - dataset + - limit + - order_direction + type: object + Dashboard: + example: + scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + folder_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - folder_id + - id + - name + - scope + type: object + DashboardRequest: + example: + scope: scope + name: name + properties: + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + required: + - name + - scope + type: object + Folder: + example: + scope: scope + name: name + id: 171976545 + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + required: + - id + - name + - scope + type: object + FolderRequest: + example: + scope: scope + name: name + properties: + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + required: + - name + - scope + type: object + LibraryReportRequest: + example: + aggregation_type: aggregation_type + library: true + comparison_type: comparison_type + x_axis: x_axis + scope: scope + name: name + description: description + rotated: true + help_center_path: help_center_path + type: type + queries: + - max_y_axis: 1294386359 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 800 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1294386359 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 800 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + properties: + description: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). + Ideal for highlighting a single numeric value in a visually striking way. + * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. + * `map` - Map report type, used for geographic analysis, visualization of demographic data, + monitoring of events in different locations. + * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, + frequency distribution analysis, ideal for highlighting highest or lowest values. + * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, + visualizing percentages. Ideal for showing the distribution of a data set into parts. + type: string + x-extensible-enum: + - big-numbers + - line + - map + - ordered-bar + - pie + x_axis: + maxLength: 100 + minLength: 1 + type: string + aggregation_type: + description: |- + * `avg` - Aggregation by average. + * `sum` - Aggregation by sum. + type: string + x-extensible-enum: + - avg + - sum + data_unit: + description: |- + * `bits-per-second` - Sets the data unit to bits per second. + * `bytes` - Sets the data unit to bytes. + * `count` - Sets the data unit to counter. + * `per-second` - Sets the data unit to per second. + * `percentage` - Sets the data unit to percentage. + type: string + x-extensible-enum: + - bits-per-second + - bytes + - count + - per-second + - percentage + queries: + items: + $ref: "#/components/schemas/BaseQueryRequest" + type: array + library: + type: boolean + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + rotated: + type: boolean + comparison_type: + description: |- + * `inverse` - The lower the value, the better the result or performance. + * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. + * `regular` - The higher the value, the better the result or performance. + type: string + x-extensible-enum: + - inverse + - neutral + - regular + help_center_path: + maxLength: 255 + minLength: 1 + nullable: true + type: string + required: + - aggregation_type + - data_unit + - description + - name + - queries + - scope + - type + type: object + Order: + example: + order: + - 171976545 + - 171976545 + properties: + order: + items: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: array + required: + - order + type: object + OrderRequest: + example: + order: + - 171976545 + - 171976545 + properties: + order: + items: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + type: array + required: + - order + type: object + PatchedDashboardRequest: + example: + scope: scope + name: name + properties: + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + type: object + PatchedFolderRequest: + example: + scope: scope + name: name + properties: + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + type: object + RecommendationRequest: + example: + dashboard_id: 171976545 + properties: + dashboard_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + writeOnly: true + required: + - dashboard_id + type: object + Report: + example: + comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + description: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). + Ideal for highlighting a single numeric value in a visually striking way. + * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. + * `map` - Map report type, used for geographic analysis, visualization of demographic data, + monitoring of events in different locations. + * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, + frequency distribution analysis, ideal for highlighting highest or lowest values. + * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, + visualizing percentages. Ideal for showing the distribution of a data set into parts. + type: string + x-extensible-enum: + - big-numbers + - line + - map + - ordered-bar + - pie + x_axis: + maxLength: 100 + minLength: 1 + type: string + aggregation_type: + description: |- + * `avg` - Aggregation by average. + * `sum` - Aggregation by sum. + type: string + x-extensible-enum: + - avg + - sum + data_unit: + description: |- + * `bits-per-second` - Sets the data unit to bits per second. + * `bytes` - Sets the data unit to bytes. + * `count` - Sets the data unit to counter. + * `per-second` - Sets the data unit to per second. + * `percentage` - Sets the data unit to percentage. + type: string + x-extensible-enum: + - bits-per-second + - bytes + - count + - per-second + - percentage + queries: + items: + $ref: "#/components/schemas/BaseQuery" + type: array + order: + minLength: 1 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + rotated: + type: boolean + comparison_type: + description: |- + * `inverse` - The lower the value, the better the result or performance. + * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. + * `regular` - The higher the value, the better the result or performance. + type: string + x-extensible-enum: + - inverse + - neutral + - regular + help_center_path: + maxLength: 255 + minLength: 1 + nullable: true + type: string + library: + type: boolean + required: + - aggregation_type + - data_unit + - description + - id + - name + - order + - queries + - type + type: object + ReportRequest: + example: + aggregation_type: aggregation_type + library: true + comparison_type: comparison_type + x_axis: x_axis + columns: 1 + name: name + description: description + rotated: true + help_center_path: help_center_path + type: type + queries: + - max_y_axis: 1294386359 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 800 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1294386359 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 800 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + properties: + description: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). + Ideal for highlighting a single numeric value in a visually striking way. + * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. + * `map` - Map report type, used for geographic analysis, visualization of demographic data, + monitoring of events in different locations. + * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, + frequency distribution analysis, ideal for highlighting highest or lowest values. + * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, + visualizing percentages. Ideal for showing the distribution of a data set into parts. + type: string + x-extensible-enum: + - big-numbers + - line + - map + - ordered-bar + - pie + x_axis: + maxLength: 100 + minLength: 1 + type: string + aggregation_type: + description: |- + * `avg` - Aggregation by average. + * `sum` - Aggregation by sum. + type: string + x-extensible-enum: + - avg + - sum + data_unit: + description: |- + * `bits-per-second` - Sets the data unit to bits per second. + * `bytes` - Sets the data unit to bytes. + * `count` - Sets the data unit to counter. + * `per-second` - Sets the data unit to per second. + * `percentage` - Sets the data unit to percentage. + type: string + x-extensible-enum: + - bits-per-second + - bytes + - count + - per-second + - percentage + queries: + items: + $ref: "#/components/schemas/BaseQueryRequest" + type: array + columns: + format: int64 + maximum: 12 + minimum: 1 + type: integer + writeOnly: true + name: + maxLength: 255 + minLength: 1 + type: string + rotated: + type: boolean + comparison_type: + description: |- + * `inverse` - The lower the value, the better the result or performance. + * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. + * `regular` - The higher the value, the better the result or performance. + type: string + x-extensible-enum: + - inverse + - neutral + - regular + help_center_path: + maxLength: 255 + minLength: 1 + nullable: true + type: string + library: + type: boolean + required: + - aggregation_type + - columns + - data_unit + - description + - name + - queries + - type + type: object + ResponseAsyncDashboard: + example: + data: + scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Dashboard" + required: + - data + type: object + ResponseAsyncFolder: + example: + data: + scope: scope + name: name + id: 171976545 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Folder" + required: + - data + type: object + ResponseAsyncOrder: + example: + data: + order: + - 171976545 + - 171976545 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Order" + required: + - data + type: object + ResponseAsyncReport: + example: + data: + comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Report" + required: + - data + type: object + ResponseAsyncRow: + example: + data: + id: 171976545 + title: title + order: 1294386359 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Row" + required: + - data + type: object + ResponseDashboard: + example: + data: + scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Dashboard" + required: + - data + type: object + ResponseDeleteDashboard: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseDeleteFolder: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseDeleteRecommendation: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseDeleteReport: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseDeleteRow: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseFolder: + example: + data: + scope: scope + name: name + id: 171976545 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Folder" + required: + - data + type: object + ResponseListDashboard: + example: + scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + folder_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - folder_id + - id + - name + - scope + type: object + ResponseListFolder: + example: + scope: scope + name: name + id: 171976545 + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + name: + maxLength: 255 + minLength: 1 + type: string + scope: + description: |- + * `azion` - Items that have Azion scope can be shared to any account that has access permission. + * `account` - Items that have Account scope can only be shared with account users. + * `user` - Items that have User scope will only be available to the account user. + type: string + x-extensible-enum: + - azion + - account + - user + required: + - id + - name + - scope + type: object + ResponseListReport: + example: + comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + description: + maxLength: 150 + minLength: 1 + type: string + type: + description: |- + * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). + Ideal for highlighting a single numeric value in a visually striking way. + * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. + * `map` - Map report type, used for geographic analysis, visualization of demographic data, + monitoring of events in different locations. + * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, + frequency distribution analysis, ideal for highlighting highest or lowest values. + * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, + visualizing percentages. Ideal for showing the distribution of a data set into parts. + type: string + x-extensible-enum: + - big-numbers + - line + - map + - ordered-bar + - pie + x_axis: + maxLength: 100 + minLength: 1 + type: string + aggregation_type: + description: |- + * `avg` - Aggregation by average. + * `sum` - Aggregation by sum. + type: string + x-extensible-enum: + - avg + - sum + data_unit: + description: |- + * `bits-per-second` - Sets the data unit to bits per second. + * `bytes` - Sets the data unit to bytes. + * `count` - Sets the data unit to counter. + * `per-second` - Sets the data unit to per second. + * `percentage` - Sets the data unit to percentage. + type: string + x-extensible-enum: + - bits-per-second + - bytes + - count + - per-second + - percentage + queries: + items: + $ref: "#/components/schemas/BaseQuery" + type: array + order: + minLength: 1 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + rotated: + type: boolean + comparison_type: + description: |- + * `inverse` - The lower the value, the better the result or performance. + * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. + * `regular` - The higher the value, the better the result or performance. + type: string + x-extensible-enum: + - inverse + - neutral + - regular + help_center_path: + maxLength: 255 + minLength: 1 + nullable: true + type: string + library: + type: boolean + required: + - aggregation_type + - data_unit + - description + - id + - name + - order + - queries + - type + type: object + ResponseListRow: + example: + id: 171976545 + title: title + order: 1294386359 + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + title: + maxLength: 255 + minLength: 1 + type: string + order: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - id + - order + - title + type: object + ResponseOrder: + example: + data: + order: + - 171976545 + - 171976545 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Order" + required: + - data + type: object + ResponseReport: + example: + data: + comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Report" + required: + - data + type: object + ResponseRetrieveDashboard: + example: + data: + scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + properties: + data: + $ref: "#/components/schemas/Dashboard" + required: + - data + type: object + ResponseRetrieveFolder: + example: + data: + scope: scope + name: name + id: 171976545 + properties: + data: + $ref: "#/components/schemas/Folder" + required: + - data + type: object + ResponseRetrieveReport: + example: + data: + comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + properties: + data: + $ref: "#/components/schemas/Report" + required: + - data + type: object + ResponseRetrieveRow: + example: + data: + id: 171976545 + title: title + order: 1294386359 + properties: + data: + $ref: "#/components/schemas/Row" + required: + - data + type: object + ResponseRow: + example: + data: + id: 171976545 + title: title + order: 1294386359 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Row" + required: + - data + type: object + Row: + example: + id: 171976545 + title: title + order: 1294386359 + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + title: + maxLength: 255 + minLength: 1 + type: string + order: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + required: + - id + - order + - title + type: object + RowRequest: + example: + title: title + properties: + title: + maxLength: 255 + minLength: 1 + type: string + required: + - title + type: object + PaginatedDashboardList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + - scope: scope + name: name + id: 171976545 + folder_id: 1294386359 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListDashboard" + type: array + type: object + PaginatedFolderList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - scope: scope + name: name + id: 171976545 + - scope: scope + name: name + id: 171976545 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListFolder" + type: array + type: object + PaginatedReportList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + - comparison_type: comparison_type + x_axis: x_axis + description: description + rotated: true + type: type + queries: + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + - max_y_axis: 1280358509 + calculated_fields: + - calculated_fields + - calculated_fields + limit: 1465 + top_x: true + group_by: + - group_by + - group_by + order_direction: order_direction + id: 1294386359 + filters: + key: "" + dataset: dataset + aggregated_fields: + - variable: variable + aggregation: aggregation + - variable: variable + aggregation: aggregation + data_unit: data_unit + aggregation_type: aggregation_type + library: true + name: name + help_center_path: help_center_path + id: 171976545 + order: order + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListReport" + type: array + type: object + PaginatedRowList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - id: 171976545 + title: title + order: 1294386359 + - id: 171976545 + title: title + order: 1294386359 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListRow" + type: array + type: object + Content: + additionalProperties: false + example: + content_type: content_type + last_editor: last_editor + name: name + id: 0 + content_hash: content_hash + last_modified: last_modified + properties: + id: + format: int64 + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + content_type: + maxLength: 50 + minLength: 1 + type: string + content_hash: + maxLength: 50 + minLength: 1 + type: string + last_editor: + type: string + last_modified: + type: string + required: + - content_hash + - content_type + - id + - last_editor + - last_modified + - name + title: Content + type: object + ContentRequest: + additionalProperties: false + example: + content_type: content_type + name: name + content_hash: content_hash + properties: + name: + maxLength: 50 + minLength: 1 + type: string + content_type: + maxLength: 50 + minLength: 1 + type: string + content_hash: + maxLength: 50 + minLength: 1 + type: string + required: + - content_hash + - content_type + - name + title: ContentRequest + type: object + NodeGroups: + additionalProperties: false + example: + name: name + active: true + id: 0 + ref_count: 6 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + type: string + ref_count: + format: int64 + type: integer + active: + type: boolean + required: + - id + - name + - ref_count + title: NodeGroups + type: object + NodeGroupsById: + additionalProperties: false + example: + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + type: string + required: + - id + title: NodeGroupsById + type: object + NodeGroupsByIdRequest: + additionalProperties: false + example: + node_group: 0 + name: name + properties: + name: + maxLength: 100 + minLength: 1 + type: string + node_group: + format: int64 + type: integer + writeOnly: true + title: NodeGroupsByIdRequest + type: object + NodeGroupsRequest: + additionalProperties: false + example: + name: name + active: true + properties: + name: + maxLength: 100 + minLength: 1 + type: string + active: + type: boolean + required: + - name + title: NodeGroupsRequest + type: object + NodeServiceBind: + additionalProperties: false + example: + service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + properties: + id: + format: int64 + type: integer + service_name: + maxLength: 50 + minLength: 1 + type: string + service_id: + format: int64 + type: integer + active: + type: boolean + last_editor: + type: string + last_modified: + type: string + required: + - active + - id + - last_editor + - last_modified + - service_id + - service_name + title: NodeServiceBind + type: object + NodeServices: + additionalProperties: false + example: + service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + properties: + id: + format: int64 + type: integer + service_name: + maxLength: 50 + minLength: 1 + type: string + service_id: + format: int64 + type: integer + active: + type: boolean + last_editor: + type: string + last_modified: + type: string + required: + - last_editor + - last_modified + - service_id + title: NodeServices + type: object + NodeServicesRequest: + additionalProperties: false + example: + service_name: service_name + service_id: 6 + active: true + id: 0 + properties: + id: + format: int64 + type: integer + service_name: + maxLength: 50 + minLength: 1 + type: string + service_id: + format: int64 + type: integer + active: + type: boolean + required: + - service_id + title: NodeServicesRequest + type: object + Nodes: + additionalProperties: false + example: + product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: last_modified + modules: "" + hash_id: hash_id + status: status + properties: + id: + format: int64 + type: integer + hash_id: + type: string + name: + maxLength: 50 + minLength: 1 + type: string + status: + description: |- + * `waiting_authorization` - waiting_authorization + * `authorized` - authorized + title: StatusEnum + type: string + x-extensible-enum: + - waiting_authorization + - authorized + active: + type: boolean + last_editor: + type: string + last_modified: + type: string + modules: {} + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - active + - hash_id + - id + - last_editor + - last_modified + - name + - product_version + - status + title: Nodes + type: object + NodesRequest: + additionalProperties: false + example: + name: name + modules: "" + status: status + properties: + name: + maxLength: 50 + minLength: 1 + type: string + status: + description: |- + * `waiting_authorization` - waiting_authorization + * `authorized` - authorized + title: StatusEnum + type: string + x-extensible-enum: + - waiting_authorization + - authorized + modules: {} + required: + - name + - status + title: NodesRequest + type: object + PaginatedNodeGroupsList: + additionalProperties: false + example: + count: 123 + results: + - name: name + active: true + id: 0 + ref_count: 6 + - name: name + active: true + id: 0 + ref_count: 6 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/NodeGroups" + type: array + title: PaginatedNodeGroupsList + type: object + PaginatedServiceResourceList: + additionalProperties: false + example: + count: 123 + results: + - content_type: content_type + is_template: true + last_editor: last_editor + name: name + file_owner: file_owner + active: true + file_group: file_group + id: 0 + content_hash: content_hash + ref_count: 6 + last_modified: last_modified + file_mode: file_mode + - content_type: content_type + is_template: true + last_editor: last_editor + name: name + file_owner: file_owner + active: true + file_group: file_group + id: 0 + content_hash: content_hash + ref_count: 6 + last_modified: last_modified + file_mode: file_mode + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ServiceResource" + type: array + title: PaginatedServiceResourceList + type: object + PatchedNodesRequest: + additionalProperties: false + example: + name: name + modules: "" + status: status + properties: + name: + maxLength: 50 + minLength: 1 + type: string + status: + description: |- + * `waiting_authorization` - waiting_authorization + * `authorized` - authorized + title: StatusEnum + type: string + x-extensible-enum: + - waiting_authorization + - authorized + modules: {} + title: PatchedNodesRequest + type: object + PatchedServicesRequest: + additionalProperties: false + example: + min_version: min_version + permissions: 0 + name: name + active: true + properties: + name: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + min_version: + maxLength: 50 + minLength: 1 + type: string + permissions: + format: int64 + type: integer + title: PatchedServicesRequest + type: object + ResponseAsyncDeleteNodeServiceBind: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteNodeServiceBind + type: object + ResponseAsyncDeleteNodes: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteNodes + type: object + ResponseAsyncDeleteServices: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeleteServices + type: object + ResponseAsyncNodeGroupsById: + additionalProperties: false + example: + data: + name: name + id: 0 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/NodeGroupsById" + required: + - data + title: ResponseAsyncNodeGroupsById + type: object + ResponseAsyncNodeServices: + additionalProperties: false + example: + data: + service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/NodeServices" + required: + - data + title: ResponseAsyncNodeServices + type: object + ResponseAsyncNodes: + additionalProperties: false + example: + data: + product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: last_modified + modules: "" + hash_id: hash_id + status: status + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Nodes" + required: + - data + title: ResponseAsyncNodes + type: object + ResponseAsyncServices: + additionalProperties: false + example: + data: + min_version: min_version + product_version: product_version + permissions: 6 + last_editor: last_editor + name: name + active: true + id: 0 + ref_count: 1 + last_modified: last_modified + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Services" + required: + - data + title: ResponseAsyncServices + type: object + ResponseListNodeGroupsById: + additionalProperties: false + example: + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + type: string + required: + - id + title: ResponseListNodeGroupsById + type: object + ResponseListNodeServices: + additionalProperties: false + example: + service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + properties: + id: + format: int64 + type: integer + service_name: + maxLength: 50 + minLength: 1 + type: string + service_id: + format: int64 + type: integer + active: + type: boolean + last_editor: + type: string + last_modified: + type: string + required: + - last_editor + - last_modified + - service_id + title: ResponseListNodeServices + type: object + ResponseListNodes: + additionalProperties: false + example: + product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: last_modified + modules: "" + hash_id: hash_id + status: status + properties: + id: + format: int64 + type: integer + hash_id: + type: string + name: + maxLength: 50 + minLength: 1 + type: string + status: + description: |- + * `waiting_authorization` - waiting_authorization + * `authorized` - authorized + title: StatusEnum + type: string + x-extensible-enum: + - waiting_authorization + - authorized + active: + type: boolean + last_editor: + type: string + last_modified: + type: string + modules: {} + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - active + - hash_id + - id + - last_editor + - last_modified + - name + - product_version + - status + title: ResponseListNodes + type: object + ResponseListServices: + additionalProperties: false + example: + min_version: min_version + product_version: product_version + permissions: 6 + last_editor: last_editor + name: name + active: true + id: 0 + ref_count: 1 + last_modified: last_modified + properties: + id: + format: int64 + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + min_version: + maxLength: 50 + minLength: 1 + type: string + permissions: + format: int64 + type: integer + last_editor: + type: string + last_modified: + type: string + ref_count: + format: int64 + type: integer + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - id + - last_editor + - last_modified + - product_version + - ref_count + title: ResponseListServices + type: object + ResponseRetrieveNodeServiceBind: + additionalProperties: false + example: + data: + service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + properties: + data: + $ref: "#/components/schemas/NodeServiceBind" + required: + - data + title: ResponseRetrieveNodeServiceBind + type: object + ResponseRetrieveNodes: + additionalProperties: false + example: + data: + product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: last_modified + modules: "" + hash_id: hash_id + status: status + properties: + data: + $ref: "#/components/schemas/Nodes" + required: + - data + title: ResponseRetrieveNodes + type: object + ResponseRetrieveServices: + additionalProperties: false + example: + data: + min_version: min_version + product_version: product_version + permissions: 6 + last_editor: last_editor + name: name + active: true + id: 0 + ref_count: 1 + last_modified: last_modified + properties: + data: + $ref: "#/components/schemas/Services" + required: + - data + title: ResponseRetrieveServices + type: object + ServiceResource: + additionalProperties: false + example: + content_type: content_type + is_template: true + last_editor: last_editor + name: name + file_owner: file_owner + active: true + file_group: file_group + id: 0 + content_hash: content_hash + ref_count: 6 + last_modified: last_modified + file_mode: file_mode + properties: + id: + format: int64 + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + content_hash: + maxLength: 150 + minLength: 1 + type: string + content_type: + maxLength: 50 + minLength: 1 + type: string + file_group: + maxLength: 50 + minLength: 1 + type: string + file_mode: + maxLength: 4 + minLength: 1 + type: string + file_owner: + maxLength: 50 + minLength: 1 + type: string + is_template: + type: boolean + active: + type: boolean + last_editor: + type: string + last_modified: + type: string + ref_count: + format: int64 + type: integer + required: + - active + - content_hash + - content_type + - file_group + - file_mode + - file_owner + - id + - is_template + - last_editor + - last_modified + - name + - ref_count + title: ServiceResource + type: object + ServiceResourceId: + additionalProperties: false + example: + is_template: true + last_editor: last_editor + active: true + file_owner: file_owner + trigger: null + content: content + file_mode: file_mode + content_type: content_type + name: name + file_group: file_group + id: 0 + content_hash: content_hash + last_modified: last_modified + properties: + id: + format: int64 + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + content_hash: + maxLength: 50 + minLength: 1 + type: string + content_type: + maxLength: 50 + minLength: 1 + type: string + trigger: + $ref: "#/components/schemas/ServiceResourceId_trigger" + content: + maxLength: 50 + minLength: 1 + type: string + is_template: + type: boolean + active: + type: boolean + file_group: + maxLength: 50 + minLength: 1 + type: string + file_mode: + maxLength: 50 + minLength: 1 + type: string + file_owner: + maxLength: 50 + minLength: 1 + type: string + last_editor: + type: string + last_modified: + type: string + required: + - active + - content_hash + - file_group + - file_mode + - file_owner + - id + - is_template + - last_editor + - last_modified + - name + title: ServiceResourceId + type: object + ServiceResourceIdRequest: + additionalProperties: false + example: + content_type: content_type + name: name + file_owner: file_owner + file_group: file_group + trigger: null + content: content + file_mode: file_mode + properties: + name: + maxLength: 50 + minLength: 1 + type: string + content_type: + maxLength: 50 + minLength: 1 + type: string + trigger: + $ref: "#/components/schemas/ServiceResourceId_trigger" + content: + maxLength: 50 + minLength: 1 + type: string + file_group: + maxLength: 50 + minLength: 1 + type: string + file_mode: + maxLength: 50 + minLength: 1 + type: string + file_owner: + maxLength: 50 + minLength: 1 + type: string + required: + - file_group + - file_mode + - file_owner + - name + title: ServiceResourceIdRequest + type: object + ServiceResourceRequest: + additionalProperties: false + example: + content_type: content_type + name: name + file_owner: file_owner + file_group: file_group + file_mode: file_mode + properties: + name: + maxLength: 50 + minLength: 1 + type: string + content_type: + maxLength: 50 + minLength: 1 + type: string + file_group: + maxLength: 50 + minLength: 1 + type: string + file_mode: + maxLength: 4 + minLength: 1 + type: string + file_owner: + maxLength: 50 + minLength: 1 + type: string + required: + - content_type + - file_group + - file_mode + - file_owner + - name + title: ServiceResourceRequest + type: object + Services: + additionalProperties: false + example: + min_version: min_version + product_version: product_version + permissions: 6 + last_editor: last_editor + name: name + active: true + id: 0 + ref_count: 1 + last_modified: last_modified + properties: + id: + format: int64 + type: integer + name: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + min_version: + maxLength: 50 + minLength: 1 + type: string + permissions: + format: int64 + type: integer + last_editor: + type: string + last_modified: + type: string + ref_count: + format: int64 + type: integer + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - id + - last_editor + - last_modified + - product_version + - ref_count + title: Services + type: object + ServicesRequest: + additionalProperties: false + example: + min_version: min_version + permissions: 0 + name: name + active: true + properties: + name: + maxLength: 50 + minLength: 1 + type: string + active: + type: boolean + min_version: + maxLength: 50 + minLength: 1 + type: string + permissions: + format: int64 + type: integer + title: ServicesRequest + type: object + TriggerEnum: + description: "* `` - \n* `install` - install\n* `uninstall` - uninstall\n* `reload`\ + \ - reload" + title: TriggerEnum + type: string + x-extensible-enum: + - install + - uninstall + - reload + PaginatedNodeGroupsByIdList: + additionalProperties: false + example: + count: 123 + results: + - name: name + id: 0 + - name: name + id: 0 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListNodeGroupsById" + type: array + title: PaginatedNodeGroupsByIdList + type: object + PaginatedNodeServicesList: + additionalProperties: false + example: + count: 123 + results: + - service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + - service_name: service_name + service_id: 6 + last_editor: last_editor + active: true + id: 0 + last_modified: last_modified + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListNodeServices" + type: array + title: PaginatedNodeServicesList + type: object + PaginatedNodesList: + additionalProperties: false + example: + count: 123 + results: + - product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: last_modified + modules: "" + hash_id: hash_id + status: status + - product_version: product_version + last_editor: last_editor + name: name + active: true + id: 0 + last_modified: last_modified + modules: "" + hash_id: hash_id + status: status + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListNodes" + type: array + title: PaginatedNodesList + type: object + PaginatedServicesList: + additionalProperties: false + example: + count: 123 + results: + - min_version: min_version + product_version: product_version + permissions: 6 + last_editor: last_editor + name: name + active: true + id: 0 + ref_count: 1 + last_modified: last_modified + - min_version: min_version + product_version: product_version + permissions: 6 + last_editor: last_editor + name: name + active: true + id: 0 + ref_count: 1 + last_modified: last_modified + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListServices" + type: array + title: PaginatedServicesList + type: object + Credit: + additionalProperties: false + example: + amount: amount + created: created + customer_stripe_id: customer_stripe_id + description: description + currency: currency + entry_type: entry_type + expiration_date: expiration_date + client_id: client_id + properties: + amount: + format: decimal + type: string + client_id: + maxLength: 255 + minLength: 1 + type: string + currency: + maxLength: 255 + minLength: 1 + type: string + entry_type: + maxLength: 255 + minLength: 1 + type: string + expiration_date: + maxLength: 255 + minLength: 1 + type: string + created: + maxLength: 255 + minLength: 1 + type: string + customer_stripe_id: + maxLength: 255 + minLength: 1 + type: string + description: + maxLength: 255 + minLength: 1 + type: string + required: + - amount + - client_id + - created + - currency + - customer_stripe_id + - description + - entry_type + - expiration_date + title: Credit + type: object + CreditRequest: + additionalProperties: false + example: + amount: amount + properties: + amount: + format: decimal + type: string + required: + - amount + title: CreditRequest + type: object + PaginatedPaymentHistoryList: + additionalProperties: false + example: + count: 123 + results: + - amount_with_currency: amount_with_currency + card_brand: card_brand + payment_method_details: payment_method_details + invoice_number: invoice_number + invoice_url: invoice_url + status: status + payment_due: 2000-01-23 + - amount_with_currency: amount_with_currency + card_brand: card_brand + payment_method_details: payment_method_details + invoice_number: invoice_number + invoice_url: invoice_url + status: status + payment_due: 2000-01-23 + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/PaymentHistory" + type: array + title: PaginatedPaymentHistoryList + type: object + PaginatedResponsePaymentMethodList: + additionalProperties: false + example: + count: 123 + results: + - data: + card_holder: card_holder + card_last_4_digits: card_last_4_digits + card_address_line2: card_address_line2 + card_address_line1: card_address_line1 + card_country: card_country + card_brand: card_brand + card_expiration_month: 7 + id: 0 + is_default: true + card_expiration_year: 2033 + card_id: card_id + card_address_zip: card_address_zip + state: state + - data: + card_holder: card_holder + card_last_4_digits: card_last_4_digits + card_address_line2: card_address_line2 + card_address_line1: card_address_line1 + card_country: card_country + card_brand: card_brand + card_expiration_month: 7 + id: 0 + is_default: true + card_expiration_year: 2033 + card_id: card_id + card_address_zip: card_address_zip + state: state + properties: + count: + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + results: + items: + $ref: "#/components/schemas/ResponsePaymentMethod" + type: array + title: PaginatedResponsePaymentMethodList + type: object + PatchedPartialUpdateRequest: + additionalProperties: false + example: + is_default: true + properties: + is_default: + type: boolean + title: PatchedPartialUpdateRequest + type: object + PaymentHistory: + additionalProperties: false + example: + amount_with_currency: amount_with_currency + card_brand: card_brand + payment_method_details: payment_method_details + invoice_number: invoice_number + invoice_url: invoice_url + status: status + payment_due: 2000-01-23 + properties: + amount_with_currency: + maxLength: 50 + minLength: 1 + type: string + invoice_number: + maxLength: 100 + minLength: 1 + nullable: true + type: string + invoice_url: + maxLength: 100 + minLength: 1 + nullable: true + type: string + status: + maxLength: 30 + minLength: 1 + type: string + payment_due: + format: date + type: string + card_brand: + maxLength: 50 + minLength: 1 + nullable: true + type: string + payment_method_details: + maxLength: 255 + minLength: 1 + nullable: true + type: string + required: + - amount_with_currency + - card_brand + - invoice_number + - invoice_url + - payment_due + - payment_method_details + - status + title: PaymentHistory + type: object + PaymentMethod: + additionalProperties: false + example: + card_holder: card_holder + card_last_4_digits: card_last_4_digits + card_address_line2: card_address_line2 + card_address_line1: card_address_line1 + card_country: card_country + card_brand: card_brand + card_expiration_month: 7 + id: 0 + is_default: true + card_expiration_year: 2033 + card_id: card_id + card_address_zip: card_address_zip + properties: + id: + format: int64 + type: integer + card_holder: + maxLength: 255 + minLength: 1 + type: string + card_brand: + maxLength: 50 + minLength: 1 + type: string + card_expiration_month: + format: int64 + maximum: 12 + minimum: 1 + type: integer + card_expiration_year: + format: int64 + maximum: 2099 + minimum: 2022 + type: integer + card_last_4_digits: + maxLength: 4 + minLength: 4 + type: string + card_address_zip: + maxLength: 20 + minLength: 1 + type: string + card_country: + maxLength: 100 + minLength: 1 + type: string + card_address_line1: + maxLength: 255 + minLength: 1 + type: string + card_address_line2: + maxLength: 255 + minLength: 1 + type: string + card_id: + maxLength: 255 + minLength: 1 + type: string + is_default: + type: boolean + required: + - card_address_zip + - card_brand + - card_country + - card_expiration_month + - card_expiration_year + - card_holder + - card_id + - card_last_4_digits + - id + title: PaymentMethod + type: object + PaymentMethodRequest: + additionalProperties: false + example: + card_holder: card_holder + card_last_4_digits: card_last_4_digits + card_address_line2: card_address_line2 + card_address_line1: card_address_line1 + card_country: card_country + stripe_token: stripe_token + card_brand: card_brand + card_expiration_month: 1 + is_default: true + card_expiration_year: 2068 + card_id: card_id + card_address_zip: card_address_zip + properties: + card_holder: + maxLength: 255 + minLength: 1 + type: string + card_brand: + maxLength: 50 + minLength: 1 + type: string + card_expiration_month: + format: int64 + maximum: 12 + minimum: 1 + type: integer + card_expiration_year: + format: int64 + maximum: 2099 + minimum: 2022 + type: integer + card_last_4_digits: + maxLength: 4 + minLength: 4 + type: string + card_address_zip: + maxLength: 20 + minLength: 1 + type: string + card_country: + maxLength: 100 + minLength: 1 + type: string + card_address_line1: + maxLength: 255 + minLength: 1 + type: string + card_address_line2: + maxLength: 255 + minLength: 1 + type: string + stripe_token: + maxLength: 255 + minLength: 1 + type: string + writeOnly: true + card_id: + maxLength: 255 + minLength: 1 + type: string + is_default: + type: boolean + required: + - card_address_zip + - card_brand + - card_country + - card_expiration_month + - card_expiration_year + - card_holder + - card_id + - card_last_4_digits + - stripe_token + title: PaymentMethodRequest + type: object + ResponseAsyncCredit: + additionalProperties: false + example: + data: + amount: amount + created: created + customer_stripe_id: customer_stripe_id + description: description + currency: currency + entry_type: entry_type + expiration_date: expiration_date + client_id: client_id + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Credit" + required: + - data + title: ResponseAsyncCredit + type: object + ResponseAsyncDeletePaymentMethod: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseAsyncDeletePaymentMethod + type: object + ResponseAsyncPaymentMethod: + additionalProperties: false + example: + data: + card_holder: card_holder + card_last_4_digits: card_last_4_digits + card_address_line2: card_address_line2 + card_address_line1: card_address_line1 + card_country: card_country + card_brand: card_brand + card_expiration_month: 7 + id: 0 + is_default: true + card_expiration_year: 2033 + card_id: card_id + card_address_zip: card_address_zip + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/PaymentMethod" + required: + - data + title: ResponseAsyncPaymentMethod + type: object + ResponseCredit: + additionalProperties: false + example: + data: + amount: amount + created: created + customer_stripe_id: customer_stripe_id + description: description + currency: currency + entry_type: entry_type + expiration_date: expiration_date + client_id: client_id + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Credit" + required: + - data + title: ResponseCredit + type: object + ResponseDeletePaymentMethod: + additionalProperties: false + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + title: ResponseDeletePaymentMethod + type: object + ResponsePaymentMethod: + additionalProperties: false + example: + data: + card_holder: card_holder + card_last_4_digits: card_last_4_digits + card_address_line2: card_address_line2 + card_address_line1: card_address_line1 + card_country: card_country + card_brand: card_brand + card_expiration_month: 7 + id: 0 + is_default: true + card_expiration_year: 2033 + card_id: card_id + card_address_zip: card_address_zip + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/PaymentMethod" + required: + - data + title: ResponsePaymentMethod + type: object + Bucket: + example: + product_version: product_version + workloads_access: workloads_access + last_editor: last_editor + name: name + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + name: + maxLength: 63 + minLength: 6 + type: string + workloads_access: + description: |- + * `read_only` - read_only + * `read_write` - read_write + * `restricted` - restricted + type: string + x-extensible-enum: + - read_only + - read_write + - restricted + last_editor: + type: string + last_modified: + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - last_editor + - last_modified + - name + - product_version + - workloads_access + type: object + BucketCreate: + example: + product_version: product_version + workloads_access: workloads_access + last_editor: last_editor + name: name + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + name: + maxLength: 63 + minLength: 6 + type: string + workloads_access: + description: |- + * `read_only` - read_only + * `read_write` - read_write + * `restricted` - restricted + type: string + x-extensible-enum: + - read_only + - read_write + - restricted + last_editor: + type: string + last_modified: + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 3 + type: string + required: + - last_editor + - last_modified + - name + - product_version + - workloads_access + type: object + BucketCreateRequest: + example: + workloads_access: workloads_access + name: name + properties: + name: + maxLength: 63 + minLength: 6 + type: string + workloads_access: + description: |- + * `read_only` - read_only + * `read_write` - read_write + * `restricted` - restricted + type: string + x-extensible-enum: + - read_only + - read_write + - restricted + required: + - name + - workloads_access + type: object + BucketCreateResponse: + example: + data: + product_version: product_version + workloads_access: workloads_access + last_editor: last_editor + name: name + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/BucketCreate" + required: + - data + type: object + BucketObject: + example: + size: 0 + is_folder: true + last_modified: 2000-01-23T04:56:07.000+00:00 + key: key + properties: + key: + type: string + last_modified: + format: date-time + type: string + size: + description: Size of the object in bytes + format: int64 + type: integer + is_folder: + description: Whether this entry represents a folder + type: boolean + required: + - is_folder + - key + - last_modified + - size + type: object + Credential: + example: + secret_key: secret_key + capabilities: + - capabilities + - capabilities + access_key: access_key + buckets: + - buckets + - buckets + last_editor: last_editor + name: name + expiration_date: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + name: + maxLength: 100 + minLength: 1 + type: string + access_key: + type: string + secret_key: + type: string + capabilities: + items: + type: string + x-extensible-enum: + - listFiles + - readFiles + - writeFiles + - deleteFiles + - listAllBucketNames + - listBuckets + type: array + buckets: + items: + type: string + type: array + expiration_date: + format: date-time + type: string + last_editor: + nullable: true + type: string + last_modified: + format: date-time + type: string + required: + - access_key + - buckets + - capabilities + - last_editor + - last_modified + - name + - secret_key + type: object + CredentialCreateRequest: + example: + capabilities: + - capabilities + - capabilities + buckets: + - buckets + - buckets + name: name + expiration_date: 2000-01-23T04:56:07.000+00:00 + properties: + name: + maxLength: 100 + minLength: 1 + type: string + capabilities: + items: + type: string + x-extensible-enum: + - listFiles + - readFiles + - writeFiles + - deleteFiles + - listAllBucketNames + - listBuckets + type: array + buckets: + description: List of bucket names to associate with this credential. + items: + maxLength: 63 + minLength: 6 + type: string + type: array + expiration_date: + format: date-time + type: string + required: + - capabilities + - name + type: object + CredentialResponse: + example: + data: + secret_key: secret_key + capabilities: + - capabilities + - capabilities + access_key: access_key + buckets: + - buckets + - buckets + last_editor: last_editor + name: name + expiration_date: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Credential" + required: + - data + type: object + ObjectResponseAsyncData: + example: + object_key: object_key + properties: + object_key: + maxLength: 1024 + minLength: 1 + type: string + required: + - object_key + type: object + ObjectResponseData: + example: + object_key: object_key + properties: + object_key: + maxLength: 1024 + minLength: 1 + type: string + required: + - object_key + type: object + PaginatedBucketList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + workloads_access: workloads_access + last_editor: last_editor + name: name + last_modified: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + workloads_access: workloads_access + last_editor: last_editor + name: name + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Bucket" + type: array + type: object + PaginatedCredentialList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - secret_key: secret_key + capabilities: + - capabilities + - capabilities + access_key: access_key + buckets: + - buckets + - buckets + last_editor: last_editor + name: name + expiration_date: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + - secret_key: secret_key + capabilities: + - capabilities + - capabilities + access_key: access_key + buckets: + - buckets + - buckets + last_editor: last_editor + name: name + expiration_date: 2000-01-23T04:56:07.000+00:00 + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Credential" + type: array + type: object + PatchedBucketRequest: + example: + workloads_access: workloads_access + properties: + workloads_access: + description: |- + * `read_only` - read_only + * `read_write` - read_write + * `restricted` - restricted + type: string + x-extensible-enum: + - read_only + - read_write + - restricted + type: object + ResponseBucketObject: + example: + continuation_token: continuation_token + results: + - size: 0 + is_folder: true + last_modified: 2000-01-23T04:56:07.000+00:00 + key: key + - size: 0 + is_folder: true + last_modified: 2000-01-23T04:56:07.000+00:00 + key: key + properties: + continuation_token: + maxLength: 255 + minLength: 0 + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/BucketObject" + type: array + required: + - continuation_token + - results + type: object + SuccessObjectOperation: + example: + data: + object_key: object_key + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ObjectResponseData" + required: + - data + type: object + SuccessObjectOperationAsync: + example: + data: + object_key: object_key + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ObjectResponseAsyncData" + required: + - data + type: object + Certificate: + example: + product_version: product_version + csr: csr + last_editor: last_editor + certificate: certificate + active: true + private_key: private_key + key_algorithm: key_algorithm + type: type + issuer: issuer + status_detail: status_detail + managed: true + authority: authority + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + id: 0 + validity: validity + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + certificate: + maxLength: 600000 + minLength: 1 + nullable: true + type: string + private_key: + maxLength: 64000 + minLength: 1 + nullable: true + type: string + writeOnly: true + issuer: + nullable: true + type: string + subject_name: + items: + type: string + type: array + validity: + nullable: true + type: string + type: + description: |- + The value can't be changed after the certificate creation. + + * `certificate` - Certificate + * `trusted_ca_certificate` - Trusted CA Certificate + type: string + x-extensible-enum: + - certificate + - trusted_ca_certificate + managed: + type: boolean + status: + description: |- + * `challenge_verification` - Challenge Verification + * `active` - Active + * `pending` - Pending + * `failed` - Failed + type: string + x-extensible-enum: + - challenge_verification + - active + - pending + - failed + status_detail: + maxLength: 500 + minLength: 0 + type: string + csr: + nullable: true + type: string + challenge: + description: |- + * `dns` - Uses DNS to solve the ACME challenge. + * `http` - Uses HTTP to solve the ACME challenge. + type: string + x-extensible-enum: + - dns + - http + authority: + description: '* `lets_encrypt` - lets_encrypt' + type: string + x-extensible-enum: + - lets_encrypt + key_algorithm: + type: string + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + last_editor: + type: string + last_modified: + description: Timestamp of the last modification made to the certificate + content on the platform. + format: date-time + type: string + renewed_at: + description: Timestamp indicating when the managed certificate was renewed + on our platform. + format: date-time + nullable: true + type: string + required: + - authority + - challenge + - csr + - id + - issuer + - key_algorithm + - last_editor + - last_modified + - managed + - name + - product_version + - renewed_at + - status + - status_detail + - subject_name + - validity + type: object + CertificateRequest: + example: + product_version: product_version + source_certificate: 1294386359 + csr: csr + last_editor: last_editor + certificate: certificate + active: true + private_key: private_key + key_algorithm: key_algorithm + type: type + alternative_names: + - alternative_names + - alternative_names + issuer: issuer + status_detail: status_detail + managed: true + authority: authority + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + id: 0 + validity: validity + common_name: common_name + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + certificate: + maxLength: 600000 + minLength: 1 + nullable: true + type: string + private_key: + maxLength: 64000 + minLength: 1 + nullable: true + type: string + writeOnly: true + issuer: + nullable: true + type: string + subject_name: + items: + type: string + type: array + validity: + nullable: true + type: string + type: + description: |- + The value can't be changed after the certificate creation. + + * `certificate` - Certificate + * `trusted_ca_certificate` - Trusted CA Certificate + type: string + x-extensible-enum: + - certificate + - trusted_ca_certificate + managed: + type: boolean + status: + description: |- + * `challenge_verification` - Challenge Verification + * `active` - Active + * `pending` - Pending + * `failed` - Failed + type: string + x-extensible-enum: + - challenge_verification + - active + - pending + - failed + status_detail: + maxLength: 500 + minLength: 0 + type: string + csr: + nullable: true + type: string + challenge: + description: |- + * `dns` - Uses DNS to solve the ACME challenge. + * `http` - Uses HTTP to solve the ACME challenge. + type: string + x-extensible-enum: + - dns + - http + authority: + description: '* `lets_encrypt` - lets_encrypt' + type: string + x-extensible-enum: + - lets_encrypt + key_algorithm: + description: |- + * `rsa_2048` - 2048-bit RSA + * `rsa_4096` - 4096-bit RSA + * `ecc_384` - 384-bit Prime Field Curve + type: string + x-extensible-enum: + - rsa_2048 + - rsa_4096 + - ecc_384 + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + last_editor: + type: string + last_modified: + description: Timestamp of the last modification made to the certificate + content on the platform. + format: date-time + type: string + renewed_at: + description: Timestamp indicating when the managed certificate was renewed + on our platform. + format: date-time + nullable: true + type: string + common_name: + maxLength: 64 + minLength: 1 + type: string + writeOnly: true + alternative_names: + items: + maxLength: 250 + minLength: 1 + type: string + type: array + writeOnly: true + source_certificate: + format: int64 + maximum: 2147483647 + minimum: 1 + nullable: true + type: integer + writeOnly: true + required: + - authority + - challenge + - common_name + - csr + - id + - issuer + - last_editor + - last_modified + - managed + - name + - product_version + - renewed_at + - status + - status_detail + - subject_name + - validity + type: object + CertificateResponse: + example: + data: + product_version: product_version + csr: csr + last_editor: last_editor + certificate: certificate + active: true + private_key: private_key + key_algorithm: key_algorithm + type: type + issuer: issuer + status_detail: status_detail + managed: true + authority: authority + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + id: 0 + validity: validity + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Certificate" + required: + - data + type: object + CertificateRevocationList: + example: + product_version: product_version + last_editor: last_editor + last_update: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + id: 0 + crl: crl + last_modified: 2000-01-23T04:56:07.000+00:00 + issuer: issuer + next_update: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + active: + description: Indicates if the certificate revocation list is active. This + field cannot be set to false. + type: boolean + last_editor: + type: string + last_modified: + description: Timestamp of the last modification made to the certificate + content on the platform. + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 3 + type: string + issuer: + minLength: 1 + type: string + last_update: + description: Timestamp of the last update issued by the certification revocation + list issuer. + format: date-time + type: string + next_update: + description: Timestamp of the next scheduled update from the certification + revocation list issuer. + format: date-time + type: string + crl: + maxLength: 30720000 + minLength: 1 + type: string + required: + - crl + - id + - issuer + - last_editor + - last_modified + - last_update + - name + - next_update + - product_version + type: object + CertificateRevocationListResponse: + example: + data: + product_version: product_version + last_editor: last_editor + last_update: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + id: 0 + crl: crl + last_modified: 2000-01-23T04:56:07.000+00:00 + issuer: issuer + next_update: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/CertificateRevocationList" + required: + - data + type: object + CertificateSigningRequest: + example: + country: country + csr: csr + certificate: certificate + type: type + alternative_names: + - alternative_names + - alternative_names + issuer: issuer + organization_unity: organization_unity + managed: true + id: 0 + state: state + common_name: common_name + last_modified: 2000-01-23T04:56:07.000+00:00 + email: email + product_version: product_version + last_editor: last_editor + locality: locality + active: true + private_key: private_key + key_algorithm: key_algorithm + status_detail: status_detail + authority: authority + organization: organization + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + validity: validity + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + certificate: + maxLength: 600000 + minLength: 1 + nullable: true + type: string + private_key: + maxLength: 64000 + minLength: 1 + nullable: true + type: string + writeOnly: true + issuer: + nullable: true + type: string + subject_name: + items: + type: string + type: array + validity: + nullable: true + type: string + type: + description: |- + The value can't be changed after the certificate creation. + + * `certificate` - Certificate + * `trusted_ca_certificate` - Trusted CA Certificate + type: string + x-extensible-enum: + - certificate + - trusted_ca_certificate + managed: + type: boolean + status: + description: |- + * `challenge_verification` - Challenge Verification + * `active` - Active + * `pending` - Pending + * `failed` - Failed + type: string + x-extensible-enum: + - challenge_verification + - active + - pending + - failed + status_detail: + maxLength: 500 + minLength: 0 + type: string + csr: + nullable: true + type: string + challenge: + description: |- + * `dns` - Uses DNS to solve the ACME challenge. + * `http` - Uses HTTP to solve the ACME challenge. + type: string + x-extensible-enum: + - dns + - http + authority: + description: '* `lets_encrypt` - lets_encrypt' + type: string + x-extensible-enum: + - lets_encrypt + key_algorithm: + description: |- + * `rsa_2048` - 2048-bit RSA + * `rsa_4096` - 4096-bit RSA + * `ecc_384` - 384-bit Prime Field Curve + type: string + x-extensible-enum: + - rsa_2048 + - rsa_4096 + - ecc_384 + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + last_editor: + type: string + last_modified: + description: Timestamp of the last modification made to the certificate + content on the platform. + format: date-time + type: string + renewed_at: + description: Timestamp indicating when the managed certificate was renewed + on our platform. + format: date-time + nullable: true + type: string + common_name: + maxLength: 250 + minLength: 1 + type: string + writeOnly: true + alternative_names: + items: + maxLength: 250 + minLength: 1 + type: string + type: array + writeOnly: true + country: + maxLength: 2 + minLength: 2 + type: string + writeOnly: true + state: + maxLength: 250 + minLength: 1 + type: string + writeOnly: true + locality: + maxLength: 250 + minLength: 1 + type: string + writeOnly: true + organization: + maxLength: 250 + minLength: 1 + type: string + writeOnly: true + organization_unity: + maxLength: 250 + minLength: 1 + type: string + writeOnly: true + email: + format: email + type: string + writeOnly: true + required: + - authority + - challenge + - common_name + - country + - csr + - email + - id + - issuer + - last_editor + - last_modified + - locality + - managed + - name + - organization + - organization_unity + - product_version + - renewed_at + - state + - status + - status_detail + - subject_name + - validity + type: object + PaginatedCertificateList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + csr: csr + last_editor: last_editor + certificate: certificate + active: true + private_key: private_key + key_algorithm: key_algorithm + type: type + issuer: issuer + status_detail: status_detail + managed: true + authority: authority + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + id: 0 + validity: validity + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + csr: csr + last_editor: last_editor + certificate: certificate + active: true + private_key: private_key + key_algorithm: key_algorithm + type: type + issuer: issuer + status_detail: status_detail + managed: true + authority: authority + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + id: 0 + validity: validity + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/Certificate" + type: array + type: object + PatchedCertificate: + example: + product_version: product_version + csr: csr + last_editor: last_editor + certificate: certificate + active: true + private_key: private_key + key_algorithm: key_algorithm + type: type + issuer: issuer + status_detail: status_detail + managed: true + authority: authority + name: name + subject_name: + - subject_name + - subject_name + challenge: challenge + id: 0 + validity: validity + last_modified: 2000-01-23T04:56:07.000+00:00 + status: status + renewed_at: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + certificate: + maxLength: 600000 + minLength: 1 + nullable: true + type: string + private_key: + maxLength: 64000 + minLength: 1 + nullable: true + type: string + writeOnly: true + issuer: + nullable: true + type: string + subject_name: + items: + type: string + type: array + validity: + nullable: true + type: string + type: + description: |- + The value can't be changed after the certificate creation. + + * `certificate` - Certificate + * `trusted_ca_certificate` - Trusted CA Certificate + type: string + x-extensible-enum: + - certificate + - trusted_ca_certificate + managed: + type: boolean + status: + description: |- + * `challenge_verification` - Challenge Verification + * `active` - Active + * `pending` - Pending + * `failed` - Failed + type: string + x-extensible-enum: + - challenge_verification + - active + - pending + - failed + status_detail: + maxLength: 500 + minLength: 0 + type: string + csr: + nullable: true + type: string + challenge: + description: |- + * `dns` - Uses DNS to solve the ACME challenge. + * `http` - Uses HTTP to solve the ACME challenge. + type: string + x-extensible-enum: + - dns + - http + authority: + description: '* `lets_encrypt` - lets_encrypt' + type: string + x-extensible-enum: + - lets_encrypt + key_algorithm: + type: string + active: + type: boolean + product_version: + maxLength: 50 + minLength: 3 + type: string + last_editor: + type: string + last_modified: + description: Timestamp of the last modification made to the certificate + content on the platform. + format: date-time + type: string + renewed_at: + description: Timestamp indicating when the managed certificate was renewed + on our platform. + format: date-time + nullable: true + type: string + type: object + PatchedCertificateRevocationList: + example: + product_version: product_version + last_editor: last_editor + last_update: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + id: 0 + crl: crl + last_modified: 2000-01-23T04:56:07.000+00:00 + issuer: issuer + next_update: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 250 + minLength: 1 + type: string + active: + description: Indicates if the certificate revocation list is active. This + field cannot be set to false. + type: boolean + last_editor: + type: string + last_modified: + description: Timestamp of the last modification made to the certificate + content on the platform. + format: date-time + type: string + product_version: + maxLength: 50 + minLength: 3 + type: string + issuer: + minLength: 1 + type: string + last_update: + description: Timestamp of the last update issued by the certification revocation + list issuer. + format: date-time + type: string + next_update: + description: Timestamp of the next scheduled update from the certification + revocation list issuer. + format: date-time + type: string + crl: + maxLength: 30720000 + minLength: 1 + type: string + type: object + PaginatedCertificateRevocationList: + example: + next: https://api.example.com/items?page=3 + previous: https://api.example.com/items?page=1 + count: 123 + total_pages: 10 + page: 1 + results: + - product_version: product_version + last_editor: last_editor + last_update: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + id: 0 + crl: crl + last_modified: 2000-01-23T04:56:07.000+00:00 + issuer: issuer + next_update: 2000-01-23T04:56:07.000+00:00 + - product_version: product_version + last_editor: last_editor + last_update: 2000-01-23T04:56:07.000+00:00 + name: name + active: true + id: 0 + crl: crl + last_modified: 2000-01-23T04:56:07.000+00:00 + issuer: issuer + next_update: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + next: + description: URL to the next page of results + example: https://api.example.com/items?page=3 + format: uri + nullable: true + type: string + previous: + description: URL to the previous page of results + example: https://api.example.com/items?page=1 + format: uri + nullable: true + type: string + results: + items: + $ref: "#/components/schemas/CertificateRevocationList" + type: array + type: object + BuildContextField: + example: + field: field + value: value + instantiation_data_path: instantiation_data_path + properties: + field: + maxLength: 255 + minLength: 1 + type: string + value: + maxLength: 255 + minLength: 1 + type: string + instantiation_data_path: + maxLength: 255 + minLength: 0 + type: string + required: + - field + - value + type: object + BuildContextFieldRequest: + example: + field: field + value: value + instantiation_data_path: instantiation_data_path + properties: + field: + maxLength: 255 + minLength: 1 + type: string + value: + maxLength: 255 + minLength: 1 + type: string + instantiation_data_path: + maxLength: 255 + minLength: 0 + type: string + required: + - field + - value + type: object + ContinuousDeployment: + example: + execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + repository: + maxLength: 100 + minLength: 1 + type: string + branch: + maxLength: 255 + minLength: 1 + type: string + build_context: + items: + $ref: "#/components/schemas/BuildContextField" + type: array + deploy_context: + additionalProperties: {} + type: object + integration: + allOf: + - $ref: "#/components/schemas/Integration" + execution_script: + allOf: + - $ref: "#/components/schemas/ExecutionScript" + created: + description: Created date of the continuous deployment. + format: date-time + nullable: true + type: string + last_editor: + description: Last editor of the continuous deployment. + nullable: true + type: string + last_modified: + description: Last modified date of the continuous deployment. + format: date-time + nullable: true + type: string + required: + - branch + - build_context + - created + - execution_script + - id + - integration + - last_editor + - last_modified + - name + - repository + type: object + ContinuousDeploymentRequest: + example: + integration_id: 171976545 + execution_script_id: 1294386359 + name: name + deploy_context: + key: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + repository: repository + branch: branch + properties: + name: + maxLength: 100 + minLength: 1 + type: string + repository: + maxLength: 100 + minLength: 1 + type: string + branch: + maxLength: 255 + minLength: 1 + type: string + build_context: + items: + $ref: "#/components/schemas/BuildContextFieldRequest" + type: array + deploy_context: + additionalProperties: {} + type: object + integration_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + writeOnly: true + execution_script_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + writeOnly: true + required: + - branch + - build_context + - execution_script_id + - integration_id + - name + - repository + type: object + Execution: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 0 + status: status + properties: + id: + format: int64 + type: integer + status: + maxLength: 50 + minLength: 1 + type: string + created_at: + format: date-time + type: string + updated_at: + format: date-time + type: string + required: + - created_at + - id + - status + - updated_at + type: object + ExecutionScript: + example: + template_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + template_uuid: + format: uuid + type: string + required: + - id + - name + - template_uuid + type: object + Executor: + example: + is_active: true + name: name + id: 171976545 + email: email + properties: + id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + name: + type: string + email: + format: email + maxLength: 254 + type: string + is_active: + type: boolean + required: + - email + - id + - is_active + - name + type: object + Integration: + example: + provider: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + scope: scope + id: 0 + scope_type: scope_type + properties: + id: + format: int64 + type: integer + scope: + type: string + scope_type: + type: string + provider: + $ref: "#/components/schemas/Platform" + required: + - id + - provider + - scope + - scope_type + type: object + Platform: + example: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + properties: + id: + type: string + name: + type: string + installation_url: + type: string + callback_url: + type: string + required: + - callback_url + - id + - installation_url + - name + type: object + ResponseAsyncContinuousDeployment: + example: + data: + execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ContinuousDeployment" + required: + - data + type: object + ResponseAsyncDeleteContinuousDeployment: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseAsyncDeleteIntegration: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseAsyncExecution: + example: + data: + updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 0 + status: status + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Execution" + required: + - data + type: object + ResponseAsyncExecutor: + example: + data: + is_active: true + name: name + id: 171976545 + email: email + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Executor" + required: + - data + type: object + ResponseContinuousDeployment: + example: + data: + execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/ContinuousDeployment" + required: + - data + type: object + ResponseDeleteContinuousDeployment: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseDeleteIntegration: + example: + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + type: object + ResponseExecution: + example: + data: + updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 0 + status: status + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Execution" + required: + - data + type: object + ResponseExecutor: + example: + data: + is_active: true + name: name + id: 171976545 + email: email + state: state + properties: + state: + maxLength: 8 + minLength: 1 + type: string + data: + $ref: "#/components/schemas/Executor" + required: + - data + type: object + ResponseListContinuousDeployment: + example: + execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + repository: + maxLength: 100 + minLength: 1 + type: string + branch: + maxLength: 255 + minLength: 1 + type: string + build_context: + items: + $ref: "#/components/schemas/BuildContextField" + type: array + deploy_context: + additionalProperties: {} + type: object + integration: + allOf: + - $ref: "#/components/schemas/Integration" + execution_script: + allOf: + - $ref: "#/components/schemas/ExecutionScript" + created: + description: Created date of the continuous deployment. + format: date-time + nullable: true + type: string + last_editor: + description: Last editor of the continuous deployment. + nullable: true + type: string + last_modified: + description: Last modified date of the continuous deployment. + format: date-time + nullable: true + type: string + required: + - branch + - build_context + - created + - execution_script + - id + - integration + - last_editor + - last_modified + - name + - repository + type: object + ResponseListExecution: + example: + updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 0 + status: status + properties: + id: + format: int64 + type: integer + status: + maxLength: 50 + minLength: 1 + type: string + created_at: + format: date-time + type: string + updated_at: + format: date-time + type: string + required: + - created_at + - id + - status + - updated_at + type: object + ResponseListExecutionScript: + example: + template_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 0 + properties: + id: + format: int64 + type: integer + name: + maxLength: 100 + minLength: 1 + type: string + template_uuid: + format: uuid + type: string + required: + - id + - name + - template_uuid + type: object + ResponseListIntegration: + example: + provider: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + scope: scope + id: 0 + scope_type: scope_type + properties: + id: + format: int64 + type: integer + scope: + type: string + scope_type: + type: string + provider: + $ref: "#/components/schemas/Platform" + required: + - id + - provider + - scope + - scope_type + type: object + ResponseListPlatform: + example: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + properties: + id: + type: string + name: + type: string + installation_url: + type: string + callback_url: + type: string + required: + - callback_url + - id + - installation_url + - name + type: object + ResponseListRepository: + example: + visibility: visibility + name: name + id: id + url: https://openapi-generator.tech + properties: + id: + maxLength: 255 + minLength: 1 + type: string + name: + maxLength: 255 + minLength: 1 + type: string + visibility: + maxLength: 50 + minLength: 1 + type: string + url: + format: uri + maxLength: 2048 + type: string + required: + - id + - name + - url + - visibility + type: object + ResponseRetrieveContinuousDeployment: + example: + data: + execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + properties: + data: + $ref: "#/components/schemas/ContinuousDeployment" + required: + - data + type: object + ResponseRetrieveExecutionScript: + example: + data: + template_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 0 + properties: + data: + $ref: "#/components/schemas/ExecutionScript" + required: + - data + type: object + ResponseRetrieveExecutor: + example: + data: + is_active: true + name: name + id: 171976545 + email: email + properties: + data: + $ref: "#/components/schemas/Executor" + required: + - data + type: object + ResponseRetrieveIntegration: + example: + data: + provider: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + scope: scope + id: 0 + scope_type: scope_type + properties: + data: + $ref: "#/components/schemas/Integration" + required: + - data + type: object + PatchContinuousDeploymentRequest: + example: + integration_id: 171976545 + execution_script_id: 1294386359 + name: name + deploy_context: + key: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + repository: repository + branch: branch + properties: + name: + maxLength: 100 + minLength: 1 + type: string + repository: + maxLength: 100 + minLength: 1 + type: string + branch: + maxLength: 255 + minLength: 1 + type: string + build_context: + items: + $ref: "#/components/schemas/BuildContextFieldRequest" + type: array + deploy_context: + additionalProperties: {} + type: object + integration_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + writeOnly: true + execution_script_id: + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + writeOnly: true + type: object + PaginatedContinuousDeploymentList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + - execution_script: "" + created: 2000-01-23T04:56:07.000+00:00 + last_editor: last_editor + name: name + deploy_context: + key: "" + integration: "" + build_context: + - field: field + value: value + instantiation_data_path: instantiation_data_path + - field: field + value: value + instantiation_data_path: instantiation_data_path + id: 0 + repository: repository + branch: branch + last_modified: 2000-01-23T04:56:07.000+00:00 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListContinuousDeployment" + type: array + type: object + PaginatedExecutionList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 0 + status: status + - updated_at: 2000-01-23T04:56:07.000+00:00 + created_at: 2000-01-23T04:56:07.000+00:00 + id: 0 + status: status + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListExecution" + type: array + type: object + PaginatedExecutionScriptList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - template_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 0 + - template_uuid: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 + name: name + id: 0 + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListExecutionScript" + type: array + type: object + PaginatedIntegrationList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - provider: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + scope: scope + id: 0 + scope_type: scope_type + - provider: + callback_url: callback_url + installation_url: installation_url + name: name + id: id + scope: scope + id: 0 + scope_type: scope_type + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListIntegration" + type: array + type: object + PaginatedPlatformList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - callback_url: callback_url + installation_url: installation_url + name: name + id: id + - callback_url: callback_url + installation_url: installation_url + name: name + id: id + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListPlatform" + type: array + type: object + PaginatedRepositoryList: + example: + count: 123 + total_pages: 10 + page: 1 + results: + - visibility: visibility + name: name + id: id + url: https://openapi-generator.tech + - visibility: visibility + name: name + id: id + url: https://openapi-generator.tech + page_size: 10 + properties: + count: + description: Total number of items + example: 123 + format: int64 + maximum: 2147483647 + minimum: 0 + type: integer + total_pages: + description: Total number of pages + example: 10 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page: + description: Current page number + example: 1 + format: int64 + maximum: 2147483647 + minimum: 1 + type: integer + page_size: + description: Number of items per page + example: 10 + format: int64 + maximum: 100 + minimum: 1 + type: integer + results: + items: + $ref: "#/components/schemas/ResponseListRepository" + type: array + type: object + AccountInfoRequest: + additionalProperties: false + properties: + industry: + description: "The industry type. Common values: Education, Energy, Finance,\ + \ Games, Health, Media, Public Sector, Retail, Services, Technology, Telecom,\ + \ Transportation, Other." + title: Industry + type: string + company_size: + description: The size of the company. Must be an integer greater than or + equal to 1. + format: int64 + minimum: 1 + type: integer + title: AccountInfoRequest + type: object + update_account_info_details_request: + properties: + info: + $ref: "#/components/schemas/AccountInfoRequest" + type: object + UserInfoRequest: + additionalProperties: false + properties: + job_function: + description: The job function. + title: JobFunctionEnum + type: string + x-extensible-enum: + - Software Developer + - DevOps Engineer + - Infrastructure Analyst + - Network Engineer + - Security Specialist + - Data Engineer + - AI/ML Engineer + - IoT Engineer + - Team Lead + - Other + title: UserInfoRequest + type: object + UpdateUserInfo_request: + properties: + info: + $ref: "#/components/schemas/UserInfoRequest" + type: object + Functions_azion_form: + description: | + JSON schema to be rendered as a json args form. + - azion_form must be a JSON schema. + - If there are no schema being informed, an empty JSON object will be used. + example: + type: object + properties: + domain: + type: string + title: Domain + description: Domain where the cookie will be valid (use '.' at the beginning + for subdomains) + max_age: + type: integer + title: Max Age (seconds) + description: Cookie lifetime in seconds + minimum: 1 + maximum: 31536000 + format: int64 + path: + type: string + title: Path + description: Path where the cookie will be valid + values: + type: array + title: Test Variations + description: List of A/B test variations with their respective weights + minItems: 2 + maxItems: 10 + items: + type: object + properties: + value: + type: string + title: Variation Value + description: Unique variation identifier + minLength: 1 + maxLength: 50 + weight: + type: integer + title: Weight + description: Variance weight (higher weight = higher probability) + minimum: 1 + maximum: 100 + format: int64 + required: + - value + - weight + additionalProperties: false + required: + - domain + - max_age + - path + - values + additionalProperties: false + properties: + arg: + type: object + type: object + TLSWorkload_minimum_version: + nullable: true + oneOf: + - $ref: "#/components/schemas/MinimumVersionEnum" + - $ref: "#/components/schemas/BlankEnum" + BehaviorArgsAttributes_value: + description: Value can be string or integer depending on the behavior type + oneOf: + - type: string + - format: int64 + maximum: 9223372036854775807 + minimum: 1 + type: integer + ServiceResourceId_trigger: + oneOf: + - $ref: "#/components/schemas/TriggerEnum" + - $ref: "#/components/schemas/BlankEnum" + securitySchemes: + BearerAuth: + description: |- + JWT Bearer Token authentication. Use the access token obtained from the login endpoint. + + **Format:** `Authorization: Bearer ` + + **How to obtain:** + 1. Call [`POST /account/auth/login`](#/operations/auth_user_login) with your credentials + 2. Use the returned `access_token` in subsequent requests + 3. Refresh the token using [`POST /account/auth/token`](#/operations/auth_token_create) before expiration + + **Example:** + ``` + Authorization: Bearer eyJhbGciOiJIUzI1NiIs... + ``` + scheme: bearer + type: http + TokenAuth: + description: |- + Personal Token authentication. Include your token in the Authorization header with the prefix "Token". + + **Format:** `Authorization: Token ` + + **How to get a token:** + 1. Log in to [Azion Console](https://stage-console.azion.com) + 2. Go to Account Menu > Personal Tokens + 3. Click "+ Personal Token" + 4. Set a name and expiration date + 5. Copy and securely store your token + + **Example:** + ``` + Authorization: Token azion_1234567890abcdef + ``` + in: header + name: Authorization + type: apiKey + JwtMfaAuthentication: + bearerFormat: JWT + description: JWT MFA Token for Multi-Factor Authentication flows. Used when + MFA verification is required after initial login. + scheme: bearer + type: http + JwtRefreshAuthentication: + bearerFormat: JWT + description: JWT Refresh Token for obtaining new access tokens. Use the refresh_token + from login to get a new access_token without re-authenticating. + scheme: bearer + type: http + tokenAuth: + description: Token-based authentication with required prefix "Token" + in: header + name: Authorization + type: apiKey +x-tagGroups: +- name: Authentication + tags: + - Auth - Login + - Auth - MFA TOTP Device + - Auth - Refresh Access Token + - Auth - Revoke +- name: Accounts + tags: + - Accounts - Descendants + - Accounts - Info + - Accounts - Logged In +- name: Identity & Access + tags: + - Favorites + - Identity - Grants + - Identity - Group Members + - Identity - Groups + - Identity - Logged In User + - Identity - Service Token Renew + - Identity - Service Tokens + - Identity - User info + - Identity - Users + - Users - Lockout +- name: Applications + tags: + - Applications + - Applications - Cache Settings + - Applications - Device Groups + - Applications - Function + - Applications - Request Rules + - Applications - Response Rules + - Custom Pages +- name: Firewall + tags: + - Firewalls + - Firewalls - Function + - Firewalls - Rules Engine + - Network Lists + - WAFs + - WAFs - Exceptions +- name: Functions + tags: + - Functions +- name: SQL + tags: + - SQL +- name: Storage + tags: + - KV - Namespaces + - Storage - Buckets + - Storage - Credentials + - Storage - Objects +- name: Orchestrator + tags: + - Orchestrator - Node Groups + - Orchestrator - Node Services + - Orchestrator - Nodes + - Orchestrator - Service Resources + - Orchestrator - Services +- name: Intelligent DNS + tags: + - DNS - DNSSEC + - DNS - Records + - DNS - Zones +- name: Digital Certificates + tags: + - Digital Certificates - Certificate Revocation Lists + - Digital Certificates - Certificate Signing Requests + - Digital Certificates - Certificates + - Digital Certificates - Request a Certificate +- name: Data Stream + tags: + - Connectors + - Data Stream - Data Sources + - Data Stream - Streams + - Data Stream - Templates +- name: Metrics & Observability + tags: + - Metrics - Dashboard + - Metrics - Folders + - Metrics - Library Reports + - Metrics - Recommendations + - Metrics - Reports + - Metrics - Rows +- name: Real-Time Purge + tags: + - Purge +- name: Billing + tags: + - Billing - Invoices +- name: Policy + tags: + - Policy - Lockout Policy + - Policy - Policies + - Policy - Session Timeout Policy +- name: VCS & Deployments + tags: + - VCS - Continuous Deployment Executions + - VCS - Continuous Deployment Executor + - VCS - Continuous Deployments + - VCS - Execution Scripts + - VCS - Integrations + - VCS - Providers +- name: Workloads + tags: + - Workloads +- name: AI Studio + tags: + - AI Studio - Chat Threads + - AI Studio - Chunks + - AI Studio - Documents + - AI Studio - Knowledge Bases + - AI Studio - Messages + - AI Studio - Tools +- name: Billing & Payments + tags: + - Billing & Payments +- name: Publisher Management + tags: + - Publisher Management +- name: Workload Deployments + tags: + - Workload Deployments diff --git a/azion-api/api_accounts_descendants.go b/azion-api/api_accounts_descendants.go new file mode 100644 index 0000000..d0b14f2 --- /dev/null +++ b/azion-api/api_accounts_descendants.go @@ -0,0 +1,1232 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// AccountsDescendantsAPIService AccountsDescendantsAPI service +type AccountsDescendantsAPIService service + +type ApiCreateDescendantAccountRequest struct { + ctx context.Context + ApiService *AccountsDescendantsAPIService + createAccountRequest *CreateAccountRequest +} + +func (r ApiCreateDescendantAccountRequest) CreateAccountRequest(createAccountRequest CreateAccountRequest) ApiCreateDescendantAccountRequest { + r.createAccountRequest = &createAccountRequest + return r +} + +func (r ApiCreateDescendantAccountRequest) Execute() (*ResponseAccount, *http.Response, error) { + return r.ApiService.CreateDescendantAccountExecute(r) +} + +/* +CreateDescendantAccount Create a new account + +Create a new sub-account under the logged-in user's account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDescendantAccountRequest +*/ +func (a *AccountsDescendantsAPIService) CreateDescendantAccount(ctx context.Context) ApiCreateDescendantAccountRequest { + return ApiCreateDescendantAccountRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseAccount +func (a *AccountsDescendantsAPIService) CreateDescendantAccountExecute(r ApiCreateDescendantAccountRequest) (*ResponseAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsDescendantsAPIService.CreateDescendantAccount") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createAccountRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDescendantsAccountsRequest struct { + ctx context.Context + ApiService *AccountsDescendantsAPIService + active *bool + created *time.Time + createdGte *time.Time + createdLte *time.Time + fields *string + id *string + lastEditor *string + lastModified *time.Time + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + parentId *string + search *string +} + +// Filter by active status. +func (r ApiListDescendantsAccountsRequest) Active(active bool) ApiListDescendantsAccountsRequest { + r.active = &active + return r +} + +// Filter by created date (exact match). +func (r ApiListDescendantsAccountsRequest) Created(created time.Time) ApiListDescendantsAccountsRequest { + r.created = &created + return r +} + +// Filter by created date (greater than or equal). +func (r ApiListDescendantsAccountsRequest) CreatedGte(createdGte time.Time) ApiListDescendantsAccountsRequest { + r.createdGte = &createdGte + return r +} + +// Filter by created date (less than or equal). +func (r ApiListDescendantsAccountsRequest) CreatedLte(createdLte time.Time) ApiListDescendantsAccountsRequest { + r.createdLte = &createdLte + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDescendantsAccountsRequest) Fields(fields string) ApiListDescendantsAccountsRequest { + r.fields = &fields + return r +} + +// Filter by account ID (accepts comma-separated values). +func (r ApiListDescendantsAccountsRequest) Id(id string) ApiListDescendantsAccountsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListDescendantsAccountsRequest) LastEditor(lastEditor string) ApiListDescendantsAccountsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (exact match). +func (r ApiListDescendantsAccountsRequest) LastModified(lastModified time.Time) ApiListDescendantsAccountsRequest { + r.lastModified = &lastModified + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListDescendantsAccountsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListDescendantsAccountsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListDescendantsAccountsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListDescendantsAccountsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListDescendantsAccountsRequest) Name(name string) ApiListDescendantsAccountsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDescendantsAccountsRequest) Ordering(ordering string) ApiListDescendantsAccountsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDescendantsAccountsRequest) Page(page int32) ApiListDescendantsAccountsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDescendantsAccountsRequest) PageSize(pageSize int32) ApiListDescendantsAccountsRequest { + r.pageSize = &pageSize + return r +} + +// Filter by parent account ID (accepts comma-separated values). +func (r ApiListDescendantsAccountsRequest) ParentId(parentId string) ApiListDescendantsAccountsRequest { + r.parentId = &parentId + return r +} + +// A search term. +func (r ApiListDescendantsAccountsRequest) Search(search string) ApiListDescendantsAccountsRequest { + r.search = &search + return r +} + +func (r ApiListDescendantsAccountsRequest) Execute() (*PaginatedAccountList, *http.Response, error) { + return r.ApiService.ListDescendantsAccountsExecute(r) +} + +/* +ListDescendantsAccounts List accounts + +List all accounts that are descendants of the logged-in user's account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDescendantsAccountsRequest +*/ +func (a *AccountsDescendantsAPIService) ListDescendantsAccounts(ctx context.Context) ApiListDescendantsAccountsRequest { + return ApiListDescendantsAccountsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedAccountList +func (a *AccountsDescendantsAPIService) ListDescendantsAccountsExecute(r ApiListDescendantsAccountsRequest) (*PaginatedAccountList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedAccountList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsDescendantsAPIService.ListDescendantsAccounts") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.created != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "form", "") + } + if r.createdGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created__gte", r.createdGte, "form", "") + } + if r.createdLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created__lte", r.createdLte, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModified != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified", r.lastModified, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.parentId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parent_id", r.parentId, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateDescendantAccountRequest struct { + ctx context.Context + ApiService *AccountsDescendantsAPIService + accountId int64 + patchedAccountRequest *PatchedAccountRequest +} + +func (r ApiPartialUpdateDescendantAccountRequest) PatchedAccountRequest(patchedAccountRequest PatchedAccountRequest) ApiPartialUpdateDescendantAccountRequest { + r.patchedAccountRequest = &patchedAccountRequest + return r +} + +func (r ApiPartialUpdateDescendantAccountRequest) Execute() (*ResponseAccount, *http.Response, error) { + return r.ApiService.PartialUpdateDescendantAccountExecute(r) +} + +/* +PartialUpdateDescendantAccount Partially update account details + +Update specific fields of an account under the logged-in user's account. Only editable fields, such as `name`, can be updated with this operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accountId A unique integer value identifying the account. + @return ApiPartialUpdateDescendantAccountRequest +*/ +func (a *AccountsDescendantsAPIService) PartialUpdateDescendantAccount(ctx context.Context, accountId int64) ApiPartialUpdateDescendantAccountRequest { + return ApiPartialUpdateDescendantAccountRequest{ + ApiService: a, + ctx: ctx, + accountId: accountId, + } +} + +// Execute executes the request +// @return ResponseAccount +func (a *AccountsDescendantsAPIService) PartialUpdateDescendantAccountExecute(r ApiPartialUpdateDescendantAccountRequest) (*ResponseAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsDescendantsAPIService.PartialUpdateDescendantAccount") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts/{account_id}" + localVarPath = strings.Replace(localVarPath, "{"+"account_id"+"}", url.PathEscape(parameterValueToString(r.accountId, "accountId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedAccountRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDescendantAccountRequest struct { + ctx context.Context + ApiService *AccountsDescendantsAPIService + accountId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDescendantAccountRequest) Fields(fields string) ApiRetrieveDescendantAccountRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDescendantAccountRequest) Execute() (*ResponseRetrieveAccount, *http.Response, error) { + return r.ApiService.RetrieveDescendantAccountExecute(r) +} + +/* +RetrieveDescendantAccount Retrieve account details + +Retrieve detailed information of a specific account under the logged-in user's account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accountId A unique integer value identifying the account. + @return ApiRetrieveDescendantAccountRequest +*/ +func (a *AccountsDescendantsAPIService) RetrieveDescendantAccount(ctx context.Context, accountId int64) ApiRetrieveDescendantAccountRequest { + return ApiRetrieveDescendantAccountRequest{ + ApiService: a, + ctx: ctx, + accountId: accountId, + } +} + +// Execute executes the request +// @return ResponseRetrieveAccount +func (a *AccountsDescendantsAPIService) RetrieveDescendantAccountExecute(r ApiRetrieveDescendantAccountRequest) (*ResponseRetrieveAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsDescendantsAPIService.RetrieveDescendantAccount") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts/{account_id}" + localVarPath = strings.Replace(localVarPath, "{"+"account_id"+"}", url.PathEscape(parameterValueToString(r.accountId, "accountId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDescendantAccountRequest struct { + ctx context.Context + ApiService *AccountsDescendantsAPIService + accountId int64 + accountRequest *AccountRequest +} + +func (r ApiUpdateDescendantAccountRequest) AccountRequest(accountRequest AccountRequest) ApiUpdateDescendantAccountRequest { + r.accountRequest = &accountRequest + return r +} + +func (r ApiUpdateDescendantAccountRequest) Execute() (*ResponseAccount, *http.Response, error) { + return r.ApiService.UpdateDescendantAccountExecute(r) +} + +/* +UpdateDescendantAccount Update account details + +Update the information of a specific account under the logged-in user's account. This operation allows replacing the entire account data with new values. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accountId A unique integer value identifying the account. + @return ApiUpdateDescendantAccountRequest +*/ +func (a *AccountsDescendantsAPIService) UpdateDescendantAccount(ctx context.Context, accountId int64) ApiUpdateDescendantAccountRequest { + return ApiUpdateDescendantAccountRequest{ + ApiService: a, + ctx: ctx, + accountId: accountId, + } +} + +// Execute executes the request +// @return ResponseAccount +func (a *AccountsDescendantsAPIService) UpdateDescendantAccountExecute(r ApiUpdateDescendantAccountRequest) (*ResponseAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsDescendantsAPIService.UpdateDescendantAccount") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts/{account_id}" + localVarPath = strings.Replace(localVarPath, "{"+"account_id"+"}", url.PathEscape(parameterValueToString(r.accountId, "accountId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.accountRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_accounts_info.go b/azion-api/api_accounts_info.go new file mode 100644 index 0000000..5b69784 --- /dev/null +++ b/azion-api/api_accounts_info.go @@ -0,0 +1,451 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AccountsInfoAPIService AccountsInfoAPI service +type AccountsInfoAPIService service + +type ApiRetrieveAccountInfoDetailsRequest struct { + ctx context.Context + ApiService *AccountsInfoAPIService + accountId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveAccountInfoDetailsRequest) Fields(fields string) ApiRetrieveAccountInfoDetailsRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveAccountInfoDetailsRequest) Execute() (*ResponseRetrieveAccountInfo, *http.Response, error) { + return r.ApiService.RetrieveAccountInfoDetailsExecute(r) +} + +/* +RetrieveAccountInfoDetails Retrieve account information details + +Retrieve detailed information about your account or a specific child account under your logged-in account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accountId A unique integer value identifying the account. + @return ApiRetrieveAccountInfoDetailsRequest +*/ +func (a *AccountsInfoAPIService) RetrieveAccountInfoDetails(ctx context.Context, accountId int64) ApiRetrieveAccountInfoDetailsRequest { + return ApiRetrieveAccountInfoDetailsRequest{ + ApiService: a, + ctx: ctx, + accountId: accountId, + } +} + +// Execute executes the request +// @return ResponseRetrieveAccountInfo +func (a *AccountsInfoAPIService) RetrieveAccountInfoDetailsExecute(r ApiRetrieveAccountInfoDetailsRequest) (*ResponseRetrieveAccountInfo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveAccountInfo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsInfoAPIService.RetrieveAccountInfoDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts/{account_id}/info" + localVarPath = strings.Replace(localVarPath, "{"+"account_id"+"}", url.PathEscape(parameterValueToString(r.accountId, "accountId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateAccountInfoDetailsRequest struct { + ctx context.Context + ApiService *AccountsInfoAPIService + accountId int64 + updateAccountInfoDetailsRequest *UpdateAccountInfoDetailsRequest +} + +func (r ApiUpdateAccountInfoDetailsRequest) UpdateAccountInfoDetailsRequest(updateAccountInfoDetailsRequest UpdateAccountInfoDetailsRequest) ApiUpdateAccountInfoDetailsRequest { + r.updateAccountInfoDetailsRequest = &updateAccountInfoDetailsRequest + return r +} + +func (r ApiUpdateAccountInfoDetailsRequest) Execute() (*ResponseAccountInfo, *http.Response, error) { + return r.ApiService.UpdateAccountInfoDetailsExecute(r) +} + +/* +UpdateAccountInfoDetails Update account information details + +Update the information details about your account or a specific child account under your logged-in account. This operation allows replacing the entire account info data with new values. In this operation, you can also clear all detailed information of an account by providing an empty dictionary in the `info` field. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param accountId A unique integer value identifying the account. + @return ApiUpdateAccountInfoDetailsRequest +*/ +func (a *AccountsInfoAPIService) UpdateAccountInfoDetails(ctx context.Context, accountId int64) ApiUpdateAccountInfoDetailsRequest { + return ApiUpdateAccountInfoDetailsRequest{ + ApiService: a, + ctx: ctx, + accountId: accountId, + } +} + +// Execute executes the request +// @return ResponseAccountInfo +func (a *AccountsInfoAPIService) UpdateAccountInfoDetailsExecute(r ApiUpdateAccountInfoDetailsRequest) (*ResponseAccountInfo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAccountInfo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsInfoAPIService.UpdateAccountInfoDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/accounts/{account_id}/info" + localVarPath = strings.Replace(localVarPath, "{"+"account_id"+"}", url.PathEscape(parameterValueToString(r.accountId, "accountId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json", "application/x-www-form-urlencoded", "multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateAccountInfoDetailsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_accounts_logged_in.go b/azion-api/api_accounts_logged_in.go new file mode 100644 index 0000000..4b4cfbd --- /dev/null +++ b/azion-api/api_accounts_logged_in.go @@ -0,0 +1,650 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// AccountsLoggedInAPIService AccountsLoggedInAPI service +type AccountsLoggedInAPIService service + +type ApiPartialUpdateLoggedAccountRequest struct { + ctx context.Context + ApiService *AccountsLoggedInAPIService + patchedAccountRequest *PatchedAccountRequest +} + +func (r ApiPartialUpdateLoggedAccountRequest) PatchedAccountRequest(patchedAccountRequest PatchedAccountRequest) ApiPartialUpdateLoggedAccountRequest { + r.patchedAccountRequest = &patchedAccountRequest + return r +} + +func (r ApiPartialUpdateLoggedAccountRequest) Execute() (*ResponseAccount, *http.Response, error) { + return r.ApiService.PartialUpdateLoggedAccountExecute(r) +} + +/* +PartialUpdateLoggedAccount Partially update logged account details + +Partially update specific fields of the currently logged-in user's account. Only editable fields, such as `name`, can be updated with this operation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPartialUpdateLoggedAccountRequest +*/ +func (a *AccountsLoggedInAPIService) PartialUpdateLoggedAccount(ctx context.Context) ApiPartialUpdateLoggedAccountRequest { + return ApiPartialUpdateLoggedAccountRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseAccount +func (a *AccountsLoggedInAPIService) PartialUpdateLoggedAccountExecute(r ApiPartialUpdateLoggedAccountRequest) (*ResponseAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsLoggedInAPIService.PartialUpdateLoggedAccount") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/account" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedAccountRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveLoggedAccountDetailsRequest struct { + ctx context.Context + ApiService *AccountsLoggedInAPIService + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveLoggedAccountDetailsRequest) Fields(fields string) ApiRetrieveLoggedAccountDetailsRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveLoggedAccountDetailsRequest) Execute() (*ResponseRetrieveAccount, *http.Response, error) { + return r.ApiService.RetrieveLoggedAccountDetailsExecute(r) +} + +/* +RetrieveLoggedAccountDetails Retrieve logged account details + +Retrieve detailed information about the currently logged-in user's account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRetrieveLoggedAccountDetailsRequest +*/ +func (a *AccountsLoggedInAPIService) RetrieveLoggedAccountDetails(ctx context.Context) ApiRetrieveLoggedAccountDetailsRequest { + return ApiRetrieveLoggedAccountDetailsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseRetrieveAccount +func (a *AccountsLoggedInAPIService) RetrieveLoggedAccountDetailsExecute(r ApiRetrieveLoggedAccountDetailsRequest) (*ResponseRetrieveAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsLoggedInAPIService.RetrieveLoggedAccountDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/account" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateLoggedAccountRequest struct { + ctx context.Context + ApiService *AccountsLoggedInAPIService + accountRequest *AccountRequest +} + +func (r ApiUpdateLoggedAccountRequest) AccountRequest(accountRequest AccountRequest) ApiUpdateLoggedAccountRequest { + r.accountRequest = &accountRequest + return r +} + +func (r ApiUpdateLoggedAccountRequest) Execute() (*ResponseAccount, *http.Response, error) { + return r.ApiService.UpdateLoggedAccountExecute(r) +} + +/* +UpdateLoggedAccount Update logged account details + +Update the details of the currently logged-in user's account. This operation allows replacing the entire account data with new values. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateLoggedAccountRequest +*/ +func (a *AccountsLoggedInAPIService) UpdateLoggedAccount(ctx context.Context) ApiUpdateLoggedAccountRequest { + return ApiUpdateLoggedAccountRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseAccount +func (a *AccountsLoggedInAPIService) UpdateLoggedAccountExecute(r ApiUpdateLoggedAccountRequest) (*ResponseAccount, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAccount + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AccountsLoggedInAPIService.UpdateLoggedAccount") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/account" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.accountRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_ai_studio_chat_threads.go b/azion-api/api_ai_studio_chat_threads.go new file mode 100644 index 0000000..a1f9d3d --- /dev/null +++ b/azion-api/api_ai_studio_chat_threads.go @@ -0,0 +1,1325 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AIStudioChatThreadsAPIService AIStudioChatThreadsAPI service +type AIStudioChatThreadsAPIService service + +type ApiCreateChatThreadRequest struct { + ctx context.Context + ApiService *AIStudioChatThreadsAPIService + chatThreadRequest *ChatThreadRequest +} + +func (r ApiCreateChatThreadRequest) ChatThreadRequest(chatThreadRequest ChatThreadRequest) ApiCreateChatThreadRequest { + r.chatThreadRequest = &chatThreadRequest + return r +} + +func (r ApiCreateChatThreadRequest) Execute() (*ResponseChatThread, *http.Response, error) { + return r.ApiService.CreateChatThreadExecute(r) +} + +/* +CreateChatThread Create a chat thread + +Create a new chat thread for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateChatThreadRequest +*/ +func (a *AIStudioChatThreadsAPIService) CreateChatThread(ctx context.Context) ApiCreateChatThreadRequest { + return ApiCreateChatThreadRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseChatThread +func (a *AIStudioChatThreadsAPIService) CreateChatThreadExecute(r ApiCreateChatThreadRequest) (*ResponseChatThread, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseChatThread + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChatThreadsAPIService.CreateChatThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.chatThreadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyAChatThreadRequest struct { + ctx context.Context + ApiService *AIStudioChatThreadsAPIService + threadId int64 +} + +func (r ApiDestroyAChatThreadRequest) Execute() (*ResponseDeleteChatThread, *http.Response, error) { + return r.ApiService.DestroyAChatThreadExecute(r) +} + +/* +DestroyAChatThread Destroy a chat thread + +Destruction of a specific chat thread in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param threadId + @return ApiDestroyAChatThreadRequest +*/ +func (a *AIStudioChatThreadsAPIService) DestroyAChatThread(ctx context.Context, threadId int64) ApiDestroyAChatThreadRequest { + return ApiDestroyAChatThreadRequest{ + ApiService: a, + ctx: ctx, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseDeleteChatThread +func (a *AIStudioChatThreadsAPIService) DestroyAChatThreadExecute(r ApiDestroyAChatThreadRequest) (*ResponseDeleteChatThread, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteChatThread + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChatThreadsAPIService.DestroyAChatThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}" + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListChatThreadsRequest struct { + ctx context.Context + ApiService *AIStudioChatThreadsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListChatThreadsRequest) Fields(fields string) ApiListChatThreadsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListChatThreadsRequest) Ordering(ordering string) ApiListChatThreadsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListChatThreadsRequest) Page(page int32) ApiListChatThreadsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListChatThreadsRequest) PageSize(pageSize int32) ApiListChatThreadsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListChatThreadsRequest) Search(search string) ApiListChatThreadsRequest { + r.search = &search + return r +} + +func (r ApiListChatThreadsRequest) Execute() (*PaginatedChatThreadList, *http.Response, error) { + return r.ApiService.ListChatThreadsExecute(r) +} + +/* +ListChatThreads List chat threads + +List all chat threads owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListChatThreadsRequest +*/ +func (a *AIStudioChatThreadsAPIService) ListChatThreads(ctx context.Context) ApiListChatThreadsRequest { + return ApiListChatThreadsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedChatThreadList +func (a *AIStudioChatThreadsAPIService) ListChatThreadsExecute(r ApiListChatThreadsRequest) (*PaginatedChatThreadList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedChatThreadList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChatThreadsAPIService.ListChatThreads") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateChatThreadRequest struct { + ctx context.Context + ApiService *AIStudioChatThreadsAPIService + threadId int64 + patchedChatThreadRequest *PatchedChatThreadRequest +} + +func (r ApiPartialUpdateChatThreadRequest) PatchedChatThreadRequest(patchedChatThreadRequest PatchedChatThreadRequest) ApiPartialUpdateChatThreadRequest { + r.patchedChatThreadRequest = &patchedChatThreadRequest + return r +} + +func (r ApiPartialUpdateChatThreadRequest) Execute() (*ResponseChatThread, *http.Response, error) { + return r.ApiService.PartialUpdateChatThreadExecute(r) +} + +/* +PartialUpdateChatThread Partially update a chat thread + +Update one or more fields of an existing chat thread without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param threadId + @return ApiPartialUpdateChatThreadRequest +*/ +func (a *AIStudioChatThreadsAPIService) PartialUpdateChatThread(ctx context.Context, threadId int64) ApiPartialUpdateChatThreadRequest { + return ApiPartialUpdateChatThreadRequest{ + ApiService: a, + ctx: ctx, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseChatThread +func (a *AIStudioChatThreadsAPIService) PartialUpdateChatThreadExecute(r ApiPartialUpdateChatThreadRequest) (*ResponseChatThread, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseChatThread + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChatThreadsAPIService.PartialUpdateChatThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}" + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedChatThreadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetriveChatThreadRequest struct { + ctx context.Context + ApiService *AIStudioChatThreadsAPIService + threadId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetriveChatThreadRequest) Fields(fields string) ApiRetriveChatThreadRequest { + r.fields = &fields + return r +} + +func (r ApiRetriveChatThreadRequest) Execute() (*ResponseRetrieveChatThread, *http.Response, error) { + return r.ApiService.RetriveChatThreadExecute(r) +} + +/* +RetriveChatThread Retrieve details from a chat thread + +Retrieve details from a specific chat thread in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param threadId + @return ApiRetriveChatThreadRequest +*/ +func (a *AIStudioChatThreadsAPIService) RetriveChatThread(ctx context.Context, threadId int64) ApiRetriveChatThreadRequest { + return ApiRetriveChatThreadRequest{ + ApiService: a, + ctx: ctx, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseRetrieveChatThread +func (a *AIStudioChatThreadsAPIService) RetriveChatThreadExecute(r ApiRetriveChatThreadRequest) (*ResponseRetrieveChatThread, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveChatThread + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChatThreadsAPIService.RetriveChatThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}" + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateChatThreadRequest struct { + ctx context.Context + ApiService *AIStudioChatThreadsAPIService + threadId int64 + chatThreadRequest *ChatThreadRequest +} + +func (r ApiUpdateChatThreadRequest) ChatThreadRequest(chatThreadRequest ChatThreadRequest) ApiUpdateChatThreadRequest { + r.chatThreadRequest = &chatThreadRequest + return r +} + +func (r ApiUpdateChatThreadRequest) Execute() (*ResponseChatThread, *http.Response, error) { + return r.ApiService.UpdateChatThreadExecute(r) +} + +/* +UpdateChatThread Update a chat thread + +Update an existing chat thread. This replaces the entire chat thread with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param threadId + @return ApiUpdateChatThreadRequest +*/ +func (a *AIStudioChatThreadsAPIService) UpdateChatThread(ctx context.Context, threadId int64) ApiUpdateChatThreadRequest { + return ApiUpdateChatThreadRequest{ + ApiService: a, + ctx: ctx, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseChatThread +func (a *AIStudioChatThreadsAPIService) UpdateChatThreadExecute(r ApiUpdateChatThreadRequest) (*ResponseChatThread, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseChatThread + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChatThreadsAPIService.UpdateChatThread") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}" + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.chatThreadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_ai_studio_chunks.go b/azion-api/api_ai_studio_chunks.go new file mode 100644 index 0000000..7f2e8f4 --- /dev/null +++ b/azion-api/api_ai_studio_chunks.go @@ -0,0 +1,283 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AIStudioChunksAPIService AIStudioChunksAPI service +type AIStudioChunksAPIService service + +type ApiListChunksRequest struct { + ctx context.Context + ApiService *AIStudioChunksAPIService + documentId int64 + kbId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListChunksRequest) Fields(fields string) ApiListChunksRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListChunksRequest) Ordering(ordering string) ApiListChunksRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListChunksRequest) Page(page int32) ApiListChunksRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListChunksRequest) PageSize(pageSize int32) ApiListChunksRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListChunksRequest) Search(search string) ApiListChunksRequest { + r.search = &search + return r +} + +func (r ApiListChunksRequest) Execute() (*PaginatedChunkList, *http.Response, error) { + return r.ApiService.ListChunksExecute(r) +} + +/* +ListChunks List chunks + +List all chunks owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param documentId + @param kbId + @return ApiListChunksRequest +*/ +func (a *AIStudioChunksAPIService) ListChunks(ctx context.Context, documentId int64, kbId int64) ApiListChunksRequest { + return ApiListChunksRequest{ + ApiService: a, + ctx: ctx, + documentId: documentId, + kbId: kbId, + } +} + +// Execute executes the request +// @return PaginatedChunkList +func (a *AIStudioChunksAPIService) ListChunksExecute(r ApiListChunksRequest) (*PaginatedChunkList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedChunkList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioChunksAPIService.ListChunks") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/documents/{document_id}/chunks" + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_ai_studio_documents.go b/azion-api/api_ai_studio_documents.go new file mode 100644 index 0000000..e52ff84 --- /dev/null +++ b/azion-api/api_ai_studio_documents.go @@ -0,0 +1,1207 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AIStudioDocumentsAPIService AIStudioDocumentsAPI service +type AIStudioDocumentsAPIService service + +type ApiCreateDocumentRequest struct { + ctx context.Context + ApiService *AIStudioDocumentsAPIService + kbId int64 + name *string + description *string + type_ *string + sourceUri *string + chunkStrategy *map[string]interface{} +} + +func (r ApiCreateDocumentRequest) Name(name string) ApiCreateDocumentRequest { + r.name = &name + return r +} + +func (r ApiCreateDocumentRequest) Description(description string) ApiCreateDocumentRequest { + r.description = &description + return r +} + +func (r ApiCreateDocumentRequest) Type_(type_ string) ApiCreateDocumentRequest { + r.type_ = &type_ + return r +} + +func (r ApiCreateDocumentRequest) SourceUri(sourceUri string) ApiCreateDocumentRequest { + r.sourceUri = &sourceUri + return r +} + +func (r ApiCreateDocumentRequest) ChunkStrategy(chunkStrategy map[string]interface{}) ApiCreateDocumentRequest { + r.chunkStrategy = &chunkStrategy + return r +} + +func (r ApiCreateDocumentRequest) Execute() (*ResponseDocument, *http.Response, error) { + return r.ApiService.CreateDocumentExecute(r) +} + +/* +CreateDocument Create a document + +Create a new document for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiCreateDocumentRequest +*/ +func (a *AIStudioDocumentsAPIService) CreateDocument(ctx context.Context, kbId int64) ApiCreateDocumentRequest { + return ApiCreateDocumentRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseDocument +func (a *AIStudioDocumentsAPIService) CreateDocumentExecute(r ApiCreateDocumentRequest) (*ResponseDocument, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDocument + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioDocumentsAPIService.CreateDocument") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/documents" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded", "application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "", "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "type", r.type_, "", "") + } + if r.sourceUri != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "source_uri", r.sourceUri, "", "") + } + if r.chunkStrategy != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "chunk_strategy", r.chunkStrategy, "", "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyADocumentRequest struct { + ctx context.Context + ApiService *AIStudioDocumentsAPIService + documentId int64 + kbId int64 +} + +func (r ApiDestroyADocumentRequest) Execute() (*ResponseDeleteDocument, *http.Response, error) { + return r.ApiService.DestroyADocumentExecute(r) +} + +/* +DestroyADocument Destroy a document + +Destruction of a specific document in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param documentId + @param kbId + @return ApiDestroyADocumentRequest +*/ +func (a *AIStudioDocumentsAPIService) DestroyADocument(ctx context.Context, documentId int64, kbId int64) ApiDestroyADocumentRequest { + return ApiDestroyADocumentRequest{ + ApiService: a, + ctx: ctx, + documentId: documentId, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseDeleteDocument +func (a *AIStudioDocumentsAPIService) DestroyADocumentExecute(r ApiDestroyADocumentRequest) (*ResponseDeleteDocument, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteDocument + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioDocumentsAPIService.DestroyADocument") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/documents/{document_id}" + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDocumentsRequest struct { + ctx context.Context + ApiService *AIStudioDocumentsAPIService + kbId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDocumentsRequest) Fields(fields string) ApiListDocumentsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListDocumentsRequest) Ordering(ordering string) ApiListDocumentsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDocumentsRequest) Page(page int32) ApiListDocumentsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDocumentsRequest) PageSize(pageSize int32) ApiListDocumentsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDocumentsRequest) Search(search string) ApiListDocumentsRequest { + r.search = &search + return r +} + +func (r ApiListDocumentsRequest) Execute() (*PaginatedDocumentList, *http.Response, error) { + return r.ApiService.ListDocumentsExecute(r) +} + +/* +ListDocuments List documents + +List all documents owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiListDocumentsRequest +*/ +func (a *AIStudioDocumentsAPIService) ListDocuments(ctx context.Context, kbId int64) ApiListDocumentsRequest { + return ApiListDocumentsRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return PaginatedDocumentList +func (a *AIStudioDocumentsAPIService) ListDocumentsExecute(r ApiListDocumentsRequest) (*PaginatedDocumentList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDocumentList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioDocumentsAPIService.ListDocuments") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/documents" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetriveDocumentRequest struct { + ctx context.Context + ApiService *AIStudioDocumentsAPIService + documentId int64 + kbId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetriveDocumentRequest) Fields(fields string) ApiRetriveDocumentRequest { + r.fields = &fields + return r +} + +func (r ApiRetriveDocumentRequest) Execute() (*ResponseRetrieveDocument, *http.Response, error) { + return r.ApiService.RetriveDocumentExecute(r) +} + +/* +RetriveDocument Retrieve details from a document + +Retrieve details from a specific document in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param documentId + @param kbId + @return ApiRetriveDocumentRequest +*/ +func (a *AIStudioDocumentsAPIService) RetriveDocument(ctx context.Context, documentId int64, kbId int64) ApiRetriveDocumentRequest { + return ApiRetriveDocumentRequest{ + ApiService: a, + ctx: ctx, + documentId: documentId, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseRetrieveDocument +func (a *AIStudioDocumentsAPIService) RetriveDocumentExecute(r ApiRetriveDocumentRequest) (*ResponseRetrieveDocument, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveDocument + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioDocumentsAPIService.RetriveDocument") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/documents/{document_id}" + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDocumentRequest struct { + ctx context.Context + ApiService *AIStudioDocumentsAPIService + documentId int64 + kbId int64 + name *string + description *string + type_ *string + sourceUri *string + chunkStrategy *map[string]interface{} +} + +func (r ApiUpdateDocumentRequest) Name(name string) ApiUpdateDocumentRequest { + r.name = &name + return r +} + +func (r ApiUpdateDocumentRequest) Description(description string) ApiUpdateDocumentRequest { + r.description = &description + return r +} + +func (r ApiUpdateDocumentRequest) Type_(type_ string) ApiUpdateDocumentRequest { + r.type_ = &type_ + return r +} + +func (r ApiUpdateDocumentRequest) SourceUri(sourceUri string) ApiUpdateDocumentRequest { + r.sourceUri = &sourceUri + return r +} + +func (r ApiUpdateDocumentRequest) ChunkStrategy(chunkStrategy map[string]interface{}) ApiUpdateDocumentRequest { + r.chunkStrategy = &chunkStrategy + return r +} + +func (r ApiUpdateDocumentRequest) Execute() (*ResponseDocument, *http.Response, error) { + return r.ApiService.UpdateDocumentExecute(r) +} + +/* +UpdateDocument Update a document + +Update an existing document. This replaces the entire document with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param documentId + @param kbId + @return ApiUpdateDocumentRequest +*/ +func (a *AIStudioDocumentsAPIService) UpdateDocument(ctx context.Context, documentId int64, kbId int64) ApiUpdateDocumentRequest { + return ApiUpdateDocumentRequest{ + ApiService: a, + ctx: ctx, + documentId: documentId, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseDocument +func (a *AIStudioDocumentsAPIService) UpdateDocumentExecute(r ApiUpdateDocumentRequest) (*ResponseDocument, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDocument + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioDocumentsAPIService.UpdateDocument") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/documents/{document_id}" + localVarPath = strings.Replace(localVarPath, "{"+"document_id"+"}", url.PathEscape(parameterValueToString(r.documentId, "documentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data", "application/x-www-form-urlencoded", "application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "", "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "description", r.description, "", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "type", r.type_, "", "") + } + if r.sourceUri != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "source_uri", r.sourceUri, "", "") + } + if r.chunkStrategy != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "chunk_strategy", r.chunkStrategy, "", "") + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_ai_studio_knowledge_bases.go b/azion-api/api_ai_studio_knowledge_bases.go new file mode 100644 index 0000000..ce94770 --- /dev/null +++ b/azion-api/api_ai_studio_knowledge_bases.go @@ -0,0 +1,1761 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AIStudioKnowledgeBasesAPIService AIStudioKnowledgeBasesAPI service +type AIStudioKnowledgeBasesAPIService service + +type ApiAskKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + kbId int64 + kBAskRequest *KBAskRequest +} + +func (r ApiAskKnowledgeBaseRequest) KBAskRequest(kBAskRequest KBAskRequest) ApiAskKnowledgeBaseRequest { + r.kBAskRequest = &kBAskRequest + return r +} + +func (r ApiAskKnowledgeBaseRequest) Execute() (*KBAskResponse, *http.Response, error) { + return r.ApiService.AskKnowledgeBaseExecute(r) +} + +/* +AskKnowledgeBase Ask the knowledge base + +Ask a question. The agent will use RAG over this knowledge base and answer with context. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiAskKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) AskKnowledgeBase(ctx context.Context, kbId int64) ApiAskKnowledgeBaseRequest { + return ApiAskKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return KBAskResponse +func (a *AIStudioKnowledgeBasesAPIService) AskKnowledgeBaseExecute(r ApiAskKnowledgeBaseRequest) (*KBAskResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *KBAskResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.AskKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/ask" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kBAskRequest == nil { + return localVarReturnValue, nil, reportError("kBAskRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.kBAskRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + knowledgeBaseRequest *KnowledgeBaseRequest +} + +func (r ApiCreateKnowledgeBaseRequest) KnowledgeBaseRequest(knowledgeBaseRequest KnowledgeBaseRequest) ApiCreateKnowledgeBaseRequest { + r.knowledgeBaseRequest = &knowledgeBaseRequest + return r +} + +func (r ApiCreateKnowledgeBaseRequest) Execute() (*ResponseKnowledgeBase, *http.Response, error) { + return r.ApiService.CreateKnowledgeBaseExecute(r) +} + +/* +CreateKnowledgeBase Create a knowledge base + +Create a new knowledge base for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) CreateKnowledgeBase(ctx context.Context) ApiCreateKnowledgeBaseRequest { + return ApiCreateKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseKnowledgeBase +func (a *AIStudioKnowledgeBasesAPIService) CreateKnowledgeBaseExecute(r ApiCreateKnowledgeBaseRequest) (*ResponseKnowledgeBase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseKnowledgeBase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.CreateKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.knowledgeBaseRequest == nil { + return localVarReturnValue, nil, reportError("knowledgeBaseRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.knowledgeBaseRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyAKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + kbId string +} + +func (r ApiDestroyAKnowledgeBaseRequest) Execute() (*ResponseDeleteKnowledgeBase, *http.Response, error) { + return r.ApiService.DestroyAKnowledgeBaseExecute(r) +} + +/* +DestroyAKnowledgeBase Destroy a knowledge base + +Destruction of a specific knowledge base in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiDestroyAKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) DestroyAKnowledgeBase(ctx context.Context, kbId string) ApiDestroyAKnowledgeBaseRequest { + return ApiDestroyAKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseDeleteKnowledgeBase +func (a *AIStudioKnowledgeBasesAPIService) DestroyAKnowledgeBaseExecute(r ApiDestroyAKnowledgeBaseRequest) (*ResponseDeleteKnowledgeBase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteKnowledgeBase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.DestroyAKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListKnowledgeBasesRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListKnowledgeBasesRequest) Fields(fields string) ApiListKnowledgeBasesRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListKnowledgeBasesRequest) Ordering(ordering string) ApiListKnowledgeBasesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListKnowledgeBasesRequest) Page(page int32) ApiListKnowledgeBasesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListKnowledgeBasesRequest) PageSize(pageSize int32) ApiListKnowledgeBasesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListKnowledgeBasesRequest) Search(search string) ApiListKnowledgeBasesRequest { + r.search = &search + return r +} + +func (r ApiListKnowledgeBasesRequest) Execute() (*PaginatedKnowledgeBaseList, *http.Response, error) { + return r.ApiService.ListKnowledgeBasesExecute(r) +} + +/* +ListKnowledgeBases List knowledge bases + +List all knowledge bases owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListKnowledgeBasesRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) ListKnowledgeBases(ctx context.Context) ApiListKnowledgeBasesRequest { + return ApiListKnowledgeBasesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedKnowledgeBaseList +func (a *AIStudioKnowledgeBasesAPIService) ListKnowledgeBasesExecute(r ApiListKnowledgeBasesRequest) (*PaginatedKnowledgeBaseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedKnowledgeBaseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.ListKnowledgeBases") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + kbId string + patchedKnowledgeBaseRequest *PatchedKnowledgeBaseRequest +} + +func (r ApiPartialUpdateKnowledgeBaseRequest) PatchedKnowledgeBaseRequest(patchedKnowledgeBaseRequest PatchedKnowledgeBaseRequest) ApiPartialUpdateKnowledgeBaseRequest { + r.patchedKnowledgeBaseRequest = &patchedKnowledgeBaseRequest + return r +} + +func (r ApiPartialUpdateKnowledgeBaseRequest) Execute() (*ResponseKnowledgeBase, *http.Response, error) { + return r.ApiService.PartialUpdateKnowledgeBaseExecute(r) +} + +/* +PartialUpdateKnowledgeBase Partially update a knowledge base + +Update one or more fields of an existing knowledge base without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiPartialUpdateKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) PartialUpdateKnowledgeBase(ctx context.Context, kbId string) ApiPartialUpdateKnowledgeBaseRequest { + return ApiPartialUpdateKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseKnowledgeBase +func (a *AIStudioKnowledgeBasesAPIService) PartialUpdateKnowledgeBaseExecute(r ApiPartialUpdateKnowledgeBaseRequest) (*ResponseKnowledgeBase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseKnowledgeBase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.PartialUpdateKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedKnowledgeBaseRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiQueryChunkFromKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + kbId int64 + kBQueryRequest *KBQueryRequest +} + +func (r ApiQueryChunkFromKnowledgeBaseRequest) KBQueryRequest(kBQueryRequest KBQueryRequest) ApiQueryChunkFromKnowledgeBaseRequest { + r.kBQueryRequest = &kBQueryRequest + return r +} + +func (r ApiQueryChunkFromKnowledgeBaseRequest) Execute() (*KBQueryResponse, *http.Response, error) { + return r.ApiService.QueryChunkFromKnowledgeBaseExecute(r) +} + +/* +QueryChunkFromKnowledgeBase Query a chunk from a knowledge base + +Query a specific chunk from a knowledge base in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiQueryChunkFromKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) QueryChunkFromKnowledgeBase(ctx context.Context, kbId int64) ApiQueryChunkFromKnowledgeBaseRequest { + return ApiQueryChunkFromKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return KBQueryResponse +func (a *AIStudioKnowledgeBasesAPIService) QueryChunkFromKnowledgeBaseExecute(r ApiQueryChunkFromKnowledgeBaseRequest) (*KBQueryResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *KBQueryResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.QueryChunkFromKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}/query" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.kBQueryRequest == nil { + return localVarReturnValue, nil, reportError("kBQueryRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.kBQueryRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetriveKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + kbId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetriveKnowledgeBaseRequest) Fields(fields string) ApiRetriveKnowledgeBaseRequest { + r.fields = &fields + return r +} + +func (r ApiRetriveKnowledgeBaseRequest) Execute() (*ResponseRetrieveKnowledgeBase, *http.Response, error) { + return r.ApiService.RetriveKnowledgeBaseExecute(r) +} + +/* +RetriveKnowledgeBase Retrieve details from a knowledge base + +Retrieve details from a specific knowledge base in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiRetriveKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) RetriveKnowledgeBase(ctx context.Context, kbId string) ApiRetriveKnowledgeBaseRequest { + return ApiRetriveKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseRetrieveKnowledgeBase +func (a *AIStudioKnowledgeBasesAPIService) RetriveKnowledgeBaseExecute(r ApiRetriveKnowledgeBaseRequest) (*ResponseRetrieveKnowledgeBase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveKnowledgeBase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.RetriveKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateKnowledgeBaseRequest struct { + ctx context.Context + ApiService *AIStudioKnowledgeBasesAPIService + kbId string + knowledgeBaseRequest *KnowledgeBaseRequest +} + +func (r ApiUpdateKnowledgeBaseRequest) KnowledgeBaseRequest(knowledgeBaseRequest KnowledgeBaseRequest) ApiUpdateKnowledgeBaseRequest { + r.knowledgeBaseRequest = &knowledgeBaseRequest + return r +} + +func (r ApiUpdateKnowledgeBaseRequest) Execute() (*ResponseKnowledgeBase, *http.Response, error) { + return r.ApiService.UpdateKnowledgeBaseExecute(r) +} + +/* +UpdateKnowledgeBase Update a knowledge base + +Update an existing knowledge base. This replaces the entire knowledge base with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @return ApiUpdateKnowledgeBaseRequest +*/ +func (a *AIStudioKnowledgeBasesAPIService) UpdateKnowledgeBase(ctx context.Context, kbId string) ApiUpdateKnowledgeBaseRequest { + return ApiUpdateKnowledgeBaseRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + } +} + +// Execute executes the request +// @return ResponseKnowledgeBase +func (a *AIStudioKnowledgeBasesAPIService) UpdateKnowledgeBaseExecute(r ApiUpdateKnowledgeBaseRequest) (*ResponseKnowledgeBase, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseKnowledgeBase + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioKnowledgeBasesAPIService.UpdateKnowledgeBase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/kbs/{kb_id}" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.knowledgeBaseRequest == nil { + return localVarReturnValue, nil, reportError("knowledgeBaseRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.knowledgeBaseRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_ai_studio_messages.go b/azion-api/api_ai_studio_messages.go new file mode 100644 index 0000000..c95adf8 --- /dev/null +++ b/azion-api/api_ai_studio_messages.go @@ -0,0 +1,1139 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AIStudioMessagesAPIService AIStudioMessagesAPI service +type AIStudioMessagesAPIService service + +type ApiCreateMessageRequest struct { + ctx context.Context + ApiService *AIStudioMessagesAPIService + threadId int64 + messageRequest *MessageRequest +} + +func (r ApiCreateMessageRequest) MessageRequest(messageRequest MessageRequest) ApiCreateMessageRequest { + r.messageRequest = &messageRequest + return r +} + +func (r ApiCreateMessageRequest) Execute() (*ResponseMessage, *http.Response, error) { + return r.ApiService.CreateMessageExecute(r) +} + +/* +CreateMessage Create a message + +Create a new message for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param threadId + @return ApiCreateMessageRequest +*/ +func (a *AIStudioMessagesAPIService) CreateMessage(ctx context.Context, threadId int64) ApiCreateMessageRequest { + return ApiCreateMessageRequest{ + ApiService: a, + ctx: ctx, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseMessage +func (a *AIStudioMessagesAPIService) CreateMessageExecute(r ApiCreateMessageRequest) (*ResponseMessage, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseMessage + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioMessagesAPIService.CreateMessage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}/messages" + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.messageRequest == nil { + return localVarReturnValue, nil, reportError("messageRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.messageRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyAMessageRequest struct { + ctx context.Context + ApiService *AIStudioMessagesAPIService + messageId int64 + threadId int64 +} + +func (r ApiDestroyAMessageRequest) Execute() (*ResponseDeleteMessage, *http.Response, error) { + return r.ApiService.DestroyAMessageExecute(r) +} + +/* +DestroyAMessage Destroy a message + +Destruction of a specific message in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param messageId + @param threadId + @return ApiDestroyAMessageRequest +*/ +func (a *AIStudioMessagesAPIService) DestroyAMessage(ctx context.Context, messageId int64, threadId int64) ApiDestroyAMessageRequest { + return ApiDestroyAMessageRequest{ + ApiService: a, + ctx: ctx, + messageId: messageId, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseDeleteMessage +func (a *AIStudioMessagesAPIService) DestroyAMessageExecute(r ApiDestroyAMessageRequest) (*ResponseDeleteMessage, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteMessage + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioMessagesAPIService.DestroyAMessage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}/messages/{message_id}" + localVarPath = strings.Replace(localVarPath, "{"+"message_id"+"}", url.PathEscape(parameterValueToString(r.messageId, "messageId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListMessagesRequest struct { + ctx context.Context + ApiService *AIStudioMessagesAPIService + threadId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListMessagesRequest) Fields(fields string) ApiListMessagesRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListMessagesRequest) Ordering(ordering string) ApiListMessagesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListMessagesRequest) Page(page int32) ApiListMessagesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListMessagesRequest) PageSize(pageSize int32) ApiListMessagesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListMessagesRequest) Search(search string) ApiListMessagesRequest { + r.search = &search + return r +} + +func (r ApiListMessagesRequest) Execute() (*PaginatedMessageList, *http.Response, error) { + return r.ApiService.ListMessagesExecute(r) +} + +/* +ListMessages List messages + +List all messages owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param threadId + @return ApiListMessagesRequest +*/ +func (a *AIStudioMessagesAPIService) ListMessages(ctx context.Context, threadId int64) ApiListMessagesRequest { + return ApiListMessagesRequest{ + ApiService: a, + ctx: ctx, + threadId: threadId, + } +} + +// Execute executes the request +// @return PaginatedMessageList +func (a *AIStudioMessagesAPIService) ListMessagesExecute(r ApiListMessagesRequest) (*PaginatedMessageList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedMessageList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioMessagesAPIService.ListMessages") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}/messages" + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetriveMessageRequest struct { + ctx context.Context + ApiService *AIStudioMessagesAPIService + messageId int64 + threadId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetriveMessageRequest) Fields(fields string) ApiRetriveMessageRequest { + r.fields = &fields + return r +} + +func (r ApiRetriveMessageRequest) Execute() (*ResponseRetrieveMessage, *http.Response, error) { + return r.ApiService.RetriveMessageExecute(r) +} + +/* +RetriveMessage Retrieve details from a message + +Retrieve details from a specific message in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param messageId + @param threadId + @return ApiRetriveMessageRequest +*/ +func (a *AIStudioMessagesAPIService) RetriveMessage(ctx context.Context, messageId int64, threadId int64) ApiRetriveMessageRequest { + return ApiRetriveMessageRequest{ + ApiService: a, + ctx: ctx, + messageId: messageId, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseRetrieveMessage +func (a *AIStudioMessagesAPIService) RetriveMessageExecute(r ApiRetriveMessageRequest) (*ResponseRetrieveMessage, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveMessage + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioMessagesAPIService.RetriveMessage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}/messages/{message_id}" + localVarPath = strings.Replace(localVarPath, "{"+"message_id"+"}", url.PathEscape(parameterValueToString(r.messageId, "messageId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateMessageRequest struct { + ctx context.Context + ApiService *AIStudioMessagesAPIService + messageId int64 + threadId int64 + messageRequest *MessageRequest +} + +func (r ApiUpdateMessageRequest) MessageRequest(messageRequest MessageRequest) ApiUpdateMessageRequest { + r.messageRequest = &messageRequest + return r +} + +func (r ApiUpdateMessageRequest) Execute() (*ResponseMessage, *http.Response, error) { + return r.ApiService.UpdateMessageExecute(r) +} + +/* +UpdateMessage Update a message + +Update an existing message. This replaces the entire message with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param messageId + @param threadId + @return ApiUpdateMessageRequest +*/ +func (a *AIStudioMessagesAPIService) UpdateMessage(ctx context.Context, messageId int64, threadId int64) ApiUpdateMessageRequest { + return ApiUpdateMessageRequest{ + ApiService: a, + ctx: ctx, + messageId: messageId, + threadId: threadId, + } +} + +// Execute executes the request +// @return ResponseMessage +func (a *AIStudioMessagesAPIService) UpdateMessageExecute(r ApiUpdateMessageRequest) (*ResponseMessage, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseMessage + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioMessagesAPIService.UpdateMessage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/threads/{thread_id}/messages/{message_id}" + localVarPath = strings.Replace(localVarPath, "{"+"message_id"+"}", url.PathEscape(parameterValueToString(r.messageId, "messageId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"thread_id"+"}", url.PathEscape(parameterValueToString(r.threadId, "threadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.messageRequest == nil { + return localVarReturnValue, nil, reportError("messageRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.messageRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_ai_studio_tools.go b/azion-api/api_ai_studio_tools.go new file mode 100644 index 0000000..97b2382 --- /dev/null +++ b/azion-api/api_ai_studio_tools.go @@ -0,0 +1,1997 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AIStudioToolsAPIService AIStudioToolsAPI service +type AIStudioToolsAPIService service + +type ApiAddKnowledgeBaseToAToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolId int64 + toolRequest *ToolRequest +} + +func (r ApiAddKnowledgeBaseToAToolRequest) ToolRequest(toolRequest ToolRequest) ApiAddKnowledgeBaseToAToolRequest { + r.toolRequest = &toolRequest + return r +} + +func (r ApiAddKnowledgeBaseToAToolRequest) Execute() (*ToolKBLink, *http.Response, error) { + return r.ApiService.AddKnowledgeBaseToAToolExecute(r) +} + +/* +AddKnowledgeBaseToATool Add a knowledge base to a tool + +Add a new knowledge base to a specific tool for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param toolId + @return ApiAddKnowledgeBaseToAToolRequest +*/ +func (a *AIStudioToolsAPIService) AddKnowledgeBaseToATool(ctx context.Context, toolId int64) ApiAddKnowledgeBaseToAToolRequest { + return ApiAddKnowledgeBaseToAToolRequest{ + ApiService: a, + ctx: ctx, + toolId: toolId, + } +} + +// Execute executes the request +// @return ToolKBLink +func (a *AIStudioToolsAPIService) AddKnowledgeBaseToAToolExecute(r ApiAddKnowledgeBaseToAToolRequest) (*ToolKBLink, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ToolKBLink + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.AddKnowledgeBaseToATool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}/kbs" + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.toolRequest == nil { + return localVarReturnValue, nil, reportError("toolRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.toolRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolRequest *ToolRequest +} + +func (r ApiCreateToolRequest) ToolRequest(toolRequest ToolRequest) ApiCreateToolRequest { + r.toolRequest = &toolRequest + return r +} + +func (r ApiCreateToolRequest) Execute() (*ResponseTool, *http.Response, error) { + return r.ApiService.CreateToolExecute(r) +} + +/* +CreateTool Create a tool + +Create a new tool for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateToolRequest +*/ +func (a *AIStudioToolsAPIService) CreateTool(ctx context.Context) ApiCreateToolRequest { + return ApiCreateToolRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseTool +func (a *AIStudioToolsAPIService) CreateToolExecute(r ApiCreateToolRequest) (*ResponseTool, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseTool + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.CreateTool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.toolRequest == nil { + return localVarReturnValue, nil, reportError("toolRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.toolRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyAToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolId int64 +} + +func (r ApiDestroyAToolRequest) Execute() (*ResponseDeleteTool, *http.Response, error) { + return r.ApiService.DestroyAToolExecute(r) +} + +/* +DestroyATool Destroy a tool + +Destruction of a specific tool in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param toolId + @return ApiDestroyAToolRequest +*/ +func (a *AIStudioToolsAPIService) DestroyATool(ctx context.Context, toolId int64) ApiDestroyAToolRequest { + return ApiDestroyAToolRequest{ + ApiService: a, + ctx: ctx, + toolId: toolId, + } +} + +// Execute executes the request +// @return ResponseDeleteTool +func (a *AIStudioToolsAPIService) DestroyAToolExecute(r ApiDestroyAToolRequest) (*ResponseDeleteTool, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteTool + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.DestroyATool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListKnowledgeBasesLinkedToAToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListKnowledgeBasesLinkedToAToolRequest) Fields(fields string) ApiListKnowledgeBasesLinkedToAToolRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListKnowledgeBasesLinkedToAToolRequest) Ordering(ordering string) ApiListKnowledgeBasesLinkedToAToolRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListKnowledgeBasesLinkedToAToolRequest) Page(page int32) ApiListKnowledgeBasesLinkedToAToolRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListKnowledgeBasesLinkedToAToolRequest) PageSize(pageSize int32) ApiListKnowledgeBasesLinkedToAToolRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListKnowledgeBasesLinkedToAToolRequest) Search(search string) ApiListKnowledgeBasesLinkedToAToolRequest { + r.search = &search + return r +} + +func (r ApiListKnowledgeBasesLinkedToAToolRequest) Execute() (*PaginatedKnowledgeBaseList, *http.Response, error) { + return r.ApiService.ListKnowledgeBasesLinkedToAToolExecute(r) +} + +/* +ListKnowledgeBasesLinkedToATool List knowledge bases linked to a tool + +List all knowledge bases linked to a specific tool in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param toolId + @return ApiListKnowledgeBasesLinkedToAToolRequest +*/ +func (a *AIStudioToolsAPIService) ListKnowledgeBasesLinkedToATool(ctx context.Context, toolId int64) ApiListKnowledgeBasesLinkedToAToolRequest { + return ApiListKnowledgeBasesLinkedToAToolRequest{ + ApiService: a, + ctx: ctx, + toolId: toolId, + } +} + +// Execute executes the request +// @return PaginatedKnowledgeBaseList +func (a *AIStudioToolsAPIService) ListKnowledgeBasesLinkedToAToolExecute(r ApiListKnowledgeBasesLinkedToAToolRequest) (*PaginatedKnowledgeBaseList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedKnowledgeBaseList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.ListKnowledgeBasesLinkedToATool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}/kbs" + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListToolsRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListToolsRequest) Fields(fields string) ApiListToolsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListToolsRequest) Ordering(ordering string) ApiListToolsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListToolsRequest) Page(page int32) ApiListToolsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListToolsRequest) PageSize(pageSize int32) ApiListToolsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListToolsRequest) Search(search string) ApiListToolsRequest { + r.search = &search + return r +} + +func (r ApiListToolsRequest) Execute() (*PaginatedToolList, *http.Response, error) { + return r.ApiService.ListToolsExecute(r) +} + +/* +ListTools List tools + +List all tools owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListToolsRequest +*/ +func (a *AIStudioToolsAPIService) ListTools(ctx context.Context) ApiListToolsRequest { + return ApiListToolsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedToolList +func (a *AIStudioToolsAPIService) ListToolsExecute(r ApiListToolsRequest) (*PaginatedToolList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedToolList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.ListTools") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolId int64 + patchedToolRequest *PatchedToolRequest +} + +func (r ApiPartialUpdateToolRequest) PatchedToolRequest(patchedToolRequest PatchedToolRequest) ApiPartialUpdateToolRequest { + r.patchedToolRequest = &patchedToolRequest + return r +} + +func (r ApiPartialUpdateToolRequest) Execute() (*ResponseTool, *http.Response, error) { + return r.ApiService.PartialUpdateToolExecute(r) +} + +/* +PartialUpdateTool Partially update a tool + +Update one or more fields of an existing tool without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param toolId + @return ApiPartialUpdateToolRequest +*/ +func (a *AIStudioToolsAPIService) PartialUpdateTool(ctx context.Context, toolId int64) ApiPartialUpdateToolRequest { + return ApiPartialUpdateToolRequest{ + ApiService: a, + ctx: ctx, + toolId: toolId, + } +} + +// Execute executes the request +// @return ResponseTool +func (a *AIStudioToolsAPIService) PartialUpdateToolExecute(r ApiPartialUpdateToolRequest) (*ResponseTool, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseTool + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.PartialUpdateTool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedToolRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveKnowledgeBaseFromAToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + kbId int64 + toolId int64 +} + +func (r ApiRemoveKnowledgeBaseFromAToolRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveKnowledgeBaseFromAToolExecute(r) +} + +/* +RemoveKnowledgeBaseFromATool Remove a knowledge base from a tool + +Remove a specific knowledge base from a tool in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param kbId + @param toolId + @return ApiRemoveKnowledgeBaseFromAToolRequest +*/ +func (a *AIStudioToolsAPIService) RemoveKnowledgeBaseFromATool(ctx context.Context, kbId int64, toolId int64) ApiRemoveKnowledgeBaseFromAToolRequest { + return ApiRemoveKnowledgeBaseFromAToolRequest{ + ApiService: a, + ctx: ctx, + kbId: kbId, + toolId: toolId, + } +} + +// Execute executes the request +func (a *AIStudioToolsAPIService) RemoveKnowledgeBaseFromAToolExecute(r ApiRemoveKnowledgeBaseFromAToolRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.RemoveKnowledgeBaseFromATool") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}/kbs/{kb_id}" + localVarPath = strings.Replace(localVarPath, "{"+"kb_id"+"}", url.PathEscape(parameterValueToString(r.kbId, "kbId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiRetriveToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetriveToolRequest) Fields(fields string) ApiRetriveToolRequest { + r.fields = &fields + return r +} + +func (r ApiRetriveToolRequest) Execute() (*ResponseRetrieveTool, *http.Response, error) { + return r.ApiService.RetriveToolExecute(r) +} + +/* +RetriveTool Retrieve details from a tool + +Retrieve details from a specific tool in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param toolId + @return ApiRetriveToolRequest +*/ +func (a *AIStudioToolsAPIService) RetriveTool(ctx context.Context, toolId int64) ApiRetriveToolRequest { + return ApiRetriveToolRequest{ + ApiService: a, + ctx: ctx, + toolId: toolId, + } +} + +// Execute executes the request +// @return ResponseRetrieveTool +func (a *AIStudioToolsAPIService) RetriveToolExecute(r ApiRetriveToolRequest) (*ResponseRetrieveTool, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveTool + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.RetriveTool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateToolRequest struct { + ctx context.Context + ApiService *AIStudioToolsAPIService + toolId int64 + toolRequest *ToolRequest +} + +func (r ApiUpdateToolRequest) ToolRequest(toolRequest ToolRequest) ApiUpdateToolRequest { + r.toolRequest = &toolRequest + return r +} + +func (r ApiUpdateToolRequest) Execute() (*ResponseTool, *http.Response, error) { + return r.ApiService.UpdateToolExecute(r) +} + +/* +UpdateTool Update a tool + +Update an existing tool. This replaces the entire tool with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param toolId + @return ApiUpdateToolRequest +*/ +func (a *AIStudioToolsAPIService) UpdateTool(ctx context.Context, toolId int64) ApiUpdateToolRequest { + return ApiUpdateToolRequest{ + ApiService: a, + ctx: ctx, + toolId: toolId, + } +} + +// Execute executes the request +// @return ResponseTool +func (a *AIStudioToolsAPIService) UpdateToolExecute(r ApiUpdateToolRequest) (*ResponseTool, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseTool + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AIStudioToolsAPIService.UpdateTool") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/ai/tools/{tool_id}" + localVarPath = strings.Replace(localVarPath, "{"+"tool_id"+"}", url.PathEscape(parameterValueToString(r.toolId, "toolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.toolRequest == nil { + return localVarReturnValue, nil, reportError("toolRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.toolRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_applications.go b/azion-api/api_applications.go new file mode 100644 index 0000000..85f21ea --- /dev/null +++ b/azion-api/api_applications.go @@ -0,0 +1,1607 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ApplicationsAPIService ApplicationsAPI service +type ApplicationsAPIService service + +type ApiCloneApplicationRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + applicationId int64 + cloneApplicationRequest *CloneApplicationRequest +} + +func (r ApiCloneApplicationRequest) CloneApplicationRequest(cloneApplicationRequest CloneApplicationRequest) ApiCloneApplicationRequest { + r.cloneApplicationRequest = &cloneApplicationRequest + return r +} + +func (r ApiCloneApplicationRequest) Execute() (*ApplicationResponse, *http.Response, error) { + return r.ApiService.CloneApplicationExecute(r) +} + +/* +CloneApplication Clone an Application + +Create a new Application by performing a deep copy of an existing Application, including its Cache Settings, Origins, Error Responses, Function Instances, and Rules Engine. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiCloneApplicationRequest +*/ +func (a *ApplicationsAPIService) CloneApplication(ctx context.Context, applicationId int64) ApiCloneApplicationRequest { + return ApiCloneApplicationRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return ApplicationResponse +func (a *ApplicationsAPIService) CloneApplicationExecute(r ApiCloneApplicationRequest) (*ApplicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApplicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.CloneApplication") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cloneApplicationRequest == nil { + return localVarReturnValue, nil, reportError("cloneApplicationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cloneApplicationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateApplicationRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + applicationRequest *ApplicationRequest +} + +func (r ApiCreateApplicationRequest) ApplicationRequest(applicationRequest ApplicationRequest) ApiCreateApplicationRequest { + r.applicationRequest = &applicationRequest + return r +} + +func (r ApiCreateApplicationRequest) Execute() (*ApplicationResponse, *http.Response, error) { + return r.ApiService.CreateApplicationExecute(r) +} + +/* +CreateApplication Create an Application + +Create a new Application in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateApplicationRequest +*/ +func (a *ApplicationsAPIService) CreateApplication(ctx context.Context) ApiCreateApplicationRequest { + return ApiCreateApplicationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ApplicationResponse +func (a *ApplicationsAPIService) CreateApplicationExecute(r ApiCreateApplicationRequest) (*ApplicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApplicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.CreateApplication") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.applicationRequest == nil { + return localVarReturnValue, nil, reportError("applicationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.applicationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApplicationRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + applicationId int64 +} + +func (r ApiDeleteApplicationRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteApplicationExecute(r) +} + +/* +DeleteApplication Delete an Application + +Delete a specific Application in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiDeleteApplicationRequest +*/ +func (a *ApplicationsAPIService) DeleteApplication(ctx context.Context, applicationId int64) ApiDeleteApplicationRequest { + return ApiDeleteApplicationRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ApplicationsAPIService) DeleteApplicationExecute(r ApiDeleteApplicationRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.DeleteApplication") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListApplicationsRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + active *bool + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListApplicationsRequest) Active(active bool) ApiListApplicationsRequest { + r.active = &active + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListApplicationsRequest) Fields(fields string) ApiListApplicationsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListApplicationsRequest) Id(id int64) ApiListApplicationsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListApplicationsRequest) LastEditor(lastEditor string) ApiListApplicationsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListApplicationsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListApplicationsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListApplicationsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListApplicationsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListApplicationsRequest) Name(name string) ApiListApplicationsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListApplicationsRequest) Ordering(ordering string) ApiListApplicationsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListApplicationsRequest) Page(page int32) ApiListApplicationsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListApplicationsRequest) PageSize(pageSize int32) ApiListApplicationsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListApplicationsRequest) Search(search string) ApiListApplicationsRequest { + r.search = &search + return r +} + +func (r ApiListApplicationsRequest) Execute() (*PaginatedApplicationList, *http.Response, error) { + return r.ApiService.ListApplicationsExecute(r) +} + +/* +ListApplications List Applications + +List all Applications owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListApplicationsRequest +*/ +func (a *ApplicationsAPIService) ListApplications(ctx context.Context) ApiListApplicationsRequest { + return ApiListApplicationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedApplicationList +func (a *ApplicationsAPIService) ListApplicationsExecute(r ApiListApplicationsRequest) (*PaginatedApplicationList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedApplicationList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.ListApplications") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateApplicationRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + applicationId int64 + patchedApplicationRequest *PatchedApplicationRequest +} + +func (r ApiPartialUpdateApplicationRequest) PatchedApplicationRequest(patchedApplicationRequest PatchedApplicationRequest) ApiPartialUpdateApplicationRequest { + r.patchedApplicationRequest = &patchedApplicationRequest + return r +} + +func (r ApiPartialUpdateApplicationRequest) Execute() (*ApplicationResponse, *http.Response, error) { + return r.ApiService.PartialUpdateApplicationExecute(r) +} + +/* +PartialUpdateApplication Partially update an Application + +Update one or more fields of an existing Application without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiPartialUpdateApplicationRequest +*/ +func (a *ApplicationsAPIService) PartialUpdateApplication(ctx context.Context, applicationId int64) ApiPartialUpdateApplicationRequest { + return ApiPartialUpdateApplicationRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return ApplicationResponse +func (a *ApplicationsAPIService) PartialUpdateApplicationExecute(r ApiPartialUpdateApplicationRequest) (*ApplicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApplicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.PartialUpdateApplication") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedApplicationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveApplicationRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + applicationId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveApplicationRequest) Fields(fields string) ApiRetrieveApplicationRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveApplicationRequest) Execute() (*ApplicationResponse, *http.Response, error) { + return r.ApiService.RetrieveApplicationExecute(r) +} + +/* +RetrieveApplication Retrieve details of an Application + +Retrieve details of a specific Application in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiRetrieveApplicationRequest +*/ +func (a *ApplicationsAPIService) RetrieveApplication(ctx context.Context, applicationId int64) ApiRetrieveApplicationRequest { + return ApiRetrieveApplicationRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return ApplicationResponse +func (a *ApplicationsAPIService) RetrieveApplicationExecute(r ApiRetrieveApplicationRequest) (*ApplicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApplicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.RetrieveApplication") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApplicationRequest struct { + ctx context.Context + ApiService *ApplicationsAPIService + applicationId int64 + applicationRequest *ApplicationRequest +} + +func (r ApiUpdateApplicationRequest) ApplicationRequest(applicationRequest ApplicationRequest) ApiUpdateApplicationRequest { + r.applicationRequest = &applicationRequest + return r +} + +func (r ApiUpdateApplicationRequest) Execute() (*ApplicationResponse, *http.Response, error) { + return r.ApiService.UpdateApplicationExecute(r) +} + +/* +UpdateApplication Update an Application + +Update an existing Application. This replaces the entire Application with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiUpdateApplicationRequest +*/ +func (a *ApplicationsAPIService) UpdateApplication(ctx context.Context, applicationId int64) ApiUpdateApplicationRequest { + return ApiUpdateApplicationRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return ApplicationResponse +func (a *ApplicationsAPIService) UpdateApplicationExecute(r ApiUpdateApplicationRequest) (*ApplicationResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ApplicationResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsAPIService.UpdateApplication") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.applicationRequest == nil { + return localVarReturnValue, nil, reportError("applicationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.applicationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_applications_cache_settings.go b/azion-api/api_applications_cache_settings.go new file mode 100644 index 0000000..2de74cb --- /dev/null +++ b/azion-api/api_applications_cache_settings.go @@ -0,0 +1,1375 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// ApplicationsCacheSettingsAPIService ApplicationsCacheSettingsAPI service +type ApplicationsCacheSettingsAPIService service + +type ApiCreateCacheSettingRequest struct { + ctx context.Context + ApiService *ApplicationsCacheSettingsAPIService + applicationId int64 + cacheSettingRequest *CacheSettingRequest +} + +func (r ApiCreateCacheSettingRequest) CacheSettingRequest(cacheSettingRequest CacheSettingRequest) ApiCreateCacheSettingRequest { + r.cacheSettingRequest = &cacheSettingRequest + return r +} + +func (r ApiCreateCacheSettingRequest) Execute() (*CacheSettingResponse, *http.Response, error) { + return r.ApiService.CreateCacheSettingExecute(r) +} + +/* +CreateCacheSetting Create an Applications Cache Setting + +Create a new Cache Setting in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiCreateCacheSettingRequest +*/ +func (a *ApplicationsCacheSettingsAPIService) CreateCacheSetting(ctx context.Context, applicationId int64) ApiCreateCacheSettingRequest { + return ApiCreateCacheSettingRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return CacheSettingResponse +func (a *ApplicationsCacheSettingsAPIService) CreateCacheSettingExecute(r ApiCreateCacheSettingRequest) (*CacheSettingResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CacheSettingResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsCacheSettingsAPIService.CreateCacheSetting") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/cache_settings" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cacheSettingRequest == nil { + return localVarReturnValue, nil, reportError("cacheSettingRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cacheSettingRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteCacheSettingRequest struct { + ctx context.Context + ApiService *ApplicationsCacheSettingsAPIService + applicationId int64 + cacheSettingId int64 +} + +func (r ApiDeleteCacheSettingRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteCacheSettingExecute(r) +} + +/* +DeleteCacheSetting Delete an Applications Cache Setting + +Delete a specific Cache Setting in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param cacheSettingId A unique integer value identifying the cache setting. + @return ApiDeleteCacheSettingRequest +*/ +func (a *ApplicationsCacheSettingsAPIService) DeleteCacheSetting(ctx context.Context, applicationId int64, cacheSettingId int64) ApiDeleteCacheSettingRequest { + return ApiDeleteCacheSettingRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + cacheSettingId: cacheSettingId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ApplicationsCacheSettingsAPIService) DeleteCacheSettingExecute(r ApiDeleteCacheSettingRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsCacheSettingsAPIService.DeleteCacheSetting") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/cache_settings/{cache_setting_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"cache_setting_id"+"}", url.PathEscape(parameterValueToString(r.cacheSettingId, "cacheSettingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListCacheSettingsRequest struct { + ctx context.Context + ApiService *ApplicationsCacheSettingsAPIService + applicationId int64 + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListCacheSettingsRequest) Fields(fields string) ApiListCacheSettingsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListCacheSettingsRequest) Id(id int64) ApiListCacheSettingsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListCacheSettingsRequest) Name(name string) ApiListCacheSettingsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListCacheSettingsRequest) Ordering(ordering string) ApiListCacheSettingsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListCacheSettingsRequest) Page(page int32) ApiListCacheSettingsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListCacheSettingsRequest) PageSize(pageSize int32) ApiListCacheSettingsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListCacheSettingsRequest) Search(search string) ApiListCacheSettingsRequest { + r.search = &search + return r +} + +func (r ApiListCacheSettingsRequest) Execute() (*PaginatedCacheSettingList, *http.Response, error) { + return r.ApiService.ListCacheSettingsExecute(r) +} + +/* +ListCacheSettings List all Applications Cache Settings + +List all Cache Settings owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiListCacheSettingsRequest +*/ +func (a *ApplicationsCacheSettingsAPIService) ListCacheSettings(ctx context.Context, applicationId int64) ApiListCacheSettingsRequest { + return ApiListCacheSettingsRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedCacheSettingList +func (a *ApplicationsCacheSettingsAPIService) ListCacheSettingsExecute(r ApiListCacheSettingsRequest) (*PaginatedCacheSettingList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCacheSettingList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsCacheSettingsAPIService.ListCacheSettings") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/cache_settings" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateCacheSettingRequest struct { + ctx context.Context + ApiService *ApplicationsCacheSettingsAPIService + applicationId int64 + cacheSettingId int64 + patchedCacheSettingRequest *PatchedCacheSettingRequest +} + +func (r ApiPartialUpdateCacheSettingRequest) PatchedCacheSettingRequest(patchedCacheSettingRequest PatchedCacheSettingRequest) ApiPartialUpdateCacheSettingRequest { + r.patchedCacheSettingRequest = &patchedCacheSettingRequest + return r +} + +func (r ApiPartialUpdateCacheSettingRequest) Execute() (*CacheSettingResponse, *http.Response, error) { + return r.ApiService.PartialUpdateCacheSettingExecute(r) +} + +/* +PartialUpdateCacheSetting Partially update an Applications Cache Setting + +Update one or more fields of an existing Cache Setting without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param cacheSettingId A unique integer value identifying the cache setting. + @return ApiPartialUpdateCacheSettingRequest +*/ +func (a *ApplicationsCacheSettingsAPIService) PartialUpdateCacheSetting(ctx context.Context, applicationId int64, cacheSettingId int64) ApiPartialUpdateCacheSettingRequest { + return ApiPartialUpdateCacheSettingRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + cacheSettingId: cacheSettingId, + } +} + +// Execute executes the request +// @return CacheSettingResponse +func (a *ApplicationsCacheSettingsAPIService) PartialUpdateCacheSettingExecute(r ApiPartialUpdateCacheSettingRequest) (*CacheSettingResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CacheSettingResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsCacheSettingsAPIService.PartialUpdateCacheSetting") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/cache_settings/{cache_setting_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"cache_setting_id"+"}", url.PathEscape(parameterValueToString(r.cacheSettingId, "cacheSettingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCacheSettingRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveCacheSettingRequest struct { + ctx context.Context + ApiService *ApplicationsCacheSettingsAPIService + applicationId int64 + cacheSettingId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveCacheSettingRequest) Fields(fields string) ApiRetrieveCacheSettingRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveCacheSettingRequest) Execute() (*CacheSetting, *http.Response, error) { + return r.ApiService.RetrieveCacheSettingExecute(r) +} + +/* +RetrieveCacheSetting Retrieve details of an Applications Cache Setting + +Retrieve details of a specific Cache Setting in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param cacheSettingId A unique integer value identifying the cache setting. + @return ApiRetrieveCacheSettingRequest +*/ +func (a *ApplicationsCacheSettingsAPIService) RetrieveCacheSetting(ctx context.Context, applicationId int64, cacheSettingId int64) ApiRetrieveCacheSettingRequest { + return ApiRetrieveCacheSettingRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + cacheSettingId: cacheSettingId, + } +} + +// Execute executes the request +// @return CacheSetting +func (a *ApplicationsCacheSettingsAPIService) RetrieveCacheSettingExecute(r ApiRetrieveCacheSettingRequest) (*CacheSetting, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CacheSetting + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsCacheSettingsAPIService.RetrieveCacheSetting") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/cache_settings/{cache_setting_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"cache_setting_id"+"}", url.PathEscape(parameterValueToString(r.cacheSettingId, "cacheSettingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateCacheSettingRequest struct { + ctx context.Context + ApiService *ApplicationsCacheSettingsAPIService + applicationId int64 + cacheSettingId int64 + cacheSettingRequest *CacheSettingRequest +} + +func (r ApiUpdateCacheSettingRequest) CacheSettingRequest(cacheSettingRequest CacheSettingRequest) ApiUpdateCacheSettingRequest { + r.cacheSettingRequest = &cacheSettingRequest + return r +} + +func (r ApiUpdateCacheSettingRequest) Execute() (*CacheSettingResponse, *http.Response, error) { + return r.ApiService.UpdateCacheSettingExecute(r) +} + +/* +UpdateCacheSetting Update an Applications Cache Setting + +Update an existing Cache Setting. This replaces the entire Cache Setting with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param cacheSettingId A unique integer value identifying the cache setting. + @return ApiUpdateCacheSettingRequest +*/ +func (a *ApplicationsCacheSettingsAPIService) UpdateCacheSetting(ctx context.Context, applicationId int64, cacheSettingId int64) ApiUpdateCacheSettingRequest { + return ApiUpdateCacheSettingRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + cacheSettingId: cacheSettingId, + } +} + +// Execute executes the request +// @return CacheSettingResponse +func (a *ApplicationsCacheSettingsAPIService) UpdateCacheSettingExecute(r ApiUpdateCacheSettingRequest) (*CacheSettingResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CacheSettingResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsCacheSettingsAPIService.UpdateCacheSetting") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/cache_settings/{cache_setting_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"cache_setting_id"+"}", url.PathEscape(parameterValueToString(r.cacheSettingId, "cacheSettingId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cacheSettingRequest == nil { + return localVarReturnValue, nil, reportError("cacheSettingRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cacheSettingRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_applications_device_groups.go b/azion-api/api_applications_device_groups.go new file mode 100644 index 0000000..d4e51a1 --- /dev/null +++ b/azion-api/api_applications_device_groups.go @@ -0,0 +1,1385 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// ApplicationsDeviceGroupsAPIService ApplicationsDeviceGroupsAPI service +type ApplicationsDeviceGroupsAPIService service + +type ApiCreateDeviceGroupRequest struct { + ctx context.Context + ApiService *ApplicationsDeviceGroupsAPIService + applicationId int64 + deviceGroupRequest *DeviceGroupRequest +} + +func (r ApiCreateDeviceGroupRequest) DeviceGroupRequest(deviceGroupRequest DeviceGroupRequest) ApiCreateDeviceGroupRequest { + r.deviceGroupRequest = &deviceGroupRequest + return r +} + +func (r ApiCreateDeviceGroupRequest) Execute() (*DeviceGroupResponse, *http.Response, error) { + return r.ApiService.CreateDeviceGroupExecute(r) +} + +/* +CreateDeviceGroup Create an Applications Device Group + +Create a new Device Group in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiCreateDeviceGroupRequest +*/ +func (a *ApplicationsDeviceGroupsAPIService) CreateDeviceGroup(ctx context.Context, applicationId int64) ApiCreateDeviceGroupRequest { + return ApiCreateDeviceGroupRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return DeviceGroupResponse +func (a *ApplicationsDeviceGroupsAPIService) CreateDeviceGroupExecute(r ApiCreateDeviceGroupRequest) (*DeviceGroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeviceGroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsDeviceGroupsAPIService.CreateDeviceGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/device_groups" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deviceGroupRequest == nil { + return localVarReturnValue, nil, reportError("deviceGroupRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deviceGroupRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDeviceGroupRequest struct { + ctx context.Context + ApiService *ApplicationsDeviceGroupsAPIService + applicationId int64 + deviceGroupId int64 +} + +func (r ApiDeleteDeviceGroupRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteDeviceGroupExecute(r) +} + +/* +DeleteDeviceGroup Delete an Applications Device Group + +Delete a specific Device Group in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param deviceGroupId A unique integer value identifying the device group. + @return ApiDeleteDeviceGroupRequest +*/ +func (a *ApplicationsDeviceGroupsAPIService) DeleteDeviceGroup(ctx context.Context, applicationId int64, deviceGroupId int64) ApiDeleteDeviceGroupRequest { + return ApiDeleteDeviceGroupRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + deviceGroupId: deviceGroupId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ApplicationsDeviceGroupsAPIService) DeleteDeviceGroupExecute(r ApiDeleteDeviceGroupRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsDeviceGroupsAPIService.DeleteDeviceGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/device_groups/{device_group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_group_id"+"}", url.PathEscape(parameterValueToString(r.deviceGroupId, "deviceGroupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDeviceGroupsRequest struct { + ctx context.Context + ApiService *ApplicationsDeviceGroupsAPIService + applicationId int64 + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + userAgent *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDeviceGroupsRequest) Fields(fields string) ApiListDeviceGroupsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListDeviceGroupsRequest) Id(id int64) ApiListDeviceGroupsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListDeviceGroupsRequest) Name(name string) ApiListDeviceGroupsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDeviceGroupsRequest) Ordering(ordering string) ApiListDeviceGroupsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDeviceGroupsRequest) Page(page int32) ApiListDeviceGroupsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDeviceGroupsRequest) PageSize(pageSize int32) ApiListDeviceGroupsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDeviceGroupsRequest) Search(search string) ApiListDeviceGroupsRequest { + r.search = &search + return r +} + +// Filter by user agent (case-insensitive, partial match). +func (r ApiListDeviceGroupsRequest) UserAgent(userAgent string) ApiListDeviceGroupsRequest { + r.userAgent = &userAgent + return r +} + +func (r ApiListDeviceGroupsRequest) Execute() (*PaginatedDeviceGroupList, *http.Response, error) { + return r.ApiService.ListDeviceGroupsExecute(r) +} + +/* +ListDeviceGroups List Applications Device Groups + +List all Device Groups owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiListDeviceGroupsRequest +*/ +func (a *ApplicationsDeviceGroupsAPIService) ListDeviceGroups(ctx context.Context, applicationId int64) ApiListDeviceGroupsRequest { + return ApiListDeviceGroupsRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedDeviceGroupList +func (a *ApplicationsDeviceGroupsAPIService) ListDeviceGroupsExecute(r ApiListDeviceGroupsRequest) (*PaginatedDeviceGroupList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDeviceGroupList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsDeviceGroupsAPIService.ListDeviceGroups") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/device_groups" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.userAgent != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "user_agent", r.userAgent, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateDeviceGroupRequest struct { + ctx context.Context + ApiService *ApplicationsDeviceGroupsAPIService + applicationId int64 + deviceGroupId int64 + patchedDeviceGroupRequest *PatchedDeviceGroupRequest +} + +func (r ApiPartialUpdateDeviceGroupRequest) PatchedDeviceGroupRequest(patchedDeviceGroupRequest PatchedDeviceGroupRequest) ApiPartialUpdateDeviceGroupRequest { + r.patchedDeviceGroupRequest = &patchedDeviceGroupRequest + return r +} + +func (r ApiPartialUpdateDeviceGroupRequest) Execute() (*DeviceGroupResponse, *http.Response, error) { + return r.ApiService.PartialUpdateDeviceGroupExecute(r) +} + +/* +PartialUpdateDeviceGroup Partially update an Applications Device Group + +Update one or more fields of an existing Device Group without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param deviceGroupId A unique integer value identifying the device group. + @return ApiPartialUpdateDeviceGroupRequest +*/ +func (a *ApplicationsDeviceGroupsAPIService) PartialUpdateDeviceGroup(ctx context.Context, applicationId int64, deviceGroupId int64) ApiPartialUpdateDeviceGroupRequest { + return ApiPartialUpdateDeviceGroupRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + deviceGroupId: deviceGroupId, + } +} + +// Execute executes the request +// @return DeviceGroupResponse +func (a *ApplicationsDeviceGroupsAPIService) PartialUpdateDeviceGroupExecute(r ApiPartialUpdateDeviceGroupRequest) (*DeviceGroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeviceGroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsDeviceGroupsAPIService.PartialUpdateDeviceGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/device_groups/{device_group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_group_id"+"}", url.PathEscape(parameterValueToString(r.deviceGroupId, "deviceGroupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedDeviceGroupRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDeviceGroupRequest struct { + ctx context.Context + ApiService *ApplicationsDeviceGroupsAPIService + applicationId int64 + deviceGroupId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDeviceGroupRequest) Fields(fields string) ApiRetrieveDeviceGroupRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDeviceGroupRequest) Execute() (*DeviceGroupResponse, *http.Response, error) { + return r.ApiService.RetrieveDeviceGroupExecute(r) +} + +/* +RetrieveDeviceGroup Retrieve details of a Device Group + +Retrieve details of a specific Device Group in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param deviceGroupId A unique integer value identifying the device group. + @return ApiRetrieveDeviceGroupRequest +*/ +func (a *ApplicationsDeviceGroupsAPIService) RetrieveDeviceGroup(ctx context.Context, applicationId int64, deviceGroupId int64) ApiRetrieveDeviceGroupRequest { + return ApiRetrieveDeviceGroupRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + deviceGroupId: deviceGroupId, + } +} + +// Execute executes the request +// @return DeviceGroupResponse +func (a *ApplicationsDeviceGroupsAPIService) RetrieveDeviceGroupExecute(r ApiRetrieveDeviceGroupRequest) (*DeviceGroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeviceGroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsDeviceGroupsAPIService.RetrieveDeviceGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/device_groups/{device_group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_group_id"+"}", url.PathEscape(parameterValueToString(r.deviceGroupId, "deviceGroupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDeviceGroupRequest struct { + ctx context.Context + ApiService *ApplicationsDeviceGroupsAPIService + applicationId int64 + deviceGroupId int64 + deviceGroupRequest *DeviceGroupRequest +} + +func (r ApiUpdateDeviceGroupRequest) DeviceGroupRequest(deviceGroupRequest DeviceGroupRequest) ApiUpdateDeviceGroupRequest { + r.deviceGroupRequest = &deviceGroupRequest + return r +} + +func (r ApiUpdateDeviceGroupRequest) Execute() (*DeviceGroupResponse, *http.Response, error) { + return r.ApiService.UpdateDeviceGroupExecute(r) +} + +/* +UpdateDeviceGroup Update an Applications Device Group + +Update an existing Device Group. This replaces the entire Device Group with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param deviceGroupId A unique integer value identifying the device group. + @return ApiUpdateDeviceGroupRequest +*/ +func (a *ApplicationsDeviceGroupsAPIService) UpdateDeviceGroup(ctx context.Context, applicationId int64, deviceGroupId int64) ApiUpdateDeviceGroupRequest { + return ApiUpdateDeviceGroupRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + deviceGroupId: deviceGroupId, + } +} + +// Execute executes the request +// @return DeviceGroupResponse +func (a *ApplicationsDeviceGroupsAPIService) UpdateDeviceGroupExecute(r ApiUpdateDeviceGroupRequest) (*DeviceGroupResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeviceGroupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsDeviceGroupsAPIService.UpdateDeviceGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/device_groups/{device_group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"device_group_id"+"}", url.PathEscape(parameterValueToString(r.deviceGroupId, "deviceGroupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.deviceGroupRequest == nil { + return localVarReturnValue, nil, reportError("deviceGroupRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.deviceGroupRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_applications_function.go b/azion-api/api_applications_function.go new file mode 100644 index 0000000..3758b8c --- /dev/null +++ b/azion-api/api_applications_function.go @@ -0,0 +1,1406 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ApplicationsFunctionAPIService ApplicationsFunctionAPI service +type ApplicationsFunctionAPIService service + +type ApiCreateApplicationFunctionInstanceRequest struct { + ctx context.Context + ApiService *ApplicationsFunctionAPIService + applicationId int64 + functionInstanceRequest *FunctionInstanceRequest +} + +func (r ApiCreateApplicationFunctionInstanceRequest) FunctionInstanceRequest(functionInstanceRequest FunctionInstanceRequest) ApiCreateApplicationFunctionInstanceRequest { + r.functionInstanceRequest = &functionInstanceRequest + return r +} + +func (r ApiCreateApplicationFunctionInstanceRequest) Execute() (*FunctionInstanceResponse, *http.Response, error) { + return r.ApiService.CreateApplicationFunctionInstanceExecute(r) +} + +/* +CreateApplicationFunctionInstance Create an Application Function Instance + +Create a new Function Instance for a specific Application in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiCreateApplicationFunctionInstanceRequest +*/ +func (a *ApplicationsFunctionAPIService) CreateApplicationFunctionInstance(ctx context.Context, applicationId int64) ApiCreateApplicationFunctionInstanceRequest { + return ApiCreateApplicationFunctionInstanceRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return FunctionInstanceResponse +func (a *ApplicationsFunctionAPIService) CreateApplicationFunctionInstanceExecute(r ApiCreateApplicationFunctionInstanceRequest) (*FunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsFunctionAPIService.CreateApplicationFunctionInstance") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/functions" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.functionInstanceRequest == nil { + return localVarReturnValue, nil, reportError("functionInstanceRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.functionInstanceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApplicationFunctionInstanceRequest struct { + ctx context.Context + ApiService *ApplicationsFunctionAPIService + applicationId int64 + functionId int64 +} + +func (r ApiDeleteApplicationFunctionInstanceRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteApplicationFunctionInstanceExecute(r) +} + +/* +DeleteApplicationFunctionInstance Delete an Application Function Instance + +Delete a specific Application Function Instance in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param functionId A unique integer value identifying the function instance. + @return ApiDeleteApplicationFunctionInstanceRequest +*/ +func (a *ApplicationsFunctionAPIService) DeleteApplicationFunctionInstance(ctx context.Context, applicationId int64, functionId int64) ApiDeleteApplicationFunctionInstanceRequest { + return ApiDeleteApplicationFunctionInstanceRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + functionId: functionId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ApplicationsFunctionAPIService) DeleteApplicationFunctionInstanceExecute(r ApiDeleteApplicationFunctionInstanceRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsFunctionAPIService.DeleteApplicationFunctionInstance") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListApplicationFunctionInstancesRequest struct { + ctx context.Context + ApiService *ApplicationsFunctionAPIService + applicationId int64 + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListApplicationFunctionInstancesRequest) Fields(fields string) ApiListApplicationFunctionInstancesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListApplicationFunctionInstancesRequest) Id(id int64) ApiListApplicationFunctionInstancesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListApplicationFunctionInstancesRequest) LastEditor(lastEditor string) ApiListApplicationFunctionInstancesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListApplicationFunctionInstancesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListApplicationFunctionInstancesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListApplicationFunctionInstancesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListApplicationFunctionInstancesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListApplicationFunctionInstancesRequest) Name(name string) ApiListApplicationFunctionInstancesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListApplicationFunctionInstancesRequest) Ordering(ordering string) ApiListApplicationFunctionInstancesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListApplicationFunctionInstancesRequest) Page(page int32) ApiListApplicationFunctionInstancesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListApplicationFunctionInstancesRequest) PageSize(pageSize int32) ApiListApplicationFunctionInstancesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListApplicationFunctionInstancesRequest) Search(search string) ApiListApplicationFunctionInstancesRequest { + r.search = &search + return r +} + +func (r ApiListApplicationFunctionInstancesRequest) Execute() (*PaginatedFunctionInstanceList, *http.Response, error) { + return r.ApiService.ListApplicationFunctionInstancesExecute(r) +} + +/* +ListApplicationFunctionInstances List Function Instances + +List all Function Instances for a specific Application owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiListApplicationFunctionInstancesRequest +*/ +func (a *ApplicationsFunctionAPIService) ListApplicationFunctionInstances(ctx context.Context, applicationId int64) ApiListApplicationFunctionInstancesRequest { + return ApiListApplicationFunctionInstancesRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedFunctionInstanceList +func (a *ApplicationsFunctionAPIService) ListApplicationFunctionInstancesExecute(r ApiListApplicationFunctionInstancesRequest) (*PaginatedFunctionInstanceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFunctionInstanceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsFunctionAPIService.ListApplicationFunctionInstances") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/functions" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateApplicationFunctionInstanceRequest struct { + ctx context.Context + ApiService *ApplicationsFunctionAPIService + applicationId int64 + functionId int64 + patchedFunctionInstanceRequest *PatchedFunctionInstanceRequest +} + +func (r ApiPartialUpdateApplicationFunctionInstanceRequest) PatchedFunctionInstanceRequest(patchedFunctionInstanceRequest PatchedFunctionInstanceRequest) ApiPartialUpdateApplicationFunctionInstanceRequest { + r.patchedFunctionInstanceRequest = &patchedFunctionInstanceRequest + return r +} + +func (r ApiPartialUpdateApplicationFunctionInstanceRequest) Execute() (*FunctionInstanceResponse, *http.Response, error) { + return r.ApiService.PartialUpdateApplicationFunctionInstanceExecute(r) +} + +/* +PartialUpdateApplicationFunctionInstance Partially update an Application Function Instance + +Update one or more fields of an existing Application Function Instance without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param functionId A unique integer value identifying the function instance. + @return ApiPartialUpdateApplicationFunctionInstanceRequest +*/ +func (a *ApplicationsFunctionAPIService) PartialUpdateApplicationFunctionInstance(ctx context.Context, applicationId int64, functionId int64) ApiPartialUpdateApplicationFunctionInstanceRequest { + return ApiPartialUpdateApplicationFunctionInstanceRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + functionId: functionId, + } +} + +// Execute executes the request +// @return FunctionInstanceResponse +func (a *ApplicationsFunctionAPIService) PartialUpdateApplicationFunctionInstanceExecute(r ApiPartialUpdateApplicationFunctionInstanceRequest) (*FunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsFunctionAPIService.PartialUpdateApplicationFunctionInstance") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFunctionInstanceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveApplicationFunctionInstanceRequest struct { + ctx context.Context + ApiService *ApplicationsFunctionAPIService + applicationId int64 + functionId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveApplicationFunctionInstanceRequest) Fields(fields string) ApiRetrieveApplicationFunctionInstanceRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveApplicationFunctionInstanceRequest) Execute() (*FunctionInstanceResponse, *http.Response, error) { + return r.ApiService.RetrieveApplicationFunctionInstanceExecute(r) +} + +/* +RetrieveApplicationFunctionInstance Retrieve details of an Application Function Instance + +Retrieve details of a specific Application Function Instance in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param functionId A unique integer value identifying the function instance. + @return ApiRetrieveApplicationFunctionInstanceRequest +*/ +func (a *ApplicationsFunctionAPIService) RetrieveApplicationFunctionInstance(ctx context.Context, applicationId int64, functionId int64) ApiRetrieveApplicationFunctionInstanceRequest { + return ApiRetrieveApplicationFunctionInstanceRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + functionId: functionId, + } +} + +// Execute executes the request +// @return FunctionInstanceResponse +func (a *ApplicationsFunctionAPIService) RetrieveApplicationFunctionInstanceExecute(r ApiRetrieveApplicationFunctionInstanceRequest) (*FunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsFunctionAPIService.RetrieveApplicationFunctionInstance") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApplicationFunctionInstanceRequest struct { + ctx context.Context + ApiService *ApplicationsFunctionAPIService + applicationId int64 + functionId int64 + functionInstanceRequest *FunctionInstanceRequest +} + +func (r ApiUpdateApplicationFunctionInstanceRequest) FunctionInstanceRequest(functionInstanceRequest FunctionInstanceRequest) ApiUpdateApplicationFunctionInstanceRequest { + r.functionInstanceRequest = &functionInstanceRequest + return r +} + +func (r ApiUpdateApplicationFunctionInstanceRequest) Execute() (*FunctionInstanceResponse, *http.Response, error) { + return r.ApiService.UpdateApplicationFunctionInstanceExecute(r) +} + +/* +UpdateApplicationFunctionInstance Update an Application Function Instance + +Update an existing Application Function Instance. This replaces the entire Function Instance with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param functionId A unique integer value identifying the function instance. + @return ApiUpdateApplicationFunctionInstanceRequest +*/ +func (a *ApplicationsFunctionAPIService) UpdateApplicationFunctionInstance(ctx context.Context, applicationId int64, functionId int64) ApiUpdateApplicationFunctionInstanceRequest { + return ApiUpdateApplicationFunctionInstanceRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + functionId: functionId, + } +} + +// Execute executes the request +// @return FunctionInstanceResponse +func (a *ApplicationsFunctionAPIService) UpdateApplicationFunctionInstanceExecute(r ApiUpdateApplicationFunctionInstanceRequest) (*FunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsFunctionAPIService.UpdateApplicationFunctionInstance") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.functionInstanceRequest == nil { + return localVarReturnValue, nil, reportError("functionInstanceRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.functionInstanceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_applications_request_rules.go b/azion-api/api_applications_request_rules.go new file mode 100644 index 0000000..dbf2b87 --- /dev/null +++ b/azion-api/api_applications_request_rules.go @@ -0,0 +1,1661 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ApplicationsRequestRulesAPIService ApplicationsRequestRulesAPI service +type ApplicationsRequestRulesAPIService service + +type ApiCreateApplicationRequestRuleRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + requestPhaseRule2 *RequestPhaseRule2 +} + +func (r ApiCreateApplicationRequestRuleRequest) RequestPhaseRule2(requestPhaseRule2 RequestPhaseRule2) ApiCreateApplicationRequestRuleRequest { + r.requestPhaseRule2 = &requestPhaseRule2 + return r +} + +func (r ApiCreateApplicationRequestRuleRequest) Execute() (*RequestPhaseRuleResponse, *http.Response, error) { + return r.ApiService.CreateApplicationRequestRuleExecute(r) +} + +/* +CreateApplicationRequestRule Create an Application Request Rule + +Create a new Rule for a specific Application in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiCreateApplicationRequestRuleRequest +*/ +func (a *ApplicationsRequestRulesAPIService) CreateApplicationRequestRule(ctx context.Context, applicationId int64) ApiCreateApplicationRequestRuleRequest { + return ApiCreateApplicationRequestRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return RequestPhaseRuleResponse +func (a *ApplicationsRequestRulesAPIService) CreateApplicationRequestRuleExecute(r ApiCreateApplicationRequestRuleRequest) (*RequestPhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RequestPhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.CreateApplicationRequestRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.requestPhaseRule2 == nil { + return localVarReturnValue, nil, reportError("requestPhaseRule2 is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestPhaseRule2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApplicationRequestRuleRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + requestRuleId int64 +} + +func (r ApiDeleteApplicationRequestRuleRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteApplicationRequestRuleExecute(r) +} + +/* +DeleteApplicationRequestRule Delete an Application Request Rule + +Delete a specific Rule in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiDeleteApplicationRequestRuleRequest +*/ +func (a *ApplicationsRequestRulesAPIService) DeleteApplicationRequestRule(ctx context.Context, applicationId int64, requestRuleId int64) ApiDeleteApplicationRequestRuleRequest { + return ApiDeleteApplicationRequestRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ApplicationsRequestRulesAPIService) DeleteApplicationRequestRuleExecute(r ApiDeleteApplicationRequestRuleRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.DeleteApplicationRequestRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListApplicationRequestRulesRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + description *string + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + orderGte *int64 + orderLte *int64 + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by description (case-insensitive, partial match). +func (r ApiListApplicationRequestRulesRequest) Description(description string) ApiListApplicationRequestRulesRequest { + r.description = &description + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListApplicationRequestRulesRequest) Fields(fields string) ApiListApplicationRequestRulesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListApplicationRequestRulesRequest) Id(id int64) ApiListApplicationRequestRulesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListApplicationRequestRulesRequest) LastEditor(lastEditor string) ApiListApplicationRequestRulesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListApplicationRequestRulesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListApplicationRequestRulesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListApplicationRequestRulesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListApplicationRequestRulesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListApplicationRequestRulesRequest) Name(name string) ApiListApplicationRequestRulesRequest { + r.name = &name + return r +} + +// Filter by order (greater than or equal). +func (r ApiListApplicationRequestRulesRequest) OrderGte(orderGte int64) ApiListApplicationRequestRulesRequest { + r.orderGte = &orderGte + return r +} + +// Filter by order (less than or equal). +func (r ApiListApplicationRequestRulesRequest) OrderLte(orderLte int64) ApiListApplicationRequestRulesRequest { + r.orderLte = &orderLte + return r +} + +// Which field to use when ordering the results. +func (r ApiListApplicationRequestRulesRequest) Ordering(ordering string) ApiListApplicationRequestRulesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListApplicationRequestRulesRequest) Page(page int32) ApiListApplicationRequestRulesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListApplicationRequestRulesRequest) PageSize(pageSize int32) ApiListApplicationRequestRulesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListApplicationRequestRulesRequest) Search(search string) ApiListApplicationRequestRulesRequest { + r.search = &search + return r +} + +func (r ApiListApplicationRequestRulesRequest) Execute() (*PaginatedRequestPhaseRuleList, *http.Response, error) { + return r.ApiService.ListApplicationRequestRulesExecute(r) +} + +/* +ListApplicationRequestRules List Application Request Rules + +List all Rules for a specific Application owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiListApplicationRequestRulesRequest +*/ +func (a *ApplicationsRequestRulesAPIService) ListApplicationRequestRules(ctx context.Context, applicationId int64) ApiListApplicationRequestRulesRequest { + return ApiListApplicationRequestRulesRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedRequestPhaseRuleList +func (a *ApplicationsRequestRulesAPIService) ListApplicationRequestRulesExecute(r ApiListApplicationRequestRulesRequest) (*PaginatedRequestPhaseRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRequestPhaseRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.ListApplicationRequestRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.description != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.orderGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order__gte", r.orderGte, "form", "") + } + if r.orderLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order__lte", r.orderLte, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateApplicationRequestRuleRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + requestRuleId int64 + patchedRequestPhaseRule *PatchedRequestPhaseRule +} + +func (r ApiPartialUpdateApplicationRequestRuleRequest) PatchedRequestPhaseRule(patchedRequestPhaseRule PatchedRequestPhaseRule) ApiPartialUpdateApplicationRequestRuleRequest { + r.patchedRequestPhaseRule = &patchedRequestPhaseRule + return r +} + +func (r ApiPartialUpdateApplicationRequestRuleRequest) Execute() (*RequestPhaseRuleResponse, *http.Response, error) { + return r.ApiService.PartialUpdateApplicationRequestRuleExecute(r) +} + +/* +PartialUpdateApplicationRequestRule Partially update an Application Request Rule + +Update one or more fields of an existing Application Rule without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiPartialUpdateApplicationRequestRuleRequest +*/ +func (a *ApplicationsRequestRulesAPIService) PartialUpdateApplicationRequestRule(ctx context.Context, applicationId int64, requestRuleId int64) ApiPartialUpdateApplicationRequestRuleRequest { + return ApiPartialUpdateApplicationRequestRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return RequestPhaseRuleResponse +func (a *ApplicationsRequestRulesAPIService) PartialUpdateApplicationRequestRuleExecute(r ApiPartialUpdateApplicationRequestRuleRequest) (*RequestPhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RequestPhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.PartialUpdateApplicationRequestRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedRequestPhaseRule + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveApplicationRequestRuleRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + requestRuleId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveApplicationRequestRuleRequest) Fields(fields string) ApiRetrieveApplicationRequestRuleRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveApplicationRequestRuleRequest) Execute() (*RequestPhaseRuleResponse, *http.Response, error) { + return r.ApiService.RetrieveApplicationRequestRuleExecute(r) +} + +/* +RetrieveApplicationRequestRule Retrieve details of an Application Request Rule + +Retrieve details of a specific Rule in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiRetrieveApplicationRequestRuleRequest +*/ +func (a *ApplicationsRequestRulesAPIService) RetrieveApplicationRequestRule(ctx context.Context, applicationId int64, requestRuleId int64) ApiRetrieveApplicationRequestRuleRequest { + return ApiRetrieveApplicationRequestRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return RequestPhaseRuleResponse +func (a *ApplicationsRequestRulesAPIService) RetrieveApplicationRequestRuleExecute(r ApiRetrieveApplicationRequestRuleRequest) (*RequestPhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RequestPhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.RetrieveApplicationRequestRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApplicationRequestRuleRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + requestRuleId int64 + requestPhaseRule2 *RequestPhaseRule2 +} + +func (r ApiUpdateApplicationRequestRuleRequest) RequestPhaseRule2(requestPhaseRule2 RequestPhaseRule2) ApiUpdateApplicationRequestRuleRequest { + r.requestPhaseRule2 = &requestPhaseRule2 + return r +} + +func (r ApiUpdateApplicationRequestRuleRequest) Execute() (*RequestPhaseRuleResponse, *http.Response, error) { + return r.ApiService.UpdateApplicationRequestRuleExecute(r) +} + +/* +UpdateApplicationRequestRule Update an Application Request Rule + +Update an existing Rule. This replaces the entire Rule with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiUpdateApplicationRequestRuleRequest +*/ +func (a *ApplicationsRequestRulesAPIService) UpdateApplicationRequestRule(ctx context.Context, applicationId int64, requestRuleId int64) ApiUpdateApplicationRequestRuleRequest { + return ApiUpdateApplicationRequestRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return RequestPhaseRuleResponse +func (a *ApplicationsRequestRulesAPIService) UpdateApplicationRequestRuleExecute(r ApiUpdateApplicationRequestRuleRequest) (*RequestPhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RequestPhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.UpdateApplicationRequestRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.requestPhaseRule2 == nil { + return localVarReturnValue, nil, reportError("requestPhaseRule2 is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.requestPhaseRule2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApplicationRequestRulesOrderRequest struct { + ctx context.Context + ApiService *ApplicationsRequestRulesAPIService + applicationId int64 + applicationRequestPhaseRuleEngineOrder *ApplicationRequestPhaseRuleEngineOrder + search *string +} + +func (r ApiUpdateApplicationRequestRulesOrderRequest) ApplicationRequestPhaseRuleEngineOrder(applicationRequestPhaseRuleEngineOrder ApplicationRequestPhaseRuleEngineOrder) ApiUpdateApplicationRequestRulesOrderRequest { + r.applicationRequestPhaseRuleEngineOrder = &applicationRequestPhaseRuleEngineOrder + return r +} + +// A search term. +func (r ApiUpdateApplicationRequestRulesOrderRequest) Search(search string) ApiUpdateApplicationRequestRulesOrderRequest { + r.search = &search + return r +} + +func (r ApiUpdateApplicationRequestRulesOrderRequest) Execute() (*PaginatedRequestPhaseRuleList, *http.Response, error) { + return r.ApiService.UpdateApplicationRequestRulesOrderExecute(r) +} + +/* +UpdateApplicationRequestRulesOrder Ordering Application Request Rules + +Reoder all Rules for a specific Application owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiUpdateApplicationRequestRulesOrderRequest +*/ +func (a *ApplicationsRequestRulesAPIService) UpdateApplicationRequestRulesOrder(ctx context.Context, applicationId int64) ApiUpdateApplicationRequestRulesOrderRequest { + return ApiUpdateApplicationRequestRulesOrderRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedRequestPhaseRuleList +func (a *ApplicationsRequestRulesAPIService) UpdateApplicationRequestRulesOrderExecute(r ApiUpdateApplicationRequestRulesOrderRequest) (*PaginatedRequestPhaseRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRequestPhaseRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsRequestRulesAPIService.UpdateApplicationRequestRulesOrder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/request_rules/order" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.applicationRequestPhaseRuleEngineOrder == nil { + return localVarReturnValue, nil, reportError("applicationRequestPhaseRuleEngineOrder is required and must be specified") + } + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.applicationRequestPhaseRuleEngineOrder + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_applications_response_rules.go b/azion-api/api_applications_response_rules.go new file mode 100644 index 0000000..d37cbc2 --- /dev/null +++ b/azion-api/api_applications_response_rules.go @@ -0,0 +1,1661 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ApplicationsResponseRulesAPIService ApplicationsResponseRulesAPI service +type ApplicationsResponseRulesAPIService service + +type ApiCreateApplicationResponseRuleRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + responsePhaseRuleRequest *ResponsePhaseRuleRequest +} + +func (r ApiCreateApplicationResponseRuleRequest) ResponsePhaseRuleRequest(responsePhaseRuleRequest ResponsePhaseRuleRequest) ApiCreateApplicationResponseRuleRequest { + r.responsePhaseRuleRequest = &responsePhaseRuleRequest + return r +} + +func (r ApiCreateApplicationResponseRuleRequest) Execute() (*ResponsePhaseRuleResponse, *http.Response, error) { + return r.ApiService.CreateApplicationResponseRuleExecute(r) +} + +/* +CreateApplicationResponseRule Create an Application Response Rule + +Create a new Rule for a specific Application in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiCreateApplicationResponseRuleRequest +*/ +func (a *ApplicationsResponseRulesAPIService) CreateApplicationResponseRule(ctx context.Context, applicationId int64) ApiCreateApplicationResponseRuleRequest { + return ApiCreateApplicationResponseRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return ResponsePhaseRuleResponse +func (a *ApplicationsResponseRulesAPIService) CreateApplicationResponseRuleExecute(r ApiCreateApplicationResponseRuleRequest) (*ResponsePhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.CreateApplicationResponseRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.responsePhaseRuleRequest == nil { + return localVarReturnValue, nil, reportError("responsePhaseRuleRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.responsePhaseRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteApplicationResponseRuleRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + responseRuleId int64 +} + +func (r ApiDeleteApplicationResponseRuleRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteApplicationResponseRuleExecute(r) +} + +/* +DeleteApplicationResponseRule Delete an Application Response Rule + +Delete a specific Rule in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param responseRuleId A unique integer value identifying the response rule. + @return ApiDeleteApplicationResponseRuleRequest +*/ +func (a *ApplicationsResponseRulesAPIService) DeleteApplicationResponseRule(ctx context.Context, applicationId int64, responseRuleId int64) ApiDeleteApplicationResponseRuleRequest { + return ApiDeleteApplicationResponseRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + responseRuleId: responseRuleId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ApplicationsResponseRulesAPIService) DeleteApplicationResponseRuleExecute(r ApiDeleteApplicationResponseRuleRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.DeleteApplicationResponseRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules/{response_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"response_rule_id"+"}", url.PathEscape(parameterValueToString(r.responseRuleId, "responseRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListApplicationResponseRulesRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + description *string + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + orderGte *int64 + orderLte *int64 + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by description (case-insensitive, partial match). +func (r ApiListApplicationResponseRulesRequest) Description(description string) ApiListApplicationResponseRulesRequest { + r.description = &description + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListApplicationResponseRulesRequest) Fields(fields string) ApiListApplicationResponseRulesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListApplicationResponseRulesRequest) Id(id int64) ApiListApplicationResponseRulesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListApplicationResponseRulesRequest) LastEditor(lastEditor string) ApiListApplicationResponseRulesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListApplicationResponseRulesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListApplicationResponseRulesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListApplicationResponseRulesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListApplicationResponseRulesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListApplicationResponseRulesRequest) Name(name string) ApiListApplicationResponseRulesRequest { + r.name = &name + return r +} + +// Filter by order (greater than or equal). +func (r ApiListApplicationResponseRulesRequest) OrderGte(orderGte int64) ApiListApplicationResponseRulesRequest { + r.orderGte = &orderGte + return r +} + +// Filter by order (less than or equal). +func (r ApiListApplicationResponseRulesRequest) OrderLte(orderLte int64) ApiListApplicationResponseRulesRequest { + r.orderLte = &orderLte + return r +} + +// Which field to use when ordering the results. +func (r ApiListApplicationResponseRulesRequest) Ordering(ordering string) ApiListApplicationResponseRulesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListApplicationResponseRulesRequest) Page(page int32) ApiListApplicationResponseRulesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListApplicationResponseRulesRequest) PageSize(pageSize int32) ApiListApplicationResponseRulesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListApplicationResponseRulesRequest) Search(search string) ApiListApplicationResponseRulesRequest { + r.search = &search + return r +} + +func (r ApiListApplicationResponseRulesRequest) Execute() (*PaginatedResponsePhaseRuleList, *http.Response, error) { + return r.ApiService.ListApplicationResponseRulesExecute(r) +} + +/* +ListApplicationResponseRules List Application Response Rules + +List all Rules for a specific Application owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiListApplicationResponseRulesRequest +*/ +func (a *ApplicationsResponseRulesAPIService) ListApplicationResponseRules(ctx context.Context, applicationId int64) ApiListApplicationResponseRulesRequest { + return ApiListApplicationResponseRulesRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedResponsePhaseRuleList +func (a *ApplicationsResponseRulesAPIService) ListApplicationResponseRulesExecute(r ApiListApplicationResponseRulesRequest) (*PaginatedResponsePhaseRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedResponsePhaseRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.ListApplicationResponseRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.description != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.orderGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order__gte", r.orderGte, "form", "") + } + if r.orderLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order__lte", r.orderLte, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateApplicationResponseRuleRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + responseRuleId int64 + patchedResponsePhaseRuleRequest *PatchedResponsePhaseRuleRequest +} + +func (r ApiPartialUpdateApplicationResponseRuleRequest) PatchedResponsePhaseRuleRequest(patchedResponsePhaseRuleRequest PatchedResponsePhaseRuleRequest) ApiPartialUpdateApplicationResponseRuleRequest { + r.patchedResponsePhaseRuleRequest = &patchedResponsePhaseRuleRequest + return r +} + +func (r ApiPartialUpdateApplicationResponseRuleRequest) Execute() (*ResponsePhaseRuleResponse, *http.Response, error) { + return r.ApiService.PartialUpdateApplicationResponseRuleExecute(r) +} + +/* +PartialUpdateApplicationResponseRule Partially update an Application Response Rule + +Update one or more fields of an existing Application Rule without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param responseRuleId A unique integer value identifying the response rule. + @return ApiPartialUpdateApplicationResponseRuleRequest +*/ +func (a *ApplicationsResponseRulesAPIService) PartialUpdateApplicationResponseRule(ctx context.Context, applicationId int64, responseRuleId int64) ApiPartialUpdateApplicationResponseRuleRequest { + return ApiPartialUpdateApplicationResponseRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + responseRuleId: responseRuleId, + } +} + +// Execute executes the request +// @return ResponsePhaseRuleResponse +func (a *ApplicationsResponseRulesAPIService) PartialUpdateApplicationResponseRuleExecute(r ApiPartialUpdateApplicationResponseRuleRequest) (*ResponsePhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.PartialUpdateApplicationResponseRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules/{response_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"response_rule_id"+"}", url.PathEscape(parameterValueToString(r.responseRuleId, "responseRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedResponsePhaseRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveApplicationResponseRuleRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + responseRuleId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveApplicationResponseRuleRequest) Fields(fields string) ApiRetrieveApplicationResponseRuleRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveApplicationResponseRuleRequest) Execute() (*RequestPhaseRuleResponse, *http.Response, error) { + return r.ApiService.RetrieveApplicationResponseRuleExecute(r) +} + +/* +RetrieveApplicationResponseRule Retrieve details of an Application Response Rule + +Retrieve details of a specific Rule in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param responseRuleId A unique integer value identifying the response rule. + @return ApiRetrieveApplicationResponseRuleRequest +*/ +func (a *ApplicationsResponseRulesAPIService) RetrieveApplicationResponseRule(ctx context.Context, applicationId int64, responseRuleId int64) ApiRetrieveApplicationResponseRuleRequest { + return ApiRetrieveApplicationResponseRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + responseRuleId: responseRuleId, + } +} + +// Execute executes the request +// @return RequestPhaseRuleResponse +func (a *ApplicationsResponseRulesAPIService) RetrieveApplicationResponseRuleExecute(r ApiRetrieveApplicationResponseRuleRequest) (*RequestPhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RequestPhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.RetrieveApplicationResponseRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules/{response_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"response_rule_id"+"}", url.PathEscape(parameterValueToString(r.responseRuleId, "responseRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApplicationResponseRuleRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + responseRuleId int64 + responsePhaseRuleRequest *ResponsePhaseRuleRequest +} + +func (r ApiUpdateApplicationResponseRuleRequest) ResponsePhaseRuleRequest(responsePhaseRuleRequest ResponsePhaseRuleRequest) ApiUpdateApplicationResponseRuleRequest { + r.responsePhaseRuleRequest = &responsePhaseRuleRequest + return r +} + +func (r ApiUpdateApplicationResponseRuleRequest) Execute() (*ResponsePhaseRuleResponse, *http.Response, error) { + return r.ApiService.UpdateApplicationResponseRuleExecute(r) +} + +/* +UpdateApplicationResponseRule Update an Application Response Rule + +Update an existing Rule. This replaces the entire Rule with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @param responseRuleId A unique integer value identifying the response rule. + @return ApiUpdateApplicationResponseRuleRequest +*/ +func (a *ApplicationsResponseRulesAPIService) UpdateApplicationResponseRule(ctx context.Context, applicationId int64, responseRuleId int64) ApiUpdateApplicationResponseRuleRequest { + return ApiUpdateApplicationResponseRuleRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + responseRuleId: responseRuleId, + } +} + +// Execute executes the request +// @return ResponsePhaseRuleResponse +func (a *ApplicationsResponseRulesAPIService) UpdateApplicationResponseRuleExecute(r ApiUpdateApplicationResponseRuleRequest) (*ResponsePhaseRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePhaseRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.UpdateApplicationResponseRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules/{response_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"response_rule_id"+"}", url.PathEscape(parameterValueToString(r.responseRuleId, "responseRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.responsePhaseRuleRequest == nil { + return localVarReturnValue, nil, reportError("responsePhaseRuleRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.responsePhaseRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateApplicationResponseRulesOrderRequest struct { + ctx context.Context + ApiService *ApplicationsResponseRulesAPIService + applicationId int64 + applicationResponsePhaseRuleEngineOrderRequest *ApplicationResponsePhaseRuleEngineOrderRequest + search *string +} + +func (r ApiUpdateApplicationResponseRulesOrderRequest) ApplicationResponsePhaseRuleEngineOrderRequest(applicationResponsePhaseRuleEngineOrderRequest ApplicationResponsePhaseRuleEngineOrderRequest) ApiUpdateApplicationResponseRulesOrderRequest { + r.applicationResponsePhaseRuleEngineOrderRequest = &applicationResponsePhaseRuleEngineOrderRequest + return r +} + +// A search term. +func (r ApiUpdateApplicationResponseRulesOrderRequest) Search(search string) ApiUpdateApplicationResponseRulesOrderRequest { + r.search = &search + return r +} + +func (r ApiUpdateApplicationResponseRulesOrderRequest) Execute() (*PaginatedResponsePhaseRuleList, *http.Response, error) { + return r.ApiService.UpdateApplicationResponseRulesOrderExecute(r) +} + +/* +UpdateApplicationResponseRulesOrder Ordering Application Response Rules + +Reoder all Rules for a specific Application owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param applicationId A unique integer value identifying the application. + @return ApiUpdateApplicationResponseRulesOrderRequest +*/ +func (a *ApplicationsResponseRulesAPIService) UpdateApplicationResponseRulesOrder(ctx context.Context, applicationId int64) ApiUpdateApplicationResponseRulesOrderRequest { + return ApiUpdateApplicationResponseRulesOrderRequest{ + ApiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +// Execute executes the request +// @return PaginatedResponsePhaseRuleList +func (a *ApplicationsResponseRulesAPIService) UpdateApplicationResponseRulesOrderExecute(r ApiUpdateApplicationResponseRulesOrderRequest) (*PaginatedResponsePhaseRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedResponsePhaseRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApplicationsResponseRulesAPIService.UpdateApplicationResponseRulesOrder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/applications/{application_id}/response_rules/order" + localVarPath = strings.Replace(localVarPath, "{"+"application_id"+"}", url.PathEscape(parameterValueToString(r.applicationId, "applicationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.applicationResponsePhaseRuleEngineOrderRequest == nil { + return localVarReturnValue, nil, reportError("applicationResponsePhaseRuleEngineOrderRequest is required and must be specified") + } + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.applicationResponsePhaseRuleEngineOrderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_auth_login.go b/azion-api/api_auth_login.go new file mode 100644 index 0000000..d2523bc --- /dev/null +++ b/azion-api/api_auth_login.go @@ -0,0 +1,627 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// AuthLoginAPIService AuthLoginAPI service +type AuthLoginAPIService service + +type ApiAuthUserLoginRequest struct { + ctx context.Context + ApiService *AuthLoginAPIService + loginRequest *LoginRequest +} + +func (r ApiAuthUserLoginRequest) LoginRequest(loginRequest LoginRequest) ApiAuthUserLoginRequest { + r.loginRequest = &loginRequest + return r +} + +func (r ApiAuthUserLoginRequest) Execute() (*ResponseLogin, *http.Response, error) { + return r.ApiService.AuthUserLoginExecute(r) +} + +/* +AuthUserLogin User Login – Generate JWT Tokens + +This endpoint performs user authentication and issues the user's JWT tokens.The response depends on whether multi-factor authentication (MFA) is enabled for the user: + - If the user does not have MFA enabled, the API returns a TokenPair object containing the access_token and refresh_token, allowing immediate authentication. + - If the user has MFA enabled, the response returns an MFAToken object.This temporary token must be used in the MFA verification endpoint to complete authentication.After successful verification of the second factor, the TokenPair is issued. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthUserLoginRequest +*/ +func (a *AuthLoginAPIService) AuthUserLogin(ctx context.Context) ApiAuthUserLoginRequest { + return ApiAuthUserLoginRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseLogin +func (a *AuthLoginAPIService) AuthUserLoginExecute(r ApiAuthUserLoginRequest) (*ResponseLogin, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseLogin + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthLoginAPIService.AuthUserLogin") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/login" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.loginRequest == nil { + return localVarReturnValue, nil, reportError("loginRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.loginRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiAuthUserLoginMethodRequest struct { + ctx context.Context + ApiService *AuthLoginAPIService + email *string + fields *string +} + +// Email address of the user +func (r ApiAuthUserLoginMethodRequest) Email(email string) ApiAuthUserLoginMethodRequest { + r.email = &email + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiAuthUserLoginMethodRequest) Fields(fields string) ApiAuthUserLoginMethodRequest { + r.fields = &fields + return r +} + +func (r ApiAuthUserLoginMethodRequest) Execute() (*UserLoginMethodResponse, *http.Response, error) { + return r.ApiService.AuthUserLoginMethodExecute(r) +} + +/* +AuthUserLoginMethod Check User Authentication Method + +Returns the login type configured for the user. This indicates whether the user authenticates directly via Azion credentials (login) or via a federated Identity Provider (federated) linked to their account. +This endpoint allows clients to determine whether to proceed with Azion's native login flow or redirect the user to the Identity Provider (IdP) for authentication. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthUserLoginMethodRequest +*/ +func (a *AuthLoginAPIService) AuthUserLoginMethod(ctx context.Context) ApiAuthUserLoginMethodRequest { + return ApiAuthUserLoginMethodRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return UserLoginMethodResponse +func (a *AuthLoginAPIService) AuthUserLoginMethodExecute(r ApiAuthUserLoginMethodRequest) (*UserLoginMethodResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UserLoginMethodResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthLoginAPIService.AuthUserLoginMethod") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/login/method" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.email != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email", r.email, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiTotpVerifyRequest struct { + ctx context.Context + ApiService *AuthLoginAPIService + tOTPVerificationRequest *TOTPVerificationRequest +} + +func (r ApiTotpVerifyRequest) TOTPVerificationRequest(tOTPVerificationRequest TOTPVerificationRequest) ApiTotpVerifyRequest { + r.tOTPVerificationRequest = &tOTPVerificationRequest + return r +} + +func (r ApiTotpVerifyRequest) Execute() (*TokenPairResponse, *http.Response, error) { + return r.ApiService.TotpVerifyExecute(r) +} + +/* +TotpVerify Retrieve user JWT tokens by MFA auth + +Retrieves JWT access and refresh tokens, via a POST request with jwt mfa token as auth + code. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTotpVerifyRequest +*/ +func (a *AuthLoginAPIService) TotpVerify(ctx context.Context) ApiTotpVerifyRequest { + return ApiTotpVerifyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TokenPairResponse +func (a *AuthLoginAPIService) TotpVerifyExecute(r ApiTotpVerifyRequest) (*TokenPairResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TokenPairResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthLoginAPIService.TotpVerify") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/mfa/totp/verify" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tOTPVerificationRequest == nil { + return localVarReturnValue, nil, reportError("tOTPVerificationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tOTPVerificationRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_auth_mfatotp_device.go b/azion-api/api_auth_mfatotp_device.go new file mode 100644 index 0000000..ca4edb9 --- /dev/null +++ b/azion-api/api_auth_mfatotp_device.go @@ -0,0 +1,713 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// AuthMFATOTPDeviceAPIService AuthMFATOTPDeviceAPI service +type AuthMFATOTPDeviceAPIService service + +type ApiCreateTotpDeviceRequest struct { + ctx context.Context + ApiService *AuthMFATOTPDeviceAPIService + body *interface{} +} + +func (r ApiCreateTotpDeviceRequest) Body(body interface{}) ApiCreateTotpDeviceRequest { + r.body = &body + return r +} + +func (r ApiCreateTotpDeviceRequest) Execute() (*TOTPDeviceResponse, *http.Response, error) { + return r.ApiService.CreateTotpDeviceExecute(r) +} + +/* +CreateTotpDevice Create a TOTP device + +Create a new TOTP device for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateTotpDeviceRequest +*/ +func (a *AuthMFATOTPDeviceAPIService) CreateTotpDevice(ctx context.Context) ApiCreateTotpDeviceRequest { + return ApiCreateTotpDeviceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TOTPDeviceResponse +func (a *AuthMFATOTPDeviceAPIService) CreateTotpDeviceExecute(r ApiCreateTotpDeviceRequest) (*TOTPDeviceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TOTPDeviceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthMFATOTPDeviceAPIService.CreateTotpDevice") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/mfa/totp" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteTotpDeviceRequest struct { + ctx context.Context + ApiService *AuthMFATOTPDeviceAPIService + deviceId int64 +} + +func (r ApiDeleteTotpDeviceRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteTotpDeviceExecute(r) +} + +/* +DeleteTotpDevice Delete a TOTP device + +Delete a specific TOTP device from your account or descendant account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param deviceId A unique integer value identifying the TOTP device. + @return ApiDeleteTotpDeviceRequest +*/ +func (a *AuthMFATOTPDeviceAPIService) DeleteTotpDevice(ctx context.Context, deviceId int64) ApiDeleteTotpDeviceRequest { + return ApiDeleteTotpDeviceRequest{ + ApiService: a, + ctx: ctx, + deviceId: deviceId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *AuthMFATOTPDeviceAPIService) DeleteTotpDeviceExecute(r ApiDeleteTotpDeviceRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthMFATOTPDeviceAPIService.DeleteTotpDevice") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/mfa/totp/{device_id}" + localVarPath = strings.Replace(localVarPath, "{"+"device_id"+"}", url.PathEscape(parameterValueToString(r.deviceId, "deviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTotpDevicesRequest struct { + ctx context.Context + ApiService *AuthMFATOTPDeviceAPIService + confirmed *bool + email *string + fields *string + id *string + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by confirmed status. +func (r ApiListTotpDevicesRequest) Confirmed(confirmed bool) ApiListTotpDevicesRequest { + r.confirmed = &confirmed + return r +} + +// Filter by user's email (case-insensitive, partial match). +func (r ApiListTotpDevicesRequest) Email(email string) ApiListTotpDevicesRequest { + r.email = &email + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListTotpDevicesRequest) Fields(fields string) ApiListTotpDevicesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListTotpDevicesRequest) Id(id string) ApiListTotpDevicesRequest { + r.id = &id + return r +} + +// Filter by user's first name (case-insensitive, partial match). +func (r ApiListTotpDevicesRequest) Name(name string) ApiListTotpDevicesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListTotpDevicesRequest) Ordering(ordering string) ApiListTotpDevicesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListTotpDevicesRequest) Page(page int32) ApiListTotpDevicesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListTotpDevicesRequest) PageSize(pageSize int32) ApiListTotpDevicesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListTotpDevicesRequest) Search(search string) ApiListTotpDevicesRequest { + r.search = &search + return r +} + +func (r ApiListTotpDevicesRequest) Execute() (*PaginatedTOTPDeviceList, *http.Response, error) { + return r.ApiService.ListTotpDevicesExecute(r) +} + +/* +ListTotpDevices List of TOTP devices + +List all totp devices for user account and descendant accounts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTotpDevicesRequest +*/ +func (a *AuthMFATOTPDeviceAPIService) ListTotpDevices(ctx context.Context) ApiListTotpDevicesRequest { + return ApiListTotpDevicesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTOTPDeviceList +func (a *AuthMFATOTPDeviceAPIService) ListTotpDevicesExecute(r ApiListTotpDevicesRequest) (*PaginatedTOTPDeviceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTOTPDeviceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthMFATOTPDeviceAPIService.ListTotpDevices") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/mfa/totp" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.confirmed != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "confirmed", r.confirmed, "form", "") + } + if r.email != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "email", r.email, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_auth_refresh_access_token.go b/azion-api/api_auth_refresh_access_token.go new file mode 100644 index 0000000..da01e83 --- /dev/null +++ b/azion-api/api_auth_refresh_access_token.go @@ -0,0 +1,218 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// AuthRefreshAccessTokenAPIService AuthRefreshAccessTokenAPI service +type AuthRefreshAccessTokenAPIService service + +type ApiAuthUserRefreshTokenRequest struct { + ctx context.Context + ApiService *AuthRefreshAccessTokenAPIService + tokenRequest *TokenRequest +} + +func (r ApiAuthUserRefreshTokenRequest) TokenRequest(tokenRequest TokenRequest) ApiAuthUserRefreshTokenRequest { + r.tokenRequest = &tokenRequest + return r +} + +func (r ApiAuthUserRefreshTokenRequest) Execute() (*TokenResponse, *http.Response, error) { + return r.ApiService.AuthUserRefreshTokenExecute(r) +} + +/* +AuthUserRefreshToken Refresh user JWT access token + +Refresh JWT access token, via a POST request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthUserRefreshTokenRequest +*/ +func (a *AuthRefreshAccessTokenAPIService) AuthUserRefreshToken(ctx context.Context) ApiAuthUserRefreshTokenRequest { + return ApiAuthUserRefreshTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TokenResponse +func (a *AuthRefreshAccessTokenAPIService) AuthUserRefreshTokenExecute(r ApiAuthUserRefreshTokenRequest) (*TokenResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TokenResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthRefreshAccessTokenAPIService.AuthUserRefreshToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/token" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.tokenRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_auth_revoke.go b/azion-api/api_auth_revoke.go new file mode 100644 index 0000000..150497e --- /dev/null +++ b/azion-api/api_auth_revoke.go @@ -0,0 +1,218 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// AuthRevokeAPIService AuthRevokeAPI service +type AuthRevokeAPIService service + +type ApiAuthUserRevokeRequest struct { + ctx context.Context + ApiService *AuthRevokeAPIService + body *interface{} +} + +func (r ApiAuthUserRevokeRequest) Body(body interface{}) ApiAuthUserRevokeRequest { + r.body = &body + return r +} + +func (r ApiAuthUserRevokeRequest) Execute() (*StateExecutedResponse, *http.Response, error) { + return r.ApiService.AuthUserRevokeExecute(r) +} + +/* +AuthUserRevoke Revoke user JWT refresh token + +Revoke refresh token via a POST request. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAuthUserRevokeRequest +*/ +func (a *AuthRevokeAPIService) AuthUserRevoke(ctx context.Context) ApiAuthUserRevokeRequest { + return ApiAuthUserRevokeRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return StateExecutedResponse +func (a *AuthRevokeAPIService) AuthUserRevokeExecute(r ApiAuthUserRevokeRequest) (*StateExecutedResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *StateExecutedResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthRevokeAPIService.AuthUserRevoke") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/account/auth/revoke" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_billing_invoices.go b/azion-api/api_billing_invoices.go new file mode 100644 index 0000000..c42ade7 --- /dev/null +++ b/azion-api/api_billing_invoices.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// BillingInvoicesAPIService BillingInvoicesAPI service +type BillingInvoicesAPIService service + +type ApiRetrieveInvoiceRequest struct { + ctx context.Context + ApiService *BillingInvoicesAPIService + period string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveInvoiceRequest) Fields(fields string) ApiRetrieveInvoiceRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveInvoiceRequest) Execute() (*http.Response, error) { + return r.ApiService.RetrieveInvoiceExecute(r) +} + +/* +RetrieveInvoice Retrieve details of an invoice + +Retrieve invoice data for a specific period. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param period Invoice period in MM-YYYY format (e.g., 01-2024 for January 2024) + @return ApiRetrieveInvoiceRequest +*/ +func (a *BillingInvoicesAPIService) RetrieveInvoice(ctx context.Context, period string) ApiRetrieveInvoiceRequest { + return ApiRetrieveInvoiceRequest{ + ApiService: a, + ctx: ctx, + period: period, + } +} + +// Execute executes the request +func (a *BillingInvoicesAPIService) RetrieveInvoiceExecute(r ApiRetrieveInvoiceRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingInvoicesAPIService.RetrieveInvoice") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/billing/invoices/{period}" + localVarPath = strings.Replace(localVarPath, "{"+"period"+"}", url.PathEscape(parameterValueToString(r.period, "period")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["tokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/azion-api/api_billing_payments.go b/azion-api/api_billing_payments.go new file mode 100644 index 0000000..de770b4 --- /dev/null +++ b/azion-api/api_billing_payments.go @@ -0,0 +1,1577 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// BillingPaymentsAPIService BillingPaymentsAPI service +type BillingPaymentsAPIService service + +type ApiAddCreditsRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + creditRequest *CreditRequest +} + +func (r ApiAddCreditsRequest) CreditRequest(creditRequest CreditRequest) ApiAddCreditsRequest { + r.creditRequest = &creditRequest + return r +} + +func (r ApiAddCreditsRequest) Execute() (*ResponseCredit, *http.Response, error) { + return r.ApiService.AddCreditsExecute(r) +} + +/* +AddCredits Add credits using the default credit card + +Add credit into the default credit card in US Dollars. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiAddCreditsRequest +*/ +func (a *BillingPaymentsAPIService) AddCredits(ctx context.Context) ApiAddCreditsRequest { + return ApiAddCreditsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseCredit +func (a *BillingPaymentsAPIService) AddCreditsExecute(r ApiAddCreditsRequest) (*ResponseCredit, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseCredit + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.AddCredits") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/credits" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.creditRequest == nil { + return localVarReturnValue, nil, reportError("creditRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.creditRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateCreditCardRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + paymentMethodRequest *PaymentMethodRequest +} + +func (r ApiCreateCreditCardRequest) PaymentMethodRequest(paymentMethodRequest PaymentMethodRequest) ApiCreateCreditCardRequest { + r.paymentMethodRequest = &paymentMethodRequest + return r +} + +func (r ApiCreateCreditCardRequest) Execute() (*ResponsePaymentMethod, *http.Response, error) { + return r.ApiService.CreateCreditCardExecute(r) +} + +/* +CreateCreditCard Create a new credit card + +Create a new credit card for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCreditCardRequest +*/ +func (a *BillingPaymentsAPIService) CreateCreditCard(ctx context.Context) ApiCreateCreditCardRequest { + return ApiCreateCreditCardRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponsePaymentMethod +func (a *BillingPaymentsAPIService) CreateCreditCardExecute(r ApiCreateCreditCardRequest) (*ResponsePaymentMethod, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePaymentMethod + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.CreateCreditCard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/credit_cards" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.paymentMethodRequest == nil { + return localVarReturnValue, nil, reportError("paymentMethodRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.paymentMethodRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyCreditCardRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + id string +} + +func (r ApiDestroyCreditCardRequest) Execute() (*ResponseDeletePaymentMethod, *http.Response, error) { + return r.ApiService.DestroyCreditCardExecute(r) +} + +/* +DestroyCreditCard Destroy a credit card + +Destruction of a specific credit card in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiDestroyCreditCardRequest +*/ +func (a *BillingPaymentsAPIService) DestroyCreditCard(ctx context.Context, id string) ApiDestroyCreditCardRequest { + return ApiDestroyCreditCardRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponseDeletePaymentMethod +func (a *BillingPaymentsAPIService) DestroyCreditCardExecute(r ApiDestroyCreditCardRequest) (*ResponseDeletePaymentMethod, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeletePaymentMethod + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.DestroyCreditCard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/credit_cards/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListCreditCardsRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListCreditCardsRequest) Fields(fields string) ApiListCreditCardsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListCreditCardsRequest) Ordering(ordering string) ApiListCreditCardsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListCreditCardsRequest) Page(page int32) ApiListCreditCardsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListCreditCardsRequest) PageSize(pageSize int32) ApiListCreditCardsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListCreditCardsRequest) Search(search string) ApiListCreditCardsRequest { + r.search = &search + return r +} + +func (r ApiListCreditCardsRequest) Execute() (*PaginatedResponsePaymentMethodList, *http.Response, error) { + return r.ApiService.ListCreditCardsExecute(r) +} + +/* +ListCreditCards List of the credit cards + +List all credit cards owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCreditCardsRequest +*/ +func (a *BillingPaymentsAPIService) ListCreditCards(ctx context.Context) ApiListCreditCardsRequest { + return ApiListCreditCardsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedResponsePaymentMethodList +func (a *BillingPaymentsAPIService) ListCreditCardsExecute(r ApiListCreditCardsRequest) (*PaginatedResponsePaymentMethodList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedResponsePaymentMethodList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.ListCreditCards") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/credit_cards" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListPaymentHistoryRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListPaymentHistoryRequest) Fields(fields string) ApiListPaymentHistoryRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListPaymentHistoryRequest) Ordering(ordering string) ApiListPaymentHistoryRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListPaymentHistoryRequest) Page(page int32) ApiListPaymentHistoryRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListPaymentHistoryRequest) PageSize(pageSize int32) ApiListPaymentHistoryRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListPaymentHistoryRequest) Search(search string) ApiListPaymentHistoryRequest { + r.search = &search + return r +} + +func (r ApiListPaymentHistoryRequest) Execute() (*PaginatedPaymentHistoryList, *http.Response, error) { + return r.ApiService.ListPaymentHistoryExecute(r) +} + +/* +ListPaymentHistory List of the payment history + +List all details of the payment history. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPaymentHistoryRequest +*/ +func (a *BillingPaymentsAPIService) ListPaymentHistory(ctx context.Context) ApiListPaymentHistoryRequest { + return ApiListPaymentHistoryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedPaymentHistoryList +func (a *BillingPaymentsAPIService) ListPaymentHistoryExecute(r ApiListPaymentHistoryRequest) (*PaginatedPaymentHistoryList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPaymentHistoryList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.ListPaymentHistory") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/history" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateCreditCardRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + id string + patchedPartialUpdateRequest *PatchedPartialUpdateRequest +} + +func (r ApiPartialUpdateCreditCardRequest) PatchedPartialUpdateRequest(patchedPartialUpdateRequest PatchedPartialUpdateRequest) ApiPartialUpdateCreditCardRequest { + r.patchedPartialUpdateRequest = &patchedPartialUpdateRequest + return r +} + +func (r ApiPartialUpdateCreditCardRequest) Execute() (*ResponsePaymentMethod, *http.Response, error) { + return r.ApiService.PartialUpdateCreditCardExecute(r) +} + +/* +PartialUpdateCreditCard Partially update a credit card + +Update the field 'is_default' to enable of an existing credit card.Only the field 'is_default' is editable for an existing card. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiPartialUpdateCreditCardRequest +*/ +func (a *BillingPaymentsAPIService) PartialUpdateCreditCard(ctx context.Context, id string) ApiPartialUpdateCreditCardRequest { + return ApiPartialUpdateCreditCardRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponsePaymentMethod +func (a *BillingPaymentsAPIService) PartialUpdateCreditCardExecute(r ApiPartialUpdateCreditCardRequest) (*ResponsePaymentMethod, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePaymentMethod + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.PartialUpdateCreditCard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/credit_cards/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedPartialUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveCreditCardRequest struct { + ctx context.Context + ApiService *BillingPaymentsAPIService + id string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveCreditCardRequest) Fields(fields string) ApiRetrieveCreditCardRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveCreditCardRequest) Execute() (*ResponsePaymentMethod, *http.Response, error) { + return r.ApiService.RetrieveCreditCardExecute(r) +} + +/* +RetrieveCreditCard Retrieve details from a credit card + +Retrieve details from a specific credit card in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiRetrieveCreditCardRequest +*/ +func (a *BillingPaymentsAPIService) RetrieveCreditCard(ctx context.Context, id string) ApiRetrieveCreditCardRequest { + return ApiRetrieveCreditCardRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponsePaymentMethod +func (a *BillingPaymentsAPIService) RetrieveCreditCardExecute(r ApiRetrieveCreditCardRequest) (*ResponsePaymentMethod, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePaymentMethod + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BillingPaymentsAPIService.RetrieveCreditCard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/payments/credit_cards/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_connectors.go b/azion-api/api_connectors.go new file mode 100644 index 0000000..fa37d5c --- /dev/null +++ b/azion-api/api_connectors.go @@ -0,0 +1,1396 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// ConnectorsAPIService ConnectorsAPI service +type ConnectorsAPIService service + +type ApiCreateConnectorRequest struct { + ctx context.Context + ApiService *ConnectorsAPIService + connectorRequest2 *ConnectorRequest2 +} + +func (r ApiCreateConnectorRequest) ConnectorRequest2(connectorRequest2 ConnectorRequest2) ApiCreateConnectorRequest { + r.connectorRequest2 = &connectorRequest2 + return r +} + +func (r ApiCreateConnectorRequest) Execute() (*ConnectorResponse, *http.Response, error) { + return r.ApiService.CreateConnectorExecute(r) +} + +/* +CreateConnector Create an Connector + +Create a new Connector in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateConnectorRequest +*/ +func (a *ConnectorsAPIService) CreateConnector(ctx context.Context) ApiCreateConnectorRequest { + return ApiCreateConnectorRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ConnectorResponse +func (a *ConnectorsAPIService) CreateConnectorExecute(r ApiCreateConnectorRequest) (*ConnectorResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsAPIService.CreateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/connectors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.connectorRequest2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteConnectorRequest struct { + ctx context.Context + ApiService *ConnectorsAPIService + connectorId int64 +} + +func (r ApiDeleteConnectorRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteConnectorExecute(r) +} + +/* +DeleteConnector Delete an Connector + +Delete a specific Connector in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId A unique integer value identifying the connector. + @return ApiDeleteConnectorRequest +*/ +func (a *ConnectorsAPIService) DeleteConnector(ctx context.Context, connectorId int64) ApiDeleteConnectorRequest { + return ApiDeleteConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *ConnectorsAPIService) DeleteConnectorExecute(r ApiDeleteConnectorRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsAPIService.DeleteConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/connectors/{connector_id}" + localVarPath = strings.Replace(localVarPath, "{"+"connector_id"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListConnectorsRequest struct { + ctx context.Context + ApiService *ConnectorsAPIService + active *bool + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + typeIn *string +} + +// Filter by active status. +func (r ApiListConnectorsRequest) Active(active bool) ApiListConnectorsRequest { + r.active = &active + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListConnectorsRequest) Fields(fields string) ApiListConnectorsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListConnectorsRequest) Id(id int64) ApiListConnectorsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListConnectorsRequest) LastEditor(lastEditor string) ApiListConnectorsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListConnectorsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListConnectorsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListConnectorsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListConnectorsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListConnectorsRequest) Name(name string) ApiListConnectorsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListConnectorsRequest) Ordering(ordering string) ApiListConnectorsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListConnectorsRequest) Page(page int32) ApiListConnectorsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListConnectorsRequest) PageSize(pageSize int32) ApiListConnectorsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListConnectorsRequest) Search(search string) ApiListConnectorsRequest { + r.search = &search + return r +} + +// Filter by type (accepts comma-separated values). +func (r ApiListConnectorsRequest) TypeIn(typeIn string) ApiListConnectorsRequest { + r.typeIn = &typeIn + return r +} + +func (r ApiListConnectorsRequest) Execute() (*PaginatedConnectorList, *http.Response, error) { + return r.ApiService.ListConnectorsExecute(r) +} + +/* +ListConnectors List Connectors + +List all Connectors owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListConnectorsRequest +*/ +func (a *ConnectorsAPIService) ListConnectors(ctx context.Context) ApiListConnectorsRequest { + return ApiListConnectorsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedConnectorList +func (a *ConnectorsAPIService) ListConnectorsExecute(r ApiListConnectorsRequest) (*PaginatedConnectorList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedConnectorList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsAPIService.ListConnectors") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/connectors" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.typeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type__in", r.typeIn, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateConnectorRequest struct { + ctx context.Context + ApiService *ConnectorsAPIService + connectorId int64 + patchedConnectorRequest2 *PatchedConnectorRequest2 +} + +func (r ApiPartialUpdateConnectorRequest) PatchedConnectorRequest2(patchedConnectorRequest2 PatchedConnectorRequest2) ApiPartialUpdateConnectorRequest { + r.patchedConnectorRequest2 = &patchedConnectorRequest2 + return r +} + +func (r ApiPartialUpdateConnectorRequest) Execute() (*ConnectorResponse, *http.Response, error) { + return r.ApiService.PartialUpdateConnectorExecute(r) +} + +/* +PartialUpdateConnector Partially update an Connector + +Update one or more fields of an existing Connector without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId A unique integer value identifying the connector. + @return ApiPartialUpdateConnectorRequest +*/ +func (a *ConnectorsAPIService) PartialUpdateConnector(ctx context.Context, connectorId int64) ApiPartialUpdateConnectorRequest { + return ApiPartialUpdateConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + } +} + +// Execute executes the request +// @return ConnectorResponse +func (a *ConnectorsAPIService) PartialUpdateConnectorExecute(r ApiPartialUpdateConnectorRequest) (*ConnectorResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsAPIService.PartialUpdateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/connectors/{connector_id}" + localVarPath = strings.Replace(localVarPath, "{"+"connector_id"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedConnectorRequest2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveConnectorRequest struct { + ctx context.Context + ApiService *ConnectorsAPIService + connectorId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveConnectorRequest) Fields(fields string) ApiRetrieveConnectorRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveConnectorRequest) Execute() (*ConnectorResponse, *http.Response, error) { + return r.ApiService.RetrieveConnectorExecute(r) +} + +/* +RetrieveConnector Retrieve details of an Connector + +Retrieve details of a specific Connector in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId A unique integer value identifying the connector. + @return ApiRetrieveConnectorRequest +*/ +func (a *ConnectorsAPIService) RetrieveConnector(ctx context.Context, connectorId int64) ApiRetrieveConnectorRequest { + return ApiRetrieveConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + } +} + +// Execute executes the request +// @return ConnectorResponse +func (a *ConnectorsAPIService) RetrieveConnectorExecute(r ApiRetrieveConnectorRequest) (*ConnectorResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsAPIService.RetrieveConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/connectors/{connector_id}" + localVarPath = strings.Replace(localVarPath, "{"+"connector_id"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateConnectorRequest struct { + ctx context.Context + ApiService *ConnectorsAPIService + connectorId int64 + connectorRequest2 *ConnectorRequest2 +} + +func (r ApiUpdateConnectorRequest) ConnectorRequest2(connectorRequest2 ConnectorRequest2) ApiUpdateConnectorRequest { + r.connectorRequest2 = &connectorRequest2 + return r +} + +func (r ApiUpdateConnectorRequest) Execute() (*ConnectorResponse, *http.Response, error) { + return r.ApiService.UpdateConnectorExecute(r) +} + +/* +UpdateConnector Update an Connector + +Update an existing Connector. This replaces the entire Connector with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param connectorId A unique integer value identifying the connector. + @return ApiUpdateConnectorRequest +*/ +func (a *ConnectorsAPIService) UpdateConnector(ctx context.Context, connectorId int64) ApiUpdateConnectorRequest { + return ApiUpdateConnectorRequest{ + ApiService: a, + ctx: ctx, + connectorId: connectorId, + } +} + +// Execute executes the request +// @return ConnectorResponse +func (a *ConnectorsAPIService) UpdateConnectorExecute(r ApiUpdateConnectorRequest) (*ConnectorResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ConnectorResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ConnectorsAPIService.UpdateConnector") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/connectors/{connector_id}" + localVarPath = strings.Replace(localVarPath, "{"+"connector_id"+"}", url.PathEscape(parameterValueToString(r.connectorId, "connectorId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.connectorRequest2 + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_custom_pages.go b/azion-api/api_custom_pages.go new file mode 100644 index 0000000..33bc185 --- /dev/null +++ b/azion-api/api_custom_pages.go @@ -0,0 +1,1392 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// CustomPagesAPIService CustomPagesAPI service +type CustomPagesAPIService service + +type ApiCreateCustomPageRequest struct { + ctx context.Context + ApiService *CustomPagesAPIService + customPageRequest *CustomPageRequest +} + +func (r ApiCreateCustomPageRequest) CustomPageRequest(customPageRequest CustomPageRequest) ApiCreateCustomPageRequest { + r.customPageRequest = &customPageRequest + return r +} + +func (r ApiCreateCustomPageRequest) Execute() (*CustomPageResponse, *http.Response, error) { + return r.ApiService.CreateCustomPageExecute(r) +} + +/* +CreateCustomPage Create a Custom Page + +Create a new Custom Page in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCustomPageRequest +*/ +func (a *CustomPagesAPIService) CreateCustomPage(ctx context.Context) ApiCreateCustomPageRequest { + return ApiCreateCustomPageRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CustomPageResponse +func (a *CustomPagesAPIService) CreateCustomPageExecute(r ApiCreateCustomPageRequest) (*CustomPageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomPageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesAPIService.CreateCustomPage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/custom_pages" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.customPageRequest == nil { + return localVarReturnValue, nil, reportError("customPageRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.customPageRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteCustomPageRequest struct { + ctx context.Context + ApiService *CustomPagesAPIService + customPageId int64 +} + +func (r ApiDeleteCustomPageRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteCustomPageExecute(r) +} + +/* +DeleteCustomPage Delete a Custom Page + +Delete a specific Custom Page in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customPageId A unique integer value identifying the custom page. + @return ApiDeleteCustomPageRequest +*/ +func (a *CustomPagesAPIService) DeleteCustomPage(ctx context.Context, customPageId int64) ApiDeleteCustomPageRequest { + return ApiDeleteCustomPageRequest{ + ApiService: a, + ctx: ctx, + customPageId: customPageId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *CustomPagesAPIService) DeleteCustomPageExecute(r ApiDeleteCustomPageRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesAPIService.DeleteCustomPage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/custom_pages/{custom_page_id}" + localVarPath = strings.Replace(localVarPath, "{"+"custom_page_id"+"}", url.PathEscape(parameterValueToString(r.customPageId, "customPageId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListCustomPagesRequest struct { + ctx context.Context + ApiService *CustomPagesAPIService + active *bool + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListCustomPagesRequest) Active(active bool) ApiListCustomPagesRequest { + r.active = &active + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListCustomPagesRequest) Fields(fields string) ApiListCustomPagesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListCustomPagesRequest) Id(id int64) ApiListCustomPagesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListCustomPagesRequest) LastEditor(lastEditor string) ApiListCustomPagesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListCustomPagesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListCustomPagesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListCustomPagesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListCustomPagesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListCustomPagesRequest) Name(name string) ApiListCustomPagesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListCustomPagesRequest) Ordering(ordering string) ApiListCustomPagesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListCustomPagesRequest) Page(page int32) ApiListCustomPagesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListCustomPagesRequest) PageSize(pageSize int32) ApiListCustomPagesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListCustomPagesRequest) Search(search string) ApiListCustomPagesRequest { + r.search = &search + return r +} + +func (r ApiListCustomPagesRequest) Execute() (*PaginatedCustomPageList, *http.Response, error) { + return r.ApiService.ListCustomPagesExecute(r) +} + +/* +ListCustomPages List Custom Pages + +List all Custom Pages owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCustomPagesRequest +*/ +func (a *CustomPagesAPIService) ListCustomPages(ctx context.Context) ApiListCustomPagesRequest { + return ApiListCustomPagesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedCustomPageList +func (a *CustomPagesAPIService) ListCustomPagesExecute(r ApiListCustomPagesRequest) (*PaginatedCustomPageList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCustomPageList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesAPIService.ListCustomPages") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/custom_pages" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateCustomPageRequest struct { + ctx context.Context + ApiService *CustomPagesAPIService + customPageId int64 + patchedCustomPageRequest *PatchedCustomPageRequest +} + +func (r ApiPartialUpdateCustomPageRequest) PatchedCustomPageRequest(patchedCustomPageRequest PatchedCustomPageRequest) ApiPartialUpdateCustomPageRequest { + r.patchedCustomPageRequest = &patchedCustomPageRequest + return r +} + +func (r ApiPartialUpdateCustomPageRequest) Execute() (*CustomPageResponse, *http.Response, error) { + return r.ApiService.PartialUpdateCustomPageExecute(r) +} + +/* +PartialUpdateCustomPage Partially update a Custom Page + +Update one or more fields of an existing Custom Page without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customPageId A unique integer value identifying the custom page. + @return ApiPartialUpdateCustomPageRequest +*/ +func (a *CustomPagesAPIService) PartialUpdateCustomPage(ctx context.Context, customPageId int64) ApiPartialUpdateCustomPageRequest { + return ApiPartialUpdateCustomPageRequest{ + ApiService: a, + ctx: ctx, + customPageId: customPageId, + } +} + +// Execute executes the request +// @return CustomPageResponse +func (a *CustomPagesAPIService) PartialUpdateCustomPageExecute(r ApiPartialUpdateCustomPageRequest) (*CustomPageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomPageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesAPIService.PartialUpdateCustomPage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/custom_pages/{custom_page_id}" + localVarPath = strings.Replace(localVarPath, "{"+"custom_page_id"+"}", url.PathEscape(parameterValueToString(r.customPageId, "customPageId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCustomPageRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveCustomPageRequest struct { + ctx context.Context + ApiService *CustomPagesAPIService + customPageId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveCustomPageRequest) Fields(fields string) ApiRetrieveCustomPageRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveCustomPageRequest) Execute() (*CustomPageResponse, *http.Response, error) { + return r.ApiService.RetrieveCustomPageExecute(r) +} + +/* +RetrieveCustomPage Retrieve details of a Custom Page + +Retrieve details of a specific Custom Page in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customPageId A unique integer value identifying the custom page. + @return ApiRetrieveCustomPageRequest +*/ +func (a *CustomPagesAPIService) RetrieveCustomPage(ctx context.Context, customPageId int64) ApiRetrieveCustomPageRequest { + return ApiRetrieveCustomPageRequest{ + ApiService: a, + ctx: ctx, + customPageId: customPageId, + } +} + +// Execute executes the request +// @return CustomPageResponse +func (a *CustomPagesAPIService) RetrieveCustomPageExecute(r ApiRetrieveCustomPageRequest) (*CustomPageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomPageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesAPIService.RetrieveCustomPage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/custom_pages/{custom_page_id}" + localVarPath = strings.Replace(localVarPath, "{"+"custom_page_id"+"}", url.PathEscape(parameterValueToString(r.customPageId, "customPageId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateCustomPageRequest struct { + ctx context.Context + ApiService *CustomPagesAPIService + customPageId int64 + customPageRequest *CustomPageRequest +} + +func (r ApiUpdateCustomPageRequest) CustomPageRequest(customPageRequest CustomPageRequest) ApiUpdateCustomPageRequest { + r.customPageRequest = &customPageRequest + return r +} + +func (r ApiUpdateCustomPageRequest) Execute() (*CustomPageResponse, *http.Response, error) { + return r.ApiService.UpdateCustomPageExecute(r) +} + +/* +UpdateCustomPage Update a Custom Page + +Update an existing Custom Page. This replaces the entire Custom Page with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param customPageId A unique integer value identifying the custom page. + @return ApiUpdateCustomPageRequest +*/ +func (a *CustomPagesAPIService) UpdateCustomPage(ctx context.Context, customPageId int64) ApiUpdateCustomPageRequest { + return ApiUpdateCustomPageRequest{ + ApiService: a, + ctx: ctx, + customPageId: customPageId, + } +} + +// Execute executes the request +// @return CustomPageResponse +func (a *CustomPagesAPIService) UpdateCustomPageExecute(r ApiUpdateCustomPageRequest) (*CustomPageResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CustomPageResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomPagesAPIService.UpdateCustomPage") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/custom_pages/{custom_page_id}" + localVarPath = strings.Replace(localVarPath, "{"+"custom_page_id"+"}", url.PathEscape(parameterValueToString(r.customPageId, "customPageId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.customPageRequest == nil { + return localVarReturnValue, nil, reportError("customPageRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.customPageRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_data_stream_data_sources.go b/azion-api/api_data_stream_data_sources.go new file mode 100644 index 0000000..44722e8 --- /dev/null +++ b/azion-api/api_data_stream_data_sources.go @@ -0,0 +1,304 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// DataStreamDataSourcesAPIService DataStreamDataSourcesAPI service +type DataStreamDataSourcesAPIService service + +type ApiListDataSourcesRequest struct { + ctx context.Context + ApiService *DataStreamDataSourcesAPIService + active *bool + fields *string + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + slug *string +} + +// Filter by active status. +func (r ApiListDataSourcesRequest) Active(active bool) ApiListDataSourcesRequest { + r.active = &active + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDataSourcesRequest) Fields(fields string) ApiListDataSourcesRequest { + r.fields = &fields + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListDataSourcesRequest) Name(name string) ApiListDataSourcesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDataSourcesRequest) Ordering(ordering string) ApiListDataSourcesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDataSourcesRequest) Page(page int32) ApiListDataSourcesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDataSourcesRequest) PageSize(pageSize int32) ApiListDataSourcesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDataSourcesRequest) Search(search string) ApiListDataSourcesRequest { + r.search = &search + return r +} + +// Filter by slug (case-insensitive, exact match). +func (r ApiListDataSourcesRequest) Slug(slug string) ApiListDataSourcesRequest { + r.slug = &slug + return r +} + +func (r ApiListDataSourcesRequest) Execute() (*PaginatedDataSourceList, *http.Response, error) { + return r.ApiService.ListDataSourcesExecute(r) +} + +/* +ListDataSources List of Data Sources + +List all Data Sources. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDataSourcesRequest +*/ +func (a *DataStreamDataSourcesAPIService) ListDataSources(ctx context.Context) ApiListDataSourcesRequest { + return ApiListDataSourcesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedDataSourceList +func (a *DataStreamDataSourcesAPIService) ListDataSourcesExecute(r ApiListDataSourcesRequest) (*PaginatedDataSourceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDataSourceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamDataSourcesAPIService.ListDataSources") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/data_sources" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.slug != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "slug", r.slug, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_data_stream_streams.go b/azion-api/api_data_stream_streams.go new file mode 100644 index 0000000..103ed34 --- /dev/null +++ b/azion-api/api_data_stream_streams.go @@ -0,0 +1,1412 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// DataStreamStreamsAPIService DataStreamStreamsAPI service +type DataStreamStreamsAPIService service + +type ApiCreateDataStreamRequest struct { + ctx context.Context + ApiService *DataStreamStreamsAPIService + dataStreamRequest *DataStreamRequest +} + +func (r ApiCreateDataStreamRequest) DataStreamRequest(dataStreamRequest DataStreamRequest) ApiCreateDataStreamRequest { + r.dataStreamRequest = &dataStreamRequest + return r +} + +func (r ApiCreateDataStreamRequest) Execute() (*DataStreamResponse, *http.Response, error) { + return r.ApiService.CreateDataStreamExecute(r) +} + +/* +CreateDataStream Create a Data Stream + +Create a new Data Stream in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDataStreamRequest +*/ +func (a *DataStreamStreamsAPIService) CreateDataStream(ctx context.Context) ApiCreateDataStreamRequest { + return ApiCreateDataStreamRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DataStreamResponse +func (a *DataStreamStreamsAPIService) CreateDataStreamExecute(r ApiCreateDataStreamRequest) (*DataStreamResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataStreamResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamStreamsAPIService.CreateDataStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/streams" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataStreamRequest == nil { + return localVarReturnValue, nil, reportError("dataStreamRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataStreamRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDataStreamRequest struct { + ctx context.Context + ApiService *DataStreamStreamsAPIService + streamId int64 +} + +func (r ApiDeleteDataStreamRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteDataStreamExecute(r) +} + +/* +DeleteDataStream Delete a Data Stream + +Delete a specific Data Stream in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param streamId A unique integer value identifying the data stream. + @return ApiDeleteDataStreamRequest +*/ +func (a *DataStreamStreamsAPIService) DeleteDataStream(ctx context.Context, streamId int64) ApiDeleteDataStreamRequest { + return ApiDeleteDataStreamRequest{ + ApiService: a, + ctx: ctx, + streamId: streamId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *DataStreamStreamsAPIService) DeleteDataStreamExecute(r ApiDeleteDataStreamRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamStreamsAPIService.DeleteDataStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/streams/{stream_id}" + localVarPath = strings.Replace(localVarPath, "{"+"stream_id"+"}", url.PathEscape(parameterValueToString(r.streamId, "streamId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDataStreamsRequest struct { + ctx context.Context + ApiService *DataStreamStreamsAPIService + active *bool + dataSetId *int64 + dataSource *string + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListDataStreamsRequest) Active(active bool) ApiListDataStreamsRequest { + r.active = &active + return r +} + +// Filter by data set id (accepts comma-separated values). +func (r ApiListDataStreamsRequest) DataSetId(dataSetId int64) ApiListDataStreamsRequest { + r.dataSetId = &dataSetId + return r +} + +// Filter by data source (accepts comma-separated values). +func (r ApiListDataStreamsRequest) DataSource(dataSource string) ApiListDataStreamsRequest { + r.dataSource = &dataSource + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDataStreamsRequest) Fields(fields string) ApiListDataStreamsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListDataStreamsRequest) Id(id int64) ApiListDataStreamsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListDataStreamsRequest) LastEditor(lastEditor string) ApiListDataStreamsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListDataStreamsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListDataStreamsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListDataStreamsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListDataStreamsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListDataStreamsRequest) Name(name string) ApiListDataStreamsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDataStreamsRequest) Ordering(ordering string) ApiListDataStreamsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDataStreamsRequest) Page(page int32) ApiListDataStreamsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDataStreamsRequest) PageSize(pageSize int32) ApiListDataStreamsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDataStreamsRequest) Search(search string) ApiListDataStreamsRequest { + r.search = &search + return r +} + +func (r ApiListDataStreamsRequest) Execute() (*PaginatedDataStreamList, *http.Response, error) { + return r.ApiService.ListDataStreamsExecute(r) +} + +/* +ListDataStreams List Data Streams + +List all Data Streams owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDataStreamsRequest +*/ +func (a *DataStreamStreamsAPIService) ListDataStreams(ctx context.Context) ApiListDataStreamsRequest { + return ApiListDataStreamsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedDataStreamList +func (a *DataStreamStreamsAPIService) ListDataStreamsExecute(r ApiListDataStreamsRequest) (*PaginatedDataStreamList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDataStreamList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamStreamsAPIService.ListDataStreams") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/streams" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.dataSetId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "data_set_id", r.dataSetId, "form", "") + } + if r.dataSource != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "data_source", r.dataSource, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateDataStreamRequest struct { + ctx context.Context + ApiService *DataStreamStreamsAPIService + streamId int64 + patchedDataStreamRequest *PatchedDataStreamRequest +} + +func (r ApiPartialUpdateDataStreamRequest) PatchedDataStreamRequest(patchedDataStreamRequest PatchedDataStreamRequest) ApiPartialUpdateDataStreamRequest { + r.patchedDataStreamRequest = &patchedDataStreamRequest + return r +} + +func (r ApiPartialUpdateDataStreamRequest) Execute() (*DataStreamResponse, *http.Response, error) { + return r.ApiService.PartialUpdateDataStreamExecute(r) +} + +/* +PartialUpdateDataStream Partially update a Data Stream + +Update one or more fields of an existing Data Stream. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param streamId A unique integer value identifying the data stream. + @return ApiPartialUpdateDataStreamRequest +*/ +func (a *DataStreamStreamsAPIService) PartialUpdateDataStream(ctx context.Context, streamId int64) ApiPartialUpdateDataStreamRequest { + return ApiPartialUpdateDataStreamRequest{ + ApiService: a, + ctx: ctx, + streamId: streamId, + } +} + +// Execute executes the request +// @return DataStreamResponse +func (a *DataStreamStreamsAPIService) PartialUpdateDataStreamExecute(r ApiPartialUpdateDataStreamRequest) (*DataStreamResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataStreamResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamStreamsAPIService.PartialUpdateDataStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/streams/{stream_id}" + localVarPath = strings.Replace(localVarPath, "{"+"stream_id"+"}", url.PathEscape(parameterValueToString(r.streamId, "streamId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedDataStreamRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDataStreamRequest struct { + ctx context.Context + ApiService *DataStreamStreamsAPIService + streamId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDataStreamRequest) Fields(fields string) ApiRetrieveDataStreamRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDataStreamRequest) Execute() (*DataStreamResponse, *http.Response, error) { + return r.ApiService.RetrieveDataStreamExecute(r) +} + +/* +RetrieveDataStream Retrieve details of a Data Stream + +Retrieve details from a specific Data Stream in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param streamId A unique integer value identifying the data stream. + @return ApiRetrieveDataStreamRequest +*/ +func (a *DataStreamStreamsAPIService) RetrieveDataStream(ctx context.Context, streamId int64) ApiRetrieveDataStreamRequest { + return ApiRetrieveDataStreamRequest{ + ApiService: a, + ctx: ctx, + streamId: streamId, + } +} + +// Execute executes the request +// @return DataStreamResponse +func (a *DataStreamStreamsAPIService) RetrieveDataStreamExecute(r ApiRetrieveDataStreamRequest) (*DataStreamResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataStreamResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamStreamsAPIService.RetrieveDataStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/streams/{stream_id}" + localVarPath = strings.Replace(localVarPath, "{"+"stream_id"+"}", url.PathEscape(parameterValueToString(r.streamId, "streamId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDataStreamRequest struct { + ctx context.Context + ApiService *DataStreamStreamsAPIService + streamId int64 + dataStreamRequest *DataStreamRequest +} + +func (r ApiUpdateDataStreamRequest) DataStreamRequest(dataStreamRequest DataStreamRequest) ApiUpdateDataStreamRequest { + r.dataStreamRequest = &dataStreamRequest + return r +} + +func (r ApiUpdateDataStreamRequest) Execute() (*DataStreamResponse, *http.Response, error) { + return r.ApiService.UpdateDataStreamExecute(r) +} + +/* +UpdateDataStream Update a Data Stream + +Update an existing Data Stream. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param streamId A unique integer value identifying the data stream. + @return ApiUpdateDataStreamRequest +*/ +func (a *DataStreamStreamsAPIService) UpdateDataStream(ctx context.Context, streamId int64) ApiUpdateDataStreamRequest { + return ApiUpdateDataStreamRequest{ + ApiService: a, + ctx: ctx, + streamId: streamId, + } +} + +// Execute executes the request +// @return DataStreamResponse +func (a *DataStreamStreamsAPIService) UpdateDataStreamExecute(r ApiUpdateDataStreamRequest) (*DataStreamResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DataStreamResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamStreamsAPIService.UpdateDataStream") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/streams/{stream_id}" + localVarPath = strings.Replace(localVarPath, "{"+"stream_id"+"}", url.PathEscape(parameterValueToString(r.streamId, "streamId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dataStreamRequest == nil { + return localVarReturnValue, nil, reportError("dataStreamRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dataStreamRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_data_stream_templates.go b/azion-api/api_data_stream_templates.go new file mode 100644 index 0000000..5c63e94 --- /dev/null +++ b/azion-api/api_data_stream_templates.go @@ -0,0 +1,1412 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// DataStreamTemplatesAPIService DataStreamTemplatesAPI service +type DataStreamTemplatesAPIService service + +type ApiCreateTemplateRequest struct { + ctx context.Context + ApiService *DataStreamTemplatesAPIService + templateRequest *TemplateRequest +} + +func (r ApiCreateTemplateRequest) TemplateRequest(templateRequest TemplateRequest) ApiCreateTemplateRequest { + r.templateRequest = &templateRequest + return r +} + +func (r ApiCreateTemplateRequest) Execute() (*TemplateResponse, *http.Response, error) { + return r.ApiService.CreateTemplateExecute(r) +} + +/* +CreateTemplate Create a Template + +Create a new custom Template in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateTemplateRequest +*/ +func (a *DataStreamTemplatesAPIService) CreateTemplate(ctx context.Context) ApiCreateTemplateRequest { + return ApiCreateTemplateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return TemplateResponse +func (a *DataStreamTemplatesAPIService) CreateTemplateExecute(r ApiCreateTemplateRequest) (*TemplateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamTemplatesAPIService.CreateTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/templates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateRequest == nil { + return localVarReturnValue, nil, reportError("templateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteTemplateRequest struct { + ctx context.Context + ApiService *DataStreamTemplatesAPIService + templateId int64 +} + +func (r ApiDeleteTemplateRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteTemplateExecute(r) +} + +/* +DeleteTemplate Delete a Template + +Delete a specific custom Template in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId A unique integer value identifying the template. + @return ApiDeleteTemplateRequest +*/ +func (a *DataStreamTemplatesAPIService) DeleteTemplate(ctx context.Context, templateId int64) ApiDeleteTemplateRequest { + return ApiDeleteTemplateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *DataStreamTemplatesAPIService) DeleteTemplateExecute(r ApiDeleteTemplateRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamTemplatesAPIService.DeleteTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListTemplatesRequest struct { + ctx context.Context + ApiService *DataStreamTemplatesAPIService + active *bool + custom *bool + dataSet *string + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListTemplatesRequest) Active(active bool) ApiListTemplatesRequest { + r.active = &active + return r +} + +// Filter by custom status (true for custom templates, false for default templates). +func (r ApiListTemplatesRequest) Custom(custom bool) ApiListTemplatesRequest { + r.custom = &custom + return r +} + +// Filter by data set (case-insensitive, partial match). +func (r ApiListTemplatesRequest) DataSet(dataSet string) ApiListTemplatesRequest { + r.dataSet = &dataSet + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListTemplatesRequest) Fields(fields string) ApiListTemplatesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListTemplatesRequest) Id(id int64) ApiListTemplatesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListTemplatesRequest) LastEditor(lastEditor string) ApiListTemplatesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListTemplatesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListTemplatesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListTemplatesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListTemplatesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListTemplatesRequest) Name(name string) ApiListTemplatesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListTemplatesRequest) Ordering(ordering string) ApiListTemplatesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListTemplatesRequest) Page(page int32) ApiListTemplatesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListTemplatesRequest) PageSize(pageSize int32) ApiListTemplatesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListTemplatesRequest) Search(search string) ApiListTemplatesRequest { + r.search = &search + return r +} + +func (r ApiListTemplatesRequest) Execute() (*PaginatedTemplateList, *http.Response, error) { + return r.ApiService.ListTemplatesExecute(r) +} + +/* +ListTemplates List Templates + +List all Templates owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListTemplatesRequest +*/ +func (a *DataStreamTemplatesAPIService) ListTemplates(ctx context.Context) ApiListTemplatesRequest { + return ApiListTemplatesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedTemplateList +func (a *DataStreamTemplatesAPIService) ListTemplatesExecute(r ApiListTemplatesRequest) (*PaginatedTemplateList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedTemplateList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamTemplatesAPIService.ListTemplates") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/templates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.custom != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "custom", r.custom, "form", "") + } + if r.dataSet != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "data_set", r.dataSet, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateTemplateRequest struct { + ctx context.Context + ApiService *DataStreamTemplatesAPIService + templateId int64 + patchedTemplateRequest *PatchedTemplateRequest +} + +func (r ApiPartialUpdateTemplateRequest) PatchedTemplateRequest(patchedTemplateRequest PatchedTemplateRequest) ApiPartialUpdateTemplateRequest { + r.patchedTemplateRequest = &patchedTemplateRequest + return r +} + +func (r ApiPartialUpdateTemplateRequest) Execute() (*TemplateResponse, *http.Response, error) { + return r.ApiService.PartialUpdateTemplateExecute(r) +} + +/* +PartialUpdateTemplate Partially update a Template + +Update one or more fields of an existing custom Template. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId A unique integer value identifying the template. + @return ApiPartialUpdateTemplateRequest +*/ +func (a *DataStreamTemplatesAPIService) PartialUpdateTemplate(ctx context.Context, templateId int64) ApiPartialUpdateTemplateRequest { + return ApiPartialUpdateTemplateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// @return TemplateResponse +func (a *DataStreamTemplatesAPIService) PartialUpdateTemplateExecute(r ApiPartialUpdateTemplateRequest) (*TemplateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamTemplatesAPIService.PartialUpdateTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedTemplateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveTemplateRequest struct { + ctx context.Context + ApiService *DataStreamTemplatesAPIService + templateId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveTemplateRequest) Fields(fields string) ApiRetrieveTemplateRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveTemplateRequest) Execute() (*TemplateResponse, *http.Response, error) { + return r.ApiService.RetrieveTemplateExecute(r) +} + +/* +RetrieveTemplate Retrieve details of a Template + +Retrieve details from a specific Template in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId A unique integer value identifying the template. + @return ApiRetrieveTemplateRequest +*/ +func (a *DataStreamTemplatesAPIService) RetrieveTemplate(ctx context.Context, templateId int64) ApiRetrieveTemplateRequest { + return ApiRetrieveTemplateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// @return TemplateResponse +func (a *DataStreamTemplatesAPIService) RetrieveTemplateExecute(r ApiRetrieveTemplateRequest) (*TemplateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamTemplatesAPIService.RetrieveTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateTemplateRequest struct { + ctx context.Context + ApiService *DataStreamTemplatesAPIService + templateId int64 + templateRequest *TemplateRequest +} + +func (r ApiUpdateTemplateRequest) TemplateRequest(templateRequest TemplateRequest) ApiUpdateTemplateRequest { + r.templateRequest = &templateRequest + return r +} + +func (r ApiUpdateTemplateRequest) Execute() (*TemplateResponse, *http.Response, error) { + return r.ApiService.UpdateTemplateExecute(r) +} + +/* +UpdateTemplate Update a Template + +Update an existing custom Template. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param templateId A unique integer value identifying the template. + @return ApiUpdateTemplateRequest +*/ +func (a *DataStreamTemplatesAPIService) UpdateTemplate(ctx context.Context, templateId int64) ApiUpdateTemplateRequest { + return ApiUpdateTemplateRequest{ + ApiService: a, + ctx: ctx, + templateId: templateId, + } +} + +// Execute executes the request +// @return TemplateResponse +func (a *DataStreamTemplatesAPIService) UpdateTemplateExecute(r ApiUpdateTemplateRequest) (*TemplateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *TemplateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DataStreamTemplatesAPIService.UpdateTemplate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/stream/templates/{template_id}" + localVarPath = strings.Replace(localVarPath, "{"+"template_id"+"}", url.PathEscape(parameterValueToString(r.templateId, "templateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.templateRequest == nil { + return localVarReturnValue, nil, reportError("templateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.templateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_digital_certificates_certificate_revocation_lists.go b/azion-api/api_digital_certificates_certificate_revocation_lists.go new file mode 100644 index 0000000..4a77b5b --- /dev/null +++ b/azion-api/api_digital_certificates_certificate_revocation_lists.go @@ -0,0 +1,1452 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// DigitalCertificatesCertificateRevocationListsAPIService DigitalCertificatesCertificateRevocationListsAPI service +type DigitalCertificatesCertificateRevocationListsAPIService service + +type ApiCreateCertificateRevocationListRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateRevocationListsAPIService + certificateRevocationList *CertificateRevocationList +} + +func (r ApiCreateCertificateRevocationListRequest) CertificateRevocationList(certificateRevocationList CertificateRevocationList) ApiCreateCertificateRevocationListRequest { + r.certificateRevocationList = &certificateRevocationList + return r +} + +func (r ApiCreateCertificateRevocationListRequest) Execute() (*CertificateRevocationListResponse, *http.Response, error) { + return r.ApiService.CreateCertificateRevocationListExecute(r) +} + +/* +CreateCertificateRevocationList Create a certificate revocation lists (CRL) + +Create a new certificate revocation lists (CRL) for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCertificateRevocationListRequest +*/ +func (a *DigitalCertificatesCertificateRevocationListsAPIService) CreateCertificateRevocationList(ctx context.Context) ApiCreateCertificateRevocationListRequest { + return ApiCreateCertificateRevocationListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CertificateRevocationListResponse +func (a *DigitalCertificatesCertificateRevocationListsAPIService) CreateCertificateRevocationListExecute(r ApiCreateCertificateRevocationListRequest) (*CertificateRevocationListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateRevocationListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateRevocationListsAPIService.CreateCertificateRevocationList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/crls" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certificateRevocationList == nil { + return localVarReturnValue, nil, reportError("certificateRevocationList is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certificateRevocationList + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteCertificateRevocationListRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateRevocationListsAPIService + crlId int64 +} + +func (r ApiDeleteCertificateRevocationListRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteCertificateRevocationListExecute(r) +} + +/* +DeleteCertificateRevocationList Delete a certificate revocation list + +Delete a specific certificate revocation list in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param crlId The unique identifier of the certificate revocation list + @return ApiDeleteCertificateRevocationListRequest +*/ +func (a *DigitalCertificatesCertificateRevocationListsAPIService) DeleteCertificateRevocationList(ctx context.Context, crlId int64) ApiDeleteCertificateRevocationListRequest { + return ApiDeleteCertificateRevocationListRequest{ + ApiService: a, + ctx: ctx, + crlId: crlId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *DigitalCertificatesCertificateRevocationListsAPIService) DeleteCertificateRevocationListExecute(r ApiDeleteCertificateRevocationListRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateRevocationListsAPIService.DeleteCertificateRevocationList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/crls/{crl_id}" + localVarPath = strings.Replace(localVarPath, "{"+"crl_id"+"}", url.PathEscape(parameterValueToString(r.crlId, "crlId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListCertificateRevocationListsRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateRevocationListsAPIService + fields *string + id *int64 + issuer *string + lastModified *time.Time + lastModifiedGte *time.Time + lastModifiedLte *time.Time + lastUpdate *time.Time + lastUpdateGte *time.Time + lastUpdateLte *time.Time + name *string + nextUpdate *time.Time + nextUpdateGte *time.Time + nextUpdateLte *time.Time + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListCertificateRevocationListsRequest) Fields(fields string) ApiListCertificateRevocationListsRequest { + r.fields = &fields + return r +} + +// Filter by CRL ID (accepts comma-separated values). +func (r ApiListCertificateRevocationListsRequest) Id(id int64) ApiListCertificateRevocationListsRequest { + r.id = &id + return r +} + +// Filter by issuer (case-insensitive, partial match). +func (r ApiListCertificateRevocationListsRequest) Issuer(issuer string) ApiListCertificateRevocationListsRequest { + r.issuer = &issuer + return r +} + +// Filter by exact last modified date and time. +func (r ApiListCertificateRevocationListsRequest) LastModified(lastModified time.Time) ApiListCertificateRevocationListsRequest { + r.lastModified = &lastModified + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListCertificateRevocationListsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListCertificateRevocationListsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListCertificateRevocationListsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListCertificateRevocationListsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by exact last update date and time. +func (r ApiListCertificateRevocationListsRequest) LastUpdate(lastUpdate time.Time) ApiListCertificateRevocationListsRequest { + r.lastUpdate = &lastUpdate + return r +} + +// Filter by last update date (greater than or equal). +func (r ApiListCertificateRevocationListsRequest) LastUpdateGte(lastUpdateGte time.Time) ApiListCertificateRevocationListsRequest { + r.lastUpdateGte = &lastUpdateGte + return r +} + +// Filter by last update date (less than or equal). +func (r ApiListCertificateRevocationListsRequest) LastUpdateLte(lastUpdateLte time.Time) ApiListCertificateRevocationListsRequest { + r.lastUpdateLte = &lastUpdateLte + return r +} + +// Filter by CRL name (case-insensitive, partial match). +func (r ApiListCertificateRevocationListsRequest) Name(name string) ApiListCertificateRevocationListsRequest { + r.name = &name + return r +} + +// Filter by exact next update date and time. +func (r ApiListCertificateRevocationListsRequest) NextUpdate(nextUpdate time.Time) ApiListCertificateRevocationListsRequest { + r.nextUpdate = &nextUpdate + return r +} + +// Filter by next update date (greater than or equal). +func (r ApiListCertificateRevocationListsRequest) NextUpdateGte(nextUpdateGte time.Time) ApiListCertificateRevocationListsRequest { + r.nextUpdateGte = &nextUpdateGte + return r +} + +// Filter by next update date (less than or equal). +func (r ApiListCertificateRevocationListsRequest) NextUpdateLte(nextUpdateLte time.Time) ApiListCertificateRevocationListsRequest { + r.nextUpdateLte = &nextUpdateLte + return r +} + +// Which field to use when ordering the results. +func (r ApiListCertificateRevocationListsRequest) Ordering(ordering string) ApiListCertificateRevocationListsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListCertificateRevocationListsRequest) Page(page int32) ApiListCertificateRevocationListsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListCertificateRevocationListsRequest) PageSize(pageSize int32) ApiListCertificateRevocationListsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListCertificateRevocationListsRequest) Search(search string) ApiListCertificateRevocationListsRequest { + r.search = &search + return r +} + +func (r ApiListCertificateRevocationListsRequest) Execute() (*PaginatedCertificateRevocationList, *http.Response, error) { + return r.ApiService.ListCertificateRevocationListsExecute(r) +} + +/* +ListCertificateRevocationLists List certificate revocation lists (CRL) + +List all certificate revocation lists (CRL) owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCertificateRevocationListsRequest +*/ +func (a *DigitalCertificatesCertificateRevocationListsAPIService) ListCertificateRevocationLists(ctx context.Context) ApiListCertificateRevocationListsRequest { + return ApiListCertificateRevocationListsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedCertificateRevocationList +func (a *DigitalCertificatesCertificateRevocationListsAPIService) ListCertificateRevocationListsExecute(r ApiListCertificateRevocationListsRequest) (*PaginatedCertificateRevocationList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCertificateRevocationList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateRevocationListsAPIService.ListCertificateRevocationLists") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/crls" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.issuer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "issuer", r.issuer, "form", "") + } + if r.lastModified != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified", r.lastModified, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.lastUpdate != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_update", r.lastUpdate, "form", "") + } + if r.lastUpdateGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_update__gte", r.lastUpdateGte, "form", "") + } + if r.lastUpdateLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_update__lte", r.lastUpdateLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.nextUpdate != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_update", r.nextUpdate, "form", "") + } + if r.nextUpdateGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_update__gte", r.nextUpdateGte, "form", "") + } + if r.nextUpdateLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "next_update__lte", r.nextUpdateLte, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateCertificateRevocationListRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateRevocationListsAPIService + crlId int64 + patchedCertificateRevocationList *PatchedCertificateRevocationList +} + +func (r ApiPartialUpdateCertificateRevocationListRequest) PatchedCertificateRevocationList(patchedCertificateRevocationList PatchedCertificateRevocationList) ApiPartialUpdateCertificateRevocationListRequest { + r.patchedCertificateRevocationList = &patchedCertificateRevocationList + return r +} + +func (r ApiPartialUpdateCertificateRevocationListRequest) Execute() (*CertificateRevocationListResponse, *http.Response, error) { + return r.ApiService.PartialUpdateCertificateRevocationListExecute(r) +} + +/* +PartialUpdateCertificateRevocationList Update a certificate revocation lists (CRL) + +Update one or more fields of an existing certificate revocation lists (CRL) without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param crlId The unique identifier of the certificate revocation list + @return ApiPartialUpdateCertificateRevocationListRequest +*/ +func (a *DigitalCertificatesCertificateRevocationListsAPIService) PartialUpdateCertificateRevocationList(ctx context.Context, crlId int64) ApiPartialUpdateCertificateRevocationListRequest { + return ApiPartialUpdateCertificateRevocationListRequest{ + ApiService: a, + ctx: ctx, + crlId: crlId, + } +} + +// Execute executes the request +// @return CertificateRevocationListResponse +func (a *DigitalCertificatesCertificateRevocationListsAPIService) PartialUpdateCertificateRevocationListExecute(r ApiPartialUpdateCertificateRevocationListRequest) (*CertificateRevocationListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateRevocationListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateRevocationListsAPIService.PartialUpdateCertificateRevocationList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/crls/{crl_id}" + localVarPath = strings.Replace(localVarPath, "{"+"crl_id"+"}", url.PathEscape(parameterValueToString(r.crlId, "crlId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCertificateRevocationList + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveCertificateRevocationListRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateRevocationListsAPIService + crlId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveCertificateRevocationListRequest) Fields(fields string) ApiRetrieveCertificateRevocationListRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveCertificateRevocationListRequest) Execute() (*CertificateRevocationListResponse, *http.Response, error) { + return r.ApiService.RetrieveCertificateRevocationListExecute(r) +} + +/* +RetrieveCertificateRevocationList Retrieve details from a certificate revocation lists (CRL) + +Retrieve details from a specific certificate revocation lists (CRL) in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param crlId The unique identifier of the certificate revocation list + @return ApiRetrieveCertificateRevocationListRequest +*/ +func (a *DigitalCertificatesCertificateRevocationListsAPIService) RetrieveCertificateRevocationList(ctx context.Context, crlId int64) ApiRetrieveCertificateRevocationListRequest { + return ApiRetrieveCertificateRevocationListRequest{ + ApiService: a, + ctx: ctx, + crlId: crlId, + } +} + +// Execute executes the request +// @return CertificateRevocationListResponse +func (a *DigitalCertificatesCertificateRevocationListsAPIService) RetrieveCertificateRevocationListExecute(r ApiRetrieveCertificateRevocationListRequest) (*CertificateRevocationListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateRevocationListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateRevocationListsAPIService.RetrieveCertificateRevocationList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/crls/{crl_id}" + localVarPath = strings.Replace(localVarPath, "{"+"crl_id"+"}", url.PathEscape(parameterValueToString(r.crlId, "crlId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateCertificateRevocationListRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateRevocationListsAPIService + crlId int64 + certificateRevocationList *CertificateRevocationList +} + +func (r ApiUpdateCertificateRevocationListRequest) CertificateRevocationList(certificateRevocationList CertificateRevocationList) ApiUpdateCertificateRevocationListRequest { + r.certificateRevocationList = &certificateRevocationList + return r +} + +func (r ApiUpdateCertificateRevocationListRequest) Execute() (*CertificateRevocationListResponse, *http.Response, error) { + return r.ApiService.UpdateCertificateRevocationListExecute(r) +} + +/* +UpdateCertificateRevocationList Update a certificate revocation lists (CRL) + +Update an existing certificate revocation lists (CRL). This replaces the entire certificate with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param crlId The unique identifier of the certificate revocation list + @return ApiUpdateCertificateRevocationListRequest +*/ +func (a *DigitalCertificatesCertificateRevocationListsAPIService) UpdateCertificateRevocationList(ctx context.Context, crlId int64) ApiUpdateCertificateRevocationListRequest { + return ApiUpdateCertificateRevocationListRequest{ + ApiService: a, + ctx: ctx, + crlId: crlId, + } +} + +// Execute executes the request +// @return CertificateRevocationListResponse +func (a *DigitalCertificatesCertificateRevocationListsAPIService) UpdateCertificateRevocationListExecute(r ApiUpdateCertificateRevocationListRequest) (*CertificateRevocationListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateRevocationListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateRevocationListsAPIService.UpdateCertificateRevocationList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/crls/{crl_id}" + localVarPath = strings.Replace(localVarPath, "{"+"crl_id"+"}", url.PathEscape(parameterValueToString(r.crlId, "crlId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certificateRevocationList == nil { + return localVarReturnValue, nil, reportError("certificateRevocationList is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certificateRevocationList + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_digital_certificates_certificate_signing_requests.go b/azion-api/api_digital_certificates_certificate_signing_requests.go new file mode 100644 index 0000000..21ef961 --- /dev/null +++ b/azion-api/api_digital_certificates_certificate_signing_requests.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// DigitalCertificatesCertificateSigningRequestsAPIService DigitalCertificatesCertificateSigningRequestsAPI service +type DigitalCertificatesCertificateSigningRequestsAPIService service + +type ApiCreateCertificateSigningRequestRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificateSigningRequestsAPIService + certificateSigningRequest *CertificateSigningRequest +} + +func (r ApiCreateCertificateSigningRequestRequest) CertificateSigningRequest(certificateSigningRequest CertificateSigningRequest) ApiCreateCertificateSigningRequestRequest { + r.certificateSigningRequest = &certificateSigningRequest + return r +} + +func (r ApiCreateCertificateSigningRequestRequest) Execute() (*CertificateResponse, *http.Response, error) { + return r.ApiService.CreateCertificateSigningRequestExecute(r) +} + +/* +CreateCertificateSigningRequest Create a certificate signing request (CSR) + +Create a new certificate signing request (CSR) for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCertificateSigningRequestRequest +*/ +func (a *DigitalCertificatesCertificateSigningRequestsAPIService) CreateCertificateSigningRequest(ctx context.Context) ApiCreateCertificateSigningRequestRequest { + return ApiCreateCertificateSigningRequestRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CertificateResponse +func (a *DigitalCertificatesCertificateSigningRequestsAPIService) CreateCertificateSigningRequestExecute(r ApiCreateCertificateSigningRequestRequest) (*CertificateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificateSigningRequestsAPIService.CreateCertificateSigningRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/csr" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certificateSigningRequest == nil { + return localVarReturnValue, nil, reportError("certificateSigningRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certificateSigningRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_digital_certificates_certificates.go b/azion-api/api_digital_certificates_certificates.go new file mode 100644 index 0000000..0ee240d --- /dev/null +++ b/azion-api/api_digital_certificates_certificates.go @@ -0,0 +1,1442 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// DigitalCertificatesCertificatesAPIService DigitalCertificatesCertificatesAPI service +type DigitalCertificatesCertificatesAPIService service + +type ApiCreateCertificateRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificatesAPIService + certificate *Certificate +} + +func (r ApiCreateCertificateRequest) Certificate(certificate Certificate) ApiCreateCertificateRequest { + r.certificate = &certificate + return r +} + +func (r ApiCreateCertificateRequest) Execute() (*CertificateResponse, *http.Response, error) { + return r.ApiService.CreateCertificateExecute(r) +} + +/* +CreateCertificate Create a certificate + +Create a new certificate for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCertificateRequest +*/ +func (a *DigitalCertificatesCertificatesAPIService) CreateCertificate(ctx context.Context) ApiCreateCertificateRequest { + return ApiCreateCertificateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CertificateResponse +func (a *DigitalCertificatesCertificatesAPIService) CreateCertificateExecute(r ApiCreateCertificateRequest) (*CertificateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificatesAPIService.CreateCertificate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certificate == nil { + return localVarReturnValue, nil, reportError("certificate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certificate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteCertificateRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificatesAPIService + certificateId int64 +} + +func (r ApiDeleteCertificateRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteCertificateExecute(r) +} + +/* +DeleteCertificate Delete a certificate + +Delete a specific certificate in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certificateId The unique identifier of the certificate + @return ApiDeleteCertificateRequest +*/ +func (a *DigitalCertificatesCertificatesAPIService) DeleteCertificate(ctx context.Context, certificateId int64) ApiDeleteCertificateRequest { + return ApiDeleteCertificateRequest{ + ApiService: a, + ctx: ctx, + certificateId: certificateId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *DigitalCertificatesCertificatesAPIService) DeleteCertificateExecute(r ApiDeleteCertificateRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificatesAPIService.DeleteCertificate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates/{certificate_id}" + localVarPath = strings.Replace(localVarPath, "{"+"certificate_id"+"}", url.PathEscape(parameterValueToString(r.certificateId, "certificateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListCertificatesRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificatesAPIService + certificateType *string + fields *string + id *int64 + issuer *string + lastModified *time.Time + lastModifiedGte *time.Time + lastModifiedLte *time.Time + managed *bool + name *string + ordering *string + page *int32 + pageSize *int32 + renewedAt *time.Time + renewedAtGte *time.Time + renewedAtLte *time.Time + search *string +} + +// Filter by certificate type (accepts comma-separated values). +func (r ApiListCertificatesRequest) CertificateType(certificateType string) ApiListCertificatesRequest { + r.certificateType = &certificateType + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListCertificatesRequest) Fields(fields string) ApiListCertificatesRequest { + r.fields = &fields + return r +} + +// Filter by certificate ID (accepts comma-separated values). +func (r ApiListCertificatesRequest) Id(id int64) ApiListCertificatesRequest { + r.id = &id + return r +} + +// Filter by issuer (case-insensitive, partial match). +func (r ApiListCertificatesRequest) Issuer(issuer string) ApiListCertificatesRequest { + r.issuer = &issuer + return r +} + +// Filter by exact last modified date and time. +func (r ApiListCertificatesRequest) LastModified(lastModified time.Time) ApiListCertificatesRequest { + r.lastModified = &lastModified + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListCertificatesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListCertificatesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListCertificatesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListCertificatesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by managed status. +func (r ApiListCertificatesRequest) Managed(managed bool) ApiListCertificatesRequest { + r.managed = &managed + return r +} + +// Filter by certificate name (case-insensitive, partial match). +func (r ApiListCertificatesRequest) Name(name string) ApiListCertificatesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListCertificatesRequest) Ordering(ordering string) ApiListCertificatesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListCertificatesRequest) Page(page int32) ApiListCertificatesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListCertificatesRequest) PageSize(pageSize int32) ApiListCertificatesRequest { + r.pageSize = &pageSize + return r +} + +// Filter by exact renewed date and time. +func (r ApiListCertificatesRequest) RenewedAt(renewedAt time.Time) ApiListCertificatesRequest { + r.renewedAt = &renewedAt + return r +} + +// Filter by renewed date (greater than or equal). +func (r ApiListCertificatesRequest) RenewedAtGte(renewedAtGte time.Time) ApiListCertificatesRequest { + r.renewedAtGte = &renewedAtGte + return r +} + +// Filter by renewed date (less than or equal). +func (r ApiListCertificatesRequest) RenewedAtLte(renewedAtLte time.Time) ApiListCertificatesRequest { + r.renewedAtLte = &renewedAtLte + return r +} + +// A search term. +func (r ApiListCertificatesRequest) Search(search string) ApiListCertificatesRequest { + r.search = &search + return r +} + +func (r ApiListCertificatesRequest) Execute() (*PaginatedCertificateList, *http.Response, error) { + return r.ApiService.ListCertificatesExecute(r) +} + +/* +ListCertificates List certificates + +List all certificates owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCertificatesRequest +*/ +func (a *DigitalCertificatesCertificatesAPIService) ListCertificates(ctx context.Context) ApiListCertificatesRequest { + return ApiListCertificatesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedCertificateList +func (a *DigitalCertificatesCertificatesAPIService) ListCertificatesExecute(r ApiListCertificatesRequest) (*PaginatedCertificateList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCertificateList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificatesAPIService.ListCertificates") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.certificateType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "certificate_type", r.certificateType, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.issuer != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "issuer", r.issuer, "form", "") + } + if r.lastModified != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified", r.lastModified, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.managed != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "managed", r.managed, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.renewedAt != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "renewed_at", r.renewedAt, "form", "") + } + if r.renewedAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "renewed_at__gte", r.renewedAtGte, "form", "") + } + if r.renewedAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "renewed_at__lte", r.renewedAtLte, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateCertificateRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificatesAPIService + certificateId int64 + patchedCertificate *PatchedCertificate +} + +func (r ApiPartialUpdateCertificateRequest) PatchedCertificate(patchedCertificate PatchedCertificate) ApiPartialUpdateCertificateRequest { + r.patchedCertificate = &patchedCertificate + return r +} + +func (r ApiPartialUpdateCertificateRequest) Execute() (*CertificateResponse, *http.Response, error) { + return r.ApiService.PartialUpdateCertificateExecute(r) +} + +/* +PartialUpdateCertificate Partially update a certificate + +Update one or more fields of an existing certificate without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certificateId The unique identifier of the certificate + @return ApiPartialUpdateCertificateRequest +*/ +func (a *DigitalCertificatesCertificatesAPIService) PartialUpdateCertificate(ctx context.Context, certificateId int64) ApiPartialUpdateCertificateRequest { + return ApiPartialUpdateCertificateRequest{ + ApiService: a, + ctx: ctx, + certificateId: certificateId, + } +} + +// Execute executes the request +// @return CertificateResponse +func (a *DigitalCertificatesCertificatesAPIService) PartialUpdateCertificateExecute(r ApiPartialUpdateCertificateRequest) (*CertificateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificatesAPIService.PartialUpdateCertificate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates/{certificate_id}" + localVarPath = strings.Replace(localVarPath, "{"+"certificate_id"+"}", url.PathEscape(parameterValueToString(r.certificateId, "certificateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedCertificate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveCertificateRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificatesAPIService + certificateId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveCertificateRequest) Fields(fields string) ApiRetrieveCertificateRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveCertificateRequest) Execute() (*CertificateResponse, *http.Response, error) { + return r.ApiService.RetrieveCertificateExecute(r) +} + +/* +RetrieveCertificate Retrieve details from a certificate + +Retrieve details from a specific certificate in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certificateId The unique identifier of the certificate + @return ApiRetrieveCertificateRequest +*/ +func (a *DigitalCertificatesCertificatesAPIService) RetrieveCertificate(ctx context.Context, certificateId int64) ApiRetrieveCertificateRequest { + return ApiRetrieveCertificateRequest{ + ApiService: a, + ctx: ctx, + certificateId: certificateId, + } +} + +// Execute executes the request +// @return CertificateResponse +func (a *DigitalCertificatesCertificatesAPIService) RetrieveCertificateExecute(r ApiRetrieveCertificateRequest) (*CertificateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificatesAPIService.RetrieveCertificate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates/{certificate_id}" + localVarPath = strings.Replace(localVarPath, "{"+"certificate_id"+"}", url.PathEscape(parameterValueToString(r.certificateId, "certificateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateCertificateRequest struct { + ctx context.Context + ApiService *DigitalCertificatesCertificatesAPIService + certificateId int64 + certificate *Certificate +} + +func (r ApiUpdateCertificateRequest) Certificate(certificate Certificate) ApiUpdateCertificateRequest { + r.certificate = &certificate + return r +} + +func (r ApiUpdateCertificateRequest) Execute() (*CertificateResponse, *http.Response, error) { + return r.ApiService.UpdateCertificateExecute(r) +} + +/* +UpdateCertificate Update a certificate + +Update an existing certificate. This replaces the entire certificate with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param certificateId The unique identifier of the certificate + @return ApiUpdateCertificateRequest +*/ +func (a *DigitalCertificatesCertificatesAPIService) UpdateCertificate(ctx context.Context, certificateId int64) ApiUpdateCertificateRequest { + return ApiUpdateCertificateRequest{ + ApiService: a, + ctx: ctx, + certificateId: certificateId, + } +} + +// Execute executes the request +// @return CertificateResponse +func (a *DigitalCertificatesCertificatesAPIService) UpdateCertificateExecute(r ApiUpdateCertificateRequest) (*CertificateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesCertificatesAPIService.UpdateCertificate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates/{certificate_id}" + localVarPath = strings.Replace(localVarPath, "{"+"certificate_id"+"}", url.PathEscape(parameterValueToString(r.certificateId, "certificateId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certificate == nil { + return localVarReturnValue, nil, reportError("certificate is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certificate + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_digital_certificates_request_a_certificate.go b/azion-api/api_digital_certificates_request_a_certificate.go new file mode 100644 index 0000000..4afb7ad --- /dev/null +++ b/azion-api/api_digital_certificates_request_a_certificate.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// DigitalCertificatesRequestACertificateAPIService DigitalCertificatesRequestACertificateAPI service +type DigitalCertificatesRequestACertificateAPIService service + +type ApiRequestCertificateRequest struct { + ctx context.Context + ApiService *DigitalCertificatesRequestACertificateAPIService + certificateRequest *CertificateRequest +} + +func (r ApiRequestCertificateRequest) CertificateRequest(certificateRequest CertificateRequest) ApiRequestCertificateRequest { + r.certificateRequest = &certificateRequest + return r +} + +func (r ApiRequestCertificateRequest) Execute() (*CertificateResponse, *http.Response, error) { + return r.ApiService.RequestCertificateExecute(r) +} + +/* +RequestCertificate Request a certificate + +Request a new certificate for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRequestCertificateRequest +*/ +func (a *DigitalCertificatesRequestACertificateAPIService) RequestCertificate(ctx context.Context) ApiRequestCertificateRequest { + return ApiRequestCertificateRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CertificateResponse +func (a *DigitalCertificatesRequestACertificateAPIService) RequestCertificateExecute(r ApiRequestCertificateRequest) (*CertificateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CertificateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DigitalCertificatesRequestACertificateAPIService.RequestCertificate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/tls/certificates/request" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.certificateRequest == nil { + return localVarReturnValue, nil, reportError("certificateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.certificateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_dns_records.go b/azion-api/api_dns_records.go new file mode 100644 index 0000000..1dd8c04 --- /dev/null +++ b/azion-api/api_dns_records.go @@ -0,0 +1,1355 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// DNSRecordsAPIService DNSRecordsAPI service +type DNSRecordsAPIService service + +type ApiCreateDnsRecordRequest struct { + ctx context.Context + ApiService *DNSRecordsAPIService + zoneId int64 + recordRequest *RecordRequest +} + +func (r ApiCreateDnsRecordRequest) RecordRequest(recordRequest RecordRequest) ApiCreateDnsRecordRequest { + r.recordRequest = &recordRequest + return r +} + +func (r ApiCreateDnsRecordRequest) Execute() (*RecordResponse, *http.Response, error) { + return r.ApiService.CreateDnsRecordExecute(r) +} + +/* +CreateDnsRecord Create a DNS Record + +Create a new DNS Record in a DNS Zone for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiCreateDnsRecordRequest +*/ +func (a *DNSRecordsAPIService) CreateDnsRecord(ctx context.Context, zoneId int64) ApiCreateDnsRecordRequest { + return ApiCreateDnsRecordRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return RecordResponse +func (a *DNSRecordsAPIService) CreateDnsRecordExecute(r ApiCreateDnsRecordRequest) (*RecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSRecordsAPIService.CreateDnsRecord") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/records" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.recordRequest == nil { + return localVarReturnValue, nil, reportError("recordRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.recordRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDnsRecordRequest struct { + ctx context.Context + ApiService *DNSRecordsAPIService + recordId int64 + zoneId int64 +} + +func (r ApiDeleteDnsRecordRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteDnsRecordExecute(r) +} + +/* +DeleteDnsRecord Delete a DNS Record + +Delete a specific DNS Record from a DNS Zone in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param recordId A unique integer value identifying the DNS Record. + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiDeleteDnsRecordRequest +*/ +func (a *DNSRecordsAPIService) DeleteDnsRecord(ctx context.Context, recordId int64, zoneId int64) ApiDeleteDnsRecordRequest { + return ApiDeleteDnsRecordRequest{ + ApiService: a, + ctx: ctx, + recordId: recordId, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *DNSRecordsAPIService) DeleteDnsRecordExecute(r ApiDeleteDnsRecordRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSRecordsAPIService.DeleteDnsRecord") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/records/{record_id}" + localVarPath = strings.Replace(localVarPath, "{"+"record_id"+"}", url.PathEscape(parameterValueToString(r.recordId, "recordId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDnsRecordsRequest struct { + ctx context.Context + ApiService *DNSRecordsAPIService + zoneId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDnsRecordsRequest) Fields(fields string) ApiListDnsRecordsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListDnsRecordsRequest) Ordering(ordering string) ApiListDnsRecordsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDnsRecordsRequest) Page(page int32) ApiListDnsRecordsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDnsRecordsRequest) PageSize(pageSize int32) ApiListDnsRecordsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDnsRecordsRequest) Search(search string) ApiListDnsRecordsRequest { + r.search = &search + return r +} + +func (r ApiListDnsRecordsRequest) Execute() (*PaginatedRecordList, *http.Response, error) { + return r.ApiService.ListDnsRecordsExecute(r) +} + +/* +ListDnsRecords List DNS Records + +List all DNS Records from a DNS Zone owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiListDnsRecordsRequest +*/ +func (a *DNSRecordsAPIService) ListDnsRecords(ctx context.Context, zoneId int64) ApiListDnsRecordsRequest { + return ApiListDnsRecordsRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return PaginatedRecordList +func (a *DNSRecordsAPIService) ListDnsRecordsExecute(r ApiListDnsRecordsRequest) (*PaginatedRecordList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRecordList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSRecordsAPIService.ListDnsRecords") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/records" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateDnsRecordRequest struct { + ctx context.Context + ApiService *DNSRecordsAPIService + recordId int64 + zoneId int64 + patchedRecordRequest *PatchedRecordRequest +} + +func (r ApiPartialUpdateDnsRecordRequest) PatchedRecordRequest(patchedRecordRequest PatchedRecordRequest) ApiPartialUpdateDnsRecordRequest { + r.patchedRecordRequest = &patchedRecordRequest + return r +} + +func (r ApiPartialUpdateDnsRecordRequest) Execute() (*RecordResponse, *http.Response, error) { + return r.ApiService.PartialUpdateDnsRecordExecute(r) +} + +/* +PartialUpdateDnsRecord Partially update a DNS Record + +Update one or more fields of an existing DNS Record without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param recordId A unique integer value identifying the DNS Record. + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiPartialUpdateDnsRecordRequest +*/ +func (a *DNSRecordsAPIService) PartialUpdateDnsRecord(ctx context.Context, recordId int64, zoneId int64) ApiPartialUpdateDnsRecordRequest { + return ApiPartialUpdateDnsRecordRequest{ + ApiService: a, + ctx: ctx, + recordId: recordId, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return RecordResponse +func (a *DNSRecordsAPIService) PartialUpdateDnsRecordExecute(r ApiPartialUpdateDnsRecordRequest) (*RecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSRecordsAPIService.PartialUpdateDnsRecord") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/records/{record_id}" + localVarPath = strings.Replace(localVarPath, "{"+"record_id"+"}", url.PathEscape(parameterValueToString(r.recordId, "recordId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedRecordRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDnsRecordRequest struct { + ctx context.Context + ApiService *DNSRecordsAPIService + recordId int64 + zoneId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDnsRecordRequest) Fields(fields string) ApiRetrieveDnsRecordRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDnsRecordRequest) Execute() (*RecordResponse, *http.Response, error) { + return r.ApiService.RetrieveDnsRecordExecute(r) +} + +/* +RetrieveDnsRecord Retrieve details of a DNS Record + +Retrieve details of a specific DNS Record from a DNS Zone in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param recordId A unique integer value identifying the DNS Record. + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiRetrieveDnsRecordRequest +*/ +func (a *DNSRecordsAPIService) RetrieveDnsRecord(ctx context.Context, recordId int64, zoneId int64) ApiRetrieveDnsRecordRequest { + return ApiRetrieveDnsRecordRequest{ + ApiService: a, + ctx: ctx, + recordId: recordId, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return RecordResponse +func (a *DNSRecordsAPIService) RetrieveDnsRecordExecute(r ApiRetrieveDnsRecordRequest) (*RecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSRecordsAPIService.RetrieveDnsRecord") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/records/{record_id}" + localVarPath = strings.Replace(localVarPath, "{"+"record_id"+"}", url.PathEscape(parameterValueToString(r.recordId, "recordId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDnsRecordRequest struct { + ctx context.Context + ApiService *DNSRecordsAPIService + recordId int64 + zoneId int64 + recordRequest *RecordRequest +} + +func (r ApiUpdateDnsRecordRequest) RecordRequest(recordRequest RecordRequest) ApiUpdateDnsRecordRequest { + r.recordRequest = &recordRequest + return r +} + +func (r ApiUpdateDnsRecordRequest) Execute() (*RecordResponse, *http.Response, error) { + return r.ApiService.UpdateDnsRecordExecute(r) +} + +/* +UpdateDnsRecord Update a DNS Record + +Update an existing a DNS Record. This replaces the entire DNS Record with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param recordId A unique integer value identifying the DNS Record. + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiUpdateDnsRecordRequest +*/ +func (a *DNSRecordsAPIService) UpdateDnsRecord(ctx context.Context, recordId int64, zoneId int64) ApiUpdateDnsRecordRequest { + return ApiUpdateDnsRecordRequest{ + ApiService: a, + ctx: ctx, + recordId: recordId, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return RecordResponse +func (a *DNSRecordsAPIService) UpdateDnsRecordExecute(r ApiUpdateDnsRecordRequest) (*RecordResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RecordResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSRecordsAPIService.UpdateDnsRecord") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/records/{record_id}" + localVarPath = strings.Replace(localVarPath, "{"+"record_id"+"}", url.PathEscape(parameterValueToString(r.recordId, "recordId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.recordRequest == nil { + return localVarReturnValue, nil, reportError("recordRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.recordRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_dns_zones.go b/azion-api/api_dns_zones.go new file mode 100644 index 0000000..81308a9 --- /dev/null +++ b/azion-api/api_dns_zones.go @@ -0,0 +1,1361 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// DNSZonesAPIService DNSZonesAPI service +type DNSZonesAPIService service + +type ApiCreateDnsZoneRequest struct { + ctx context.Context + ApiService *DNSZonesAPIService + zoneRequest *ZoneRequest +} + +func (r ApiCreateDnsZoneRequest) ZoneRequest(zoneRequest ZoneRequest) ApiCreateDnsZoneRequest { + r.zoneRequest = &zoneRequest + return r +} + +func (r ApiCreateDnsZoneRequest) Execute() (*ZoneResponse, *http.Response, error) { + return r.ApiService.CreateDnsZoneExecute(r) +} + +/* +CreateDnsZone Create a DNS Zone + +Create a new DNS Zone for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDnsZoneRequest +*/ +func (a *DNSZonesAPIService) CreateDnsZone(ctx context.Context) ApiCreateDnsZoneRequest { + return ApiCreateDnsZoneRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ZoneResponse +func (a *DNSZonesAPIService) CreateDnsZoneExecute(r ApiCreateDnsZoneRequest) (*ZoneResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ZoneResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSZonesAPIService.CreateDnsZone") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.zoneRequest == nil { + return localVarReturnValue, nil, reportError("zoneRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.zoneRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDnsZoneRequest struct { + ctx context.Context + ApiService *DNSZonesAPIService + zoneId int64 +} + +func (r ApiDeleteDnsZoneRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteDnsZoneExecute(r) +} + +/* +DeleteDnsZone Delete a DNS Zone + +Delete a specific DNS Zone in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiDeleteDnsZoneRequest +*/ +func (a *DNSZonesAPIService) DeleteDnsZone(ctx context.Context, zoneId int64) ApiDeleteDnsZoneRequest { + return ApiDeleteDnsZoneRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *DNSZonesAPIService) DeleteDnsZoneExecute(r ApiDeleteDnsZoneRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSZonesAPIService.DeleteDnsZone") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDnsZonesRequest struct { + ctx context.Context + ApiService *DNSZonesAPIService + active *bool + domain *string + fields *string + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListDnsZonesRequest) Active(active bool) ApiListDnsZonesRequest { + r.active = &active + return r +} + +// Filter by domain (exact match). +func (r ApiListDnsZonesRequest) Domain(domain string) ApiListDnsZonesRequest { + r.domain = &domain + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDnsZonesRequest) Fields(fields string) ApiListDnsZonesRequest { + r.fields = &fields + return r +} + +// Filter by name (exact match). +func (r ApiListDnsZonesRequest) Name(name string) ApiListDnsZonesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDnsZonesRequest) Ordering(ordering string) ApiListDnsZonesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDnsZonesRequest) Page(page int32) ApiListDnsZonesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDnsZonesRequest) PageSize(pageSize int32) ApiListDnsZonesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDnsZonesRequest) Search(search string) ApiListDnsZonesRequest { + r.search = &search + return r +} + +func (r ApiListDnsZonesRequest) Execute() (*PaginatedZoneList, *http.Response, error) { + return r.ApiService.ListDnsZonesExecute(r) +} + +/* +ListDnsZones List DNS Zones + +List all DNS Zones owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDnsZonesRequest +*/ +func (a *DNSZonesAPIService) ListDnsZones(ctx context.Context) ApiListDnsZonesRequest { + return ApiListDnsZonesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedZoneList +func (a *DNSZonesAPIService) ListDnsZonesExecute(r ApiListDnsZonesRequest) (*PaginatedZoneList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedZoneList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSZonesAPIService.ListDnsZones") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.domain != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "domain", r.domain, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateDnsZoneRequest struct { + ctx context.Context + ApiService *DNSZonesAPIService + zoneId int64 + patchedUpdateZoneRequest *PatchedUpdateZoneRequest +} + +func (r ApiPartialUpdateDnsZoneRequest) PatchedUpdateZoneRequest(patchedUpdateZoneRequest PatchedUpdateZoneRequest) ApiPartialUpdateDnsZoneRequest { + r.patchedUpdateZoneRequest = &patchedUpdateZoneRequest + return r +} + +func (r ApiPartialUpdateDnsZoneRequest) Execute() (*ZoneResponse, *http.Response, error) { + return r.ApiService.PartialUpdateDnsZoneExecute(r) +} + +/* +PartialUpdateDnsZone Partially update a DNS Zone + +Update one or more fields of an existing DNS Zone without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiPartialUpdateDnsZoneRequest +*/ +func (a *DNSZonesAPIService) PartialUpdateDnsZone(ctx context.Context, zoneId int64) ApiPartialUpdateDnsZoneRequest { + return ApiPartialUpdateDnsZoneRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return ZoneResponse +func (a *DNSZonesAPIService) PartialUpdateDnsZoneExecute(r ApiPartialUpdateDnsZoneRequest) (*ZoneResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ZoneResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSZonesAPIService.PartialUpdateDnsZone") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedUpdateZoneRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDnsZoneRequest struct { + ctx context.Context + ApiService *DNSZonesAPIService + zoneId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDnsZoneRequest) Fields(fields string) ApiRetrieveDnsZoneRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDnsZoneRequest) Execute() (*ZoneResponse, *http.Response, error) { + return r.ApiService.RetrieveDnsZoneExecute(r) +} + +/* +RetrieveDnsZone Retrieve details of a DNS Zone + +Retrieve details of a specific DNS Zone in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiRetrieveDnsZoneRequest +*/ +func (a *DNSZonesAPIService) RetrieveDnsZone(ctx context.Context, zoneId int64) ApiRetrieveDnsZoneRequest { + return ApiRetrieveDnsZoneRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return ZoneResponse +func (a *DNSZonesAPIService) RetrieveDnsZoneExecute(r ApiRetrieveDnsZoneRequest) (*ZoneResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ZoneResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSZonesAPIService.RetrieveDnsZone") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDnsZoneRequest struct { + ctx context.Context + ApiService *DNSZonesAPIService + zoneId int64 + updateZoneRequest *UpdateZoneRequest +} + +func (r ApiUpdateDnsZoneRequest) UpdateZoneRequest(updateZoneRequest UpdateZoneRequest) ApiUpdateDnsZoneRequest { + r.updateZoneRequest = &updateZoneRequest + return r +} + +func (r ApiUpdateDnsZoneRequest) Execute() (*ZoneResponse, *http.Response, error) { + return r.ApiService.UpdateDnsZoneExecute(r) +} + +/* +UpdateDnsZone Update a DNS Zone + +Update an existing a DNS Zone. This replaces the entire DNS Zone with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiUpdateDnsZoneRequest +*/ +func (a *DNSZonesAPIService) UpdateDnsZone(ctx context.Context, zoneId int64) ApiUpdateDnsZoneRequest { + return ApiUpdateDnsZoneRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return ZoneResponse +func (a *DNSZonesAPIService) UpdateDnsZoneExecute(r ApiUpdateDnsZoneRequest) (*ZoneResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ZoneResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSZonesAPIService.UpdateDnsZone") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateZoneRequest == nil { + return localVarReturnValue, nil, reportError("updateZoneRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateZoneRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_dnsdnssec.go b/azion-api/api_dnsdnssec.go new file mode 100644 index 0000000..7a9d9c3 --- /dev/null +++ b/azion-api/api_dnsdnssec.go @@ -0,0 +1,666 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// DNSDNSSECAPIService DNSDNSSECAPI service +type DNSDNSSECAPIService service + +type ApiPartialUpdateDnssecRequest struct { + ctx context.Context + ApiService *DNSDNSSECAPIService + zoneId int64 + patchedDNSSECRequest *PatchedDNSSECRequest +} + +func (r ApiPartialUpdateDnssecRequest) PatchedDNSSECRequest(patchedDNSSECRequest PatchedDNSSECRequest) ApiPartialUpdateDnssecRequest { + r.patchedDNSSECRequest = &patchedDNSSECRequest + return r +} + +func (r ApiPartialUpdateDnssecRequest) Execute() (*DNSSECResponse, *http.Response, error) { + return r.ApiService.PartialUpdateDnssecExecute(r) +} + +/* +PartialUpdateDnssec Partially update a DNSSEC + +Update one or more fields of an existing DNSSEC without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiPartialUpdateDnssecRequest +*/ +func (a *DNSDNSSECAPIService) PartialUpdateDnssec(ctx context.Context, zoneId int64) ApiPartialUpdateDnssecRequest { + return ApiPartialUpdateDnssecRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return DNSSECResponse +func (a *DNSDNSSECAPIService) PartialUpdateDnssecExecute(r ApiPartialUpdateDnssecRequest) (*DNSSECResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DNSSECResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSDNSSECAPIService.PartialUpdateDnssec") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/dnssec" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedDNSSECRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDnssecRequest struct { + ctx context.Context + ApiService *DNSDNSSECAPIService + zoneId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDnssecRequest) Fields(fields string) ApiRetrieveDnssecRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDnssecRequest) Execute() (*DNSSECResponse, *http.Response, error) { + return r.ApiService.RetrieveDnssecExecute(r) +} + +/* +RetrieveDnssec Retrieve details of a DNSSEC + +Retrieve details of a specific DNSSEC from a DNS Zone in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiRetrieveDnssecRequest +*/ +func (a *DNSDNSSECAPIService) RetrieveDnssec(ctx context.Context, zoneId int64) ApiRetrieveDnssecRequest { + return ApiRetrieveDnssecRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return DNSSECResponse +func (a *DNSDNSSECAPIService) RetrieveDnssecExecute(r ApiRetrieveDnssecRequest) (*DNSSECResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DNSSECResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSDNSSECAPIService.RetrieveDnssec") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/dnssec" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDnssecRequest struct { + ctx context.Context + ApiService *DNSDNSSECAPIService + zoneId int64 + dNSSECRequest *DNSSECRequest +} + +func (r ApiUpdateDnssecRequest) DNSSECRequest(dNSSECRequest DNSSECRequest) ApiUpdateDnssecRequest { + r.dNSSECRequest = &dNSSECRequest + return r +} + +func (r ApiUpdateDnssecRequest) Execute() (*DNSSECResponse, *http.Response, error) { + return r.ApiService.UpdateDnssecExecute(r) +} + +/* +UpdateDnssec Update a DNSSEC + +Update an existing a DNSSEC. This replaces the entire DNSSEC with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param zoneId A unique integer value identifying the DNS Zone. + @return ApiUpdateDnssecRequest +*/ +func (a *DNSDNSSECAPIService) UpdateDnssec(ctx context.Context, zoneId int64) ApiUpdateDnssecRequest { + return ApiUpdateDnssecRequest{ + ApiService: a, + ctx: ctx, + zoneId: zoneId, + } +} + +// Execute executes the request +// @return DNSSECResponse +func (a *DNSDNSSECAPIService) UpdateDnssecExecute(r ApiUpdateDnssecRequest) (*DNSSECResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DNSSECResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DNSDNSSECAPIService.UpdateDnssec") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/dns/zones/{zone_id}/dnssec" + localVarPath = strings.Replace(localVarPath, "{"+"zone_id"+"}", url.PathEscape(parameterValueToString(r.zoneId, "zoneId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dNSSECRequest == nil { + return localVarReturnValue, nil, reportError("dNSSECRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dNSSECRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_favorites.go b/azion-api/api_favorites.go new file mode 100644 index 0000000..b4297af --- /dev/null +++ b/azion-api/api_favorites.go @@ -0,0 +1,717 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// FavoritesAPIService FavoritesAPI service +type FavoritesAPIService service + +type ApiCreateFavoriteRequest struct { + ctx context.Context + ApiService *FavoritesAPIService + favoriteRequest *FavoriteRequest +} + +func (r ApiCreateFavoriteRequest) FavoriteRequest(favoriteRequest FavoriteRequest) ApiCreateFavoriteRequest { + r.favoriteRequest = &favoriteRequest + return r +} + +func (r ApiCreateFavoriteRequest) Execute() (*ResponseFavorite, *http.Response, error) { + return r.ApiService.CreateFavoriteExecute(r) +} + +/* +CreateFavorite Create a new favorite + +Create a new favorite for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateFavoriteRequest +*/ +func (a *FavoritesAPIService) CreateFavorite(ctx context.Context) ApiCreateFavoriteRequest { + return ApiCreateFavoriteRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseFavorite +func (a *FavoritesAPIService) CreateFavoriteExecute(r ApiCreateFavoriteRequest) (*ResponseFavorite, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseFavorite + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FavoritesAPIService.CreateFavorite") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/user/favorites" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.favoriteRequest == nil { + return localVarReturnValue, nil, reportError("favoriteRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.favoriteRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteFavoriteRequest struct { + ctx context.Context + ApiService *FavoritesAPIService + favoriteId int64 +} + +func (r ApiDeleteFavoriteRequest) Execute() (*ResponseDeleteFavorite, *http.Response, error) { + return r.ApiService.DeleteFavoriteExecute(r) +} + +/* +DeleteFavorite Delete a favorite + +Delete a specific favorite in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param favoriteId A unique integer value identifying this Favorite. + @return ApiDeleteFavoriteRequest +*/ +func (a *FavoritesAPIService) DeleteFavorite(ctx context.Context, favoriteId int64) ApiDeleteFavoriteRequest { + return ApiDeleteFavoriteRequest{ + ApiService: a, + ctx: ctx, + favoriteId: favoriteId, + } +} + +// Execute executes the request +// @return ResponseDeleteFavorite +func (a *FavoritesAPIService) DeleteFavoriteExecute(r ApiDeleteFavoriteRequest) (*ResponseDeleteFavorite, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteFavorite + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FavoritesAPIService.DeleteFavorite") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/user/favorites/{favorite_id}" + localVarPath = strings.Replace(localVarPath, "{"+"favorite_id"+"}", url.PathEscape(parameterValueToString(r.favoriteId, "favoriteId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFavoritesRequest struct { + ctx context.Context + ApiService *FavoritesAPIService + fields *string + id *int64 + ordering *string + page *int32 + pageSize *int32 + search *string + type_ *string + uri *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListFavoritesRequest) Fields(fields string) ApiListFavoritesRequest { + r.fields = &fields + return r +} + +func (r ApiListFavoritesRequest) Id(id int64) ApiListFavoritesRequest { + r.id = &id + return r +} + +// Which field to use when ordering the results. +func (r ApiListFavoritesRequest) Ordering(ordering string) ApiListFavoritesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListFavoritesRequest) Page(page int32) ApiListFavoritesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListFavoritesRequest) PageSize(pageSize int32) ApiListFavoritesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListFavoritesRequest) Search(search string) ApiListFavoritesRequest { + r.search = &search + return r +} + +func (r ApiListFavoritesRequest) Type_(type_ string) ApiListFavoritesRequest { + r.type_ = &type_ + return r +} + +func (r ApiListFavoritesRequest) Uri(uri string) ApiListFavoritesRequest { + r.uri = &uri + return r +} + +func (r ApiListFavoritesRequest) Execute() (*PaginatedFavoriteList, *http.Response, error) { + return r.ApiService.ListFavoritesExecute(r) +} + +/* +ListFavorites List of the favorites + +List all favorites by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListFavoritesRequest +*/ +func (a *FavoritesAPIService) ListFavorites(ctx context.Context) ApiListFavoritesRequest { + return ApiListFavoritesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedFavoriteList +func (a *FavoritesAPIService) ListFavoritesExecute(r ApiListFavoritesRequest) (*PaginatedFavoriteList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFavoriteList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FavoritesAPIService.ListFavorites") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/user/favorites" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } + if r.uri != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "uri", r.uri, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_firewalls.go b/azion-api/api_firewalls.go new file mode 100644 index 0000000..3af91dc --- /dev/null +++ b/azion-api/api_firewalls.go @@ -0,0 +1,1617 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// FirewallsAPIService FirewallsAPI service +type FirewallsAPIService service + +type ApiCloneFirewallRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + firewallId int64 + cloneFirewallRequest *CloneFirewallRequest +} + +func (r ApiCloneFirewallRequest) CloneFirewallRequest(cloneFirewallRequest CloneFirewallRequest) ApiCloneFirewallRequest { + r.cloneFirewallRequest = &cloneFirewallRequest + return r +} + +func (r ApiCloneFirewallRequest) Execute() (*FirewallResponse, *http.Response, error) { + return r.ApiService.CloneFirewallExecute(r) +} + +/* +CloneFirewall Clone a Firewall + +Create a new Firewall by performing a deep copy of an existing Firewall, including its Function Instances and Rules Engine. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiCloneFirewallRequest +*/ +func (a *FirewallsAPIService) CloneFirewall(ctx context.Context, firewallId int64) ApiCloneFirewallRequest { + return ApiCloneFirewallRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return FirewallResponse +func (a *FirewallsAPIService) CloneFirewallExecute(r ApiCloneFirewallRequest) (*FirewallResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.CloneFirewall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cloneFirewallRequest == nil { + return localVarReturnValue, nil, reportError("cloneFirewallRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cloneFirewallRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateFirewallRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + firewallRequest *FirewallRequest +} + +func (r ApiCreateFirewallRequest) FirewallRequest(firewallRequest FirewallRequest) ApiCreateFirewallRequest { + r.firewallRequest = &firewallRequest + return r +} + +func (r ApiCreateFirewallRequest) Execute() (*FirewallResponse, *http.Response, error) { + return r.ApiService.CreateFirewallExecute(r) +} + +/* +CreateFirewall Create a Firewall + +Create a new Firewall for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateFirewallRequest +*/ +func (a *FirewallsAPIService) CreateFirewall(ctx context.Context) ApiCreateFirewallRequest { + return ApiCreateFirewallRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FirewallResponse +func (a *FirewallsAPIService) CreateFirewallExecute(r ApiCreateFirewallRequest) (*FirewallResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.CreateFirewall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallRequest == nil { + return localVarReturnValue, nil, reportError("firewallRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteFirewallRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + firewallId int64 +} + +func (r ApiDeleteFirewallRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteFirewallExecute(r) +} + +/* +DeleteFirewall Delete a Firewall + +Delete a specific Firewall in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiDeleteFirewallRequest +*/ +func (a *FirewallsAPIService) DeleteFirewall(ctx context.Context, firewallId int64) ApiDeleteFirewallRequest { + return ApiDeleteFirewallRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *FirewallsAPIService) DeleteFirewallExecute(r ApiDeleteFirewallRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.DeleteFirewall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFirewallsRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + active *bool + debug *bool + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListFirewallsRequest) Active(active bool) ApiListFirewallsRequest { + r.active = &active + return r +} + +// Filter by debug rules status. +func (r ApiListFirewallsRequest) Debug(debug bool) ApiListFirewallsRequest { + r.debug = &debug + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListFirewallsRequest) Fields(fields string) ApiListFirewallsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListFirewallsRequest) Id(id int64) ApiListFirewallsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListFirewallsRequest) LastEditor(lastEditor string) ApiListFirewallsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListFirewallsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListFirewallsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListFirewallsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListFirewallsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListFirewallsRequest) Name(name string) ApiListFirewallsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListFirewallsRequest) Ordering(ordering string) ApiListFirewallsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListFirewallsRequest) Page(page int32) ApiListFirewallsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListFirewallsRequest) PageSize(pageSize int32) ApiListFirewallsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListFirewallsRequest) Search(search string) ApiListFirewallsRequest { + r.search = &search + return r +} + +func (r ApiListFirewallsRequest) Execute() (*PaginatedFirewallList, *http.Response, error) { + return r.ApiService.ListFirewallsExecute(r) +} + +/* +ListFirewalls List Firewalls + +List all Firewalls owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListFirewallsRequest +*/ +func (a *FirewallsAPIService) ListFirewalls(ctx context.Context) ApiListFirewallsRequest { + return ApiListFirewallsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedFirewallList +func (a *FirewallsAPIService) ListFirewallsExecute(r ApiListFirewallsRequest) (*PaginatedFirewallList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFirewallList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.ListFirewalls") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.debug != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "debug", r.debug, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateFirewallRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + firewallId int64 + patchedFirewallRequest *PatchedFirewallRequest +} + +func (r ApiPartialUpdateFirewallRequest) PatchedFirewallRequest(patchedFirewallRequest PatchedFirewallRequest) ApiPartialUpdateFirewallRequest { + r.patchedFirewallRequest = &patchedFirewallRequest + return r +} + +func (r ApiPartialUpdateFirewallRequest) Execute() (*FirewallResponse, *http.Response, error) { + return r.ApiService.PartialUpdateFirewallExecute(r) +} + +/* +PartialUpdateFirewall Partially update a Firewall + +Update one or more fields of an existing Firewall without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiPartialUpdateFirewallRequest +*/ +func (a *FirewallsAPIService) PartialUpdateFirewall(ctx context.Context, firewallId int64) ApiPartialUpdateFirewallRequest { + return ApiPartialUpdateFirewallRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return FirewallResponse +func (a *FirewallsAPIService) PartialUpdateFirewallExecute(r ApiPartialUpdateFirewallRequest) (*FirewallResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.PartialUpdateFirewall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFirewallRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveFirewallRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + firewallId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveFirewallRequest) Fields(fields string) ApiRetrieveFirewallRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveFirewallRequest) Execute() (*FirewallResponse, *http.Response, error) { + return r.ApiService.RetrieveFirewallExecute(r) +} + +/* +RetrieveFirewall Retrieve details from a Firewall + +Retrieve details from a specific Firewall in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiRetrieveFirewallRequest +*/ +func (a *FirewallsAPIService) RetrieveFirewall(ctx context.Context, firewallId int64) ApiRetrieveFirewallRequest { + return ApiRetrieveFirewallRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return FirewallResponse +func (a *FirewallsAPIService) RetrieveFirewallExecute(r ApiRetrieveFirewallRequest) (*FirewallResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.RetrieveFirewall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateFirewallRequest struct { + ctx context.Context + ApiService *FirewallsAPIService + firewallId int64 + firewallRequest *FirewallRequest +} + +func (r ApiUpdateFirewallRequest) FirewallRequest(firewallRequest FirewallRequest) ApiUpdateFirewallRequest { + r.firewallRequest = &firewallRequest + return r +} + +func (r ApiUpdateFirewallRequest) Execute() (*FirewallResponse, *http.Response, error) { + return r.ApiService.UpdateFirewallExecute(r) +} + +/* +UpdateFirewall Update a Firewall + +Update an existing Firewall. This replaces the entire Firewall with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiUpdateFirewallRequest +*/ +func (a *FirewallsAPIService) UpdateFirewall(ctx context.Context, firewallId int64) ApiUpdateFirewallRequest { + return ApiUpdateFirewallRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return FirewallResponse +func (a *FirewallsAPIService) UpdateFirewallExecute(r ApiUpdateFirewallRequest) (*FirewallResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsAPIService.UpdateFirewall") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallRequest == nil { + return localVarReturnValue, nil, reportError("firewallRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_firewalls_function.go b/azion-api/api_firewalls_function.go new file mode 100644 index 0000000..065df82 --- /dev/null +++ b/azion-api/api_firewalls_function.go @@ -0,0 +1,1406 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// FirewallsFunctionAPIService FirewallsFunctionAPI service +type FirewallsFunctionAPIService service + +type ApiCreateFirewallFunctionRequest struct { + ctx context.Context + ApiService *FirewallsFunctionAPIService + firewallId int64 + firewallFunctionInstanceRequest *FirewallFunctionInstanceRequest +} + +func (r ApiCreateFirewallFunctionRequest) FirewallFunctionInstanceRequest(firewallFunctionInstanceRequest FirewallFunctionInstanceRequest) ApiCreateFirewallFunctionRequest { + r.firewallFunctionInstanceRequest = &firewallFunctionInstanceRequest + return r +} + +func (r ApiCreateFirewallFunctionRequest) Execute() (*FirewallFunctionInstanceResponse, *http.Response, error) { + return r.ApiService.CreateFirewallFunctionExecute(r) +} + +/* +CreateFirewallFunction Create an Firewall Function + +Create a new Function Instance for a specific Firewall in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiCreateFirewallFunctionRequest +*/ +func (a *FirewallsFunctionAPIService) CreateFirewallFunction(ctx context.Context, firewallId int64) ApiCreateFirewallFunctionRequest { + return ApiCreateFirewallFunctionRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return FirewallFunctionInstanceResponse +func (a *FirewallsFunctionAPIService) CreateFirewallFunctionExecute(r ApiCreateFirewallFunctionRequest) (*FirewallFunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallFunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsFunctionAPIService.CreateFirewallFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/functions" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallFunctionInstanceRequest == nil { + return localVarReturnValue, nil, reportError("firewallFunctionInstanceRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallFunctionInstanceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteFirewallFunctionRequest struct { + ctx context.Context + ApiService *FirewallsFunctionAPIService + firewallId int64 + functionId int64 +} + +func (r ApiDeleteFirewallFunctionRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteFirewallFunctionExecute(r) +} + +/* +DeleteFirewallFunction Delete an Firewall Function + +Delete a specific Firewall Function Instance in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param functionId A unique integer value identifying the function instance. + @return ApiDeleteFirewallFunctionRequest +*/ +func (a *FirewallsFunctionAPIService) DeleteFirewallFunction(ctx context.Context, firewallId int64, functionId int64) ApiDeleteFirewallFunctionRequest { + return ApiDeleteFirewallFunctionRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + functionId: functionId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *FirewallsFunctionAPIService) DeleteFirewallFunctionExecute(r ApiDeleteFirewallFunctionRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsFunctionAPIService.DeleteFirewallFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFirewallFunctionRequest struct { + ctx context.Context + ApiService *FirewallsFunctionAPIService + firewallId int64 + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListFirewallFunctionRequest) Fields(fields string) ApiListFirewallFunctionRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListFirewallFunctionRequest) Id(id int64) ApiListFirewallFunctionRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListFirewallFunctionRequest) LastEditor(lastEditor string) ApiListFirewallFunctionRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListFirewallFunctionRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListFirewallFunctionRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListFirewallFunctionRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListFirewallFunctionRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListFirewallFunctionRequest) Name(name string) ApiListFirewallFunctionRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListFirewallFunctionRequest) Ordering(ordering string) ApiListFirewallFunctionRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListFirewallFunctionRequest) Page(page int32) ApiListFirewallFunctionRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListFirewallFunctionRequest) PageSize(pageSize int32) ApiListFirewallFunctionRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListFirewallFunctionRequest) Search(search string) ApiListFirewallFunctionRequest { + r.search = &search + return r +} + +func (r ApiListFirewallFunctionRequest) Execute() (*PaginatedFirewallFunctionInstanceList, *http.Response, error) { + return r.ApiService.ListFirewallFunctionExecute(r) +} + +/* +ListFirewallFunction List Firewall Function + +List all Function Instances for a specific Firewall owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiListFirewallFunctionRequest +*/ +func (a *FirewallsFunctionAPIService) ListFirewallFunction(ctx context.Context, firewallId int64) ApiListFirewallFunctionRequest { + return ApiListFirewallFunctionRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return PaginatedFirewallFunctionInstanceList +func (a *FirewallsFunctionAPIService) ListFirewallFunctionExecute(r ApiListFirewallFunctionRequest) (*PaginatedFirewallFunctionInstanceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFirewallFunctionInstanceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsFunctionAPIService.ListFirewallFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/functions" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateFirewallFunctionRequest struct { + ctx context.Context + ApiService *FirewallsFunctionAPIService + firewallId int64 + functionId int64 + patchedFirewallFunctionInstanceRequest *PatchedFirewallFunctionInstanceRequest +} + +func (r ApiPartialUpdateFirewallFunctionRequest) PatchedFirewallFunctionInstanceRequest(patchedFirewallFunctionInstanceRequest PatchedFirewallFunctionInstanceRequest) ApiPartialUpdateFirewallFunctionRequest { + r.patchedFirewallFunctionInstanceRequest = &patchedFirewallFunctionInstanceRequest + return r +} + +func (r ApiPartialUpdateFirewallFunctionRequest) Execute() (*FirewallFunctionInstanceResponse, *http.Response, error) { + return r.ApiService.PartialUpdateFirewallFunctionExecute(r) +} + +/* +PartialUpdateFirewallFunction Partially update an Firewall Function + +Update one or more fields of an existing Firewall Function Instance without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param functionId A unique integer value identifying the function instance. + @return ApiPartialUpdateFirewallFunctionRequest +*/ +func (a *FirewallsFunctionAPIService) PartialUpdateFirewallFunction(ctx context.Context, firewallId int64, functionId int64) ApiPartialUpdateFirewallFunctionRequest { + return ApiPartialUpdateFirewallFunctionRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + functionId: functionId, + } +} + +// Execute executes the request +// @return FirewallFunctionInstanceResponse +func (a *FirewallsFunctionAPIService) PartialUpdateFirewallFunctionExecute(r ApiPartialUpdateFirewallFunctionRequest) (*FirewallFunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallFunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsFunctionAPIService.PartialUpdateFirewallFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFirewallFunctionInstanceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveFirewallFunctionRequest struct { + ctx context.Context + ApiService *FirewallsFunctionAPIService + firewallId int64 + functionId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveFirewallFunctionRequest) Fields(fields string) ApiRetrieveFirewallFunctionRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveFirewallFunctionRequest) Execute() (*FirewallFunctionInstanceResponse, *http.Response, error) { + return r.ApiService.RetrieveFirewallFunctionExecute(r) +} + +/* +RetrieveFirewallFunction Retrieve details of an Firewall Function + +Retrieve details of a specific Firewall Function Instance in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param functionId A unique integer value identifying the function instance. + @return ApiRetrieveFirewallFunctionRequest +*/ +func (a *FirewallsFunctionAPIService) RetrieveFirewallFunction(ctx context.Context, firewallId int64, functionId int64) ApiRetrieveFirewallFunctionRequest { + return ApiRetrieveFirewallFunctionRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + functionId: functionId, + } +} + +// Execute executes the request +// @return FirewallFunctionInstanceResponse +func (a *FirewallsFunctionAPIService) RetrieveFirewallFunctionExecute(r ApiRetrieveFirewallFunctionRequest) (*FirewallFunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallFunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsFunctionAPIService.RetrieveFirewallFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateFirewallFunctionRequest struct { + ctx context.Context + ApiService *FirewallsFunctionAPIService + firewallId int64 + functionId int64 + firewallFunctionInstanceRequest *FirewallFunctionInstanceRequest +} + +func (r ApiUpdateFirewallFunctionRequest) FirewallFunctionInstanceRequest(firewallFunctionInstanceRequest FirewallFunctionInstanceRequest) ApiUpdateFirewallFunctionRequest { + r.firewallFunctionInstanceRequest = &firewallFunctionInstanceRequest + return r +} + +func (r ApiUpdateFirewallFunctionRequest) Execute() (*FirewallFunctionInstanceResponse, *http.Response, error) { + return r.ApiService.UpdateFirewallFunctionExecute(r) +} + +/* +UpdateFirewallFunction Update an Firewall Function + +Update an existing Firewall Function Instance. This replaces the entire Function Instance with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param functionId A unique integer value identifying the function instance. + @return ApiUpdateFirewallFunctionRequest +*/ +func (a *FirewallsFunctionAPIService) UpdateFirewallFunction(ctx context.Context, firewallId int64, functionId int64) ApiUpdateFirewallFunctionRequest { + return ApiUpdateFirewallFunctionRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + functionId: functionId, + } +} + +// Execute executes the request +// @return FirewallFunctionInstanceResponse +func (a *FirewallsFunctionAPIService) UpdateFirewallFunctionExecute(r ApiUpdateFirewallFunctionRequest) (*FirewallFunctionInstanceResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallFunctionInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsFunctionAPIService.UpdateFirewallFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallFunctionInstanceRequest == nil { + return localVarReturnValue, nil, reportError("firewallFunctionInstanceRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallFunctionInstanceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_firewalls_rules_engine.go b/azion-api/api_firewalls_rules_engine.go new file mode 100644 index 0000000..34739a7 --- /dev/null +++ b/azion-api/api_firewalls_rules_engine.go @@ -0,0 +1,1661 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// FirewallsRulesEngineAPIService FirewallsRulesEngineAPI service +type FirewallsRulesEngineAPIService service + +type ApiCreateFirewallRuleRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + firewallRuleRequest *FirewallRuleRequest +} + +func (r ApiCreateFirewallRuleRequest) FirewallRuleRequest(firewallRuleRequest FirewallRuleRequest) ApiCreateFirewallRuleRequest { + r.firewallRuleRequest = &firewallRuleRequest + return r +} + +func (r ApiCreateFirewallRuleRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.CreateFirewallRuleExecute(r) +} + +/* +CreateFirewallRule Create an Firewall Rule + +Create a new Rule for a specific Firewall in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiCreateFirewallRuleRequest +*/ +func (a *FirewallsRulesEngineAPIService) CreateFirewallRule(ctx context.Context, firewallId int64) ApiCreateFirewallRuleRequest { + return ApiCreateFirewallRuleRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallsRulesEngineAPIService) CreateFirewallRuleExecute(r ApiCreateFirewallRuleRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.CreateFirewallRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallRuleRequest == nil { + return localVarReturnValue, nil, reportError("firewallRuleRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteFirewallRuleRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + requestRuleId int64 +} + +func (r ApiDeleteFirewallRuleRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteFirewallRuleExecute(r) +} + +/* +DeleteFirewallRule Delete an Firewall Rule + +Delete a specific Rule in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiDeleteFirewallRuleRequest +*/ +func (a *FirewallsRulesEngineAPIService) DeleteFirewallRule(ctx context.Context, firewallId int64, requestRuleId int64) ApiDeleteFirewallRuleRequest { + return ApiDeleteFirewallRuleRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *FirewallsRulesEngineAPIService) DeleteFirewallRuleExecute(r ApiDeleteFirewallRuleRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.DeleteFirewallRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFirewallRulesRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + description *string + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + orderGte *int64 + orderLte *int64 + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by description (case-insensitive, partial match). +func (r ApiListFirewallRulesRequest) Description(description string) ApiListFirewallRulesRequest { + r.description = &description + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListFirewallRulesRequest) Fields(fields string) ApiListFirewallRulesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListFirewallRulesRequest) Id(id int64) ApiListFirewallRulesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListFirewallRulesRequest) LastEditor(lastEditor string) ApiListFirewallRulesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListFirewallRulesRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListFirewallRulesRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListFirewallRulesRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListFirewallRulesRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListFirewallRulesRequest) Name(name string) ApiListFirewallRulesRequest { + r.name = &name + return r +} + +// Filter by order (greater than or equal). +func (r ApiListFirewallRulesRequest) OrderGte(orderGte int64) ApiListFirewallRulesRequest { + r.orderGte = &orderGte + return r +} + +// Filter by order (less than or equal). +func (r ApiListFirewallRulesRequest) OrderLte(orderLte int64) ApiListFirewallRulesRequest { + r.orderLte = &orderLte + return r +} + +// Which field to use when ordering the results. +func (r ApiListFirewallRulesRequest) Ordering(ordering string) ApiListFirewallRulesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListFirewallRulesRequest) Page(page int32) ApiListFirewallRulesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListFirewallRulesRequest) PageSize(pageSize int32) ApiListFirewallRulesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListFirewallRulesRequest) Search(search string) ApiListFirewallRulesRequest { + r.search = &search + return r +} + +func (r ApiListFirewallRulesRequest) Execute() (*PaginatedFirewallRuleList, *http.Response, error) { + return r.ApiService.ListFirewallRulesExecute(r) +} + +/* +ListFirewallRules List Firewall Rules + +List all Rules for a specific Firewall owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiListFirewallRulesRequest +*/ +func (a *FirewallsRulesEngineAPIService) ListFirewallRules(ctx context.Context, firewallId int64) ApiListFirewallRulesRequest { + return ApiListFirewallRulesRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return PaginatedFirewallRuleList +func (a *FirewallsRulesEngineAPIService) ListFirewallRulesExecute(r ApiListFirewallRulesRequest) (*PaginatedFirewallRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFirewallRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.ListFirewallRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.description != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.orderGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order__gte", r.orderGte, "form", "") + } + if r.orderLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "order__lte", r.orderLte, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiOrderFirewallRulesRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + firewallRuleEngineOrderRequest *FirewallRuleEngineOrderRequest + search *string +} + +func (r ApiOrderFirewallRulesRequest) FirewallRuleEngineOrderRequest(firewallRuleEngineOrderRequest FirewallRuleEngineOrderRequest) ApiOrderFirewallRulesRequest { + r.firewallRuleEngineOrderRequest = &firewallRuleEngineOrderRequest + return r +} + +// A search term. +func (r ApiOrderFirewallRulesRequest) Search(search string) ApiOrderFirewallRulesRequest { + r.search = &search + return r +} + +func (r ApiOrderFirewallRulesRequest) Execute() (*PaginatedFirewallRuleList, *http.Response, error) { + return r.ApiService.OrderFirewallRulesExecute(r) +} + +/* +OrderFirewallRules Ordering Firewall Rules + +Reoder all Rules for a specific Firewall owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @return ApiOrderFirewallRulesRequest +*/ +func (a *FirewallsRulesEngineAPIService) OrderFirewallRules(ctx context.Context, firewallId int64) ApiOrderFirewallRulesRequest { + return ApiOrderFirewallRulesRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + } +} + +// Execute executes the request +// @return PaginatedFirewallRuleList +func (a *FirewallsRulesEngineAPIService) OrderFirewallRulesExecute(r ApiOrderFirewallRulesRequest) (*PaginatedFirewallRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFirewallRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.OrderFirewallRules") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules/order" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallRuleEngineOrderRequest == nil { + return localVarReturnValue, nil, reportError("firewallRuleEngineOrderRequest is required and must be specified") + } + + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallRuleEngineOrderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateFirewallRuleRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + requestRuleId int64 + patchedFirewallRuleRequest *PatchedFirewallRuleRequest +} + +func (r ApiPartialUpdateFirewallRuleRequest) PatchedFirewallRuleRequest(patchedFirewallRuleRequest PatchedFirewallRuleRequest) ApiPartialUpdateFirewallRuleRequest { + r.patchedFirewallRuleRequest = &patchedFirewallRuleRequest + return r +} + +func (r ApiPartialUpdateFirewallRuleRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.PartialUpdateFirewallRuleExecute(r) +} + +/* +PartialUpdateFirewallRule Partially update an Firewall Rule + +Update one or more fields of an existing Firewall Rule without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiPartialUpdateFirewallRuleRequest +*/ +func (a *FirewallsRulesEngineAPIService) PartialUpdateFirewallRule(ctx context.Context, firewallId int64, requestRuleId int64) ApiPartialUpdateFirewallRuleRequest { + return ApiPartialUpdateFirewallRuleRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallsRulesEngineAPIService) PartialUpdateFirewallRuleExecute(r ApiPartialUpdateFirewallRuleRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.PartialUpdateFirewallRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFirewallRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveFirewallRuleRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + requestRuleId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveFirewallRuleRequest) Fields(fields string) ApiRetrieveFirewallRuleRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveFirewallRuleRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.RetrieveFirewallRuleExecute(r) +} + +/* +RetrieveFirewallRule Retrieve details of an Firewall Rule + +Retrieve details of a specific Rule in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiRetrieveFirewallRuleRequest +*/ +func (a *FirewallsRulesEngineAPIService) RetrieveFirewallRule(ctx context.Context, firewallId int64, requestRuleId int64) ApiRetrieveFirewallRuleRequest { + return ApiRetrieveFirewallRuleRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallsRulesEngineAPIService) RetrieveFirewallRuleExecute(r ApiRetrieveFirewallRuleRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.RetrieveFirewallRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateFirewallRuleRequest struct { + ctx context.Context + ApiService *FirewallsRulesEngineAPIService + firewallId int64 + requestRuleId int64 + firewallRuleRequest *FirewallRuleRequest +} + +func (r ApiUpdateFirewallRuleRequest) FirewallRuleRequest(firewallRuleRequest FirewallRuleRequest) ApiUpdateFirewallRuleRequest { + r.firewallRuleRequest = &firewallRuleRequest + return r +} + +func (r ApiUpdateFirewallRuleRequest) Execute() (*FirewallRuleResponse, *http.Response, error) { + return r.ApiService.UpdateFirewallRuleExecute(r) +} + +/* +UpdateFirewallRule Update an Firewall Rule + +Update an existing Rule. This replaces the entire Rule with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param firewallId A unique integer value identifying the firewall. + @param requestRuleId A unique integer value identifying the request rule. + @return ApiUpdateFirewallRuleRequest +*/ +func (a *FirewallsRulesEngineAPIService) UpdateFirewallRule(ctx context.Context, firewallId int64, requestRuleId int64) ApiUpdateFirewallRuleRequest { + return ApiUpdateFirewallRuleRequest{ + ApiService: a, + ctx: ctx, + firewallId: firewallId, + requestRuleId: requestRuleId, + } +} + +// Execute executes the request +// @return FirewallRuleResponse +func (a *FirewallsRulesEngineAPIService) UpdateFirewallRuleExecute(r ApiUpdateFirewallRuleRequest) (*FirewallRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FirewallRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FirewallsRulesEngineAPIService.UpdateFirewallRule") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/firewalls/{firewall_id}/request_rules/{request_rule_id}" + localVarPath = strings.Replace(localVarPath, "{"+"firewall_id"+"}", url.PathEscape(parameterValueToString(r.firewallId, "firewallId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"request_rule_id"+"}", url.PathEscape(parameterValueToString(r.requestRuleId, "requestRuleId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.firewallRuleRequest == nil { + return localVarReturnValue, nil, reportError("firewallRuleRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.firewallRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_functions.go b/azion-api/api_functions.go new file mode 100644 index 0000000..3609ec1 --- /dev/null +++ b/azion-api/api_functions.go @@ -0,0 +1,1412 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// FunctionsAPIService FunctionsAPI service +type FunctionsAPIService service + +type ApiCreateFunctionRequest struct { + ctx context.Context + ApiService *FunctionsAPIService + functionsRequest *FunctionsRequest +} + +func (r ApiCreateFunctionRequest) FunctionsRequest(functionsRequest FunctionsRequest) ApiCreateFunctionRequest { + r.functionsRequest = &functionsRequest + return r +} + +func (r ApiCreateFunctionRequest) Execute() (*FunctionResponse, *http.Response, error) { + return r.ApiService.CreateFunctionExecute(r) +} + +/* +CreateFunction Create an Function + +Create a new Function in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateFunctionRequest +*/ +func (a *FunctionsAPIService) CreateFunction(ctx context.Context) ApiCreateFunctionRequest { + return ApiCreateFunctionRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return FunctionResponse +func (a *FunctionsAPIService) CreateFunctionExecute(r ApiCreateFunctionRequest) (*FunctionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsAPIService.CreateFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/functions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.functionsRequest == nil { + return localVarReturnValue, nil, reportError("functionsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.functionsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteFunctionRequest struct { + ctx context.Context + ApiService *FunctionsAPIService + functionId int64 +} + +func (r ApiDeleteFunctionRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteFunctionExecute(r) +} + +/* +DeleteFunction Delete an Function + +Delete a specific Function in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param functionId A unique integer value identifying the function. + @return ApiDeleteFunctionRequest +*/ +func (a *FunctionsAPIService) DeleteFunction(ctx context.Context, functionId int64) ApiDeleteFunctionRequest { + return ApiDeleteFunctionRequest{ + ApiService: a, + ctx: ctx, + functionId: functionId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *FunctionsAPIService) DeleteFunctionExecute(r ApiDeleteFunctionRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsAPIService.DeleteFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFunctionsRequest struct { + ctx context.Context + ApiService *FunctionsAPIService + active *bool + fields *string + id *int64 + languageIn *string + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + runtimeEnvironmentIn *string + search *string +} + +// Filter by active status. +func (r ApiListFunctionsRequest) Active(active bool) ApiListFunctionsRequest { + r.active = &active + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListFunctionsRequest) Fields(fields string) ApiListFunctionsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListFunctionsRequest) Id(id int64) ApiListFunctionsRequest { + r.id = &id + return r +} + +// Filter by language (accepts comma-separated values). +func (r ApiListFunctionsRequest) LanguageIn(languageIn string) ApiListFunctionsRequest { + r.languageIn = &languageIn + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListFunctionsRequest) LastEditor(lastEditor string) ApiListFunctionsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListFunctionsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListFunctionsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListFunctionsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListFunctionsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListFunctionsRequest) Name(name string) ApiListFunctionsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListFunctionsRequest) Ordering(ordering string) ApiListFunctionsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListFunctionsRequest) Page(page int32) ApiListFunctionsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListFunctionsRequest) PageSize(pageSize int32) ApiListFunctionsRequest { + r.pageSize = &pageSize + return r +} + +// Filter by runtime environment (accepts comma-separated values). +func (r ApiListFunctionsRequest) RuntimeEnvironmentIn(runtimeEnvironmentIn string) ApiListFunctionsRequest { + r.runtimeEnvironmentIn = &runtimeEnvironmentIn + return r +} + +// A search term. +func (r ApiListFunctionsRequest) Search(search string) ApiListFunctionsRequest { + r.search = &search + return r +} + +func (r ApiListFunctionsRequest) Execute() (*PaginatedFunctionsList, *http.Response, error) { + return r.ApiService.ListFunctionsExecute(r) +} + +/* +ListFunctions List Functions + +List all Functions owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListFunctionsRequest +*/ +func (a *FunctionsAPIService) ListFunctions(ctx context.Context) ApiListFunctionsRequest { + return ApiListFunctionsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedFunctionsList +func (a *FunctionsAPIService) ListFunctionsExecute(r ApiListFunctionsRequest) (*PaginatedFunctionsList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFunctionsList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsAPIService.ListFunctions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/functions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.languageIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "language__in", r.languageIn, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.runtimeEnvironmentIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "runtime_environment__in", r.runtimeEnvironmentIn, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateFunctionRequest struct { + ctx context.Context + ApiService *FunctionsAPIService + functionId int64 + patchedFunctionsRequest *PatchedFunctionsRequest +} + +func (r ApiPartialUpdateFunctionRequest) PatchedFunctionsRequest(patchedFunctionsRequest PatchedFunctionsRequest) ApiPartialUpdateFunctionRequest { + r.patchedFunctionsRequest = &patchedFunctionsRequest + return r +} + +func (r ApiPartialUpdateFunctionRequest) Execute() (*FunctionResponse, *http.Response, error) { + return r.ApiService.PartialUpdateFunctionExecute(r) +} + +/* +PartialUpdateFunction Partially update an Function + +Update one or more fields of an existing Function without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param functionId A unique integer value identifying the function. + @return ApiPartialUpdateFunctionRequest +*/ +func (a *FunctionsAPIService) PartialUpdateFunction(ctx context.Context, functionId int64) ApiPartialUpdateFunctionRequest { + return ApiPartialUpdateFunctionRequest{ + ApiService: a, + ctx: ctx, + functionId: functionId, + } +} + +// Execute executes the request +// @return FunctionResponse +func (a *FunctionsAPIService) PartialUpdateFunctionExecute(r ApiPartialUpdateFunctionRequest) (*FunctionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsAPIService.PartialUpdateFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFunctionsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveFunctionRequest struct { + ctx context.Context + ApiService *FunctionsAPIService + functionId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveFunctionRequest) Fields(fields string) ApiRetrieveFunctionRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveFunctionRequest) Execute() (*FunctionResponse, *http.Response, error) { + return r.ApiService.RetrieveFunctionExecute(r) +} + +/* +RetrieveFunction Retrieve details of an Function + +Retrieve details of a specific Function in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param functionId A unique integer value identifying the function. + @return ApiRetrieveFunctionRequest +*/ +func (a *FunctionsAPIService) RetrieveFunction(ctx context.Context, functionId int64) ApiRetrieveFunctionRequest { + return ApiRetrieveFunctionRequest{ + ApiService: a, + ctx: ctx, + functionId: functionId, + } +} + +// Execute executes the request +// @return FunctionResponse +func (a *FunctionsAPIService) RetrieveFunctionExecute(r ApiRetrieveFunctionRequest) (*FunctionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsAPIService.RetrieveFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateFunctionRequest struct { + ctx context.Context + ApiService *FunctionsAPIService + functionId int64 + functionsRequest *FunctionsRequest +} + +func (r ApiUpdateFunctionRequest) FunctionsRequest(functionsRequest FunctionsRequest) ApiUpdateFunctionRequest { + r.functionsRequest = &functionsRequest + return r +} + +func (r ApiUpdateFunctionRequest) Execute() (*FunctionResponse, *http.Response, error) { + return r.ApiService.UpdateFunctionExecute(r) +} + +/* +UpdateFunction Update an Function + +Update an existing Function. This replaces the entire Function with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param functionId A unique integer value identifying the function. + @return ApiUpdateFunctionRequest +*/ +func (a *FunctionsAPIService) UpdateFunction(ctx context.Context, functionId int64) ApiUpdateFunctionRequest { + return ApiUpdateFunctionRequest{ + ApiService: a, + ctx: ctx, + functionId: functionId, + } +} + +// Execute executes the request +// @return FunctionResponse +func (a *FunctionsAPIService) UpdateFunctionExecute(r ApiUpdateFunctionRequest) (*FunctionResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FunctionResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FunctionsAPIService.UpdateFunction") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/functions/{function_id}" + localVarPath = strings.Replace(localVarPath, "{"+"function_id"+"}", url.PathEscape(parameterValueToString(r.functionId, "functionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.functionsRequest == nil { + return localVarReturnValue, nil, reportError("functionsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.functionsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_grants.go b/azion-api/api_identity_grants.go new file mode 100644 index 0000000..2386a0f --- /dev/null +++ b/azion-api/api_identity_grants.go @@ -0,0 +1,1331 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityGrantsAPIService IdentityGrantsAPI service +type IdentityGrantsAPIService service + +type ApiCreateGrantRequest struct { + ctx context.Context + ApiService *IdentityGrantsAPIService + grantRequest *GrantRequest +} + +func (r ApiCreateGrantRequest) GrantRequest(grantRequest GrantRequest) ApiCreateGrantRequest { + r.grantRequest = &grantRequest + return r +} + +func (r ApiCreateGrantRequest) Execute() (*ResponseGrant, *http.Response, error) { + return r.ApiService.CreateGrantExecute(r) +} + +/* +CreateGrant Create a new grant + +Creates a new grant, optionally linked to an identity, for the logged-in account or its descendant accounts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateGrantRequest +*/ +func (a *IdentityGrantsAPIService) CreateGrant(ctx context.Context) ApiCreateGrantRequest { + return ApiCreateGrantRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseGrant +func (a *IdentityGrantsAPIService) CreateGrantExecute(r ApiCreateGrantRequest) (*ResponseGrant, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGrant + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGrantsAPIService.CreateGrant") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/grants" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.grantRequest == nil { + return localVarReturnValue, nil, reportError("grantRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.grantRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteGrantRequest struct { + ctx context.Context + ApiService *IdentityGrantsAPIService + grantId string +} + +func (r ApiDeleteGrantRequest) Execute() (*ResponseDeleteGrant, *http.Response, error) { + return r.ApiService.DeleteGrantExecute(r) +} + +/* +DeleteGrant Delete a grant + +Delete a specific grant from the logged-in account or its descendant accounts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param grantId + @return ApiDeleteGrantRequest +*/ +func (a *IdentityGrantsAPIService) DeleteGrant(ctx context.Context, grantId string) ApiDeleteGrantRequest { + return ApiDeleteGrantRequest{ + ApiService: a, + ctx: ctx, + grantId: grantId, + } +} + +// Execute executes the request +// @return ResponseDeleteGrant +func (a *IdentityGrantsAPIService) DeleteGrantExecute(r ApiDeleteGrantRequest) (*ResponseDeleteGrant, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteGrant + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGrantsAPIService.DeleteGrant") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListGrantsRequest struct { + ctx context.Context + ApiService *IdentityGrantsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListGrantsRequest) Fields(fields string) ApiListGrantsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListGrantsRequest) Ordering(ordering string) ApiListGrantsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListGrantsRequest) Page(page int32) ApiListGrantsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListGrantsRequest) PageSize(pageSize int32) ApiListGrantsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListGrantsRequest) Search(search string) ApiListGrantsRequest { + r.search = &search + return r +} + +func (r ApiListGrantsRequest) Execute() (*PaginatedGrantList, *http.Response, error) { + return r.ApiService.ListGrantsExecute(r) +} + +/* +ListGrants List grants for the account + +Retrieves a list of all grants associated with the logged-in account or its descendant accounts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListGrantsRequest +*/ +func (a *IdentityGrantsAPIService) ListGrants(ctx context.Context) ApiListGrantsRequest { + return ApiListGrantsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedGrantList +func (a *IdentityGrantsAPIService) ListGrantsExecute(r ApiListGrantsRequest) (*PaginatedGrantList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGrantList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGrantsAPIService.ListGrants") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/grants" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateGrantRequest struct { + ctx context.Context + ApiService *IdentityGrantsAPIService + grantId string + patchedGrantRequest *PatchedGrantRequest +} + +func (r ApiPartialUpdateGrantRequest) PatchedGrantRequest(patchedGrantRequest PatchedGrantRequest) ApiPartialUpdateGrantRequest { + r.patchedGrantRequest = &patchedGrantRequest + return r +} + +func (r ApiPartialUpdateGrantRequest) Execute() (*ResponseGrant, *http.Response, error) { + return r.ApiService.PartialUpdateGrantExecute(r) +} + +/* +PartialUpdateGrant Partially update a grant + +Updates specific fields of an existing grant within the logged-in account or its descendant accounts, leaving other fields unchanged. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param grantId + @return ApiPartialUpdateGrantRequest +*/ +func (a *IdentityGrantsAPIService) PartialUpdateGrant(ctx context.Context, grantId string) ApiPartialUpdateGrantRequest { + return ApiPartialUpdateGrantRequest{ + ApiService: a, + ctx: ctx, + grantId: grantId, + } +} + +// Execute executes the request +// @return ResponseGrant +func (a *IdentityGrantsAPIService) PartialUpdateGrantExecute(r ApiPartialUpdateGrantRequest) (*ResponseGrant, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGrant + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGrantsAPIService.PartialUpdateGrant") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedGrantRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveGrantRequest struct { + ctx context.Context + ApiService *IdentityGrantsAPIService + grantId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveGrantRequest) Fields(fields string) ApiRetrieveGrantRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveGrantRequest) Execute() (*ResponseRetrieveGrant, *http.Response, error) { + return r.ApiService.RetrieveGrantExecute(r) +} + +/* +RetrieveGrant Retrieve grant details + +Fetches detailed information about a specific grant within the logged-in account or its descendant accounts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param grantId + @return ApiRetrieveGrantRequest +*/ +func (a *IdentityGrantsAPIService) RetrieveGrant(ctx context.Context, grantId string) ApiRetrieveGrantRequest { + return ApiRetrieveGrantRequest{ + ApiService: a, + ctx: ctx, + grantId: grantId, + } +} + +// Execute executes the request +// @return ResponseRetrieveGrant +func (a *IdentityGrantsAPIService) RetrieveGrantExecute(r ApiRetrieveGrantRequest) (*ResponseRetrieveGrant, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveGrant + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGrantsAPIService.RetrieveGrant") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateGrantRequest struct { + ctx context.Context + ApiService *IdentityGrantsAPIService + grantId string + grantRequest *GrantRequest +} + +func (r ApiUpdateGrantRequest) GrantRequest(grantRequest GrantRequest) ApiUpdateGrantRequest { + r.grantRequest = &grantRequest + return r +} + +func (r ApiUpdateGrantRequest) Execute() (*ResponseGrant, *http.Response, error) { + return r.ApiService.UpdateGrantExecute(r) +} + +/* +UpdateGrant Update a grant + +Updates an existing grant within the logged-in account or its descendant accounts. This operation replaces the entire grant with the provided data. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param grantId + @return ApiUpdateGrantRequest +*/ +func (a *IdentityGrantsAPIService) UpdateGrant(ctx context.Context, grantId string) ApiUpdateGrantRequest { + return ApiUpdateGrantRequest{ + ApiService: a, + ctx: ctx, + grantId: grantId, + } +} + +// Execute executes the request +// @return ResponseGrant +func (a *IdentityGrantsAPIService) UpdateGrantExecute(r ApiUpdateGrantRequest) (*ResponseGrant, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGrant + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGrantsAPIService.UpdateGrant") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.grantRequest == nil { + return localVarReturnValue, nil, reportError("grantRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.grantRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_group_members.go b/azion-api/api_identity_group_members.go new file mode 100644 index 0000000..c259991 --- /dev/null +++ b/azion-api/api_identity_group_members.go @@ -0,0 +1,454 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityGroupMembersAPIService IdentityGroupMembersAPI service +type IdentityGroupMembersAPIService service + +type ApiRetrieveMembersGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupMembersAPIService + id int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveMembersGroupRequest) Fields(fields string) ApiRetrieveMembersGroupRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveMembersGroupRequest) Execute() (*ResponseRetrieveGroupMembers, *http.Response, error) { + return r.ApiService.RetrieveMembersGroupExecute(r) +} + +/* +RetrieveMembersGroup Retrieve members from a group + +Retrieve members from a specific group in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiRetrieveMembersGroupRequest +*/ +func (a *IdentityGroupMembersAPIService) RetrieveMembersGroup(ctx context.Context, id int64) ApiRetrieveMembersGroupRequest { + return ApiRetrieveMembersGroupRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponseRetrieveGroupMembers +func (a *IdentityGroupMembersAPIService) RetrieveMembersGroupExecute(r ApiRetrieveMembersGroupRequest) (*ResponseRetrieveGroupMembers, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveGroupMembers + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupMembersAPIService.RetrieveMembersGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups/{id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateMembersGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupMembersAPIService + id int64 + groupMembersRequest *GroupMembersRequest +} + +func (r ApiUpdateMembersGroupRequest) GroupMembersRequest(groupMembersRequest GroupMembersRequest) ApiUpdateMembersGroupRequest { + r.groupMembersRequest = &groupMembersRequest + return r +} + +func (r ApiUpdateMembersGroupRequest) Execute() (*ResponseGroupMembers, *http.Response, error) { + return r.ApiService.UpdateMembersGroupExecute(r) +} + +/* +UpdateMembersGroup Update members from a group + +Update all members from a group. This replaces the entire group members with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdateMembersGroupRequest +*/ +func (a *IdentityGroupMembersAPIService) UpdateMembersGroup(ctx context.Context, id int64) ApiUpdateMembersGroupRequest { + return ApiUpdateMembersGroupRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponseGroupMembers +func (a *IdentityGroupMembersAPIService) UpdateMembersGroupExecute(r ApiUpdateMembersGroupRequest) (*ResponseGroupMembers, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGroupMembers + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupMembersAPIService.UpdateMembersGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups/{id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupMembersRequest == nil { + return localVarReturnValue, nil, reportError("groupMembersRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupMembersRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_groups.go b/azion-api/api_identity_groups.go new file mode 100644 index 0000000..be4fa0a --- /dev/null +++ b/azion-api/api_identity_groups.go @@ -0,0 +1,1331 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityGroupsAPIService IdentityGroupsAPI service +type IdentityGroupsAPIService service + +type ApiCreateGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupsAPIService + groupRequest *GroupRequest +} + +func (r ApiCreateGroupRequest) GroupRequest(groupRequest GroupRequest) ApiCreateGroupRequest { + r.groupRequest = &groupRequest + return r +} + +func (r ApiCreateGroupRequest) Execute() (*ResponseGroup, *http.Response, error) { + return r.ApiService.CreateGroupExecute(r) +} + +/* +CreateGroup Create a new group + +Create a group for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateGroupRequest +*/ +func (a *IdentityGroupsAPIService) CreateGroup(ctx context.Context) ApiCreateGroupRequest { + return ApiCreateGroupRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseGroup +func (a *IdentityGroupsAPIService) CreateGroupExecute(r ApiCreateGroupRequest) (*ResponseGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupsAPIService.CreateGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupRequest == nil { + return localVarReturnValue, nil, reportError("groupRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupsAPIService + groupId string +} + +func (r ApiDeleteGroupRequest) Execute() (*ResponseDeleteGroup, *http.Response, error) { + return r.ApiService.DeleteGroupExecute(r) +} + +/* +DeleteGroup Delete a group + +Delete a specific group in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId + @return ApiDeleteGroupRequest +*/ +func (a *IdentityGroupsAPIService) DeleteGroup(ctx context.Context, groupId string) ApiDeleteGroupRequest { + return ApiDeleteGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +// @return ResponseDeleteGroup +func (a *IdentityGroupsAPIService) DeleteGroupExecute(r ApiDeleteGroupRequest) (*ResponseDeleteGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupsAPIService.DeleteGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListGroupRequest) Fields(fields string) ApiListGroupRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListGroupRequest) Ordering(ordering string) ApiListGroupRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListGroupRequest) Page(page int32) ApiListGroupRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListGroupRequest) PageSize(pageSize int32) ApiListGroupRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListGroupRequest) Search(search string) ApiListGroupRequest { + r.search = &search + return r +} + +func (r ApiListGroupRequest) Execute() (*PaginatedGroupList, *http.Response, error) { + return r.ApiService.ListGroupExecute(r) +} + +/* +ListGroup List of the account groups + +List all groups owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListGroupRequest +*/ +func (a *IdentityGroupsAPIService) ListGroup(ctx context.Context) ApiListGroupRequest { + return ApiListGroupRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedGroupList +func (a *IdentityGroupsAPIService) ListGroupExecute(r ApiListGroupRequest) (*PaginatedGroupList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedGroupList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupsAPIService.ListGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupsAPIService + groupId string + patchedGroupRequest *PatchedGroupRequest +} + +func (r ApiPartialUpdateGroupRequest) PatchedGroupRequest(patchedGroupRequest PatchedGroupRequest) ApiPartialUpdateGroupRequest { + r.patchedGroupRequest = &patchedGroupRequest + return r +} + +func (r ApiPartialUpdateGroupRequest) Execute() (*ResponseGroup, *http.Response, error) { + return r.ApiService.PartialUpdateGroupExecute(r) +} + +/* +PartialUpdateGroup Partially update a group + +Update one or more fields of an existing group without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId + @return ApiPartialUpdateGroupRequest +*/ +func (a *IdentityGroupsAPIService) PartialUpdateGroup(ctx context.Context, groupId string) ApiPartialUpdateGroupRequest { + return ApiPartialUpdateGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +// @return ResponseGroup +func (a *IdentityGroupsAPIService) PartialUpdateGroupExecute(r ApiPartialUpdateGroupRequest) (*ResponseGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupsAPIService.PartialUpdateGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedGroupRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupsAPIService + groupId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveGroupRequest) Fields(fields string) ApiRetrieveGroupRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveGroupRequest) Execute() (*ResponseRetrieveGroup, *http.Response, error) { + return r.ApiService.RetrieveGroupExecute(r) +} + +/* +RetrieveGroup Retrieve details from a group + +Retrieve details from a specific group in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId + @return ApiRetrieveGroupRequest +*/ +func (a *IdentityGroupsAPIService) RetrieveGroup(ctx context.Context, groupId string) ApiRetrieveGroupRequest { + return ApiRetrieveGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +// @return ResponseRetrieveGroup +func (a *IdentityGroupsAPIService) RetrieveGroupExecute(r ApiRetrieveGroupRequest) (*ResponseRetrieveGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupsAPIService.RetrieveGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateGroupRequest struct { + ctx context.Context + ApiService *IdentityGroupsAPIService + groupId string + groupRequest *GroupRequest +} + +func (r ApiUpdateGroupRequest) GroupRequest(groupRequest GroupRequest) ApiUpdateGroupRequest { + r.groupRequest = &groupRequest + return r +} + +func (r ApiUpdateGroupRequest) Execute() (*ResponseGroup, *http.Response, error) { + return r.ApiService.UpdateGroupExecute(r) +} + +/* +UpdateGroup Update a group + +Update an existing group. This replaces the entire group with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId + @return ApiUpdateGroupRequest +*/ +func (a *IdentityGroupsAPIService) UpdateGroup(ctx context.Context, groupId string) ApiUpdateGroupRequest { + return ApiUpdateGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +// @return ResponseGroup +func (a *IdentityGroupsAPIService) UpdateGroupExecute(r ApiUpdateGroupRequest) (*ResponseGroup, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseGroup + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityGroupsAPIService.UpdateGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.groupRequest == nil { + return localVarReturnValue, nil, reportError("groupRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.groupRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_logged_in_user.go b/azion-api/api_identity_logged_in_user.go new file mode 100644 index 0000000..8d32697 --- /dev/null +++ b/azion-api/api_identity_logged_in_user.go @@ -0,0 +1,653 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// IdentityLoggedInUserAPIService IdentityLoggedInUserAPI service +type IdentityLoggedInUserAPIService service + +type ApiListLoggedUserRequest struct { + ctx context.Context + ApiService *IdentityLoggedInUserAPIService + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListLoggedUserRequest) Fields(fields string) ApiListLoggedUserRequest { + r.fields = &fields + return r +} + +func (r ApiListLoggedUserRequest) Execute() (*ResponseRetrieveUser, *http.Response, error) { + return r.ApiService.ListLoggedUserExecute(r) +} + +/* +ListLoggedUser Retrieve details from the currently logged-in user + +Retrieve details from the logged user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListLoggedUserRequest +*/ +func (a *IdentityLoggedInUserAPIService) ListLoggedUser(ctx context.Context) ApiListLoggedUserRequest { + return ApiListLoggedUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseRetrieveUser +func (a *IdentityLoggedInUserAPIService) ListLoggedUserExecute(r ApiListLoggedUserRequest) (*ResponseRetrieveUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityLoggedInUserAPIService.ListLoggedUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/user" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateLoggedUserRequest struct { + ctx context.Context + ApiService *IdentityLoggedInUserAPIService + patchedUserRequest *PatchedUserRequest +} + +func (r ApiPartialUpdateLoggedUserRequest) PatchedUserRequest(patchedUserRequest PatchedUserRequest) ApiPartialUpdateLoggedUserRequest { + r.patchedUserRequest = &patchedUserRequest + return r +} + +func (r ApiPartialUpdateLoggedUserRequest) Execute() (*ResponseUser, *http.Response, error) { + return r.ApiService.PartialUpdateLoggedUserExecute(r) +} + +/* +PartialUpdateLoggedUser Partially update the currently logged-in user + +Update one or more fields of the logged user without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiPartialUpdateLoggedUserRequest +*/ +func (a *IdentityLoggedInUserAPIService) PartialUpdateLoggedUser(ctx context.Context) ApiPartialUpdateLoggedUserRequest { + return ApiPartialUpdateLoggedUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseUser +func (a *IdentityLoggedInUserAPIService) PartialUpdateLoggedUserExecute(r ApiPartialUpdateLoggedUserRequest) (*ResponseUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityLoggedInUserAPIService.PartialUpdateLoggedUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/user" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedUserRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateLoggedUserRequest struct { + ctx context.Context + ApiService *IdentityLoggedInUserAPIService + userRequest *UserRequest +} + +func (r ApiUpdateLoggedUserRequest) UserRequest(userRequest UserRequest) ApiUpdateLoggedUserRequest { + r.userRequest = &userRequest + return r +} + +func (r ApiUpdateLoggedUserRequest) Execute() (*ResponseUser, *http.Response, error) { + return r.ApiService.UpdateLoggedUserExecute(r) +} + +/* +UpdateLoggedUser Update the currently logged-in user + +Update the logged user. This replaces the entire user with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateLoggedUserRequest +*/ +func (a *IdentityLoggedInUserAPIService) UpdateLoggedUser(ctx context.Context) ApiUpdateLoggedUserRequest { + return ApiUpdateLoggedUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseUser +func (a *IdentityLoggedInUserAPIService) UpdateLoggedUserExecute(r ApiUpdateLoggedUserRequest) (*ResponseUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityLoggedInUserAPIService.UpdateLoggedUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/user" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userRequest == nil { + return localVarReturnValue, nil, reportError("userRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_service_token_renew.go b/azion-api/api_identity_service_token_renew.go new file mode 100644 index 0000000..916a755 --- /dev/null +++ b/azion-api/api_identity_service_token_renew.go @@ -0,0 +1,240 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityServiceTokenRenewAPIService IdentityServiceTokenRenewAPI service +type IdentityServiceTokenRenewAPIService service + +type ApiRenewServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokenRenewAPIService + id int64 + serviceTokenRenewRequest *ServiceTokenRenewRequest +} + +func (r ApiRenewServiceTokenRequest) ServiceTokenRenewRequest(serviceTokenRenewRequest ServiceTokenRenewRequest) ApiRenewServiceTokenRequest { + r.serviceTokenRenewRequest = &serviceTokenRenewRequest + return r +} + +func (r ApiRenewServiceTokenRequest) Execute() (*ResponseServiceTokenRenew, *http.Response, error) { + return r.ApiService.RenewServiceTokenExecute(r) +} + +/* +RenewServiceToken Renews a service token + +Renews a service token for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiRenewServiceTokenRequest +*/ +func (a *IdentityServiceTokenRenewAPIService) RenewServiceToken(ctx context.Context, id int64) ApiRenewServiceTokenRequest { + return ApiRenewServiceTokenRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponseServiceTokenRenew +func (a *IdentityServiceTokenRenewAPIService) RenewServiceTokenExecute(r ApiRenewServiceTokenRequest) (*ResponseServiceTokenRenew, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseServiceTokenRenew + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokenRenewAPIService.RenewServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens/{id}/renew" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceTokenRenewRequest == nil { + return localVarReturnValue, nil, reportError("serviceTokenRenewRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceTokenRenewRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_service_tokens.go b/azion-api/api_identity_service_tokens.go new file mode 100644 index 0000000..356b91a --- /dev/null +++ b/azion-api/api_identity_service_tokens.go @@ -0,0 +1,1331 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityServiceTokensAPIService IdentityServiceTokensAPI service +type IdentityServiceTokensAPIService service + +type ApiCreateServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokensAPIService + serviceTokenCreateRequest *ServiceTokenCreateRequest +} + +func (r ApiCreateServiceTokenRequest) ServiceTokenCreateRequest(serviceTokenCreateRequest ServiceTokenCreateRequest) ApiCreateServiceTokenRequest { + r.serviceTokenCreateRequest = &serviceTokenCreateRequest + return r +} + +func (r ApiCreateServiceTokenRequest) Execute() (*ResponseServiceTokenCreate, *http.Response, error) { + return r.ApiService.CreateServiceTokenExecute(r) +} + +/* +CreateServiceToken Create a new service token + +Create a new service token for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateServiceTokenRequest +*/ +func (a *IdentityServiceTokensAPIService) CreateServiceToken(ctx context.Context) ApiCreateServiceTokenRequest { + return ApiCreateServiceTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseServiceTokenCreate +func (a *IdentityServiceTokensAPIService) CreateServiceTokenExecute(r ApiCreateServiceTokenRequest) (*ResponseServiceTokenCreate, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseServiceTokenCreate + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokensAPIService.CreateServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceTokenCreateRequest == nil { + return localVarReturnValue, nil, reportError("serviceTokenCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceTokenCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokensAPIService + tokenId string +} + +func (r ApiDeleteServiceTokenRequest) Execute() (*ResponseDeleteServiceToken, *http.Response, error) { + return r.ApiService.DeleteServiceTokenExecute(r) +} + +/* +DeleteServiceToken Delete a service token + +Delete a specific service token in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenId + @return ApiDeleteServiceTokenRequest +*/ +func (a *IdentityServiceTokensAPIService) DeleteServiceToken(ctx context.Context, tokenId string) ApiDeleteServiceTokenRequest { + return ApiDeleteServiceTokenRequest{ + ApiService: a, + ctx: ctx, + tokenId: tokenId, + } +} + +// Execute executes the request +// @return ResponseDeleteServiceToken +func (a *IdentityServiceTokensAPIService) DeleteServiceTokenExecute(r ApiDeleteServiceTokenRequest) (*ResponseDeleteServiceToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteServiceToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokensAPIService.DeleteServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens/{token_id}" + localVarPath = strings.Replace(localVarPath, "{"+"token_id"+"}", url.PathEscape(parameterValueToString(r.tokenId, "tokenId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokensAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListServiceTokenRequest) Fields(fields string) ApiListServiceTokenRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListServiceTokenRequest) Ordering(ordering string) ApiListServiceTokenRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListServiceTokenRequest) Page(page int32) ApiListServiceTokenRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListServiceTokenRequest) PageSize(pageSize int32) ApiListServiceTokenRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListServiceTokenRequest) Search(search string) ApiListServiceTokenRequest { + r.search = &search + return r +} + +func (r ApiListServiceTokenRequest) Execute() (*PaginatedServiceTokenList, *http.Response, error) { + return r.ApiService.ListServiceTokenExecute(r) +} + +/* +ListServiceToken List of the account service tokens + +List all services tokens owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListServiceTokenRequest +*/ +func (a *IdentityServiceTokensAPIService) ListServiceToken(ctx context.Context) ApiListServiceTokenRequest { + return ApiListServiceTokenRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedServiceTokenList +func (a *IdentityServiceTokensAPIService) ListServiceTokenExecute(r ApiListServiceTokenRequest) (*PaginatedServiceTokenList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedServiceTokenList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokensAPIService.ListServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokensAPIService + tokenId string + patchedServiceTokenUpdateRequest *PatchedServiceTokenUpdateRequest +} + +func (r ApiPartialUpdateServiceTokenRequest) PatchedServiceTokenUpdateRequest(patchedServiceTokenUpdateRequest PatchedServiceTokenUpdateRequest) ApiPartialUpdateServiceTokenRequest { + r.patchedServiceTokenUpdateRequest = &patchedServiceTokenUpdateRequest + return r +} + +func (r ApiPartialUpdateServiceTokenRequest) Execute() (*ResponseServiceToken, *http.Response, error) { + return r.ApiService.PartialUpdateServiceTokenExecute(r) +} + +/* +PartialUpdateServiceToken Partially update a service token + +Update one or more fields of an existing service token without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenId + @return ApiPartialUpdateServiceTokenRequest +*/ +func (a *IdentityServiceTokensAPIService) PartialUpdateServiceToken(ctx context.Context, tokenId string) ApiPartialUpdateServiceTokenRequest { + return ApiPartialUpdateServiceTokenRequest{ + ApiService: a, + ctx: ctx, + tokenId: tokenId, + } +} + +// Execute executes the request +// @return ResponseServiceToken +func (a *IdentityServiceTokensAPIService) PartialUpdateServiceTokenExecute(r ApiPartialUpdateServiceTokenRequest) (*ResponseServiceToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseServiceToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokensAPIService.PartialUpdateServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens/{token_id}" + localVarPath = strings.Replace(localVarPath, "{"+"token_id"+"}", url.PathEscape(parameterValueToString(r.tokenId, "tokenId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedServiceTokenUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokensAPIService + tokenId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveServiceTokenRequest) Fields(fields string) ApiRetrieveServiceTokenRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveServiceTokenRequest) Execute() (*ResponseRetrieveServiceToken, *http.Response, error) { + return r.ApiService.RetrieveServiceTokenExecute(r) +} + +/* +RetrieveServiceToken Retrieve details from a service token + +Retrieve details from a specific service token in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenId + @return ApiRetrieveServiceTokenRequest +*/ +func (a *IdentityServiceTokensAPIService) RetrieveServiceToken(ctx context.Context, tokenId string) ApiRetrieveServiceTokenRequest { + return ApiRetrieveServiceTokenRequest{ + ApiService: a, + ctx: ctx, + tokenId: tokenId, + } +} + +// Execute executes the request +// @return ResponseRetrieveServiceToken +func (a *IdentityServiceTokensAPIService) RetrieveServiceTokenExecute(r ApiRetrieveServiceTokenRequest) (*ResponseRetrieveServiceToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveServiceToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokensAPIService.RetrieveServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens/{token_id}" + localVarPath = strings.Replace(localVarPath, "{"+"token_id"+"}", url.PathEscape(parameterValueToString(r.tokenId, "tokenId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateServiceTokenRequest struct { + ctx context.Context + ApiService *IdentityServiceTokensAPIService + tokenId string + serviceTokenUpdateRequest *ServiceTokenUpdateRequest +} + +func (r ApiUpdateServiceTokenRequest) ServiceTokenUpdateRequest(serviceTokenUpdateRequest ServiceTokenUpdateRequest) ApiUpdateServiceTokenRequest { + r.serviceTokenUpdateRequest = &serviceTokenUpdateRequest + return r +} + +func (r ApiUpdateServiceTokenRequest) Execute() (*ResponseServiceToken, *http.Response, error) { + return r.ApiService.UpdateServiceTokenExecute(r) +} + +/* +UpdateServiceToken Update a service token + +Update an existing service token. This replaces the entire service token with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param tokenId + @return ApiUpdateServiceTokenRequest +*/ +func (a *IdentityServiceTokensAPIService) UpdateServiceToken(ctx context.Context, tokenId string) ApiUpdateServiceTokenRequest { + return ApiUpdateServiceTokenRequest{ + ApiService: a, + ctx: ctx, + tokenId: tokenId, + } +} + +// Execute executes the request +// @return ResponseServiceToken +func (a *IdentityServiceTokensAPIService) UpdateServiceTokenExecute(r ApiUpdateServiceTokenRequest) (*ResponseServiceToken, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseServiceToken + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityServiceTokensAPIService.UpdateServiceToken") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/service-tokens/{token_id}" + localVarPath = strings.Replace(localVarPath, "{"+"token_id"+"}", url.PathEscape(parameterValueToString(r.tokenId, "tokenId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceTokenUpdateRequest == nil { + return localVarReturnValue, nil, reportError("serviceTokenUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceTokenUpdateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_user_info.go b/azion-api/api_identity_user_info.go new file mode 100644 index 0000000..d0c134d --- /dev/null +++ b/azion-api/api_identity_user_info.go @@ -0,0 +1,451 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityUserInfoAPIService IdentityUserInfoAPI service +type IdentityUserInfoAPIService service + +type ApiRetrieveUserInfoRequest struct { + ctx context.Context + ApiService *IdentityUserInfoAPIService + id int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveUserInfoRequest) Fields(fields string) ApiRetrieveUserInfoRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveUserInfoRequest) Execute() (*ResponseRetrieveUserInfo, *http.Response, error) { + return r.ApiService.RetrieveUserInfoExecute(r) +} + +/* +RetrieveUserInfo Retrieve user info + +Retrieve info from a specific user in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiRetrieveUserInfoRequest +*/ +func (a *IdentityUserInfoAPIService) RetrieveUserInfo(ctx context.Context, id int64) ApiRetrieveUserInfoRequest { + return ApiRetrieveUserInfoRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponseRetrieveUserInfo +func (a *IdentityUserInfoAPIService) RetrieveUserInfoExecute(r ApiRetrieveUserInfoRequest) (*ResponseRetrieveUserInfo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveUserInfo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUserInfoAPIService.RetrieveUserInfo") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{id}/info" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateUserInfoRequest struct { + ctx context.Context + ApiService *IdentityUserInfoAPIService + id int64 + updateUserInfoRequest *UpdateUserInfoRequest +} + +func (r ApiUpdateUserInfoRequest) UpdateUserInfoRequest(updateUserInfoRequest UpdateUserInfoRequest) ApiUpdateUserInfoRequest { + r.updateUserInfoRequest = &updateUserInfoRequest + return r +} + +func (r ApiUpdateUserInfoRequest) Execute() (*ResponseUserInfo, *http.Response, error) { + return r.ApiService.UpdateUserInfoExecute(r) +} + +/* +UpdateUserInfo Update an user info + +Update info from an existing user. This replaces the entire user info with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id + @return ApiUpdateUserInfoRequest +*/ +func (a *IdentityUserInfoAPIService) UpdateUserInfo(ctx context.Context, id int64) ApiUpdateUserInfoRequest { + return ApiUpdateUserInfoRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ResponseUserInfo +func (a *IdentityUserInfoAPIService) UpdateUserInfoExecute(r ApiUpdateUserInfoRequest) (*ResponseUserInfo, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseUserInfo + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUserInfoAPIService.UpdateUserInfo") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{id}/info" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateUserInfoRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_identity_users.go b/azion-api/api_identity_users.go new file mode 100644 index 0000000..23c89ee --- /dev/null +++ b/azion-api/api_identity_users.go @@ -0,0 +1,1341 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// IdentityUsersAPIService IdentityUsersAPI service +type IdentityUsersAPIService service + +type ApiCreateUserRequest struct { + ctx context.Context + ApiService *IdentityUsersAPIService + userRequest *UserRequest +} + +func (r ApiCreateUserRequest) UserRequest(userRequest UserRequest) ApiCreateUserRequest { + r.userRequest = &userRequest + return r +} + +func (r ApiCreateUserRequest) Execute() (*ResponseUser, *http.Response, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Create a new user + +Create a new user for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateUserRequest +*/ +func (a *IdentityUsersAPIService) CreateUser(ctx context.Context) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseUser +func (a *IdentityUsersAPIService) CreateUserExecute(r ApiCreateUserRequest) (*ResponseUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUsersAPIService.CreateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userRequest == nil { + return localVarReturnValue, nil, reportError("userRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService *IdentityUsersAPIService + userId string +} + +func (r ApiDeleteUserRequest) Execute() (*ResponseDeleteUser, *http.Response, error) { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Delete an user + +Delete a specific user in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId + @return ApiDeleteUserRequest +*/ +func (a *IdentityUsersAPIService) DeleteUser(ctx context.Context, userId string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return ResponseDeleteUser +func (a *IdentityUsersAPIService) DeleteUserExecute(r ApiDeleteUserRequest) (*ResponseDeleteUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUsersAPIService.DeleteUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListUsersRequest struct { + ctx context.Context + ApiService *IdentityUsersAPIService + fields *string + locked *bool + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListUsersRequest) Fields(fields string) ApiListUsersRequest { + r.fields = &fields + return r +} + +// Filters users by locked status. - `true`: Returns only locked users. - `false`: Returns only unlocked users. - (not provided): Returns all users. +func (r ApiListUsersRequest) Locked(locked bool) ApiListUsersRequest { + r.locked = &locked + return r +} + +// Which field to use when ordering the results. +func (r ApiListUsersRequest) Ordering(ordering string) ApiListUsersRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListUsersRequest) Page(page int32) ApiListUsersRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListUsersRequest) PageSize(pageSize int32) ApiListUsersRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListUsersRequest) Search(search string) ApiListUsersRequest { + r.search = &search + return r +} + +func (r ApiListUsersRequest) Execute() (*PaginatedUserList, *http.Response, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers List of the account users + +List all users owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListUsersRequest +*/ +func (a *IdentityUsersAPIService) ListUsers(ctx context.Context) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedUserList +func (a *IdentityUsersAPIService) ListUsersExecute(r ApiListUsersRequest) (*PaginatedUserList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedUserList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUsersAPIService.ListUsers") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.locked != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "locked", r.locked, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateUserRequest struct { + ctx context.Context + ApiService *IdentityUsersAPIService + userId string + patchedUserRequest *PatchedUserRequest +} + +func (r ApiPartialUpdateUserRequest) PatchedUserRequest(patchedUserRequest PatchedUserRequest) ApiPartialUpdateUserRequest { + r.patchedUserRequest = &patchedUserRequest + return r +} + +func (r ApiPartialUpdateUserRequest) Execute() (*ResponseUser, *http.Response, error) { + return r.ApiService.PartialUpdateUserExecute(r) +} + +/* +PartialUpdateUser Partially update an user + +Update one or more fields of an existing user without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId + @return ApiPartialUpdateUserRequest +*/ +func (a *IdentityUsersAPIService) PartialUpdateUser(ctx context.Context, userId string) ApiPartialUpdateUserRequest { + return ApiPartialUpdateUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return ResponseUser +func (a *IdentityUsersAPIService) PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) (*ResponseUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUsersAPIService.PartialUpdateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedUserRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveUserRequest struct { + ctx context.Context + ApiService *IdentityUsersAPIService + userId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveUserRequest) Fields(fields string) ApiRetrieveUserRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveUserRequest) Execute() (*ResponseRetrieveUser, *http.Response, error) { + return r.ApiService.RetrieveUserExecute(r) +} + +/* +RetrieveUser Retrieve details from an user + +Retrieve details from a specific user in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId + @return ApiRetrieveUserRequest +*/ +func (a *IdentityUsersAPIService) RetrieveUser(ctx context.Context, userId string) ApiRetrieveUserRequest { + return ApiRetrieveUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return ResponseRetrieveUser +func (a *IdentityUsersAPIService) RetrieveUserExecute(r ApiRetrieveUserRequest) (*ResponseRetrieveUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUsersAPIService.RetrieveUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateUserRequest struct { + ctx context.Context + ApiService *IdentityUsersAPIService + userId string + userRequest *UserRequest +} + +func (r ApiUpdateUserRequest) UserRequest(userRequest UserRequest) ApiUpdateUserRequest { + r.userRequest = &userRequest + return r +} + +func (r ApiUpdateUserRequest) Execute() (*ResponseUser, *http.Response, error) { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Update an user + +Update an existing user. This replaces the entire user with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId + @return ApiUpdateUserRequest +*/ +func (a *IdentityUsersAPIService) UpdateUser(ctx context.Context, userId string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +// @return ResponseUser +func (a *IdentityUsersAPIService) UpdateUserExecute(r ApiUpdateUserRequest) (*ResponseUser, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseUser + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IdentityUsersAPIService.UpdateUser") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{user_id}" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.userRequest == nil { + return localVarReturnValue, nil, reportError("userRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.userRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_kv_namespaces.go b/azion-api/api_kv_namespaces.go new file mode 100644 index 0000000..03fbd4f --- /dev/null +++ b/azion-api/api_kv_namespaces.go @@ -0,0 +1,493 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// KVNamespacesAPIService KVNamespacesAPI service +type KVNamespacesAPIService service + +type ApiCreateNamespaceRequest struct { + ctx context.Context + ApiService *KVNamespacesAPIService + namespaceCreateRequest *NamespaceCreateRequest +} + +func (r ApiCreateNamespaceRequest) NamespaceCreateRequest(namespaceCreateRequest NamespaceCreateRequest) ApiCreateNamespaceRequest { + r.namespaceCreateRequest = &namespaceCreateRequest + return r +} + +func (r ApiCreateNamespaceRequest) Execute() (*Namespace, *http.Response, error) { + return r.ApiService.CreateNamespaceExecute(r) +} + +/* +CreateNamespace Create namespace + +Creates a new namespace in the authenticated account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateNamespaceRequest +*/ +func (a *KVNamespacesAPIService) CreateNamespace(ctx context.Context) ApiCreateNamespaceRequest { + return ApiCreateNamespaceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return Namespace +func (a *KVNamespacesAPIService) CreateNamespaceExecute(r ApiCreateNamespaceRequest) (*Namespace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Namespace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KVNamespacesAPIService.CreateNamespace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/kv/namespaces" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.namespaceCreateRequest == nil { + return localVarReturnValue, nil, reportError("namespaceCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.namespaceCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListNamespacesRequest struct { + ctx context.Context + ApiService *KVNamespacesAPIService + fields *string + page *int32 + pageSize *int32 +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListNamespacesRequest) Fields(fields string) ApiListNamespacesRequest { + r.fields = &fields + return r +} + +// A page number within the paginated result set. +func (r ApiListNamespacesRequest) Page(page int32) ApiListNamespacesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListNamespacesRequest) PageSize(pageSize int32) ApiListNamespacesRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiListNamespacesRequest) Execute() (*NamespaceList, *http.Response, error) { + return r.ApiService.ListNamespacesExecute(r) +} + +/* +ListNamespaces List namespaces + +Returns a paginated list of namespaces for the authenticated account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListNamespacesRequest +*/ +func (a *KVNamespacesAPIService) ListNamespaces(ctx context.Context) ApiListNamespacesRequest { + return ApiListNamespacesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return NamespaceList +func (a *KVNamespacesAPIService) ListNamespacesExecute(r ApiListNamespacesRequest) (*NamespaceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NamespaceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KVNamespacesAPIService.ListNamespaces") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/kv/namespaces" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveNamespaceRequest struct { + ctx context.Context + ApiService *KVNamespacesAPIService + namespace string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveNamespaceRequest) Fields(fields string) ApiRetrieveNamespaceRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveNamespaceRequest) Execute() (*Namespace, *http.Response, error) { + return r.ApiService.RetrieveNamespaceExecute(r) +} + +/* +RetrieveNamespace Retrieve namespace + +Returns a specific namespace by name, if it belongs to the authenticated account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param namespace The unique identifier (name) of the namespace + @return ApiRetrieveNamespaceRequest +*/ +func (a *KVNamespacesAPIService) RetrieveNamespace(ctx context.Context, namespace string) ApiRetrieveNamespaceRequest { + return ApiRetrieveNamespaceRequest{ + ApiService: a, + ctx: ctx, + namespace: namespace, + } +} + +// Execute executes the request +// @return Namespace +func (a *KVNamespacesAPIService) RetrieveNamespaceExecute(r ApiRetrieveNamespaceRequest) (*Namespace, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Namespace + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "KVNamespacesAPIService.RetrieveNamespace") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/kv/namespaces/{namespace}" + localVarPath = strings.Replace(localVarPath, "{"+"namespace"+"}", url.PathEscape(parameterValueToString(r.namespace, "namespace")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_metrics_dashboard.go b/azion-api/api_metrics_dashboard.go new file mode 100644 index 0000000..8da5ffb --- /dev/null +++ b/azion-api/api_metrics_dashboard.go @@ -0,0 +1,1358 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// MetricsDashboardAPIService MetricsDashboardAPI service +type MetricsDashboardAPIService service + +type ApiCreateDashboardRequest struct { + ctx context.Context + ApiService *MetricsDashboardAPIService + folderId int64 + dashboardRequest *DashboardRequest +} + +func (r ApiCreateDashboardRequest) DashboardRequest(dashboardRequest DashboardRequest) ApiCreateDashboardRequest { + r.dashboardRequest = &dashboardRequest + return r +} + +func (r ApiCreateDashboardRequest) Execute() (*ResponseDashboard, *http.Response, error) { + return r.ApiService.CreateDashboardExecute(r) +} + +/* +CreateDashboard Create a new dashboard + +Create a new dashboard in a given scope. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param folderId The unique identifier of the folder + @return ApiCreateDashboardRequest +*/ +func (a *MetricsDashboardAPIService) CreateDashboard(ctx context.Context, folderId int64) ApiCreateDashboardRequest { + return ApiCreateDashboardRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseDashboard +func (a *MetricsDashboardAPIService) CreateDashboardExecute(r ApiCreateDashboardRequest) (*ResponseDashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsDashboardAPIService.CreateDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards" + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.dashboardRequest == nil { + return localVarReturnValue, nil, reportError("dashboardRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dashboardRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDashboardRequest struct { + ctx context.Context + ApiService *MetricsDashboardAPIService + dashboardId int64 + folderId int64 +} + +func (r ApiDeleteDashboardRequest) Execute() (*ResponseDeleteDashboard, *http.Response, error) { + return r.ApiService.DeleteDashboardExecute(r) +} + +/* +DeleteDashboard Delete a dashboard + +Delete a specific dashboard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiDeleteDashboardRequest +*/ +func (a *MetricsDashboardAPIService) DeleteDashboard(ctx context.Context, dashboardId int64, folderId int64) ApiDeleteDashboardRequest { + return ApiDeleteDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseDeleteDashboard +func (a *MetricsDashboardAPIService) DeleteDashboardExecute(r ApiDeleteDashboardRequest) (*ResponseDeleteDashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteDashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsDashboardAPIService.DeleteDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDashboardsRequest struct { + ctx context.Context + ApiService *MetricsDashboardAPIService + folderId int64 + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDashboardsRequest) Fields(fields string) ApiListDashboardsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListDashboardsRequest) Id(id int64) ApiListDashboardsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListDashboardsRequest) Name(name string) ApiListDashboardsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDashboardsRequest) Ordering(ordering string) ApiListDashboardsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDashboardsRequest) Page(page int32) ApiListDashboardsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDashboardsRequest) PageSize(pageSize int32) ApiListDashboardsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDashboardsRequest) Search(search string) ApiListDashboardsRequest { + r.search = &search + return r +} + +func (r ApiListDashboardsRequest) Execute() (*PaginatedDashboardList, *http.Response, error) { + return r.ApiService.ListDashboardsExecute(r) +} + +/* +ListDashboards List of the dashboards + +List all dashboards for your user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param folderId The unique identifier of the folder + @return ApiListDashboardsRequest +*/ +func (a *MetricsDashboardAPIService) ListDashboards(ctx context.Context, folderId int64) ApiListDashboardsRequest { + return ApiListDashboardsRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// @return PaginatedDashboardList +func (a *MetricsDashboardAPIService) ListDashboardsExecute(r ApiListDashboardsRequest) (*PaginatedDashboardList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDashboardList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsDashboardAPIService.ListDashboards") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards" + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateDashboardRequest struct { + ctx context.Context + ApiService *MetricsDashboardAPIService + dashboardId int64 + folderId int64 + patchedDashboardRequest *PatchedDashboardRequest +} + +func (r ApiPartialUpdateDashboardRequest) PatchedDashboardRequest(patchedDashboardRequest PatchedDashboardRequest) ApiPartialUpdateDashboardRequest { + r.patchedDashboardRequest = &patchedDashboardRequest + return r +} + +func (r ApiPartialUpdateDashboardRequest) Execute() (*ResponseDashboard, *http.Response, error) { + return r.ApiService.PartialUpdateDashboardExecute(r) +} + +/* +PartialUpdateDashboard Partially update a dashboard + +Update one or more fields of an existing dashboard without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiPartialUpdateDashboardRequest +*/ +func (a *MetricsDashboardAPIService) PartialUpdateDashboard(ctx context.Context, dashboardId int64, folderId int64) ApiPartialUpdateDashboardRequest { + return ApiPartialUpdateDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseDashboard +func (a *MetricsDashboardAPIService) PartialUpdateDashboardExecute(r ApiPartialUpdateDashboardRequest) (*ResponseDashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsDashboardAPIService.PartialUpdateDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedDashboardRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDashboardRequest struct { + ctx context.Context + ApiService *MetricsDashboardAPIService + dashboardId int64 + folderId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDashboardRequest) Fields(fields string) ApiRetrieveDashboardRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDashboardRequest) Execute() (*ResponseRetrieveDashboard, *http.Response, error) { + return r.ApiService.RetrieveDashboardExecute(r) +} + +/* +RetrieveDashboard Retrieve details from a dashboard + +Retrieve details from a specific dashboard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiRetrieveDashboardRequest +*/ +func (a *MetricsDashboardAPIService) RetrieveDashboard(ctx context.Context, dashboardId int64, folderId int64) ApiRetrieveDashboardRequest { + return ApiRetrieveDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseRetrieveDashboard +func (a *MetricsDashboardAPIService) RetrieveDashboardExecute(r ApiRetrieveDashboardRequest) (*ResponseRetrieveDashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveDashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsDashboardAPIService.RetrieveDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateDashboardRequest struct { + ctx context.Context + ApiService *MetricsDashboardAPIService + dashboardId int64 + folderId int64 + dashboardRequest *DashboardRequest +} + +func (r ApiUpdateDashboardRequest) DashboardRequest(dashboardRequest DashboardRequest) ApiUpdateDashboardRequest { + r.dashboardRequest = &dashboardRequest + return r +} + +func (r ApiUpdateDashboardRequest) Execute() (*ResponseDashboard, *http.Response, error) { + return r.ApiService.UpdateDashboardExecute(r) +} + +/* +UpdateDashboard Update a dashboard + +Update an existing dashboard. This replaces the entire dashboard with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiUpdateDashboardRequest +*/ +func (a *MetricsDashboardAPIService) UpdateDashboard(ctx context.Context, dashboardId int64, folderId int64) ApiUpdateDashboardRequest { + return ApiUpdateDashboardRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseDashboard +func (a *MetricsDashboardAPIService) UpdateDashboardExecute(r ApiUpdateDashboardRequest) (*ResponseDashboard, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDashboard + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsDashboardAPIService.UpdateDashboard") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.dashboardRequest == nil { + return localVarReturnValue, nil, reportError("dashboardRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.dashboardRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_metrics_folders.go b/azion-api/api_metrics_folders.go new file mode 100644 index 0000000..d873279 --- /dev/null +++ b/azion-api/api_metrics_folders.go @@ -0,0 +1,1298 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// MetricsFoldersAPIService MetricsFoldersAPI service +type MetricsFoldersAPIService service + +type ApiCreateFolderRequest struct { + ctx context.Context + ApiService *MetricsFoldersAPIService + folderRequest *FolderRequest +} + +func (r ApiCreateFolderRequest) FolderRequest(folderRequest FolderRequest) ApiCreateFolderRequest { + r.folderRequest = &folderRequest + return r +} + +func (r ApiCreateFolderRequest) Execute() (*ResponseFolder, *http.Response, error) { + return r.ApiService.CreateFolderExecute(r) +} + +/* +CreateFolder Create a new folder + +Create a new folder in a given scope. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateFolderRequest +*/ +func (a *MetricsFoldersAPIService) CreateFolder(ctx context.Context) ApiCreateFolderRequest { + return ApiCreateFolderRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseFolder +func (a *MetricsFoldersAPIService) CreateFolderExecute(r ApiCreateFolderRequest) (*ResponseFolder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseFolder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsFoldersAPIService.CreateFolder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderRequest == nil { + return localVarReturnValue, nil, reportError("folderRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.folderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteFolderRequest struct { + ctx context.Context + ApiService *MetricsFoldersAPIService + folderId int64 +} + +func (r ApiDeleteFolderRequest) Execute() (*ResponseDeleteFolder, *http.Response, error) { + return r.ApiService.DeleteFolderExecute(r) +} + +/* +DeleteFolder Delete a folder + +Delete a specific folder. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param folderId The unique identifier of the folder + @return ApiDeleteFolderRequest +*/ +func (a *MetricsFoldersAPIService) DeleteFolder(ctx context.Context, folderId int64) ApiDeleteFolderRequest { + return ApiDeleteFolderRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseDeleteFolder +func (a *MetricsFoldersAPIService) DeleteFolderExecute(r ApiDeleteFolderRequest) (*ResponseDeleteFolder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteFolder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsFoldersAPIService.DeleteFolder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListFoldersRequest struct { + ctx context.Context + ApiService *MetricsFoldersAPIService + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListFoldersRequest) Fields(fields string) ApiListFoldersRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListFoldersRequest) Id(id int64) ApiListFoldersRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListFoldersRequest) Name(name string) ApiListFoldersRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListFoldersRequest) Ordering(ordering string) ApiListFoldersRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListFoldersRequest) Page(page int32) ApiListFoldersRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListFoldersRequest) PageSize(pageSize int32) ApiListFoldersRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListFoldersRequest) Search(search string) ApiListFoldersRequest { + r.search = &search + return r +} + +func (r ApiListFoldersRequest) Execute() (*PaginatedFolderList, *http.Response, error) { + return r.ApiService.ListFoldersExecute(r) +} + +/* +ListFolders List of the folders + +List all folders for your user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListFoldersRequest +*/ +func (a *MetricsFoldersAPIService) ListFolders(ctx context.Context) ApiListFoldersRequest { + return ApiListFoldersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedFolderList +func (a *MetricsFoldersAPIService) ListFoldersExecute(r ApiListFoldersRequest) (*PaginatedFolderList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFolderList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsFoldersAPIService.ListFolders") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateFolderRequest struct { + ctx context.Context + ApiService *MetricsFoldersAPIService + folderId int64 + patchedFolderRequest *PatchedFolderRequest +} + +func (r ApiPartialUpdateFolderRequest) PatchedFolderRequest(patchedFolderRequest PatchedFolderRequest) ApiPartialUpdateFolderRequest { + r.patchedFolderRequest = &patchedFolderRequest + return r +} + +func (r ApiPartialUpdateFolderRequest) Execute() (*ResponseFolder, *http.Response, error) { + return r.ApiService.PartialUpdateFolderExecute(r) +} + +/* +PartialUpdateFolder Partially update a folder + +Update one or more fields of an existing folder without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param folderId The unique identifier of the folder + @return ApiPartialUpdateFolderRequest +*/ +func (a *MetricsFoldersAPIService) PartialUpdateFolder(ctx context.Context, folderId int64) ApiPartialUpdateFolderRequest { + return ApiPartialUpdateFolderRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseFolder +func (a *MetricsFoldersAPIService) PartialUpdateFolderExecute(r ApiPartialUpdateFolderRequest) (*ResponseFolder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseFolder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsFoldersAPIService.PartialUpdateFolder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedFolderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveFolderRequest struct { + ctx context.Context + ApiService *MetricsFoldersAPIService + folderId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveFolderRequest) Fields(fields string) ApiRetrieveFolderRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveFolderRequest) Execute() (*ResponseRetrieveFolder, *http.Response, error) { + return r.ApiService.RetrieveFolderExecute(r) +} + +/* +RetrieveFolder Retrieve details from a folder + +Retrieve details from a specific folder. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param folderId The unique identifier of the folder + @return ApiRetrieveFolderRequest +*/ +func (a *MetricsFoldersAPIService) RetrieveFolder(ctx context.Context, folderId int64) ApiRetrieveFolderRequest { + return ApiRetrieveFolderRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseRetrieveFolder +func (a *MetricsFoldersAPIService) RetrieveFolderExecute(r ApiRetrieveFolderRequest) (*ResponseRetrieveFolder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveFolder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsFoldersAPIService.RetrieveFolder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateFolderRequest struct { + ctx context.Context + ApiService *MetricsFoldersAPIService + folderId int64 + folderRequest *FolderRequest +} + +func (r ApiUpdateFolderRequest) FolderRequest(folderRequest FolderRequest) ApiUpdateFolderRequest { + r.folderRequest = &folderRequest + return r +} + +func (r ApiUpdateFolderRequest) Execute() (*ResponseFolder, *http.Response, error) { + return r.ApiService.UpdateFolderExecute(r) +} + +/* +UpdateFolder Update a folder + +Update an existing folder. This replaces the entire folder with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param folderId The unique identifier of the folder + @return ApiUpdateFolderRequest +*/ +func (a *MetricsFoldersAPIService) UpdateFolder(ctx context.Context, folderId int64) ApiUpdateFolderRequest { + return ApiUpdateFolderRequest{ + ApiService: a, + ctx: ctx, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseFolder +func (a *MetricsFoldersAPIService) UpdateFolderExecute(r ApiUpdateFolderRequest) (*ResponseFolder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseFolder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsFoldersAPIService.UpdateFolder") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.folderRequest == nil { + return localVarReturnValue, nil, reportError("folderRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.folderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_metrics_library_reports.go b/azion-api/api_metrics_library_reports.go new file mode 100644 index 0000000..143488e --- /dev/null +++ b/azion-api/api_metrics_library_reports.go @@ -0,0 +1,1100 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// MetricsLibraryReportsAPIService MetricsLibraryReportsAPI service +type MetricsLibraryReportsAPIService service + +type ApiCreateLibraryReportRequest struct { + ctx context.Context + ApiService *MetricsLibraryReportsAPIService + libraryReportRequest *LibraryReportRequest +} + +func (r ApiCreateLibraryReportRequest) LibraryReportRequest(libraryReportRequest LibraryReportRequest) ApiCreateLibraryReportRequest { + r.libraryReportRequest = &libraryReportRequest + return r +} + +func (r ApiCreateLibraryReportRequest) Execute() (*ResponseReport, *http.Response, error) { + return r.ApiService.CreateLibraryReportExecute(r) +} + +/* +CreateLibraryReport Create a new library report + +Create a new library report in a given scope. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateLibraryReportRequest +*/ +func (a *MetricsLibraryReportsAPIService) CreateLibraryReport(ctx context.Context) ApiCreateLibraryReportRequest { + return ApiCreateLibraryReportRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseReport +func (a *MetricsLibraryReportsAPIService) CreateLibraryReportExecute(r ApiCreateLibraryReportRequest) (*ResponseReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsLibraryReportsAPIService.CreateLibraryReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/library/reports" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.libraryReportRequest == nil { + return localVarReturnValue, nil, reportError("libraryReportRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.libraryReportRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteLibraryReportRequest struct { + ctx context.Context + ApiService *MetricsLibraryReportsAPIService + libraryReportId int64 +} + +func (r ApiDeleteLibraryReportRequest) Execute() (*ResponseDeleteReport, *http.Response, error) { + return r.ApiService.DeleteLibraryReportExecute(r) +} + +/* +DeleteLibraryReport Delete a library report + +Delete a specific library report. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param libraryReportId The unique identifier of the library report + @return ApiDeleteLibraryReportRequest +*/ +func (a *MetricsLibraryReportsAPIService) DeleteLibraryReport(ctx context.Context, libraryReportId int64) ApiDeleteLibraryReportRequest { + return ApiDeleteLibraryReportRequest{ + ApiService: a, + ctx: ctx, + libraryReportId: libraryReportId, + } +} + +// Execute executes the request +// @return ResponseDeleteReport +func (a *MetricsLibraryReportsAPIService) DeleteLibraryReportExecute(r ApiDeleteLibraryReportRequest) (*ResponseDeleteReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsLibraryReportsAPIService.DeleteLibraryReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/library/reports/{library_report_id}" + localVarPath = strings.Replace(localVarPath, "{"+"library_report_id"+"}", url.PathEscape(parameterValueToString(r.libraryReportId, "libraryReportId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.libraryReportId < 1 { + return localVarReturnValue, nil, reportError("libraryReportId must be greater than 1") + } + if r.libraryReportId > 2147483647 { + return localVarReturnValue, nil, reportError("libraryReportId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListLibraryReportsRequest struct { + ctx context.Context + ApiService *MetricsLibraryReportsAPIService + aggregationType *string + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + type_ *string +} + +// Filter by aggregation type (accepts comma-separated values). +func (r ApiListLibraryReportsRequest) AggregationType(aggregationType string) ApiListLibraryReportsRequest { + r.aggregationType = &aggregationType + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListLibraryReportsRequest) Fields(fields string) ApiListLibraryReportsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListLibraryReportsRequest) Id(id int64) ApiListLibraryReportsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListLibraryReportsRequest) Name(name string) ApiListLibraryReportsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListLibraryReportsRequest) Ordering(ordering string) ApiListLibraryReportsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListLibraryReportsRequest) Page(page int32) ApiListLibraryReportsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListLibraryReportsRequest) PageSize(pageSize int32) ApiListLibraryReportsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListLibraryReportsRequest) Search(search string) ApiListLibraryReportsRequest { + r.search = &search + return r +} + +// Filter by type (accepts comma-separated values). +func (r ApiListLibraryReportsRequest) Type_(type_ string) ApiListLibraryReportsRequest { + r.type_ = &type_ + return r +} + +func (r ApiListLibraryReportsRequest) Execute() (*PaginatedReportList, *http.Response, error) { + return r.ApiService.ListLibraryReportsExecute(r) +} + +/* +ListLibraryReports List of library reports + +List all library reports for your user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListLibraryReportsRequest +*/ +func (a *MetricsLibraryReportsAPIService) ListLibraryReports(ctx context.Context) ApiListLibraryReportsRequest { + return ApiListLibraryReportsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedReportList +func (a *MetricsLibraryReportsAPIService) ListLibraryReportsExecute(r ApiListLibraryReportsRequest) (*PaginatedReportList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedReportList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsLibraryReportsAPIService.ListLibraryReports") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/library/reports" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.aggregationType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "aggregation_type", r.aggregationType, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveLibraryReportRequest struct { + ctx context.Context + ApiService *MetricsLibraryReportsAPIService + libraryReportId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveLibraryReportRequest) Fields(fields string) ApiRetrieveLibraryReportRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveLibraryReportRequest) Execute() (*ResponseRetrieveReport, *http.Response, error) { + return r.ApiService.RetrieveLibraryReportExecute(r) +} + +/* +RetrieveLibraryReport Retrieve details from a library report + +Retrieve details from a specific library report. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param libraryReportId The unique identifier of the library report + @return ApiRetrieveLibraryReportRequest +*/ +func (a *MetricsLibraryReportsAPIService) RetrieveLibraryReport(ctx context.Context, libraryReportId int64) ApiRetrieveLibraryReportRequest { + return ApiRetrieveLibraryReportRequest{ + ApiService: a, + ctx: ctx, + libraryReportId: libraryReportId, + } +} + +// Execute executes the request +// @return ResponseRetrieveReport +func (a *MetricsLibraryReportsAPIService) RetrieveLibraryReportExecute(r ApiRetrieveLibraryReportRequest) (*ResponseRetrieveReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsLibraryReportsAPIService.RetrieveLibraryReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/library/reports/{library_report_id}" + localVarPath = strings.Replace(localVarPath, "{"+"library_report_id"+"}", url.PathEscape(parameterValueToString(r.libraryReportId, "libraryReportId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.libraryReportId < 1 { + return localVarReturnValue, nil, reportError("libraryReportId must be greater than 1") + } + if r.libraryReportId > 2147483647 { + return localVarReturnValue, nil, reportError("libraryReportId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateLibraryReportRequest struct { + ctx context.Context + ApiService *MetricsLibraryReportsAPIService + libraryReportId int64 + libraryReportRequest *LibraryReportRequest +} + +func (r ApiUpdateLibraryReportRequest) LibraryReportRequest(libraryReportRequest LibraryReportRequest) ApiUpdateLibraryReportRequest { + r.libraryReportRequest = &libraryReportRequest + return r +} + +func (r ApiUpdateLibraryReportRequest) Execute() (*ResponseReport, *http.Response, error) { + return r.ApiService.UpdateLibraryReportExecute(r) +} + +/* +UpdateLibraryReport Update a library report + +Update an existing library report. This replaces the entire report with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param libraryReportId The unique identifier of the library report + @return ApiUpdateLibraryReportRequest +*/ +func (a *MetricsLibraryReportsAPIService) UpdateLibraryReport(ctx context.Context, libraryReportId int64) ApiUpdateLibraryReportRequest { + return ApiUpdateLibraryReportRequest{ + ApiService: a, + ctx: ctx, + libraryReportId: libraryReportId, + } +} + +// Execute executes the request +// @return ResponseReport +func (a *MetricsLibraryReportsAPIService) UpdateLibraryReportExecute(r ApiUpdateLibraryReportRequest) (*ResponseReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsLibraryReportsAPIService.UpdateLibraryReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/library/reports/{library_report_id}" + localVarPath = strings.Replace(localVarPath, "{"+"library_report_id"+"}", url.PathEscape(parameterValueToString(r.libraryReportId, "libraryReportId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.libraryReportId < 1 { + return localVarReturnValue, nil, reportError("libraryReportId must be greater than 1") + } + if r.libraryReportId > 2147483647 { + return localVarReturnValue, nil, reportError("libraryReportId must be less than 2147483647") + } + if r.libraryReportRequest == nil { + return localVarReturnValue, nil, reportError("libraryReportRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.libraryReportRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_metrics_recommendations.go b/azion-api/api_metrics_recommendations.go new file mode 100644 index 0000000..e262eb6 --- /dev/null +++ b/azion-api/api_metrics_recommendations.go @@ -0,0 +1,639 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// MetricsRecommendationsAPIService MetricsRecommendationsAPI service +type MetricsRecommendationsAPIService service + +type ApiCreateRecommendationRequest struct { + ctx context.Context + ApiService *MetricsRecommendationsAPIService + recommendationRequest *RecommendationRequest +} + +func (r ApiCreateRecommendationRequest) RecommendationRequest(recommendationRequest RecommendationRequest) ApiCreateRecommendationRequest { + r.recommendationRequest = &recommendationRequest + return r +} + +func (r ApiCreateRecommendationRequest) Execute() (*ResponseFolder, *http.Response, error) { + return r.ApiService.CreateRecommendationExecute(r) +} + +/* +CreateRecommendation Create a new recommendation + +Create a new recommendation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateRecommendationRequest +*/ +func (a *MetricsRecommendationsAPIService) CreateRecommendation(ctx context.Context) ApiCreateRecommendationRequest { + return ApiCreateRecommendationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseFolder +func (a *MetricsRecommendationsAPIService) CreateRecommendationExecute(r ApiCreateRecommendationRequest) (*ResponseFolder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseFolder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRecommendationsAPIService.CreateRecommendation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/recommendations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.recommendationRequest == nil { + return localVarReturnValue, nil, reportError("recommendationRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.recommendationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRecommendationRequest struct { + ctx context.Context + ApiService *MetricsRecommendationsAPIService + recommendationId int64 +} + +func (r ApiDeleteRecommendationRequest) Execute() (*ResponseDeleteRecommendation, *http.Response, error) { + return r.ApiService.DeleteRecommendationExecute(r) +} + +/* +DeleteRecommendation Delete a recommendation + +Delete a specific recommendation. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param recommendationId The unique identifier of the recommendation + @return ApiDeleteRecommendationRequest +*/ +func (a *MetricsRecommendationsAPIService) DeleteRecommendation(ctx context.Context, recommendationId int64) ApiDeleteRecommendationRequest { + return ApiDeleteRecommendationRequest{ + ApiService: a, + ctx: ctx, + recommendationId: recommendationId, + } +} + +// Execute executes the request +// @return ResponseDeleteRecommendation +func (a *MetricsRecommendationsAPIService) DeleteRecommendationExecute(r ApiDeleteRecommendationRequest) (*ResponseDeleteRecommendation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteRecommendation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRecommendationsAPIService.DeleteRecommendation") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/recommendations/{recommendation_id}" + localVarPath = strings.Replace(localVarPath, "{"+"recommendation_id"+"}", url.PathEscape(parameterValueToString(r.recommendationId, "recommendationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.recommendationId < 1 { + return localVarReturnValue, nil, reportError("recommendationId must be greater than 1") + } + if r.recommendationId > 2147483647 { + return localVarReturnValue, nil, reportError("recommendationId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRecommendationsRequest struct { + ctx context.Context + ApiService *MetricsRecommendationsAPIService + dashboard *string + fields *string + id *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by dashboard ID (accepts comma-separated values). +func (r ApiListRecommendationsRequest) Dashboard(dashboard string) ApiListRecommendationsRequest { + r.dashboard = &dashboard + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListRecommendationsRequest) Fields(fields string) ApiListRecommendationsRequest { + r.fields = &fields + return r +} + +// Filter by recommendation ID (accepts comma-separated values). +func (r ApiListRecommendationsRequest) Id(id string) ApiListRecommendationsRequest { + r.id = &id + return r +} + +// Which field to use when ordering the results. +func (r ApiListRecommendationsRequest) Ordering(ordering string) ApiListRecommendationsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListRecommendationsRequest) Page(page int32) ApiListRecommendationsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListRecommendationsRequest) PageSize(pageSize int32) ApiListRecommendationsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListRecommendationsRequest) Search(search string) ApiListRecommendationsRequest { + r.search = &search + return r +} + +func (r ApiListRecommendationsRequest) Execute() (*PaginatedFolderList, *http.Response, error) { + return r.ApiService.ListRecommendationsExecute(r) +} + +/* +ListRecommendations List of the recommendations + +List all recommendations for your user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListRecommendationsRequest +*/ +func (a *MetricsRecommendationsAPIService) ListRecommendations(ctx context.Context) ApiListRecommendationsRequest { + return ApiListRecommendationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedFolderList +func (a *MetricsRecommendationsAPIService) ListRecommendationsExecute(r ApiListRecommendationsRequest) (*PaginatedFolderList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedFolderList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRecommendationsAPIService.ListRecommendations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/recommendations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.dashboard != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "dashboard", r.dashboard, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_metrics_reports.go b/azion-api/api_metrics_reports.go new file mode 100644 index 0000000..e73daf8 --- /dev/null +++ b/azion-api/api_metrics_reports.go @@ -0,0 +1,1491 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// MetricsReportsAPIService MetricsReportsAPI service +type MetricsReportsAPIService service + +type ApiCreateReportRequest struct { + ctx context.Context + ApiService *MetricsReportsAPIService + dashboardId int64 + folderId int64 + rowId int64 + reportRequest *ReportRequest +} + +func (r ApiCreateReportRequest) ReportRequest(reportRequest ReportRequest) ApiCreateReportRequest { + r.reportRequest = &reportRequest + return r +} + +func (r ApiCreateReportRequest) Execute() (*ResponseReport, *http.Response, error) { + return r.ApiService.CreateReportExecute(r) +} + +/* +CreateReport Create a new report + +Create a new report in a given scope. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param rowId The unique identifier of the row + @return ApiCreateReportRequest +*/ +func (a *MetricsReportsAPIService) CreateReport(ctx context.Context, dashboardId int64, folderId int64, rowId int64) ApiCreateReportRequest { + return ApiCreateReportRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseReport +func (a *MetricsReportsAPIService) CreateReportExecute(r ApiCreateReportRequest) (*ResponseReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsReportsAPIService.CreateReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + if r.reportRequest == nil { + return localVarReturnValue, nil, reportError("reportRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.reportRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteReportRequest struct { + ctx context.Context + ApiService *MetricsReportsAPIService + dashboardId int64 + folderId int64 + reportId int64 + rowId int64 +} + +func (r ApiDeleteReportRequest) Execute() (*ResponseDeleteReport, *http.Response, error) { + return r.ApiService.DeleteReportExecute(r) +} + +/* +DeleteReport Delete a report + +Delete a specific report. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param reportId The unique identifier of the report + @param rowId The unique identifier of the row + @return ApiDeleteReportRequest +*/ +func (a *MetricsReportsAPIService) DeleteReport(ctx context.Context, dashboardId int64, folderId int64, reportId int64, rowId int64) ApiDeleteReportRequest { + return ApiDeleteReportRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + reportId: reportId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseDeleteReport +func (a *MetricsReportsAPIService) DeleteReportExecute(r ApiDeleteReportRequest) (*ResponseDeleteReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsReportsAPIService.DeleteReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"report_id"+"}", url.PathEscape(parameterValueToString(r.reportId, "reportId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.reportId < 1 { + return localVarReturnValue, nil, reportError("reportId must be greater than 1") + } + if r.reportId > 2147483647 { + return localVarReturnValue, nil, reportError("reportId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListReportsRequest struct { + ctx context.Context + ApiService *MetricsReportsAPIService + dashboardId int64 + folderId int64 + rowId int64 + aggregationType *string + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + type_ *string +} + +// Filter by aggregation type (accepts comma-separated values). +func (r ApiListReportsRequest) AggregationType(aggregationType string) ApiListReportsRequest { + r.aggregationType = &aggregationType + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListReportsRequest) Fields(fields string) ApiListReportsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListReportsRequest) Id(id int64) ApiListReportsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListReportsRequest) Name(name string) ApiListReportsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListReportsRequest) Ordering(ordering string) ApiListReportsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListReportsRequest) Page(page int32) ApiListReportsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListReportsRequest) PageSize(pageSize int32) ApiListReportsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListReportsRequest) Search(search string) ApiListReportsRequest { + r.search = &search + return r +} + +// Filter by type (accepts comma-separated values). +func (r ApiListReportsRequest) Type_(type_ string) ApiListReportsRequest { + r.type_ = &type_ + return r +} + +func (r ApiListReportsRequest) Execute() (*PaginatedReportList, *http.Response, error) { + return r.ApiService.ListReportsExecute(r) +} + +/* +ListReports List of reports + +List all reports for your user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param rowId The unique identifier of the row + @return ApiListReportsRequest +*/ +func (a *MetricsReportsAPIService) ListReports(ctx context.Context, dashboardId int64, folderId int64, rowId int64) ApiListReportsRequest { + return ApiListReportsRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + rowId: rowId, + } +} + +// Execute executes the request +// @return PaginatedReportList +func (a *MetricsReportsAPIService) ListReportsExecute(r ApiListReportsRequest) (*PaginatedReportList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedReportList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsReportsAPIService.ListReports") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + + if r.aggregationType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "aggregation_type", r.aggregationType, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiOrderingReportRequest struct { + ctx context.Context + ApiService *MetricsReportsAPIService + dashboardId int64 + folderId int64 + rowId int64 + orderRequest *OrderRequest +} + +func (r ApiOrderingReportRequest) OrderRequest(orderRequest OrderRequest) ApiOrderingReportRequest { + r.orderRequest = &orderRequest + return r +} + +func (r ApiOrderingReportRequest) Execute() (*ResponseOrder, *http.Response, error) { + return r.ApiService.OrderingReportExecute(r) +} + +/* +OrderingReport Ordering reports in row + +Reorder all reports for a specific Row. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param rowId The unique identifier of the row + @return ApiOrderingReportRequest +*/ +func (a *MetricsReportsAPIService) OrderingReport(ctx context.Context, dashboardId int64, folderId int64, rowId int64) ApiOrderingReportRequest { + return ApiOrderingReportRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseOrder +func (a *MetricsReportsAPIService) OrderingReportExecute(r ApiOrderingReportRequest) (*ResponseOrder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseOrder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsReportsAPIService.OrderingReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/order" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + if r.orderRequest == nil { + return localVarReturnValue, nil, reportError("orderRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.orderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveReportRequest struct { + ctx context.Context + ApiService *MetricsReportsAPIService + dashboardId int64 + folderId int64 + reportId int64 + rowId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveReportRequest) Fields(fields string) ApiRetrieveReportRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveReportRequest) Execute() (*ResponseRetrieveReport, *http.Response, error) { + return r.ApiService.RetrieveReportExecute(r) +} + +/* +RetrieveReport Retrieve details from a report + +Retrieve details from a specific report. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param reportId The unique identifier of the report + @param rowId The unique identifier of the row + @return ApiRetrieveReportRequest +*/ +func (a *MetricsReportsAPIService) RetrieveReport(ctx context.Context, dashboardId int64, folderId int64, reportId int64, rowId int64) ApiRetrieveReportRequest { + return ApiRetrieveReportRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + reportId: reportId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseRetrieveReport +func (a *MetricsReportsAPIService) RetrieveReportExecute(r ApiRetrieveReportRequest) (*ResponseRetrieveReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsReportsAPIService.RetrieveReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"report_id"+"}", url.PathEscape(parameterValueToString(r.reportId, "reportId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.reportId < 1 { + return localVarReturnValue, nil, reportError("reportId must be greater than 1") + } + if r.reportId > 2147483647 { + return localVarReturnValue, nil, reportError("reportId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateReportRequest struct { + ctx context.Context + ApiService *MetricsReportsAPIService + dashboardId int64 + folderId int64 + reportId int64 + rowId int64 + reportRequest *ReportRequest +} + +func (r ApiUpdateReportRequest) ReportRequest(reportRequest ReportRequest) ApiUpdateReportRequest { + r.reportRequest = &reportRequest + return r +} + +func (r ApiUpdateReportRequest) Execute() (*ResponseReport, *http.Response, error) { + return r.ApiService.UpdateReportExecute(r) +} + +/* +UpdateReport Update a report + +Update an existing report. This replaces the entire report with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param reportId The unique identifier of the report + @param rowId The unique identifier of the row + @return ApiUpdateReportRequest +*/ +func (a *MetricsReportsAPIService) UpdateReport(ctx context.Context, dashboardId int64, folderId int64, reportId int64, rowId int64) ApiUpdateReportRequest { + return ApiUpdateReportRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + reportId: reportId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseReport +func (a *MetricsReportsAPIService) UpdateReportExecute(r ApiUpdateReportRequest) (*ResponseReport, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseReport + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsReportsAPIService.UpdateReport") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"report_id"+"}", url.PathEscape(parameterValueToString(r.reportId, "reportId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.reportId < 1 { + return localVarReturnValue, nil, reportError("reportId must be greater than 1") + } + if r.reportId > 2147483647 { + return localVarReturnValue, nil, reportError("reportId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + if r.reportRequest == nil { + return localVarReturnValue, nil, reportError("reportRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.reportRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_metrics_rows.go b/azion-api/api_metrics_rows.go new file mode 100644 index 0000000..71b54aa --- /dev/null +++ b/azion-api/api_metrics_rows.go @@ -0,0 +1,1411 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// MetricsRowsAPIService MetricsRowsAPI service +type MetricsRowsAPIService service + +type ApiCreateRowRequest struct { + ctx context.Context + ApiService *MetricsRowsAPIService + dashboardId int64 + folderId int64 + rowRequest *RowRequest +} + +func (r ApiCreateRowRequest) RowRequest(rowRequest RowRequest) ApiCreateRowRequest { + r.rowRequest = &rowRequest + return r +} + +func (r ApiCreateRowRequest) Execute() (*ResponseRow, *http.Response, error) { + return r.ApiService.CreateRowExecute(r) +} + +/* +CreateRow Create a new row + +Create a new row in dashboard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiCreateRowRequest +*/ +func (a *MetricsRowsAPIService) CreateRow(ctx context.Context, dashboardId int64, folderId int64) ApiCreateRowRequest { + return ApiCreateRowRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseRow +func (a *MetricsRowsAPIService) CreateRowExecute(r ApiCreateRowRequest) (*ResponseRow, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRow + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRowsAPIService.CreateRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowRequest == nil { + return localVarReturnValue, nil, reportError("rowRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rowRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteRowRequest struct { + ctx context.Context + ApiService *MetricsRowsAPIService + dashboardId int64 + folderId int64 + rowId int64 +} + +func (r ApiDeleteRowRequest) Execute() (*ResponseDeleteRow, *http.Response, error) { + return r.ApiService.DeleteRowExecute(r) +} + +/* +DeleteRow Delete a row + +Delete a specific row. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param rowId The unique identifier of the row + @return ApiDeleteRowRequest +*/ +func (a *MetricsRowsAPIService) DeleteRow(ctx context.Context, dashboardId int64, folderId int64, rowId int64) ApiDeleteRowRequest { + return ApiDeleteRowRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseDeleteRow +func (a *MetricsRowsAPIService) DeleteRowExecute(r ApiDeleteRowRequest) (*ResponseDeleteRow, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteRow + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRowsAPIService.DeleteRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRowsRequest struct { + ctx context.Context + ApiService *MetricsRowsAPIService + dashboardId int64 + folderId int64 + fields *string + id *int64 + ordering *string + page *int32 + pageSize *int32 + search *string + title *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListRowsRequest) Fields(fields string) ApiListRowsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListRowsRequest) Id(id int64) ApiListRowsRequest { + r.id = &id + return r +} + +// Which field to use when ordering the results. +func (r ApiListRowsRequest) Ordering(ordering string) ApiListRowsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListRowsRequest) Page(page int32) ApiListRowsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListRowsRequest) PageSize(pageSize int32) ApiListRowsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListRowsRequest) Search(search string) ApiListRowsRequest { + r.search = &search + return r +} + +// Filter by title (case-insensitive, partial match). +func (r ApiListRowsRequest) Title(title string) ApiListRowsRequest { + r.title = &title + return r +} + +func (r ApiListRowsRequest) Execute() (*PaginatedRowList, *http.Response, error) { + return r.ApiService.ListRowsExecute(r) +} + +/* +ListRows List of the rows + +List all rows in dashboards. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiListRowsRequest +*/ +func (a *MetricsRowsAPIService) ListRows(ctx context.Context, dashboardId int64, folderId int64) ApiListRowsRequest { + return ApiListRowsRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return PaginatedRowList +func (a *MetricsRowsAPIService) ListRowsExecute(r ApiListRowsRequest) (*PaginatedRowList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRowList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRowsAPIService.ListRows") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.title != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "title", r.title, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiOrderingRowRequest struct { + ctx context.Context + ApiService *MetricsRowsAPIService + dashboardId int64 + folderId int64 + orderRequest *OrderRequest +} + +func (r ApiOrderingRowRequest) OrderRequest(orderRequest OrderRequest) ApiOrderingRowRequest { + r.orderRequest = &orderRequest + return r +} + +func (r ApiOrderingRowRequest) Execute() (*ResponseOrder, *http.Response, error) { + return r.ApiService.OrderingRowExecute(r) +} + +/* +OrderingRow Ordering rows in dashboard + +Reorder all rows for a specific Dahsboard. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @return ApiOrderingRowRequest +*/ +func (a *MetricsRowsAPIService) OrderingRow(ctx context.Context, dashboardId int64, folderId int64) ApiOrderingRowRequest { + return ApiOrderingRowRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + } +} + +// Execute executes the request +// @return ResponseOrder +func (a *MetricsRowsAPIService) OrderingRowExecute(r ApiOrderingRowRequest) (*ResponseOrder, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseOrder + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRowsAPIService.OrderingRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/order" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.orderRequest == nil { + return localVarReturnValue, nil, reportError("orderRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.orderRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveRowRequest struct { + ctx context.Context + ApiService *MetricsRowsAPIService + dashboardId int64 + folderId int64 + rowId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveRowRequest) Fields(fields string) ApiRetrieveRowRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveRowRequest) Execute() (*ResponseRetrieveRow, *http.Response, error) { + return r.ApiService.RetrieveRowExecute(r) +} + +/* +RetrieveRow Retrieve details from a row + +Retrieve details from a specific row. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param rowId The unique identifier of the row + @return ApiRetrieveRowRequest +*/ +func (a *MetricsRowsAPIService) RetrieveRow(ctx context.Context, dashboardId int64, folderId int64, rowId int64) ApiRetrieveRowRequest { + return ApiRetrieveRowRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseRetrieveRow +func (a *MetricsRowsAPIService) RetrieveRowExecute(r ApiRetrieveRowRequest) (*ResponseRetrieveRow, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveRow + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRowsAPIService.RetrieveRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateRowRequest struct { + ctx context.Context + ApiService *MetricsRowsAPIService + dashboardId int64 + folderId int64 + rowId int64 + rowRequest *RowRequest +} + +func (r ApiUpdateRowRequest) RowRequest(rowRequest RowRequest) ApiUpdateRowRequest { + r.rowRequest = &rowRequest + return r +} + +func (r ApiUpdateRowRequest) Execute() (*ResponseRow, *http.Response, error) { + return r.ApiService.UpdateRowExecute(r) +} + +/* +UpdateRow Update a row + +Update an existing row. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param dashboardId The unique identifier of the dashboard + @param folderId The unique identifier of the folder + @param rowId The unique identifier of the row + @return ApiUpdateRowRequest +*/ +func (a *MetricsRowsAPIService) UpdateRow(ctx context.Context, dashboardId int64, folderId int64, rowId int64) ApiUpdateRowRequest { + return ApiUpdateRowRequest{ + ApiService: a, + ctx: ctx, + dashboardId: dashboardId, + folderId: folderId, + rowId: rowId, + } +} + +// Execute executes the request +// @return ResponseRow +func (a *MetricsRowsAPIService) UpdateRowExecute(r ApiUpdateRowRequest) (*ResponseRow, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRow + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MetricsRowsAPIService.UpdateRow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}" + localVarPath = strings.Replace(localVarPath, "{"+"dashboard_id"+"}", url.PathEscape(parameterValueToString(r.dashboardId, "dashboardId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"row_id"+"}", url.PathEscape(parameterValueToString(r.rowId, "rowId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.dashboardId < 1 { + return localVarReturnValue, nil, reportError("dashboardId must be greater than 1") + } + if r.dashboardId > 2147483647 { + return localVarReturnValue, nil, reportError("dashboardId must be less than 2147483647") + } + if r.folderId < 1 { + return localVarReturnValue, nil, reportError("folderId must be greater than 1") + } + if r.folderId > 2147483647 { + return localVarReturnValue, nil, reportError("folderId must be less than 2147483647") + } + if r.rowId < 1 { + return localVarReturnValue, nil, reportError("rowId must be greater than 1") + } + if r.rowId > 2147483647 { + return localVarReturnValue, nil, reportError("rowId must be less than 2147483647") + } + if r.rowRequest == nil { + return localVarReturnValue, nil, reportError("rowRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.rowRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_network_lists.go b/azion-api/api_network_lists.go new file mode 100644 index 0000000..5cfc0e0 --- /dev/null +++ b/azion-api/api_network_lists.go @@ -0,0 +1,1412 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// NetworkListsAPIService NetworkListsAPI service +type NetworkListsAPIService service + +type ApiCreateNetworkListRequest struct { + ctx context.Context + ApiService *NetworkListsAPIService + networkListRequest *NetworkListRequest +} + +func (r ApiCreateNetworkListRequest) NetworkListRequest(networkListRequest NetworkListRequest) ApiCreateNetworkListRequest { + r.networkListRequest = &networkListRequest + return r +} + +func (r ApiCreateNetworkListRequest) Execute() (*NetworkListResponse, *http.Response, error) { + return r.ApiService.CreateNetworkListExecute(r) +} + +/* +CreateNetworkList Create a Network List + +Create a new Network List in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateNetworkListRequest +*/ +func (a *NetworkListsAPIService) CreateNetworkList(ctx context.Context) ApiCreateNetworkListRequest { + return ApiCreateNetworkListRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return NetworkListResponse +func (a *NetworkListsAPIService) CreateNetworkListExecute(r ApiCreateNetworkListRequest) (*NetworkListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NetworkListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkListsAPIService.CreateNetworkList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/network_lists" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.networkListRequest == nil { + return localVarReturnValue, nil, reportError("networkListRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.networkListRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteNetworkListRequest struct { + ctx context.Context + ApiService *NetworkListsAPIService + networkListId int64 +} + +func (r ApiDeleteNetworkListRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteNetworkListExecute(r) +} + +/* +DeleteNetworkList Delete a Network List + +Delete a specific Network List in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param networkListId A unique integer value identifying the network list. + @return ApiDeleteNetworkListRequest +*/ +func (a *NetworkListsAPIService) DeleteNetworkList(ctx context.Context, networkListId int64) ApiDeleteNetworkListRequest { + return ApiDeleteNetworkListRequest{ + ApiService: a, + ctx: ctx, + networkListId: networkListId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *NetworkListsAPIService) DeleteNetworkListExecute(r ApiDeleteNetworkListRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkListsAPIService.DeleteNetworkList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/network_lists/{network_list_id}" + localVarPath = strings.Replace(localVarPath, "{"+"network_list_id"+"}", url.PathEscape(parameterValueToString(r.networkListId, "networkListId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListNetworkListsRequest struct { + ctx context.Context + ApiService *NetworkListsAPIService + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + listTypeIn *string + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListNetworkListsRequest) Fields(fields string) ApiListNetworkListsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListNetworkListsRequest) Id(id int64) ApiListNetworkListsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListNetworkListsRequest) LastEditor(lastEditor string) ApiListNetworkListsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListNetworkListsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListNetworkListsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListNetworkListsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListNetworkListsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by list type (accepts comma-separated values). +func (r ApiListNetworkListsRequest) ListTypeIn(listTypeIn string) ApiListNetworkListsRequest { + r.listTypeIn = &listTypeIn + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListNetworkListsRequest) Name(name string) ApiListNetworkListsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListNetworkListsRequest) Ordering(ordering string) ApiListNetworkListsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListNetworkListsRequest) Page(page int32) ApiListNetworkListsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListNetworkListsRequest) PageSize(pageSize int32) ApiListNetworkListsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListNetworkListsRequest) Search(search string) ApiListNetworkListsRequest { + r.search = &search + return r +} + +func (r ApiListNetworkListsRequest) Execute() (*PaginatedNetworkListSummaryList, *http.Response, error) { + return r.ApiService.ListNetworkListsExecute(r) +} + +/* +ListNetworkLists List Network Lists + +List all Network Lists owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListNetworkListsRequest +*/ +func (a *NetworkListsAPIService) ListNetworkLists(ctx context.Context) ApiListNetworkListsRequest { + return ApiListNetworkListsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedNetworkListSummaryList +func (a *NetworkListsAPIService) ListNetworkListsExecute(r ApiListNetworkListsRequest) (*PaginatedNetworkListSummaryList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedNetworkListSummaryList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkListsAPIService.ListNetworkLists") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/network_lists" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.listTypeIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "list_type__in", r.listTypeIn, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateNetworkListRequest struct { + ctx context.Context + ApiService *NetworkListsAPIService + networkListId int64 + patchedNetworkListRequest *PatchedNetworkListRequest +} + +func (r ApiPartialUpdateNetworkListRequest) PatchedNetworkListRequest(patchedNetworkListRequest PatchedNetworkListRequest) ApiPartialUpdateNetworkListRequest { + r.patchedNetworkListRequest = &patchedNetworkListRequest + return r +} + +func (r ApiPartialUpdateNetworkListRequest) Execute() (*NetworkListResponse, *http.Response, error) { + return r.ApiService.PartialUpdateNetworkListExecute(r) +} + +/* +PartialUpdateNetworkList Partially update a Network List + +Update one or more fields of an existing Network List without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param networkListId A unique integer value identifying the network list. + @return ApiPartialUpdateNetworkListRequest +*/ +func (a *NetworkListsAPIService) PartialUpdateNetworkList(ctx context.Context, networkListId int64) ApiPartialUpdateNetworkListRequest { + return ApiPartialUpdateNetworkListRequest{ + ApiService: a, + ctx: ctx, + networkListId: networkListId, + } +} + +// Execute executes the request +// @return NetworkListResponse +func (a *NetworkListsAPIService) PartialUpdateNetworkListExecute(r ApiPartialUpdateNetworkListRequest) (*NetworkListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NetworkListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkListsAPIService.PartialUpdateNetworkList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/network_lists/{network_list_id}" + localVarPath = strings.Replace(localVarPath, "{"+"network_list_id"+"}", url.PathEscape(parameterValueToString(r.networkListId, "networkListId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedNetworkListRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveNetworkListRequest struct { + ctx context.Context + ApiService *NetworkListsAPIService + networkListId int64 + fields *string + ipv4 *bool + ipv6 *bool +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveNetworkListRequest) Fields(fields string) ApiRetrieveNetworkListRequest { + r.fields = &fields + return r +} + +// Filter by IPv4. Only applicable for network lists of type 'ip_cidr'. +func (r ApiRetrieveNetworkListRequest) Ipv4(ipv4 bool) ApiRetrieveNetworkListRequest { + r.ipv4 = &ipv4 + return r +} + +// Filter by IPv6. Only applicable for network lists of type 'ip_cidr'. +func (r ApiRetrieveNetworkListRequest) Ipv6(ipv6 bool) ApiRetrieveNetworkListRequest { + r.ipv6 = &ipv6 + return r +} + +func (r ApiRetrieveNetworkListRequest) Execute() (*NetworkListResponse, *http.Response, error) { + return r.ApiService.RetrieveNetworkListExecute(r) +} + +/* +RetrieveNetworkList Retrieve details of a Network List + +Retrieve details of a specific Network List in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param networkListId A unique integer value identifying the network list. + @return ApiRetrieveNetworkListRequest +*/ +func (a *NetworkListsAPIService) RetrieveNetworkList(ctx context.Context, networkListId int64) ApiRetrieveNetworkListRequest { + return ApiRetrieveNetworkListRequest{ + ApiService: a, + ctx: ctx, + networkListId: networkListId, + } +} + +// Execute executes the request +// @return NetworkListResponse +func (a *NetworkListsAPIService) RetrieveNetworkListExecute(r ApiRetrieveNetworkListRequest) (*NetworkListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NetworkListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkListsAPIService.RetrieveNetworkList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/network_lists/{network_list_id}" + localVarPath = strings.Replace(localVarPath, "{"+"network_list_id"+"}", url.PathEscape(parameterValueToString(r.networkListId, "networkListId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ipv4 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ipv4", r.ipv4, "form", "") + } + if r.ipv6 != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ipv6", r.ipv6, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateNetworkListRequest struct { + ctx context.Context + ApiService *NetworkListsAPIService + networkListId int64 + networkListRequest *NetworkListRequest +} + +func (r ApiUpdateNetworkListRequest) NetworkListRequest(networkListRequest NetworkListRequest) ApiUpdateNetworkListRequest { + r.networkListRequest = &networkListRequest + return r +} + +func (r ApiUpdateNetworkListRequest) Execute() (*NetworkListResponse, *http.Response, error) { + return r.ApiService.UpdateNetworkListExecute(r) +} + +/* +UpdateNetworkList Update a Network List + +Update an existing Network List. This replaces the entire Network List with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param networkListId A unique integer value identifying the network list. + @return ApiUpdateNetworkListRequest +*/ +func (a *NetworkListsAPIService) UpdateNetworkList(ctx context.Context, networkListId int64) ApiUpdateNetworkListRequest { + return ApiUpdateNetworkListRequest{ + ApiService: a, + ctx: ctx, + networkListId: networkListId, + } +} + +// Execute executes the request +// @return NetworkListResponse +func (a *NetworkListsAPIService) UpdateNetworkListExecute(r ApiUpdateNetworkListRequest) (*NetworkListResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NetworkListResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "NetworkListsAPIService.UpdateNetworkList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/network_lists/{network_list_id}" + localVarPath = strings.Replace(localVarPath, "{"+"network_list_id"+"}", url.PathEscape(parameterValueToString(r.networkListId, "networkListId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.networkListRequest == nil { + return localVarReturnValue, nil, reportError("networkListRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.networkListRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_orchestrator_node_groups.go b/azion-api/api_orchestrator_node_groups.go new file mode 100644 index 0000000..9c5c03d --- /dev/null +++ b/azion-api/api_orchestrator_node_groups.go @@ -0,0 +1,914 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// OrchestratorNodeGroupsAPIService OrchestratorNodeGroupsAPI service +type OrchestratorNodeGroupsAPIService service + +type ApiBindNodeGroupRequest struct { + ctx context.Context + ApiService *OrchestratorNodeGroupsAPIService + nodeId int64 + nodeGroupsByIdRequest *NodeGroupsByIdRequest +} + +func (r ApiBindNodeGroupRequest) NodeGroupsByIdRequest(nodeGroupsByIdRequest NodeGroupsByIdRequest) ApiBindNodeGroupRequest { + r.nodeGroupsByIdRequest = &nodeGroupsByIdRequest + return r +} + +func (r ApiBindNodeGroupRequest) Execute() (*ResponseAsyncNodeGroupsById, *http.Response, error) { + return r.ApiService.BindNodeGroupExecute(r) +} + +/* +BindNodeGroup Bind Node Group + +Create a bind between Node and Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiBindNodeGroupRequest +*/ +func (a *OrchestratorNodeGroupsAPIService) BindNodeGroup(ctx context.Context, nodeId int64) ApiBindNodeGroupRequest { + return ApiBindNodeGroupRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncNodeGroupsById +func (a *OrchestratorNodeGroupsAPIService) BindNodeGroupExecute(r ApiBindNodeGroupRequest) (*ResponseAsyncNodeGroupsById, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncNodeGroupsById + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeGroupsAPIService.BindNodeGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/groups" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nodeGroupsByIdRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateNodeGroupRequest struct { + ctx context.Context + ApiService *OrchestratorNodeGroupsAPIService + nodeGroupsRequest *NodeGroupsRequest +} + +func (r ApiCreateNodeGroupRequest) NodeGroupsRequest(nodeGroupsRequest NodeGroupsRequest) ApiCreateNodeGroupRequest { + r.nodeGroupsRequest = &nodeGroupsRequest + return r +} + +func (r ApiCreateNodeGroupRequest) Execute() (*NodeGroups, *http.Response, error) { + return r.ApiService.CreateNodeGroupExecute(r) +} + +/* +CreateNodeGroup Create Node Group + +Create an Node Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateNodeGroupRequest +*/ +func (a *OrchestratorNodeGroupsAPIService) CreateNodeGroup(ctx context.Context) ApiCreateNodeGroupRequest { + return ApiCreateNodeGroupRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return NodeGroups +func (a *OrchestratorNodeGroupsAPIService) CreateNodeGroupExecute(r ApiCreateNodeGroupRequest) (*NodeGroups, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *NodeGroups + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeGroupsAPIService.CreateNodeGroup") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nodeGroupsRequest == nil { + return localVarReturnValue, nil, reportError("nodeGroupsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nodeGroupsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListNodeGroupsRequest struct { + ctx context.Context + ApiService *OrchestratorNodeGroupsAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListNodeGroupsRequest) Fields(fields string) ApiListNodeGroupsRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListNodeGroupsRequest) Ordering(ordering string) ApiListNodeGroupsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListNodeGroupsRequest) Page(page int32) ApiListNodeGroupsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListNodeGroupsRequest) PageSize(pageSize int32) ApiListNodeGroupsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListNodeGroupsRequest) Search(search string) ApiListNodeGroupsRequest { + r.search = &search + return r +} + +func (r ApiListNodeGroupsRequest) Execute() (*PaginatedNodeGroupsList, *http.Response, error) { + return r.ApiService.ListNodeGroupsExecute(r) +} + +/* +ListNodeGroups List Node Groups + +List all Groups of an Node. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListNodeGroupsRequest +*/ +func (a *OrchestratorNodeGroupsAPIService) ListNodeGroups(ctx context.Context) ApiListNodeGroupsRequest { + return ApiListNodeGroupsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedNodeGroupsList +func (a *OrchestratorNodeGroupsAPIService) ListNodeGroupsExecute(r ApiListNodeGroupsRequest) (*PaginatedNodeGroupsList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedNodeGroupsList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeGroupsAPIService.ListNodeGroups") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/groups" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListNodeGroupsByIDRequest struct { + ctx context.Context + ApiService *OrchestratorNodeGroupsAPIService + nodeId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListNodeGroupsByIDRequest) Fields(fields string) ApiListNodeGroupsByIDRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListNodeGroupsByIDRequest) Ordering(ordering string) ApiListNodeGroupsByIDRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListNodeGroupsByIDRequest) Page(page int32) ApiListNodeGroupsByIDRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListNodeGroupsByIDRequest) PageSize(pageSize int32) ApiListNodeGroupsByIDRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListNodeGroupsByIDRequest) Search(search string) ApiListNodeGroupsByIDRequest { + r.search = &search + return r +} + +func (r ApiListNodeGroupsByIDRequest) Execute() (*PaginatedNodeGroupsByIdList, *http.Response, error) { + return r.ApiService.ListNodeGroupsByIDExecute(r) +} + +/* +ListNodeGroupsByID List Node Groups by id + +List all Groups of an Node. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiListNodeGroupsByIDRequest +*/ +func (a *OrchestratorNodeGroupsAPIService) ListNodeGroupsByID(ctx context.Context, nodeId int64) ApiListNodeGroupsByIDRequest { + return ApiListNodeGroupsByIDRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return PaginatedNodeGroupsByIdList +func (a *OrchestratorNodeGroupsAPIService) ListNodeGroupsByIDExecute(r ApiListNodeGroupsByIDRequest) (*PaginatedNodeGroupsByIdList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedNodeGroupsByIdList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeGroupsAPIService.ListNodeGroupsByID") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/groups" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRemoveNodeGroupRequest struct { + ctx context.Context + ApiService *OrchestratorNodeGroupsAPIService + groupId int64 +} + +func (r ApiRemoveNodeGroupRequest) Execute() (*http.Response, error) { + return r.ApiService.RemoveNodeGroupExecute(r) +} + +/* +RemoveNodeGroup Remove Node Group + +Remove an Node Group. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param groupId + @return ApiRemoveNodeGroupRequest +*/ +func (a *OrchestratorNodeGroupsAPIService) RemoveNodeGroup(ctx context.Context, groupId int64) ApiRemoveNodeGroupRequest { + return ApiRemoveNodeGroupRequest{ + ApiService: a, + ctx: ctx, + groupId: groupId, + } +} + +// Execute executes the request +func (a *OrchestratorNodeGroupsAPIService) RemoveNodeGroupExecute(r ApiRemoveNodeGroupRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeGroupsAPIService.RemoveNodeGroup") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/groups/{group_id}" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", url.PathEscape(parameterValueToString(r.groupId, "groupId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/azion-api/api_orchestrator_node_services.go b/azion-api/api_orchestrator_node_services.go new file mode 100644 index 0000000..3f2ddf8 --- /dev/null +++ b/azion-api/api_orchestrator_node_services.go @@ -0,0 +1,920 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// OrchestratorNodeServicesAPIService OrchestratorNodeServicesAPI service +type OrchestratorNodeServicesAPIService service + +type ApiBindNodeServicesRequest struct { + ctx context.Context + ApiService *OrchestratorNodeServicesAPIService + nodeId int64 + nodeServicesRequest *NodeServicesRequest +} + +func (r ApiBindNodeServicesRequest) NodeServicesRequest(nodeServicesRequest NodeServicesRequest) ApiBindNodeServicesRequest { + r.nodeServicesRequest = &nodeServicesRequest + return r +} + +func (r ApiBindNodeServicesRequest) Execute() (*ResponseAsyncNodeServices, *http.Response, error) { + return r.ApiService.BindNodeServicesExecute(r) +} + +/* +BindNodeServices Bind Node Service + +Create a bind between Node and Service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiBindNodeServicesRequest +*/ +func (a *OrchestratorNodeServicesAPIService) BindNodeServices(ctx context.Context, nodeId int64) ApiBindNodeServicesRequest { + return ApiBindNodeServicesRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncNodeServices +func (a *OrchestratorNodeServicesAPIService) BindNodeServicesExecute(r ApiBindNodeServicesRequest) (*ResponseAsyncNodeServices, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncNodeServices + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeServicesAPIService.BindNodeServices") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/services" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nodeServicesRequest == nil { + return localVarReturnValue, nil, reportError("nodeServicesRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nodeServicesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListNodeServicesRequest struct { + ctx context.Context + ApiService *OrchestratorNodeServicesAPIService + nodeId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListNodeServicesRequest) Fields(fields string) ApiListNodeServicesRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListNodeServicesRequest) Ordering(ordering string) ApiListNodeServicesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListNodeServicesRequest) Page(page int32) ApiListNodeServicesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListNodeServicesRequest) PageSize(pageSize int32) ApiListNodeServicesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListNodeServicesRequest) Search(search string) ApiListNodeServicesRequest { + r.search = &search + return r +} + +func (r ApiListNodeServicesRequest) Execute() (*PaginatedNodeServicesList, *http.Response, error) { + return r.ApiService.ListNodeServicesExecute(r) +} + +/* +ListNodeServices List Node Services + +List all Services from an Node. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiListNodeServicesRequest +*/ +func (a *OrchestratorNodeServicesAPIService) ListNodeServices(ctx context.Context, nodeId int64) ApiListNodeServicesRequest { + return ApiListNodeServicesRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return PaginatedNodeServicesList +func (a *OrchestratorNodeServicesAPIService) ListNodeServicesExecute(r ApiListNodeServicesRequest) (*PaginatedNodeServicesList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedNodeServicesList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeServicesAPIService.ListNodeServices") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/services" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveNodeServiceBindRequest struct { + ctx context.Context + ApiService *OrchestratorNodeServicesAPIService + bindId int64 + nodeId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveNodeServiceBindRequest) Fields(fields string) ApiRetrieveNodeServiceBindRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveNodeServiceBindRequest) Execute() (*ResponseRetrieveNodeServiceBind, *http.Response, error) { + return r.ApiService.RetrieveNodeServiceBindExecute(r) +} + +/* +RetrieveNodeServiceBind Retrieve details of an Node Service Bind + +Retrieve details of a specific Node Service Bind in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bindId + @param nodeId + @return ApiRetrieveNodeServiceBindRequest +*/ +func (a *OrchestratorNodeServicesAPIService) RetrieveNodeServiceBind(ctx context.Context, bindId int64, nodeId int64) ApiRetrieveNodeServiceBindRequest { + return ApiRetrieveNodeServiceBindRequest{ + ApiService: a, + ctx: ctx, + bindId: bindId, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseRetrieveNodeServiceBind +func (a *OrchestratorNodeServicesAPIService) RetrieveNodeServiceBindExecute(r ApiRetrieveNodeServiceBindRequest) (*ResponseRetrieveNodeServiceBind, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveNodeServiceBind + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeServicesAPIService.RetrieveNodeServiceBind") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/services/{bind_id}" + localVarPath = strings.Replace(localVarPath, "{"+"bind_id"+"}", url.PathEscape(parameterValueToString(r.bindId, "bindId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUnbindNodeServiceRequest struct { + ctx context.Context + ApiService *OrchestratorNodeServicesAPIService + bindId int64 + nodeId int64 +} + +func (r ApiUnbindNodeServiceRequest) Execute() (*ResponseAsyncDeleteNodeServiceBind, *http.Response, error) { + return r.ApiService.UnbindNodeServiceExecute(r) +} + +/* +UnbindNodeService Unbind Node Service + +Remove the bind between Node and Service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bindId + @param nodeId + @return ApiUnbindNodeServiceRequest +*/ +func (a *OrchestratorNodeServicesAPIService) UnbindNodeService(ctx context.Context, bindId int64, nodeId int64) ApiUnbindNodeServiceRequest { + return ApiUnbindNodeServiceRequest{ + ApiService: a, + ctx: ctx, + bindId: bindId, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncDeleteNodeServiceBind +func (a *OrchestratorNodeServicesAPIService) UnbindNodeServiceExecute(r ApiUnbindNodeServiceRequest) (*ResponseAsyncDeleteNodeServiceBind, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncDeleteNodeServiceBind + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodeServicesAPIService.UnbindNodeService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/services/{bind_id}" + localVarPath = strings.Replace(localVarPath, "{"+"bind_id"+"}", url.PathEscape(parameterValueToString(r.bindId, "bindId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_orchestrator_nodes.go b/azion-api/api_orchestrator_nodes.go new file mode 100644 index 0000000..5f947df --- /dev/null +++ b/azion-api/api_orchestrator_nodes.go @@ -0,0 +1,1781 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// OrchestratorNodesAPIService OrchestratorNodesAPI service +type OrchestratorNodesAPIService service + +type ApiDeleteNodeRequest struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId string +} + +func (r ApiDeleteNodeRequest) Execute() (*ResponseAsyncDeleteNodes, *http.Response, error) { + return r.ApiService.DeleteNodeExecute(r) +} + +/* +DeleteNode Delete an Node + +Delete an Node. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiDeleteNodeRequest +*/ +func (a *OrchestratorNodesAPIService) DeleteNode(ctx context.Context, nodeId string) ApiDeleteNodeRequest { + return ApiDeleteNodeRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncDeleteNodes +func (a *OrchestratorNodesAPIService) DeleteNodeExecute(r ApiDeleteNodeRequest) (*ResponseAsyncDeleteNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncDeleteNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.DeleteNode") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListNodesRequest struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + fields *string + hashId *string + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListNodesRequest) Fields(fields string) ApiListNodesRequest { + r.fields = &fields + return r +} + +// Search by hash_id +func (r ApiListNodesRequest) HashId(hashId string) ApiListNodesRequest { + r.hashId = &hashId + return r +} + +// Search by name +func (r ApiListNodesRequest) Name(name string) ApiListNodesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListNodesRequest) Ordering(ordering string) ApiListNodesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListNodesRequest) Page(page int32) ApiListNodesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListNodesRequest) PageSize(pageSize int32) ApiListNodesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListNodesRequest) Search(search string) ApiListNodesRequest { + r.search = &search + return r +} + +func (r ApiListNodesRequest) Execute() (*PaginatedNodesList, *http.Response, error) { + return r.ApiService.ListNodesExecute(r) +} + +/* +ListNodes List Nodes + +List all Nodes of your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListNodesRequest +*/ +func (a *OrchestratorNodesAPIService) ListNodes(ctx context.Context) ApiListNodesRequest { + return ApiListNodesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedNodesList +func (a *OrchestratorNodesAPIService) ListNodesExecute(r ApiListNodesRequest) (*PaginatedNodesList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedNodesList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.ListNodes") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.hashId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "hash_id", r.hashId, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateNodeRequest struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId string + patchedNodesRequest *PatchedNodesRequest +} + +func (r ApiPartialUpdateNodeRequest) PatchedNodesRequest(patchedNodesRequest PatchedNodesRequest) ApiPartialUpdateNodeRequest { + r.patchedNodesRequest = &patchedNodesRequest + return r +} + +func (r ApiPartialUpdateNodeRequest) Execute() (*ResponseAsyncNodes, *http.Response, error) { + return r.ApiService.PartialUpdateNodeExecute(r) +} + +/* +PartialUpdateNode Partially update an Node + +Update one or more fields of an existing Node without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiPartialUpdateNodeRequest +*/ +func (a *OrchestratorNodesAPIService) PartialUpdateNode(ctx context.Context, nodeId string) ApiPartialUpdateNodeRequest { + return ApiPartialUpdateNodeRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncNodes +func (a *OrchestratorNodesAPIService) PartialUpdateNodeExecute(r ApiPartialUpdateNodeRequest) (*ResponseAsyncNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.PartialUpdateNode") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedNodesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateNode2Request struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId int64 + patchedNodesRequest *PatchedNodesRequest +} + +func (r ApiPartialUpdateNode2Request) PatchedNodesRequest(patchedNodesRequest PatchedNodesRequest) ApiPartialUpdateNode2Request { + r.patchedNodesRequest = &patchedNodesRequest + return r +} + +func (r ApiPartialUpdateNode2Request) Execute() (*ResponseAsyncNodes, *http.Response, error) { + return r.ApiService.PartialUpdateNode2Execute(r) +} + +/* +PartialUpdateNode2 Partially update an Node + +Update one or more fields of an existing Node without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiPartialUpdateNode2Request +*/ +func (a *OrchestratorNodesAPIService) PartialUpdateNode2(ctx context.Context, nodeId int64) ApiPartialUpdateNode2Request { + return ApiPartialUpdateNode2Request{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncNodes +func (a *OrchestratorNodesAPIService) PartialUpdateNode2Execute(r ApiPartialUpdateNode2Request) (*ResponseAsyncNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.PartialUpdateNode2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedNodesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveNodeRequest struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveNodeRequest) Fields(fields string) ApiRetrieveNodeRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveNodeRequest) Execute() (*ResponseRetrieveNodes, *http.Response, error) { + return r.ApiService.RetrieveNodeExecute(r) +} + +/* +RetrieveNode Retrieve details of an Node + +Retrieve details of a specific Node in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiRetrieveNodeRequest +*/ +func (a *OrchestratorNodesAPIService) RetrieveNode(ctx context.Context, nodeId string) ApiRetrieveNodeRequest { + return ApiRetrieveNodeRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseRetrieveNodes +func (a *OrchestratorNodesAPIService) RetrieveNodeExecute(r ApiRetrieveNodeRequest) (*ResponseRetrieveNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.RetrieveNode") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveNode2Request struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveNode2Request) Fields(fields string) ApiRetrieveNode2Request { + r.fields = &fields + return r +} + +func (r ApiRetrieveNode2Request) Execute() (*ResponseRetrieveNodes, *http.Response, error) { + return r.ApiService.RetrieveNode2Execute(r) +} + +/* +RetrieveNode2 Retrieve details of an Node + +Retrieve details of a specific Node in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiRetrieveNode2Request +*/ +func (a *OrchestratorNodesAPIService) RetrieveNode2(ctx context.Context, nodeId int64) ApiRetrieveNode2Request { + return ApiRetrieveNode2Request{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseRetrieveNodes +func (a *OrchestratorNodesAPIService) RetrieveNode2Execute(r ApiRetrieveNode2Request) (*ResponseRetrieveNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.RetrieveNode2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateNodeRequest struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId string + nodesRequest *NodesRequest +} + +func (r ApiUpdateNodeRequest) NodesRequest(nodesRequest NodesRequest) ApiUpdateNodeRequest { + r.nodesRequest = &nodesRequest + return r +} + +func (r ApiUpdateNodeRequest) Execute() (*ResponseAsyncNodes, *http.Response, error) { + return r.ApiService.UpdateNodeExecute(r) +} + +/* +UpdateNode Update an Node + +Update an existing Node. This replaces the entire Node with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiUpdateNodeRequest +*/ +func (a *OrchestratorNodesAPIService) UpdateNode(ctx context.Context, nodeId string) ApiUpdateNodeRequest { + return ApiUpdateNodeRequest{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncNodes +func (a *OrchestratorNodesAPIService) UpdateNodeExecute(r ApiUpdateNodeRequest) (*ResponseAsyncNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.UpdateNode") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nodesRequest == nil { + return localVarReturnValue, nil, reportError("nodesRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nodesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateNode2Request struct { + ctx context.Context + ApiService *OrchestratorNodesAPIService + nodeId int64 + nodesRequest *NodesRequest +} + +func (r ApiUpdateNode2Request) NodesRequest(nodesRequest NodesRequest) ApiUpdateNode2Request { + r.nodesRequest = &nodesRequest + return r +} + +func (r ApiUpdateNode2Request) Execute() (*ResponseAsyncNodes, *http.Response, error) { + return r.ApiService.UpdateNode2Execute(r) +} + +/* +UpdateNode2 Update an Node + +Update an existing Node. This replaces the entire Node with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param nodeId + @return ApiUpdateNode2Request +*/ +func (a *OrchestratorNodesAPIService) UpdateNode2(ctx context.Context, nodeId int64) ApiUpdateNode2Request { + return ApiUpdateNode2Request{ + ApiService: a, + ctx: ctx, + nodeId: nodeId, + } +} + +// Execute executes the request +// @return ResponseAsyncNodes +func (a *OrchestratorNodesAPIService) UpdateNode2Execute(r ApiUpdateNode2Request) (*ResponseAsyncNodes, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncNodes + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorNodesAPIService.UpdateNode2") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/nodes/{node_id}/" + localVarPath = strings.Replace(localVarPath, "{"+"node_id"+"}", url.PathEscape(parameterValueToString(r.nodeId, "nodeId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.nodesRequest == nil { + return localVarReturnValue, nil, reportError("nodesRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.nodesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_orchestrator_service_resources.go b/azion-api/api_orchestrator_service_resources.go new file mode 100644 index 0000000..c097db0 --- /dev/null +++ b/azion-api/api_orchestrator_service_resources.go @@ -0,0 +1,1026 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// OrchestratorServiceResourcesAPIService OrchestratorServiceResourcesAPI service +type OrchestratorServiceResourcesAPIService service + +type ApiCreateResourceRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + serviceId int64 + serviceResourceRequest *ServiceResourceRequest +} + +func (r ApiCreateResourceRequest) ServiceResourceRequest(serviceResourceRequest ServiceResourceRequest) ApiCreateResourceRequest { + r.serviceResourceRequest = &serviceResourceRequest + return r +} + +func (r ApiCreateResourceRequest) Execute() (*ServiceResource, *http.Response, error) { + return r.ApiService.CreateResourceExecute(r) +} + +/* +CreateResource Create Service Resource + +Create a Resource on a Service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId + @return ApiCreateResourceRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) CreateResource(ctx context.Context, serviceId int64) ApiCreateResourceRequest { + return ApiCreateResourceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ServiceResource +func (a *OrchestratorServiceResourcesAPIService) CreateResourceExecute(r ApiCreateResourceRequest) (*ServiceResource, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceResource + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.CreateResource") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceResourceRequest == nil { + return localVarReturnValue, nil, reportError("serviceResourceRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceResourceRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteResourceRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + resourceId int64 + serviceId int64 +} + +func (r ApiDeleteResourceRequest) Execute() (*http.Response, error) { + return r.ApiService.DeleteResourceExecute(r) +} + +/* +DeleteResource Delete Resource + +Delete Resource from your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId + @param serviceId + @return ApiDeleteResourceRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) DeleteResource(ctx context.Context, resourceId int64, serviceId int64) ApiDeleteResourceRequest { + return ApiDeleteResourceRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + serviceId: serviceId, + } +} + +// Execute executes the request +func (a *OrchestratorServiceResourcesAPIService) DeleteResourceExecute(r ApiDeleteResourceRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.DeleteResource") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources/{resource_id}" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type ApiListResourcesOfAServiceRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + serviceId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListResourcesOfAServiceRequest) Fields(fields string) ApiListResourcesOfAServiceRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListResourcesOfAServiceRequest) Ordering(ordering string) ApiListResourcesOfAServiceRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListResourcesOfAServiceRequest) Page(page int32) ApiListResourcesOfAServiceRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListResourcesOfAServiceRequest) PageSize(pageSize int32) ApiListResourcesOfAServiceRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListResourcesOfAServiceRequest) Search(search string) ApiListResourcesOfAServiceRequest { + r.search = &search + return r +} + +func (r ApiListResourcesOfAServiceRequest) Execute() (*PaginatedServiceResourceList, *http.Response, error) { + return r.ApiService.ListResourcesOfAServiceExecute(r) +} + +/* +ListResourcesOfAService List Service Resources + +List all resources of a Service owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId + @return ApiListResourcesOfAServiceRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) ListResourcesOfAService(ctx context.Context, serviceId int64) ApiListResourcesOfAServiceRequest { + return ApiListResourcesOfAServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return PaginatedServiceResourceList +func (a *OrchestratorServiceResourcesAPIService) ListResourcesOfAServiceExecute(r ApiListResourcesOfAServiceRequest) (*PaginatedServiceResourceList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedServiceResourceList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.ListResourcesOfAService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveResourceRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + resourceId int64 + serviceId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveResourceRequest) Fields(fields string) ApiRetrieveResourceRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveResourceRequest) Execute() (*ServiceResourceId, *http.Response, error) { + return r.ApiService.RetrieveResourceExecute(r) +} + +/* +RetrieveResource Retrieve details of a Resource + +Retrieve details of a specific Resource in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId + @param serviceId + @return ApiRetrieveResourceRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) RetrieveResource(ctx context.Context, resourceId int64, serviceId int64) ApiRetrieveResourceRequest { + return ApiRetrieveResourceRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ServiceResourceId +func (a *OrchestratorServiceResourcesAPIService) RetrieveResourceExecute(r ApiRetrieveResourceRequest) (*ServiceResourceId, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceResourceId + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.RetrieveResource") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources/{resource_id}" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveResourceContentRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + resourceId int64 + serviceId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveResourceContentRequest) Fields(fields string) ApiRetrieveResourceContentRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveResourceContentRequest) Execute() (*Content, *http.Response, error) { + return r.ApiService.RetrieveResourceContentExecute(r) +} + +/* +RetrieveResourceContent Retrieve content of a Resource + +Retrieve content of a resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId + @param serviceId + @return ApiRetrieveResourceContentRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) RetrieveResourceContent(ctx context.Context, resourceId int64, serviceId int64) ApiRetrieveResourceContentRequest { + return ApiRetrieveResourceContentRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return Content +func (a *OrchestratorServiceResourcesAPIService) RetrieveResourceContentExecute(r ApiRetrieveResourceContentRequest) (*Content, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Content + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.RetrieveResourceContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources/{resource_id}/content" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateResourceRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + resourceId int64 + serviceId int64 + serviceResourceIdRequest *ServiceResourceIdRequest +} + +func (r ApiUpdateResourceRequest) ServiceResourceIdRequest(serviceResourceIdRequest ServiceResourceIdRequest) ApiUpdateResourceRequest { + r.serviceResourceIdRequest = &serviceResourceIdRequest + return r +} + +func (r ApiUpdateResourceRequest) Execute() (*ServiceResourceId, *http.Response, error) { + return r.ApiService.UpdateResourceExecute(r) +} + +/* +UpdateResource Update Resource + +Update Resource in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId + @param serviceId + @return ApiUpdateResourceRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) UpdateResource(ctx context.Context, resourceId int64, serviceId int64) ApiUpdateResourceRequest { + return ApiUpdateResourceRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ServiceResourceId +func (a *OrchestratorServiceResourcesAPIService) UpdateResourceExecute(r ApiUpdateResourceRequest) (*ServiceResourceId, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ServiceResourceId + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.UpdateResource") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources/{resource_id}" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.serviceResourceIdRequest == nil { + return localVarReturnValue, nil, reportError("serviceResourceIdRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.serviceResourceIdRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUploadResourceContentRequest struct { + ctx context.Context + ApiService *OrchestratorServiceResourcesAPIService + resourceId int64 + serviceId int64 + contentRequest *ContentRequest +} + +func (r ApiUploadResourceContentRequest) ContentRequest(contentRequest ContentRequest) ApiUploadResourceContentRequest { + r.contentRequest = &contentRequest + return r +} + +func (r ApiUploadResourceContentRequest) Execute() (*Content, *http.Response, error) { + return r.ApiService.UploadResourceContentExecute(r) +} + +/* +UploadResourceContent Upload content of a Resource + +Upload content of a Resource. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param resourceId + @param serviceId + @return ApiUploadResourceContentRequest +*/ +func (a *OrchestratorServiceResourcesAPIService) UploadResourceContent(ctx context.Context, resourceId int64, serviceId int64) ApiUploadResourceContentRequest { + return ApiUploadResourceContentRequest{ + ApiService: a, + ctx: ctx, + resourceId: resourceId, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return Content +func (a *OrchestratorServiceResourcesAPIService) UploadResourceContentExecute(r ApiUploadResourceContentRequest) (*Content, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *Content + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServiceResourcesAPIService.UploadResourceContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}/resources/{resource_id}/content" + localVarPath = strings.Replace(localVarPath, "{"+"resource_id"+"}", url.PathEscape(parameterValueToString(r.resourceId, "resourceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.contentRequest == nil { + return localVarReturnValue, nil, reportError("contentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.contentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_orchestrator_services.go b/azion-api/api_orchestrator_services.go new file mode 100644 index 0000000..77a36c4 --- /dev/null +++ b/azion-api/api_orchestrator_services.go @@ -0,0 +1,1325 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// OrchestratorServicesAPIService OrchestratorServicesAPI service +type OrchestratorServicesAPIService service + +type ApiCreateServiceRequest struct { + ctx context.Context + ApiService *OrchestratorServicesAPIService + servicesRequest *ServicesRequest +} + +func (r ApiCreateServiceRequest) ServicesRequest(servicesRequest ServicesRequest) ApiCreateServiceRequest { + r.servicesRequest = &servicesRequest + return r +} + +func (r ApiCreateServiceRequest) Execute() (*ResponseAsyncServices, *http.Response, error) { + return r.ApiService.CreateServiceExecute(r) +} + +/* +CreateService Create Service + +Create an Service. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateServiceRequest +*/ +func (a *OrchestratorServicesAPIService) CreateService(ctx context.Context) ApiCreateServiceRequest { + return ApiCreateServiceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseAsyncServices +func (a *OrchestratorServicesAPIService) CreateServiceExecute(r ApiCreateServiceRequest) (*ResponseAsyncServices, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncServices + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServicesAPIService.CreateService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.servicesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDestroyServiceRequest struct { + ctx context.Context + ApiService *OrchestratorServicesAPIService + serviceId int64 +} + +func (r ApiDestroyServiceRequest) Execute() (*ResponseAsyncDeleteServices, *http.Response, error) { + return r.ApiService.DestroyServiceExecute(r) +} + +/* +DestroyService Destroy an Service + +Destruction of a specific Service in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId + @return ApiDestroyServiceRequest +*/ +func (a *OrchestratorServicesAPIService) DestroyService(ctx context.Context, serviceId int64) ApiDestroyServiceRequest { + return ApiDestroyServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ResponseAsyncDeleteServices +func (a *OrchestratorServicesAPIService) DestroyServiceExecute(r ApiDestroyServiceRequest) (*ResponseAsyncDeleteServices, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncDeleteServices + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServicesAPIService.DestroyService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListServicesRequest struct { + ctx context.Context + ApiService *OrchestratorServicesAPIService + fields *string + name *string + ordering *string + page *int32 + pageSize *int32 +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListServicesRequest) Fields(fields string) ApiListServicesRequest { + r.fields = &fields + return r +} + +// Search by name +func (r ApiListServicesRequest) Name(name string) ApiListServicesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListServicesRequest) Ordering(ordering string) ApiListServicesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListServicesRequest) Page(page int32) ApiListServicesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListServicesRequest) PageSize(pageSize int32) ApiListServicesRequest { + r.pageSize = &pageSize + return r +} + +func (r ApiListServicesRequest) Execute() (*PaginatedServicesList, *http.Response, error) { + return r.ApiService.ListServicesExecute(r) +} + +/* +ListServices List Services + +Get the list of Services of your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListServicesRequest +*/ +func (a *OrchestratorServicesAPIService) ListServices(ctx context.Context) ApiListServicesRequest { + return ApiListServicesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedServicesList +func (a *OrchestratorServicesAPIService) ListServicesExecute(r ApiListServicesRequest) (*PaginatedServicesList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedServicesList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServicesAPIService.ListServices") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateServiceRequest struct { + ctx context.Context + ApiService *OrchestratorServicesAPIService + serviceId int64 + patchedServicesRequest *PatchedServicesRequest +} + +func (r ApiPartialUpdateServiceRequest) PatchedServicesRequest(patchedServicesRequest PatchedServicesRequest) ApiPartialUpdateServiceRequest { + r.patchedServicesRequest = &patchedServicesRequest + return r +} + +func (r ApiPartialUpdateServiceRequest) Execute() (*ResponseAsyncServices, *http.Response, error) { + return r.ApiService.PartialUpdateServiceExecute(r) +} + +/* +PartialUpdateService Partially update an Service + +Update one or more fields of an existing Service without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId + @return ApiPartialUpdateServiceRequest +*/ +func (a *OrchestratorServicesAPIService) PartialUpdateService(ctx context.Context, serviceId int64) ApiPartialUpdateServiceRequest { + return ApiPartialUpdateServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ResponseAsyncServices +func (a *OrchestratorServicesAPIService) PartialUpdateServiceExecute(r ApiPartialUpdateServiceRequest) (*ResponseAsyncServices, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncServices + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServicesAPIService.PartialUpdateService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedServicesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveServiceRequest struct { + ctx context.Context + ApiService *OrchestratorServicesAPIService + serviceId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveServiceRequest) Fields(fields string) ApiRetrieveServiceRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveServiceRequest) Execute() (*ResponseRetrieveServices, *http.Response, error) { + return r.ApiService.RetrieveServiceExecute(r) +} + +/* +RetrieveService Retrieve details of an Service + +Retrieve details of a specific Service in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId + @return ApiRetrieveServiceRequest +*/ +func (a *OrchestratorServicesAPIService) RetrieveService(ctx context.Context, serviceId int64) ApiRetrieveServiceRequest { + return ApiRetrieveServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ResponseRetrieveServices +func (a *OrchestratorServicesAPIService) RetrieveServiceExecute(r ApiRetrieveServiceRequest) (*ResponseRetrieveServices, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveServices + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServicesAPIService.RetrieveService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateServiceRequest struct { + ctx context.Context + ApiService *OrchestratorServicesAPIService + serviceId string + servicesRequest *ServicesRequest +} + +func (r ApiUpdateServiceRequest) ServicesRequest(servicesRequest ServicesRequest) ApiUpdateServiceRequest { + r.servicesRequest = &servicesRequest + return r +} + +func (r ApiUpdateServiceRequest) Execute() (*ResponseAsyncServices, *http.Response, error) { + return r.ApiService.UpdateServiceExecute(r) +} + +/* +UpdateService Update an Service + +Update an existing Service replacing all fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param serviceId + @return ApiUpdateServiceRequest +*/ +func (a *OrchestratorServicesAPIService) UpdateService(ctx context.Context, serviceId string) ApiUpdateServiceRequest { + return ApiUpdateServiceRequest{ + ApiService: a, + ctx: ctx, + serviceId: serviceId, + } +} + +// Execute executes the request +// @return ResponseAsyncServices +func (a *OrchestratorServicesAPIService) UpdateServiceExecute(r ApiUpdateServiceRequest) (*ResponseAsyncServices, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseAsyncServices + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrchestratorServicesAPIService.UpdateService") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/orchestrator/services/{service_id}" + localVarPath = strings.Replace(localVarPath, "{"+"service_id"+"}", url.PathEscape(parameterValueToString(r.serviceId, "serviceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.servicesRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_policy_lockout_policy.go b/azion-api/api_policy_lockout_policy.go new file mode 100644 index 0000000..420c992 --- /dev/null +++ b/azion-api/api_policy_lockout_policy.go @@ -0,0 +1,445 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PolicyLockoutPolicyAPIService PolicyLockoutPolicyAPI service +type PolicyLockoutPolicyAPIService service + +type ApiRetrieveLockoutPolicyRequest struct { + ctx context.Context + ApiService *PolicyLockoutPolicyAPIService + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveLockoutPolicyRequest) Fields(fields string) ApiRetrieveLockoutPolicyRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveLockoutPolicyRequest) Execute() (*LockoutPolicyResponse, *http.Response, error) { + return r.ApiService.RetrieveLockoutPolicyExecute(r) +} + +/* +RetrieveLockoutPolicy Get Lockout Policy + +Get Lockout Policy for the current account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRetrieveLockoutPolicyRequest +*/ +func (a *PolicyLockoutPolicyAPIService) RetrieveLockoutPolicy(ctx context.Context) ApiRetrieveLockoutPolicyRequest { + return ApiRetrieveLockoutPolicyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return LockoutPolicyResponse +func (a *PolicyLockoutPolicyAPIService) RetrieveLockoutPolicyExecute(r ApiRetrieveLockoutPolicyRequest) (*LockoutPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LockoutPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyLockoutPolicyAPIService.RetrieveLockoutPolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/lockout" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateLockoutPolicyRequest struct { + ctx context.Context + ApiService *PolicyLockoutPolicyAPIService + lockoutPolicyRequest *LockoutPolicyRequest +} + +func (r ApiUpdateLockoutPolicyRequest) LockoutPolicyRequest(lockoutPolicyRequest LockoutPolicyRequest) ApiUpdateLockoutPolicyRequest { + r.lockoutPolicyRequest = &lockoutPolicyRequest + return r +} + +func (r ApiUpdateLockoutPolicyRequest) Execute() (*LockoutPolicyResponse, *http.Response, error) { + return r.ApiService.UpdateLockoutPolicyExecute(r) +} + +/* +UpdateLockoutPolicy Put Lockout Policy + +Put Lockout Policy for the current account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateLockoutPolicyRequest +*/ +func (a *PolicyLockoutPolicyAPIService) UpdateLockoutPolicy(ctx context.Context) ApiUpdateLockoutPolicyRequest { + return ApiUpdateLockoutPolicyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return LockoutPolicyResponse +func (a *PolicyLockoutPolicyAPIService) UpdateLockoutPolicyExecute(r ApiUpdateLockoutPolicyRequest) (*LockoutPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *LockoutPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyLockoutPolicyAPIService.UpdateLockoutPolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/lockout" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.lockoutPolicyRequest == nil { + return localVarReturnValue, nil, reportError("lockoutPolicyRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.lockoutPolicyRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_policy_policies.go b/azion-api/api_policy_policies.go new file mode 100644 index 0000000..9dd9075 --- /dev/null +++ b/azion-api/api_policy_policies.go @@ -0,0 +1,1331 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// PolicyPoliciesAPIService PolicyPoliciesAPI service +type PolicyPoliciesAPIService service + +type ApiCreatePolicyRequest struct { + ctx context.Context + ApiService *PolicyPoliciesAPIService + policyRequest *PolicyRequest +} + +func (r ApiCreatePolicyRequest) PolicyRequest(policyRequest PolicyRequest) ApiCreatePolicyRequest { + r.policyRequest = &policyRequest + return r +} + +func (r ApiCreatePolicyRequest) Execute() (*PolicyResponse, *http.Response, error) { + return r.ApiService.CreatePolicyExecute(r) +} + +/* +CreatePolicy Create a new policy + +Create a new policy for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatePolicyRequest +*/ +func (a *PolicyPoliciesAPIService) CreatePolicy(ctx context.Context) ApiCreatePolicyRequest { + return ApiCreatePolicyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PolicyResponse +func (a *PolicyPoliciesAPIService) CreatePolicyExecute(r ApiCreatePolicyRequest) (*PolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyPoliciesAPIService.CreatePolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.policyRequest == nil { + return localVarReturnValue, nil, reportError("policyRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.policyRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletePolicyRequest struct { + ctx context.Context + ApiService *PolicyPoliciesAPIService + policyId int64 +} + +func (r ApiDeletePolicyRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeletePolicyExecute(r) +} + +/* +DeletePolicy Delete a policy + +Delete a specific policy from your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param policyId A unique integer value identifying the policy. + @return ApiDeletePolicyRequest +*/ +func (a *PolicyPoliciesAPIService) DeletePolicy(ctx context.Context, policyId int64) ApiDeletePolicyRequest { + return ApiDeletePolicyRequest{ + ApiService: a, + ctx: ctx, + policyId: policyId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *PolicyPoliciesAPIService) DeletePolicyExecute(r ApiDeletePolicyRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyPoliciesAPIService.DeletePolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/{policy_id}" + localVarPath = strings.Replace(localVarPath, "{"+"policy_id"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListPolicyRequest struct { + ctx context.Context + ApiService *PolicyPoliciesAPIService + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListPolicyRequest) Fields(fields string) ApiListPolicyRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListPolicyRequest) Ordering(ordering string) ApiListPolicyRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListPolicyRequest) Page(page int32) ApiListPolicyRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListPolicyRequest) PageSize(pageSize int32) ApiListPolicyRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListPolicyRequest) Search(search string) ApiListPolicyRequest { + r.search = &search + return r +} + +func (r ApiListPolicyRequest) Execute() (*PaginatedPolicyList, *http.Response, error) { + return r.ApiService.ListPolicyExecute(r) +} + +/* +ListPolicy List of account policies + +List all your account policies. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPolicyRequest +*/ +func (a *PolicyPoliciesAPIService) ListPolicy(ctx context.Context) ApiListPolicyRequest { + return ApiListPolicyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedPolicyList +func (a *PolicyPoliciesAPIService) ListPolicyExecute(r ApiListPolicyRequest) (*PaginatedPolicyList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPolicyList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyPoliciesAPIService.ListPolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdatePolicyRequest struct { + ctx context.Context + ApiService *PolicyPoliciesAPIService + policyId int64 + patchedPolicyRequest *PatchedPolicyRequest +} + +func (r ApiPartialUpdatePolicyRequest) PatchedPolicyRequest(patchedPolicyRequest PatchedPolicyRequest) ApiPartialUpdatePolicyRequest { + r.patchedPolicyRequest = &patchedPolicyRequest + return r +} + +func (r ApiPartialUpdatePolicyRequest) Execute() (*PolicyResponse, *http.Response, error) { + return r.ApiService.PartialUpdatePolicyExecute(r) +} + +/* +PartialUpdatePolicy Partially update a policy + +Update one or more fields of an existing policy without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param policyId A unique integer value identifying the policy. + @return ApiPartialUpdatePolicyRequest +*/ +func (a *PolicyPoliciesAPIService) PartialUpdatePolicy(ctx context.Context, policyId int64) ApiPartialUpdatePolicyRequest { + return ApiPartialUpdatePolicyRequest{ + ApiService: a, + ctx: ctx, + policyId: policyId, + } +} + +// Execute executes the request +// @return PolicyResponse +func (a *PolicyPoliciesAPIService) PartialUpdatePolicyExecute(r ApiPartialUpdatePolicyRequest) (*PolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyPoliciesAPIService.PartialUpdatePolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/{policy_id}" + localVarPath = strings.Replace(localVarPath, "{"+"policy_id"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedPolicyRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrievePolicyRequest struct { + ctx context.Context + ApiService *PolicyPoliciesAPIService + policyId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrievePolicyRequest) Fields(fields string) ApiRetrievePolicyRequest { + r.fields = &fields + return r +} + +func (r ApiRetrievePolicyRequest) Execute() (*PolicyResponse, *http.Response, error) { + return r.ApiService.RetrievePolicyExecute(r) +} + +/* +RetrievePolicy Retrieve details from a policy + +Retrieve details from a specific policy from your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param policyId A unique integer value identifying the policy. + @return ApiRetrievePolicyRequest +*/ +func (a *PolicyPoliciesAPIService) RetrievePolicy(ctx context.Context, policyId int64) ApiRetrievePolicyRequest { + return ApiRetrievePolicyRequest{ + ApiService: a, + ctx: ctx, + policyId: policyId, + } +} + +// Execute executes the request +// @return PolicyResponse +func (a *PolicyPoliciesAPIService) RetrievePolicyExecute(r ApiRetrievePolicyRequest) (*PolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyPoliciesAPIService.RetrievePolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/{policy_id}" + localVarPath = strings.Replace(localVarPath, "{"+"policy_id"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatePolicyRequest struct { + ctx context.Context + ApiService *PolicyPoliciesAPIService + policyId int64 + policyRequest *PolicyRequest +} + +func (r ApiUpdatePolicyRequest) PolicyRequest(policyRequest PolicyRequest) ApiUpdatePolicyRequest { + r.policyRequest = &policyRequest + return r +} + +func (r ApiUpdatePolicyRequest) Execute() (*PolicyResponse, *http.Response, error) { + return r.ApiService.UpdatePolicyExecute(r) +} + +/* +UpdatePolicy Update a policy + +Update an existing policy. This replaces all policy rules with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param policyId A unique integer value identifying the policy. + @return ApiUpdatePolicyRequest +*/ +func (a *PolicyPoliciesAPIService) UpdatePolicy(ctx context.Context, policyId int64) ApiUpdatePolicyRequest { + return ApiUpdatePolicyRequest{ + ApiService: a, + ctx: ctx, + policyId: policyId, + } +} + +// Execute executes the request +// @return PolicyResponse +func (a *PolicyPoliciesAPIService) UpdatePolicyExecute(r ApiUpdatePolicyRequest) (*PolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicyPoliciesAPIService.UpdatePolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/{policy_id}" + localVarPath = strings.Replace(localVarPath, "{"+"policy_id"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.policyRequest == nil { + return localVarReturnValue, nil, reportError("policyRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.policyRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_policy_session_timeout_policy.go b/azion-api/api_policy_session_timeout_policy.go new file mode 100644 index 0000000..7c80223 --- /dev/null +++ b/azion-api/api_policy_session_timeout_policy.go @@ -0,0 +1,445 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PolicySessionTimeoutPolicyAPIService PolicySessionTimeoutPolicyAPI service +type PolicySessionTimeoutPolicyAPIService service + +type ApiRetrieveSessionTimeoutPolicyRequest struct { + ctx context.Context + ApiService *PolicySessionTimeoutPolicyAPIService + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveSessionTimeoutPolicyRequest) Fields(fields string) ApiRetrieveSessionTimeoutPolicyRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveSessionTimeoutPolicyRequest) Execute() (*SessionTimeoutPolicyResponse, *http.Response, error) { + return r.ApiService.RetrieveSessionTimeoutPolicyExecute(r) +} + +/* +RetrieveSessionTimeoutPolicy Get Session Timeout Policy + +Get Session Timeout Policy for the current account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiRetrieveSessionTimeoutPolicyRequest +*/ +func (a *PolicySessionTimeoutPolicyAPIService) RetrieveSessionTimeoutPolicy(ctx context.Context) ApiRetrieveSessionTimeoutPolicyRequest { + return ApiRetrieveSessionTimeoutPolicyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return SessionTimeoutPolicyResponse +func (a *PolicySessionTimeoutPolicyAPIService) RetrieveSessionTimeoutPolicyExecute(r ApiRetrieveSessionTimeoutPolicyRequest) (*SessionTimeoutPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SessionTimeoutPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicySessionTimeoutPolicyAPIService.RetrieveSessionTimeoutPolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/session" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateSessionTimeoutPolicyRequest struct { + ctx context.Context + ApiService *PolicySessionTimeoutPolicyAPIService + sessionTimeoutPolicyRequest *SessionTimeoutPolicyRequest +} + +func (r ApiUpdateSessionTimeoutPolicyRequest) SessionTimeoutPolicyRequest(sessionTimeoutPolicyRequest SessionTimeoutPolicyRequest) ApiUpdateSessionTimeoutPolicyRequest { + r.sessionTimeoutPolicyRequest = &sessionTimeoutPolicyRequest + return r +} + +func (r ApiUpdateSessionTimeoutPolicyRequest) Execute() (*SessionTimeoutPolicyResponse, *http.Response, error) { + return r.ApiService.UpdateSessionTimeoutPolicyExecute(r) +} + +/* +UpdateSessionTimeoutPolicy Put Session Timeout Policy + +Put Session Timeout Policy for the current account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdateSessionTimeoutPolicyRequest +*/ +func (a *PolicySessionTimeoutPolicyAPIService) UpdateSessionTimeoutPolicy(ctx context.Context) ApiUpdateSessionTimeoutPolicyRequest { + return ApiUpdateSessionTimeoutPolicyRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return SessionTimeoutPolicyResponse +func (a *PolicySessionTimeoutPolicyAPIService) UpdateSessionTimeoutPolicyExecute(r ApiUpdateSessionTimeoutPolicyRequest) (*SessionTimeoutPolicyResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SessionTimeoutPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PolicySessionTimeoutPolicyAPIService.UpdateSessionTimeoutPolicy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/auth/policies/session" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sessionTimeoutPolicyRequest == nil { + return localVarReturnValue, nil, reportError("sessionTimeoutPolicyRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sessionTimeoutPolicyRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_publisher_management.go b/azion-api/api_publisher_management.go new file mode 100644 index 0000000..3a4538f --- /dev/null +++ b/azion-api/api_publisher_management.go @@ -0,0 +1,445 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// PublisherManagementAPIService PublisherManagementAPI service +type PublisherManagementAPIService service + +type ApiGetPublisherDetailsRequest struct { + ctx context.Context + ApiService *PublisherManagementAPIService + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiGetPublisherDetailsRequest) Fields(fields string) ApiGetPublisherDetailsRequest { + r.fields = &fields + return r +} + +func (r ApiGetPublisherDetailsRequest) Execute() (*ResponseRetrievePublisher, *http.Response, error) { + return r.ApiService.GetPublisherDetailsExecute(r) +} + +/* +GetPublisherDetails Get publisher details + +Get details of the publisher associated with the authenticated user's organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiGetPublisherDetailsRequest +*/ +func (a *PublisherManagementAPIService) GetPublisherDetails(ctx context.Context) ApiGetPublisherDetailsRequest { + return ApiGetPublisherDetailsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseRetrievePublisher +func (a *PublisherManagementAPIService) GetPublisherDetailsExecute(r ApiGetPublisherDetailsRequest) (*ResponseRetrievePublisher, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrievePublisher + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublisherManagementAPIService.GetPublisherDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/marketplace/publisher" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatePublisherDetailsRequest struct { + ctx context.Context + ApiService *PublisherManagementAPIService + publisherRequest *PublisherRequest +} + +func (r ApiUpdatePublisherDetailsRequest) PublisherRequest(publisherRequest PublisherRequest) ApiUpdatePublisherDetailsRequest { + r.publisherRequest = &publisherRequest + return r +} + +func (r ApiUpdatePublisherDetailsRequest) Execute() (*ResponsePublisher, *http.Response, error) { + return r.ApiService.UpdatePublisherDetailsExecute(r) +} + +/* +UpdatePublisherDetails Update publisher details + +Update details of the publisher associated with the authenticated user's organization + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiUpdatePublisherDetailsRequest +*/ +func (a *PublisherManagementAPIService) UpdatePublisherDetails(ctx context.Context) ApiUpdatePublisherDetailsRequest { + return ApiUpdatePublisherDetailsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponsePublisher +func (a *PublisherManagementAPIService) UpdatePublisherDetailsExecute(r ApiUpdatePublisherDetailsRequest) (*ResponsePublisher, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponsePublisher + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PublisherManagementAPIService.UpdatePublisherDetails") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/marketplace/publisher" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.publisherRequest == nil { + return localVarReturnValue, nil, reportError("publisherRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.publisherRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_purge.go b/azion-api/api_purge.go new file mode 100644 index 0000000..6712e96 --- /dev/null +++ b/azion-api/api_purge.go @@ -0,0 +1,240 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// PurgeAPIService PurgeAPI service +type PurgeAPIService service + +type ApiCreatePurgeRequestRequest struct { + ctx context.Context + ApiService *PurgeAPIService + purgeType string + purgeRequest *PurgeRequest +} + +func (r ApiCreatePurgeRequestRequest) PurgeRequest(purgeRequest PurgeRequest) ApiCreatePurgeRequestRequest { + r.purgeRequest = &purgeRequest + return r +} + +func (r ApiCreatePurgeRequestRequest) Execute() (*PurgeResponse, *http.Response, error) { + return r.ApiService.CreatePurgeRequestExecute(r) +} + +/* +CreatePurgeRequest Create a Purge Request + +Create a new Purge Request in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param purgeType type of purge: URL, Wildcard or Cachekey + @return ApiCreatePurgeRequestRequest +*/ +func (a *PurgeAPIService) CreatePurgeRequest(ctx context.Context, purgeType string) ApiCreatePurgeRequestRequest { + return ApiCreatePurgeRequestRequest{ + ApiService: a, + ctx: ctx, + purgeType: purgeType, + } +} + +// Execute executes the request +// @return PurgeResponse +func (a *PurgeAPIService) CreatePurgeRequestExecute(r ApiCreatePurgeRequestRequest) (*PurgeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PurgeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PurgeAPIService.CreatePurgeRequest") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/purge/{purge_type}" + localVarPath = strings.Replace(localVarPath, "{"+"purge_type"+"}", url.PathEscape(parameterValueToString(r.purgeType, "purgeType")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.purgeRequest == nil { + return localVarReturnValue, nil, reportError("purgeRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.purgeRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_sql.go b/azion-api/api_sql.go new file mode 100644 index 0000000..7bf8c80 --- /dev/null +++ b/azion-api/api_sql.go @@ -0,0 +1,1232 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// SQLAPIService SQLAPI service +type SQLAPIService service + +type ApiCreateDatabaseRequest struct { + ctx context.Context + ApiService *SQLAPIService + databaseRequest *DatabaseRequest +} + +func (r ApiCreateDatabaseRequest) DatabaseRequest(databaseRequest DatabaseRequest) ApiCreateDatabaseRequest { + r.databaseRequest = &databaseRequest + return r +} + +func (r ApiCreateDatabaseRequest) Execute() (*DatabaseDetailResponse, *http.Response, error) { + return r.ApiService.CreateDatabaseExecute(r) +} + +/* +CreateDatabase Create a database + +Create a new database for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateDatabaseRequest +*/ +func (a *SQLAPIService) CreateDatabase(ctx context.Context) ApiCreateDatabaseRequest { + return ApiCreateDatabaseRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return DatabaseDetailResponse +func (a *SQLAPIService) CreateDatabaseExecute(r ApiCreateDatabaseRequest) (*DatabaseDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatabaseDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SQLAPIService.CreateDatabase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/sql/databases" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.databaseRequest == nil { + return localVarReturnValue, nil, reportError("databaseRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.databaseRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteDatabaseRequest struct { + ctx context.Context + ApiService *SQLAPIService + databaseId int64 +} + +func (r ApiDeleteDatabaseRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteDatabaseExecute(r) +} + +/* +DeleteDatabase Delete a database + +Schedule the deletion of a specific database in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param databaseId A unique integer value identifying this database. + @return ApiDeleteDatabaseRequest +*/ +func (a *SQLAPIService) DeleteDatabase(ctx context.Context, databaseId int64) ApiDeleteDatabaseRequest { + return ApiDeleteDatabaseRequest{ + ApiService: a, + ctx: ctx, + databaseId: databaseId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *SQLAPIService) DeleteDatabaseExecute(r ApiDeleteDatabaseRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SQLAPIService.DeleteDatabase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/sql/databases/{database_id}" + localVarPath = strings.Replace(localVarPath, "{"+"database_id"+"}", url.PathEscape(parameterValueToString(r.databaseId, "databaseId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiExecuteQueryRequest struct { + ctx context.Context + ApiService *SQLAPIService + databaseId int64 + sQLStatementsRequest *SQLStatementsRequest +} + +func (r ApiExecuteQueryRequest) SQLStatementsRequest(sQLStatementsRequest SQLStatementsRequest) ApiExecuteQueryRequest { + r.sQLStatementsRequest = &sQLStatementsRequest + return r +} + +func (r ApiExecuteQueryRequest) Execute() (*SQLResultResponse, *http.Response, error) { + return r.ApiService.ExecuteQueryExecute(r) +} + +/* +ExecuteQuery Execute a query into a database + +Execute a query into a database for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param databaseId A unique integer value identifying this database. + @return ApiExecuteQueryRequest +*/ +func (a *SQLAPIService) ExecuteQuery(ctx context.Context, databaseId int64) ApiExecuteQueryRequest { + return ApiExecuteQueryRequest{ + ApiService: a, + ctx: ctx, + databaseId: databaseId, + } +} + +// Execute executes the request +// @return SQLResultResponse +func (a *SQLAPIService) ExecuteQueryExecute(r ApiExecuteQueryRequest) (*SQLResultResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SQLResultResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SQLAPIService.ExecuteQuery") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/sql/databases/{database_id}/query" + localVarPath = strings.Replace(localVarPath, "{"+"database_id"+"}", url.PathEscape(parameterValueToString(r.databaseId, "databaseId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.sQLStatementsRequest == nil { + return localVarReturnValue, nil, reportError("sQLStatementsRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.sQLStatementsRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListDatabasesRequest struct { + ctx context.Context + ApiService *SQLAPIService + active *bool + createdAtGte *time.Time + createdAtLte *time.Time + fields *string + id *int64 + lastEditor *string + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + status *string + updatedAtGte *time.Time + updatedAtLte *time.Time +} + +// Filter by active status. +func (r ApiListDatabasesRequest) Active(active bool) ApiListDatabasesRequest { + r.active = &active + return r +} + +// Filter by created_at (greater than or equal). +func (r ApiListDatabasesRequest) CreatedAtGte(createdAtGte time.Time) ApiListDatabasesRequest { + r.createdAtGte = &createdAtGte + return r +} + +// Filter by created_at (less than or equal). +func (r ApiListDatabasesRequest) CreatedAtLte(createdAtLte time.Time) ApiListDatabasesRequest { + r.createdAtLte = &createdAtLte + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListDatabasesRequest) Fields(fields string) ApiListDatabasesRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListDatabasesRequest) Id(id int64) ApiListDatabasesRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListDatabasesRequest) LastEditor(lastEditor string) ApiListDatabasesRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListDatabasesRequest) Name(name string) ApiListDatabasesRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListDatabasesRequest) Ordering(ordering string) ApiListDatabasesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListDatabasesRequest) Page(page int32) ApiListDatabasesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListDatabasesRequest) PageSize(pageSize int32) ApiListDatabasesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListDatabasesRequest) Search(search string) ApiListDatabasesRequest { + r.search = &search + return r +} + +// Filter by status (accepts comma-separated values). +func (r ApiListDatabasesRequest) Status(status string) ApiListDatabasesRequest { + r.status = &status + return r +} + +// Filter by updated_at (greater than or equal). +func (r ApiListDatabasesRequest) UpdatedAtGte(updatedAtGte time.Time) ApiListDatabasesRequest { + r.updatedAtGte = &updatedAtGte + return r +} + +// Filter by updated_at (less than or equal). +func (r ApiListDatabasesRequest) UpdatedAtLte(updatedAtLte time.Time) ApiListDatabasesRequest { + r.updatedAtLte = &updatedAtLte + return r +} + +func (r ApiListDatabasesRequest) Execute() (*PaginatedDatabaseDetailList, *http.Response, error) { + return r.ApiService.ListDatabasesExecute(r) +} + +/* +ListDatabases List databases + +List all databases owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListDatabasesRequest +*/ +func (a *SQLAPIService) ListDatabases(ctx context.Context) ApiListDatabasesRequest { + return ApiListDatabasesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedDatabaseDetailList +func (a *SQLAPIService) ListDatabasesExecute(r ApiListDatabasesRequest) (*PaginatedDatabaseDetailList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedDatabaseDetailList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SQLAPIService.ListDatabases") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/sql/databases" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.createdAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at__gte", r.createdAtGte, "form", "") + } + if r.createdAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at__lte", r.createdAtLte, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.updatedAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_at__gte", r.updatedAtGte, "form", "") + } + if r.updatedAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_at__lte", r.updatedAtLte, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveDatabaseRequest struct { + ctx context.Context + ApiService *SQLAPIService + databaseId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveDatabaseRequest) Fields(fields string) ApiRetrieveDatabaseRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveDatabaseRequest) Execute() (*DatabaseDetailResponse, *http.Response, error) { + return r.ApiService.RetrieveDatabaseExecute(r) +} + +/* +RetrieveDatabase Retrieve details from a database + +Retrieve details from a specific database in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param databaseId A unique integer value identifying this database. + @return ApiRetrieveDatabaseRequest +*/ +func (a *SQLAPIService) RetrieveDatabase(ctx context.Context, databaseId int64) ApiRetrieveDatabaseRequest { + return ApiRetrieveDatabaseRequest{ + ApiService: a, + ctx: ctx, + databaseId: databaseId, + } +} + +// Execute executes the request +// @return DatabaseDetailResponse +func (a *SQLAPIService) RetrieveDatabaseExecute(r ApiRetrieveDatabaseRequest) (*DatabaseDetailResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DatabaseDetailResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SQLAPIService.RetrieveDatabase") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/sql/databases/{database_id}" + localVarPath = strings.Replace(localVarPath, "{"+"database_id"+"}", url.PathEscape(parameterValueToString(r.databaseId, "databaseId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_storage_buckets.go b/azion-api/api_storage_buckets.go new file mode 100644 index 0000000..0f4ddce --- /dev/null +++ b/azion-api/api_storage_buckets.go @@ -0,0 +1,1237 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// StorageBucketsAPIService StorageBucketsAPI service +type StorageBucketsAPIService service + +type ApiCreateBucketRequest struct { + ctx context.Context + ApiService *StorageBucketsAPIService + bucketCreateRequest *BucketCreateRequest +} + +func (r ApiCreateBucketRequest) BucketCreateRequest(bucketCreateRequest BucketCreateRequest) ApiCreateBucketRequest { + r.bucketCreateRequest = &bucketCreateRequest + return r +} + +func (r ApiCreateBucketRequest) Execute() (*BucketCreateResponse, *http.Response, error) { + return r.ApiService.CreateBucketExecute(r) +} + +/* +CreateBucket Create a new bucket + +Create a new bucket. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateBucketRequest +*/ +func (a *StorageBucketsAPIService) CreateBucket(ctx context.Context) ApiCreateBucketRequest { + return ApiCreateBucketRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return BucketCreateResponse +func (a *StorageBucketsAPIService) CreateBucketExecute(r ApiCreateBucketRequest) (*BucketCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BucketCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageBucketsAPIService.CreateBucket") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.bucketCreateRequest == nil { + return localVarReturnValue, nil, reportError("bucketCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.bucketCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteBucketRequest struct { + ctx context.Context + ApiService *StorageBucketsAPIService + bucketName string +} + +func (r ApiDeleteBucketRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteBucketExecute(r) +} + +/* +DeleteBucket Delete a bucket + +Delete a specific bucket. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @return ApiDeleteBucketRequest +*/ +func (a *StorageBucketsAPIService) DeleteBucket(ctx context.Context, bucketName string) ApiDeleteBucketRequest { + return ApiDeleteBucketRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *StorageBucketsAPIService) DeleteBucketExecute(r ApiDeleteBucketRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageBucketsAPIService.DeleteBucket") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListBucketsRequest struct { + ctx context.Context + ApiService *StorageBucketsAPIService + bucket *string + created *time.Time + createdGte *time.Time + createdLte *time.Time + description *string + fields *string + lastEditor *string + lastModified *time.Time + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string + status *string + workloadsAccess *string +} + +// Filter by bucket (exact match). +func (r ApiListBucketsRequest) Bucket(bucket string) ApiListBucketsRequest { + r.bucket = &bucket + return r +} + +// Filter by creation date (exact match). +func (r ApiListBucketsRequest) Created(created time.Time) ApiListBucketsRequest { + r.created = &created + return r +} + +// Filter by creation date (greater than or equal). +func (r ApiListBucketsRequest) CreatedGte(createdGte time.Time) ApiListBucketsRequest { + r.createdGte = &createdGte + return r +} + +// Filter by creation date (less than or equal). +func (r ApiListBucketsRequest) CreatedLte(createdLte time.Time) ApiListBucketsRequest { + r.createdLte = &createdLte + return r +} + +// Filter by description (case-insensitive, partial match). +func (r ApiListBucketsRequest) Description(description string) ApiListBucketsRequest { + r.description = &description + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListBucketsRequest) Fields(fields string) ApiListBucketsRequest { + r.fields = &fields + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListBucketsRequest) LastEditor(lastEditor string) ApiListBucketsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (exact match). +func (r ApiListBucketsRequest) LastModified(lastModified time.Time) ApiListBucketsRequest { + r.lastModified = &lastModified + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListBucketsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListBucketsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListBucketsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListBucketsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListBucketsRequest) Name(name string) ApiListBucketsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListBucketsRequest) Ordering(ordering string) ApiListBucketsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListBucketsRequest) Page(page int32) ApiListBucketsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListBucketsRequest) PageSize(pageSize int32) ApiListBucketsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListBucketsRequest) Search(search string) ApiListBucketsRequest { + r.search = &search + return r +} + +// Filter by status (accepts comma-separated values). +func (r ApiListBucketsRequest) Status(status string) ApiListBucketsRequest { + r.status = &status + return r +} + +// Filter by workloads access (accepts comma-separated values). +func (r ApiListBucketsRequest) WorkloadsAccess(workloadsAccess string) ApiListBucketsRequest { + r.workloadsAccess = &workloadsAccess + return r +} + +func (r ApiListBucketsRequest) Execute() (*PaginatedBucketList, *http.Response, error) { + return r.ApiService.ListBucketsExecute(r) +} + +/* +ListBuckets List buckets + +List all buckets. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListBucketsRequest +*/ +func (a *StorageBucketsAPIService) ListBuckets(ctx context.Context) ApiListBucketsRequest { + return ApiListBucketsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedBucketList +func (a *StorageBucketsAPIService) ListBucketsExecute(r ApiListBucketsRequest) (*PaginatedBucketList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedBucketList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageBucketsAPIService.ListBuckets") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.bucket != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "bucket", r.bucket, "form", "") + } + if r.created != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created", r.created, "form", "") + } + if r.createdGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created__gte", r.createdGte, "form", "") + } + if r.createdLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created__lte", r.createdLte, "form", "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModified != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified", r.lastModified, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.workloadsAccess != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "workloads_access", r.workloadsAccess, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveBucketRequest struct { + ctx context.Context + ApiService *StorageBucketsAPIService + bucketName string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveBucketRequest) Fields(fields string) ApiRetrieveBucketRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveBucketRequest) Execute() (*BucketCreateResponse, *http.Response, error) { + return r.ApiService.RetrieveBucketExecute(r) +} + +/* +RetrieveBucket Retrieve a bucket + +Retrieve details from a specific bucket. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @return ApiRetrieveBucketRequest +*/ +func (a *StorageBucketsAPIService) RetrieveBucket(ctx context.Context, bucketName string) ApiRetrieveBucketRequest { + return ApiRetrieveBucketRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + } +} + +// Execute executes the request +// @return BucketCreateResponse +func (a *StorageBucketsAPIService) RetrieveBucketExecute(r ApiRetrieveBucketRequest) (*BucketCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BucketCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageBucketsAPIService.RetrieveBucket") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateBucketRequest struct { + ctx context.Context + ApiService *StorageBucketsAPIService + bucketName string + patchedBucketRequest *PatchedBucketRequest +} + +func (r ApiUpdateBucketRequest) PatchedBucketRequest(patchedBucketRequest PatchedBucketRequest) ApiUpdateBucketRequest { + r.patchedBucketRequest = &patchedBucketRequest + return r +} + +func (r ApiUpdateBucketRequest) Execute() (*BucketCreateResponse, *http.Response, error) { + return r.ApiService.UpdateBucketExecute(r) +} + +/* +UpdateBucket Update bucket info + +Update bucket information (bucket name cannot be changed) + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @return ApiUpdateBucketRequest +*/ +func (a *StorageBucketsAPIService) UpdateBucket(ctx context.Context, bucketName string) ApiUpdateBucketRequest { + return ApiUpdateBucketRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + } +} + +// Execute executes the request +// @return BucketCreateResponse +func (a *StorageBucketsAPIService) UpdateBucketExecute(r ApiUpdateBucketRequest) (*BucketCreateResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BucketCreateResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageBucketsAPIService.UpdateBucket") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedBucketRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_storage_credentials.go b/azion-api/api_storage_credentials.go new file mode 100644 index 0000000..10ac53b --- /dev/null +++ b/azion-api/api_storage_credentials.go @@ -0,0 +1,995 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// StorageCredentialsAPIService StorageCredentialsAPI service +type StorageCredentialsAPIService service + +type ApiCreateCredentialRequest struct { + ctx context.Context + ApiService *StorageCredentialsAPIService + credentialCreateRequest *CredentialCreateRequest +} + +func (r ApiCreateCredentialRequest) CredentialCreateRequest(credentialCreateRequest CredentialCreateRequest) ApiCreateCredentialRequest { + r.credentialCreateRequest = &credentialCreateRequest + return r +} + +func (r ApiCreateCredentialRequest) Execute() (*CredentialResponse, *http.Response, error) { + return r.ApiService.CreateCredentialExecute(r) +} + +/* +CreateCredential Create a new credential + +Create a new credential. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateCredentialRequest +*/ +func (a *StorageCredentialsAPIService) CreateCredential(ctx context.Context) ApiCreateCredentialRequest { + return ApiCreateCredentialRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CredentialResponse +func (a *StorageCredentialsAPIService) CreateCredentialExecute(r ApiCreateCredentialRequest) (*CredentialResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CredentialResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageCredentialsAPIService.CreateCredential") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/credentials" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.credentialCreateRequest == nil { + return localVarReturnValue, nil, reportError("credentialCreateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.credentialCreateRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteCredentialRequest struct { + ctx context.Context + ApiService *StorageCredentialsAPIService + credentialId int64 +} + +func (r ApiDeleteCredentialRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteCredentialExecute(r) +} + +/* +DeleteCredential Delete a credential + +Delete a specific credential. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param credentialId The unique identifier of the credential + @return ApiDeleteCredentialRequest +*/ +func (a *StorageCredentialsAPIService) DeleteCredential(ctx context.Context, credentialId int64) ApiDeleteCredentialRequest { + return ApiDeleteCredentialRequest{ + ApiService: a, + ctx: ctx, + credentialId: credentialId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *StorageCredentialsAPIService) DeleteCredentialExecute(r ApiDeleteCredentialRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageCredentialsAPIService.DeleteCredential") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/credentials/{credential_id}" + localVarPath = strings.Replace(localVarPath, "{"+"credential_id"+"}", url.PathEscape(parameterValueToString(r.credentialId, "credentialId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListCredentialsRequest struct { + ctx context.Context + ApiService *StorageCredentialsAPIService + accessKey *string + buckets *string + bucketsIn *string + fields *string + id *int64 + lastEditor *string + lastModified *time.Time + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by access key (exact match). +func (r ApiListCredentialsRequest) AccessKey(accessKey string) ApiListCredentialsRequest { + r.accessKey = &accessKey + return r +} + +// Filter by bucket name (exact match). +func (r ApiListCredentialsRequest) Buckets(buckets string) ApiListCredentialsRequest { + r.buckets = &buckets + return r +} + +// Filter by multiple bucket names (comma-separated). +func (r ApiListCredentialsRequest) BucketsIn(bucketsIn string) ApiListCredentialsRequest { + r.bucketsIn = &bucketsIn + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListCredentialsRequest) Fields(fields string) ApiListCredentialsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListCredentialsRequest) Id(id int64) ApiListCredentialsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListCredentialsRequest) LastEditor(lastEditor string) ApiListCredentialsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (exact match). +func (r ApiListCredentialsRequest) LastModified(lastModified time.Time) ApiListCredentialsRequest { + r.lastModified = &lastModified + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListCredentialsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListCredentialsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListCredentialsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListCredentialsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListCredentialsRequest) Name(name string) ApiListCredentialsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListCredentialsRequest) Ordering(ordering string) ApiListCredentialsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListCredentialsRequest) Page(page int32) ApiListCredentialsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListCredentialsRequest) PageSize(pageSize int32) ApiListCredentialsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListCredentialsRequest) Search(search string) ApiListCredentialsRequest { + r.search = &search + return r +} + +func (r ApiListCredentialsRequest) Execute() (*PaginatedCredentialList, *http.Response, error) { + return r.ApiService.ListCredentialsExecute(r) +} + +/* +ListCredentials List credentials + +List all credentials. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListCredentialsRequest +*/ +func (a *StorageCredentialsAPIService) ListCredentials(ctx context.Context) ApiListCredentialsRequest { + return ApiListCredentialsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedCredentialList +func (a *StorageCredentialsAPIService) ListCredentialsExecute(r ApiListCredentialsRequest) (*PaginatedCredentialList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedCredentialList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageCredentialsAPIService.ListCredentials") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/credentials" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.accessKey != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "access_key", r.accessKey, "form", "") + } + if r.buckets != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "buckets", r.buckets, "form", "") + } + if r.bucketsIn != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "buckets__in", r.bucketsIn, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModified != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified", r.lastModified, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveCredentialRequest struct { + ctx context.Context + ApiService *StorageCredentialsAPIService + credentialId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveCredentialRequest) Fields(fields string) ApiRetrieveCredentialRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveCredentialRequest) Execute() (*CredentialResponse, *http.Response, error) { + return r.ApiService.RetrieveCredentialExecute(r) +} + +/* +RetrieveCredential Retrieve details from a credential + +Retrieve details from a specific credential. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param credentialId The unique identifier of the credential + @return ApiRetrieveCredentialRequest +*/ +func (a *StorageCredentialsAPIService) RetrieveCredential(ctx context.Context, credentialId int64) ApiRetrieveCredentialRequest { + return ApiRetrieveCredentialRequest{ + ApiService: a, + ctx: ctx, + credentialId: credentialId, + } +} + +// Execute executes the request +// @return CredentialResponse +func (a *StorageCredentialsAPIService) RetrieveCredentialExecute(r ApiRetrieveCredentialRequest) (*CredentialResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CredentialResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageCredentialsAPIService.RetrieveCredential") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/credentials/{credential_id}" + localVarPath = strings.Replace(localVarPath, "{"+"credential_id"+"}", url.PathEscape(parameterValueToString(r.credentialId, "credentialId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_storage_objects.go b/azion-api/api_storage_objects.go new file mode 100644 index 0000000..bf1fdc9 --- /dev/null +++ b/azion-api/api_storage_objects.go @@ -0,0 +1,1301 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// StorageObjectsAPIService StorageObjectsAPI service +type StorageObjectsAPIService service + +type ApiCopyObjectKeyRequest struct { + ctx context.Context + ApiService *StorageObjectsAPIService + bucketName string + newObjectKey string + objectKey string + body *interface{} +} + +func (r ApiCopyObjectKeyRequest) Body(body interface{}) ApiCopyObjectKeyRequest { + r.body = &body + return r +} + +func (r ApiCopyObjectKeyRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.CopyObjectKeyExecute(r) +} + +/* +CopyObjectKey Copy object to new key + +Copy an object to a new key within the same bucket. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @param newObjectKey The key/path of the destination object within the bucket + @param objectKey The key/path of the source object within the bucket + @return ApiCopyObjectKeyRequest +*/ +func (a *StorageObjectsAPIService) CopyObjectKey(ctx context.Context, bucketName string, newObjectKey string, objectKey string) ApiCopyObjectKeyRequest { + return ApiCopyObjectKeyRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + newObjectKey: newObjectKey, + objectKey: objectKey, + } +} + +// Execute executes the request +// @return interface{} +func (a *StorageObjectsAPIService) CopyObjectKeyExecute(r ApiCopyObjectKeyRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageObjectsAPIService.CopyObjectKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}/objects/{object_key}/copy/{new_object_key}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"new_object_key"+"}", url.PathEscape(parameterValueToString(r.newObjectKey, "newObjectKey")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"object_key"+"}", url.PathEscape(parameterValueToString(r.objectKey, "objectKey")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateObjectKeyRequest struct { + ctx context.Context + ApiService *StorageObjectsAPIService + bucketName string + objectKey string + contentType *string + body *os.File +} + +// The MIME type of the object being uploaded +func (r ApiCreateObjectKeyRequest) ContentType(contentType string) ApiCreateObjectKeyRequest { + r.contentType = &contentType + return r +} + +func (r ApiCreateObjectKeyRequest) Body(body *os.File) ApiCreateObjectKeyRequest { + r.body = body + return r +} + +func (r ApiCreateObjectKeyRequest) Execute() (*SuccessObjectOperation, *http.Response, error) { + return r.ApiService.CreateObjectKeyExecute(r) +} + +/* +CreateObjectKey Create new object key. + +Create a new object key in the bucket. The object's Content-Type is defined by the Content-Type header. If this header is not included, the Content-Type will be automatically detected. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @param objectKey The key/path of the object within the bucket + @return ApiCreateObjectKeyRequest +*/ +func (a *StorageObjectsAPIService) CreateObjectKey(ctx context.Context, bucketName string, objectKey string) ApiCreateObjectKeyRequest { + return ApiCreateObjectKeyRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + objectKey: objectKey, + } +} + +// Execute executes the request +// @return SuccessObjectOperation +func (a *StorageObjectsAPIService) CreateObjectKeyExecute(r ApiCreateObjectKeyRequest) (*SuccessObjectOperation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SuccessObjectOperation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageObjectsAPIService.CreateObjectKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}/objects/{object_key}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"object_key"+"}", url.PathEscape(parameterValueToString(r.objectKey, "objectKey")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/octet-stream"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "simple", "") + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteObjectKeyRequest struct { + ctx context.Context + ApiService *StorageObjectsAPIService + bucketName string + objectKey string +} + +func (r ApiDeleteObjectKeyRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteObjectKeyExecute(r) +} + +/* +DeleteObjectKey Delete object key + +Upon a successful deletion request, the object will be permanentlydeleted after a 24-hour grace period. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @param objectKey The key/path of the object within the bucket + @return ApiDeleteObjectKeyRequest +*/ +func (a *StorageObjectsAPIService) DeleteObjectKey(ctx context.Context, bucketName string, objectKey string) ApiDeleteObjectKeyRequest { + return ApiDeleteObjectKeyRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + objectKey: objectKey, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *StorageObjectsAPIService) DeleteObjectKeyExecute(r ApiDeleteObjectKeyRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageObjectsAPIService.DeleteObjectKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}/objects/{object_key}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"object_key"+"}", url.PathEscape(parameterValueToString(r.objectKey, "objectKey")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDownloadObjectRequest struct { + ctx context.Context + ApiService *StorageObjectsAPIService + bucketName string + objectKey string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiDownloadObjectRequest) Fields(fields string) ApiDownloadObjectRequest { + r.fields = &fields + return r +} + +func (r ApiDownloadObjectRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.DownloadObjectExecute(r) +} + +/* +DownloadObject Download object + +Download the object key from bucket. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @param objectKey The key/path of the object within the bucket + @return ApiDownloadObjectRequest +*/ +func (a *StorageObjectsAPIService) DownloadObject(ctx context.Context, bucketName string, objectKey string) ApiDownloadObjectRequest { + return ApiDownloadObjectRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + objectKey: objectKey, + } +} + +// Execute executes the request +// @return *os.File +func (a *StorageObjectsAPIService) DownloadObjectExecute(r ApiDownloadObjectRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageObjectsAPIService.DownloadObject") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}/objects/{object_key}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"object_key"+"}", url.PathEscape(parameterValueToString(r.objectKey, "objectKey")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/octet-stream", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListObjectsRequest struct { + ctx context.Context + ApiService *StorageObjectsAPIService + bucketName string + allLevels *bool + continuationToken *string + fields *string + maxObjectCount *int64 + prefix *string +} + +// If true, lists objects recursively. If false, lists only the first level using Delimiter='/' (default: true). +func (r ApiListObjectsRequest) AllLevels(allLevels bool) ApiListObjectsRequest { + r.allLevels = &allLevels + return r +} + +// A continuation token for the next page of records. +func (r ApiListObjectsRequest) ContinuationToken(continuationToken string) ApiListObjectsRequest { + r.continuationToken = &continuationToken + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListObjectsRequest) Fields(fields string) ApiListObjectsRequest { + r.fields = &fields + return r +} + +// Number of results to be returned on the page. Limited to 1000 objects. +func (r ApiListObjectsRequest) MaxObjectCount(maxObjectCount int64) ApiListObjectsRequest { + r.maxObjectCount = &maxObjectCount + return r +} + +// Filter objects by key prefix. If empty, lists from the bucket root (default: empty). +func (r ApiListObjectsRequest) Prefix(prefix string) ApiListObjectsRequest { + r.prefix = &prefix + return r +} + +func (r ApiListObjectsRequest) Execute() (*ResponseBucketObject, *http.Response, error) { + return r.ApiService.ListObjectsExecute(r) +} + +/* +ListObjects List objects from bucket + +List objects from bucket + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @return ApiListObjectsRequest +*/ +func (a *StorageObjectsAPIService) ListObjects(ctx context.Context, bucketName string) ApiListObjectsRequest { + return ApiListObjectsRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + } +} + +// Execute executes the request +// @return ResponseBucketObject +func (a *StorageObjectsAPIService) ListObjectsExecute(r ApiListObjectsRequest) (*ResponseBucketObject, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseBucketObject + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageObjectsAPIService.ListObjects") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}/objects" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.allLevels != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "all_levels", r.allLevels, "form", "") + } + if r.continuationToken != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "continuation_token", r.continuationToken, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.maxObjectCount != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "max_object_count", r.maxObjectCount, "form", "") + } + if r.prefix != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateObjectKeyRequest struct { + ctx context.Context + ApiService *StorageObjectsAPIService + bucketName string + objectKey string + contentType *string + body *os.File +} + +// The MIME type of the object being uploaded +func (r ApiUpdateObjectKeyRequest) ContentType(contentType string) ApiUpdateObjectKeyRequest { + r.contentType = &contentType + return r +} + +func (r ApiUpdateObjectKeyRequest) Body(body *os.File) ApiUpdateObjectKeyRequest { + r.body = body + return r +} + +func (r ApiUpdateObjectKeyRequest) Execute() (*SuccessObjectOperation, *http.Response, error) { + return r.ApiService.UpdateObjectKeyExecute(r) +} + +/* +UpdateObjectKey Update the object key. + +Update the object key from bucket. The object's Content-Type is defined by the Content-Type header. If this header is not included, the Content-Type will be automatically detected. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param bucketName The name of the bucket + @param objectKey The key/path of the object within the bucket + @return ApiUpdateObjectKeyRequest +*/ +func (a *StorageObjectsAPIService) UpdateObjectKey(ctx context.Context, bucketName string, objectKey string) ApiUpdateObjectKeyRequest { + return ApiUpdateObjectKeyRequest{ + ApiService: a, + ctx: ctx, + bucketName: bucketName, + objectKey: objectKey, + } +} + +// Execute executes the request +// @return SuccessObjectOperation +func (a *StorageObjectsAPIService) UpdateObjectKeyExecute(r ApiUpdateObjectKeyRequest) (*SuccessObjectOperation, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SuccessObjectOperation + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StorageObjectsAPIService.UpdateObjectKey") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/storage/buckets/{bucket_name}/objects/{object_key}" + localVarPath = strings.Replace(localVarPath, "{"+"bucket_name"+"}", url.PathEscape(parameterValueToString(r.bucketName, "bucketName")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"object_key"+"}", url.PathEscape(parameterValueToString(r.objectKey, "objectKey")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/octet-stream"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.contentType != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "Content-Type", r.contentType, "simple", "") + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_users_lockout.go b/azion-api/api_users_lockout.go new file mode 100644 index 0000000..a1ab123 --- /dev/null +++ b/azion-api/api_users_lockout.go @@ -0,0 +1,218 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// UsersLockoutAPIService UsersLockoutAPI service +type UsersLockoutAPIService service + +type ApiDestroyLockoutUserRequest struct { + ctx context.Context + ApiService *UsersLockoutAPIService + userId int64 +} + +func (r ApiDestroyLockoutUserRequest) Execute() (*http.Response, error) { + return r.ApiService.DestroyLockoutUserExecute(r) +} + +/* +DestroyLockoutUser Unlock user + +Destroy Lockout info from user. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param userId A unique integer value identifying the user. + @return ApiDestroyLockoutUserRequest +*/ +func (a *UsersLockoutAPIService) DestroyLockoutUser(ctx context.Context, userId int64) ApiDestroyLockoutUserRequest { + return ApiDestroyLockoutUserRequest{ + ApiService: a, + ctx: ctx, + userId: userId, + } +} + +// Execute executes the request +func (a *UsersLockoutAPIService) DestroyLockoutUserExecute(r ApiDestroyLockoutUserRequest) (*http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsersLockoutAPIService.DestroyLockoutUser") + if err != nil { + return nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/identity/users/{user_id}/lockout" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} diff --git a/azion-api/api_vcs_continuous_deployment_executions.go b/azion-api/api_vcs_continuous_deployment_executions.go new file mode 100644 index 0000000..9562da0 --- /dev/null +++ b/azion-api/api_vcs_continuous_deployment_executions.go @@ -0,0 +1,553 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// VCSContinuousDeploymentExecutionsAPIService VCSContinuousDeploymentExecutionsAPI service +type VCSContinuousDeploymentExecutionsAPIService service + +type ApiCreateExecutionRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentExecutionsAPIService + continuousDeploymentId int64 + body *map[string]interface{} +} + +// No request body required +func (r ApiCreateExecutionRequest) Body(body map[string]interface{}) ApiCreateExecutionRequest { + r.body = &body + return r +} + +func (r ApiCreateExecutionRequest) Execute() (*ResponseExecution, *http.Response, error) { + return r.ApiService.CreateExecutionExecute(r) +} + +/* +CreateExecution Create a execution + +Create a new continuous deployment execution. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiCreateExecutionRequest +*/ +func (a *VCSContinuousDeploymentExecutionsAPIService) CreateExecution(ctx context.Context, continuousDeploymentId int64) ApiCreateExecutionRequest { + return ApiCreateExecutionRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseExecution +func (a *VCSContinuousDeploymentExecutionsAPIService) CreateExecutionExecute(r ApiCreateExecutionRequest) (*ResponseExecution, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseExecution + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentExecutionsAPIService.CreateExecution") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}/executions" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListExecutionsRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentExecutionsAPIService + continuousDeploymentId int64 + createdAtGte *time.Time + createdAtLte *time.Time + fields *string + id *int64 + ordering *string + page *int32 + pageSize *int32 + search *string + status *string + updatedAtGte *time.Time + updatedAtLte *time.Time +} + +// Filter by created date (greater than or equal). +func (r ApiListExecutionsRequest) CreatedAtGte(createdAtGte time.Time) ApiListExecutionsRequest { + r.createdAtGte = &createdAtGte + return r +} + +// Filter by created date (less than or equal). +func (r ApiListExecutionsRequest) CreatedAtLte(createdAtLte time.Time) ApiListExecutionsRequest { + r.createdAtLte = &createdAtLte + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListExecutionsRequest) Fields(fields string) ApiListExecutionsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListExecutionsRequest) Id(id int64) ApiListExecutionsRequest { + r.id = &id + return r +} + +// Which field to use when ordering the results. +func (r ApiListExecutionsRequest) Ordering(ordering string) ApiListExecutionsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListExecutionsRequest) Page(page int32) ApiListExecutionsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListExecutionsRequest) PageSize(pageSize int32) ApiListExecutionsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListExecutionsRequest) Search(search string) ApiListExecutionsRequest { + r.search = &search + return r +} + +// Filter by status (accepts comma-separated values). +func (r ApiListExecutionsRequest) Status(status string) ApiListExecutionsRequest { + r.status = &status + return r +} + +// Filter by updated date (greater than or equal). +func (r ApiListExecutionsRequest) UpdatedAtGte(updatedAtGte time.Time) ApiListExecutionsRequest { + r.updatedAtGte = &updatedAtGte + return r +} + +// Filter by updated date (less than or equal). +func (r ApiListExecutionsRequest) UpdatedAtLte(updatedAtLte time.Time) ApiListExecutionsRequest { + r.updatedAtLte = &updatedAtLte + return r +} + +func (r ApiListExecutionsRequest) Execute() (*PaginatedExecutionList, *http.Response, error) { + return r.ApiService.ListExecutionsExecute(r) +} + +/* +ListExecutions List executions + +List all continuous deployment executions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiListExecutionsRequest +*/ +func (a *VCSContinuousDeploymentExecutionsAPIService) ListExecutions(ctx context.Context, continuousDeploymentId int64) ApiListExecutionsRequest { + return ApiListExecutionsRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return PaginatedExecutionList +func (a *VCSContinuousDeploymentExecutionsAPIService) ListExecutionsExecute(r ApiListExecutionsRequest) (*PaginatedExecutionList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedExecutionList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentExecutionsAPIService.ListExecutions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}/executions" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.createdAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at__gte", r.createdAtGte, "form", "") + } + if r.createdAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at__lte", r.createdAtLte, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.status != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") + } + if r.updatedAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_at__gte", r.updatedAtGte, "form", "") + } + if r.updatedAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_at__lte", r.updatedAtLte, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_vcs_continuous_deployment_executor.go b/azion-api/api_vcs_continuous_deployment_executor.go new file mode 100644 index 0000000..9c6b075 --- /dev/null +++ b/azion-api/api_vcs_continuous_deployment_executor.go @@ -0,0 +1,452 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// VCSContinuousDeploymentExecutorAPIService VCSContinuousDeploymentExecutorAPI service +type VCSContinuousDeploymentExecutorAPIService service + +type ApiRetrieveExecutorRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentExecutorAPIService + continuousDeploymentId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveExecutorRequest) Fields(fields string) ApiRetrieveExecutorRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveExecutorRequest) Execute() (*ResponseRetrieveExecutor, *http.Response, error) { + return r.ApiService.RetrieveExecutorExecute(r) +} + +/* +RetrieveExecutor Retrieve details from a executor + +Retrieve details from a specific continuous deployment executor. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiRetrieveExecutorRequest +*/ +func (a *VCSContinuousDeploymentExecutorAPIService) RetrieveExecutor(ctx context.Context, continuousDeploymentId int64) ApiRetrieveExecutorRequest { + return ApiRetrieveExecutorRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseRetrieveExecutor +func (a *VCSContinuousDeploymentExecutorAPIService) RetrieveExecutorExecute(r ApiRetrieveExecutorRequest) (*ResponseRetrieveExecutor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveExecutor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentExecutorAPIService.RetrieveExecutor") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}/executor" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateExecutorRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentExecutorAPIService + continuousDeploymentId int64 + body *map[string]interface{} +} + +// No request body required +func (r ApiUpdateExecutorRequest) Body(body map[string]interface{}) ApiUpdateExecutorRequest { + r.body = &body + return r +} + +func (r ApiUpdateExecutorRequest) Execute() (*ResponseExecutor, *http.Response, error) { + return r.ApiService.UpdateExecutorExecute(r) +} + +/* +UpdateExecutor Update a executor + +Update continuous deployment executor information. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiUpdateExecutorRequest +*/ +func (a *VCSContinuousDeploymentExecutorAPIService) UpdateExecutor(ctx context.Context, continuousDeploymentId int64) ApiUpdateExecutorRequest { + return ApiUpdateExecutorRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseExecutor +func (a *VCSContinuousDeploymentExecutorAPIService) UpdateExecutorExecute(r ApiUpdateExecutorRequest) (*ResponseExecutor, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseExecutor + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentExecutorAPIService.UpdateExecutor") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}/executor" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_vcs_continuous_deployments.go b/azion-api/api_vcs_continuous_deployments.go new file mode 100644 index 0000000..dfbd672 --- /dev/null +++ b/azion-api/api_vcs_continuous_deployments.go @@ -0,0 +1,1422 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// VCSContinuousDeploymentsAPIService VCSContinuousDeploymentsAPI service +type VCSContinuousDeploymentsAPIService service + +type ApiCreateContinuousDeploymentRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentsAPIService + continuousDeploymentRequest *ContinuousDeploymentRequest +} + +func (r ApiCreateContinuousDeploymentRequest) ContinuousDeploymentRequest(continuousDeploymentRequest ContinuousDeploymentRequest) ApiCreateContinuousDeploymentRequest { + r.continuousDeploymentRequest = &continuousDeploymentRequest + return r +} + +func (r ApiCreateContinuousDeploymentRequest) Execute() (*ResponseContinuousDeployment, *http.Response, error) { + return r.ApiService.CreateContinuousDeploymentExecute(r) +} + +/* +CreateContinuousDeployment Create a continuous deployment + +Create a new continuous deployment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateContinuousDeploymentRequest +*/ +func (a *VCSContinuousDeploymentsAPIService) CreateContinuousDeployment(ctx context.Context) ApiCreateContinuousDeploymentRequest { + return ApiCreateContinuousDeploymentRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ResponseContinuousDeployment +func (a *VCSContinuousDeploymentsAPIService) CreateContinuousDeploymentExecute(r ApiCreateContinuousDeploymentRequest) (*ResponseContinuousDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseContinuousDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentsAPIService.CreateContinuousDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.continuousDeploymentRequest == nil { + return localVarReturnValue, nil, reportError("continuousDeploymentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.continuousDeploymentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteContinuousDeploymentRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentsAPIService + continuousDeploymentId string +} + +func (r ApiDeleteContinuousDeploymentRequest) Execute() (*ResponseDeleteContinuousDeployment, *http.Response, error) { + return r.ApiService.DeleteContinuousDeploymentExecute(r) +} + +/* +DeleteContinuousDeployment Delete a continuous deployment + +Delete a specific continuous deployment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiDeleteContinuousDeploymentRequest +*/ +func (a *VCSContinuousDeploymentsAPIService) DeleteContinuousDeployment(ctx context.Context, continuousDeploymentId string) ApiDeleteContinuousDeploymentRequest { + return ApiDeleteContinuousDeploymentRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseDeleteContinuousDeployment +func (a *VCSContinuousDeploymentsAPIService) DeleteContinuousDeploymentExecute(r ApiDeleteContinuousDeploymentRequest) (*ResponseDeleteContinuousDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteContinuousDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentsAPIService.DeleteContinuousDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListContinuousDeploymentsRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentsAPIService + branch *string + createdGte *time.Time + createdLte *time.Time + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + name *string + ordering *string + page *int32 + pageSize *int32 + repository *string + search *string +} + +// Filter by branch (exact match). +func (r ApiListContinuousDeploymentsRequest) Branch(branch string) ApiListContinuousDeploymentsRequest { + r.branch = &branch + return r +} + +// Filter by created date (greater than or equal). +func (r ApiListContinuousDeploymentsRequest) CreatedGte(createdGte time.Time) ApiListContinuousDeploymentsRequest { + r.createdGte = &createdGte + return r +} + +// Filter by created date (less than or equal). +func (r ApiListContinuousDeploymentsRequest) CreatedLte(createdLte time.Time) ApiListContinuousDeploymentsRequest { + r.createdLte = &createdLte + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListContinuousDeploymentsRequest) Fields(fields string) ApiListContinuousDeploymentsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListContinuousDeploymentsRequest) Id(id int64) ApiListContinuousDeploymentsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListContinuousDeploymentsRequest) LastEditor(lastEditor string) ApiListContinuousDeploymentsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListContinuousDeploymentsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListContinuousDeploymentsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListContinuousDeploymentsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListContinuousDeploymentsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListContinuousDeploymentsRequest) Name(name string) ApiListContinuousDeploymentsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListContinuousDeploymentsRequest) Ordering(ordering string) ApiListContinuousDeploymentsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListContinuousDeploymentsRequest) Page(page int32) ApiListContinuousDeploymentsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListContinuousDeploymentsRequest) PageSize(pageSize int32) ApiListContinuousDeploymentsRequest { + r.pageSize = &pageSize + return r +} + +// Filter by repository (case-insensitive, partial match). +func (r ApiListContinuousDeploymentsRequest) Repository(repository string) ApiListContinuousDeploymentsRequest { + r.repository = &repository + return r +} + +// A search term. +func (r ApiListContinuousDeploymentsRequest) Search(search string) ApiListContinuousDeploymentsRequest { + r.search = &search + return r +} + +func (r ApiListContinuousDeploymentsRequest) Execute() (*PaginatedContinuousDeploymentList, *http.Response, error) { + return r.ApiService.ListContinuousDeploymentsExecute(r) +} + +/* +ListContinuousDeployments List continuous deployments + +List all continuous deployments. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListContinuousDeploymentsRequest +*/ +func (a *VCSContinuousDeploymentsAPIService) ListContinuousDeployments(ctx context.Context) ApiListContinuousDeploymentsRequest { + return ApiListContinuousDeploymentsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedContinuousDeploymentList +func (a *VCSContinuousDeploymentsAPIService) ListContinuousDeploymentsExecute(r ApiListContinuousDeploymentsRequest) (*PaginatedContinuousDeploymentList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedContinuousDeploymentList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentsAPIService.ListContinuousDeployments") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.branch != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "branch", r.branch, "form", "") + } + if r.createdGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created__gte", r.createdGte, "form", "") + } + if r.createdLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created__lte", r.createdLte, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.repository != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "repository", r.repository, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateContinuousDeploymentRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentsAPIService + continuousDeploymentId string + patchContinuousDeploymentRequest *PatchContinuousDeploymentRequest +} + +func (r ApiPartialUpdateContinuousDeploymentRequest) PatchContinuousDeploymentRequest(patchContinuousDeploymentRequest PatchContinuousDeploymentRequest) ApiPartialUpdateContinuousDeploymentRequest { + r.patchContinuousDeploymentRequest = &patchContinuousDeploymentRequest + return r +} + +func (r ApiPartialUpdateContinuousDeploymentRequest) Execute() (*ResponseContinuousDeployment, *http.Response, error) { + return r.ApiService.PartialUpdateContinuousDeploymentExecute(r) +} + +/* +PartialUpdateContinuousDeployment Partialy update a continuous deployment + +Partialy update continuous deployment information. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiPartialUpdateContinuousDeploymentRequest +*/ +func (a *VCSContinuousDeploymentsAPIService) PartialUpdateContinuousDeployment(ctx context.Context, continuousDeploymentId string) ApiPartialUpdateContinuousDeploymentRequest { + return ApiPartialUpdateContinuousDeploymentRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseContinuousDeployment +func (a *VCSContinuousDeploymentsAPIService) PartialUpdateContinuousDeploymentExecute(r ApiPartialUpdateContinuousDeploymentRequest) (*ResponseContinuousDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseContinuousDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentsAPIService.PartialUpdateContinuousDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchContinuousDeploymentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveContinuousDeploymentRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentsAPIService + continuousDeploymentId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveContinuousDeploymentRequest) Fields(fields string) ApiRetrieveContinuousDeploymentRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveContinuousDeploymentRequest) Execute() (*ResponseRetrieveContinuousDeployment, *http.Response, error) { + return r.ApiService.RetrieveContinuousDeploymentExecute(r) +} + +/* +RetrieveContinuousDeployment Retrieve details from a continuous deployment + +Retrieve details from a specific continuous deployment. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiRetrieveContinuousDeploymentRequest +*/ +func (a *VCSContinuousDeploymentsAPIService) RetrieveContinuousDeployment(ctx context.Context, continuousDeploymentId string) ApiRetrieveContinuousDeploymentRequest { + return ApiRetrieveContinuousDeploymentRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseRetrieveContinuousDeployment +func (a *VCSContinuousDeploymentsAPIService) RetrieveContinuousDeploymentExecute(r ApiRetrieveContinuousDeploymentRequest) (*ResponseRetrieveContinuousDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveContinuousDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentsAPIService.RetrieveContinuousDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateContinuousDeploymentRequest struct { + ctx context.Context + ApiService *VCSContinuousDeploymentsAPIService + continuousDeploymentId string + continuousDeploymentRequest *ContinuousDeploymentRequest +} + +func (r ApiUpdateContinuousDeploymentRequest) ContinuousDeploymentRequest(continuousDeploymentRequest ContinuousDeploymentRequest) ApiUpdateContinuousDeploymentRequest { + r.continuousDeploymentRequest = &continuousDeploymentRequest + return r +} + +func (r ApiUpdateContinuousDeploymentRequest) Execute() (*ResponseContinuousDeployment, *http.Response, error) { + return r.ApiService.UpdateContinuousDeploymentExecute(r) +} + +/* +UpdateContinuousDeployment Update a continuous deployment + +Update continuous deployment information. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param continuousDeploymentId Unique identifier of the continuous deployment + @return ApiUpdateContinuousDeploymentRequest +*/ +func (a *VCSContinuousDeploymentsAPIService) UpdateContinuousDeployment(ctx context.Context, continuousDeploymentId string) ApiUpdateContinuousDeploymentRequest { + return ApiUpdateContinuousDeploymentRequest{ + ApiService: a, + ctx: ctx, + continuousDeploymentId: continuousDeploymentId, + } +} + +// Execute executes the request +// @return ResponseContinuousDeployment +func (a *VCSContinuousDeploymentsAPIService) UpdateContinuousDeploymentExecute(r ApiUpdateContinuousDeploymentRequest) (*ResponseContinuousDeployment, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseContinuousDeployment + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSContinuousDeploymentsAPIService.UpdateContinuousDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/continuous_deployments/{continuous_deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"continuous_deployment_id"+"}", url.PathEscape(parameterValueToString(r.continuousDeploymentId, "continuousDeploymentId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.continuousDeploymentRequest == nil { + return localVarReturnValue, nil, reportError("continuousDeploymentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.continuousDeploymentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_vcs_execution_scripts.go b/azion-api/api_vcs_execution_scripts.go new file mode 100644 index 0000000..7f1f0e7 --- /dev/null +++ b/azion-api/api_vcs_execution_scripts.go @@ -0,0 +1,509 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// VCSExecutionScriptsAPIService VCSExecutionScriptsAPI service +type VCSExecutionScriptsAPIService service + +type ApiListExecutionScriptsRequest struct { + ctx context.Context + ApiService *VCSExecutionScriptsAPIService + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListExecutionScriptsRequest) Fields(fields string) ApiListExecutionScriptsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListExecutionScriptsRequest) Id(id int64) ApiListExecutionScriptsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListExecutionScriptsRequest) Name(name string) ApiListExecutionScriptsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListExecutionScriptsRequest) Ordering(ordering string) ApiListExecutionScriptsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListExecutionScriptsRequest) Page(page int32) ApiListExecutionScriptsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListExecutionScriptsRequest) PageSize(pageSize int32) ApiListExecutionScriptsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListExecutionScriptsRequest) Search(search string) ApiListExecutionScriptsRequest { + r.search = &search + return r +} + +func (r ApiListExecutionScriptsRequest) Execute() (*PaginatedExecutionScriptList, *http.Response, error) { + return r.ApiService.ListExecutionScriptsExecute(r) +} + +/* +ListExecutionScripts List execution scripts + +List all execution scripts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListExecutionScriptsRequest +*/ +func (a *VCSExecutionScriptsAPIService) ListExecutionScripts(ctx context.Context) ApiListExecutionScriptsRequest { + return ApiListExecutionScriptsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedExecutionScriptList +func (a *VCSExecutionScriptsAPIService) ListExecutionScriptsExecute(r ApiListExecutionScriptsRequest) (*PaginatedExecutionScriptList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedExecutionScriptList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSExecutionScriptsAPIService.ListExecutionScripts") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/execution_scripts" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveExecutionScriptRequest struct { + ctx context.Context + ApiService *VCSExecutionScriptsAPIService + executionScriptId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveExecutionScriptRequest) Fields(fields string) ApiRetrieveExecutionScriptRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveExecutionScriptRequest) Execute() (*ResponseRetrieveExecutionScript, *http.Response, error) { + return r.ApiService.RetrieveExecutionScriptExecute(r) +} + +/* +RetrieveExecutionScript Retrieve details from a execution script + +Retrieve details from a specific execution script. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param executionScriptId A unique integer value identifying this execution script. + @return ApiRetrieveExecutionScriptRequest +*/ +func (a *VCSExecutionScriptsAPIService) RetrieveExecutionScript(ctx context.Context, executionScriptId int64) ApiRetrieveExecutionScriptRequest { + return ApiRetrieveExecutionScriptRequest{ + ApiService: a, + ctx: ctx, + executionScriptId: executionScriptId, + } +} + +// Execute executes the request +// @return ResponseRetrieveExecutionScript +func (a *VCSExecutionScriptsAPIService) RetrieveExecutionScriptExecute(r ApiRetrieveExecutionScriptRequest) (*ResponseRetrieveExecutionScript, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveExecutionScript + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSExecutionScriptsAPIService.RetrieveExecutionScript") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/execution_scripts/{execution_script_id}" + localVarPath = strings.Replace(localVarPath, "{"+"execution_script_id"+"}", url.PathEscape(parameterValueToString(r.executionScriptId, "executionScriptId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_vcs_integrations.go b/azion-api/api_vcs_integrations.go new file mode 100644 index 0000000..4e65ddf --- /dev/null +++ b/azion-api/api_vcs_integrations.go @@ -0,0 +1,977 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// VCSIntegrationsAPIService VCSIntegrationsAPI service +type VCSIntegrationsAPIService service + +type ApiDeleteIntegrationRequest struct { + ctx context.Context + ApiService *VCSIntegrationsAPIService + integrationId string +} + +func (r ApiDeleteIntegrationRequest) Execute() (*ResponseDeleteIntegration, *http.Response, error) { + return r.ApiService.DeleteIntegrationExecute(r) +} + +/* +DeleteIntegration Delete an integration + +Delete a specific account integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param integrationId Unique identifier of the integration + @return ApiDeleteIntegrationRequest +*/ +func (a *VCSIntegrationsAPIService) DeleteIntegration(ctx context.Context, integrationId string) ApiDeleteIntegrationRequest { + return ApiDeleteIntegrationRequest{ + ApiService: a, + ctx: ctx, + integrationId: integrationId, + } +} + +// Execute executes the request +// @return ResponseDeleteIntegration +func (a *VCSIntegrationsAPIService) DeleteIntegrationExecute(r ApiDeleteIntegrationRequest) (*ResponseDeleteIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseDeleteIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSIntegrationsAPIService.DeleteIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/integrations/{integration_id}" + localVarPath = strings.Replace(localVarPath, "{"+"integration_id"+"}", url.PathEscape(parameterValueToString(r.integrationId, "integrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListIntegrationsRequest struct { + ctx context.Context + ApiService *VCSIntegrationsAPIService + fields *string + id *int64 + ordering *string + page *int32 + pageSize *int32 + platform *string + scope *string + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListIntegrationsRequest) Fields(fields string) ApiListIntegrationsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListIntegrationsRequest) Id(id int64) ApiListIntegrationsRequest { + r.id = &id + return r +} + +// Which field to use when ordering the results. +func (r ApiListIntegrationsRequest) Ordering(ordering string) ApiListIntegrationsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListIntegrationsRequest) Page(page int32) ApiListIntegrationsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListIntegrationsRequest) PageSize(pageSize int32) ApiListIntegrationsRequest { + r.pageSize = &pageSize + return r +} + +// Filter by platform id (exact match). +func (r ApiListIntegrationsRequest) Platform(platform string) ApiListIntegrationsRequest { + r.platform = &platform + return r +} + +// Filter by scope (case-insensitive, partial match). +func (r ApiListIntegrationsRequest) Scope(scope string) ApiListIntegrationsRequest { + r.scope = &scope + return r +} + +// A search term. +func (r ApiListIntegrationsRequest) Search(search string) ApiListIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListIntegrationsRequest) Execute() (*PaginatedIntegrationList, *http.Response, error) { + return r.ApiService.ListIntegrationsExecute(r) +} + +/* +ListIntegrations List integrations + +List all account integrations. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListIntegrationsRequest +*/ +func (a *VCSIntegrationsAPIService) ListIntegrations(ctx context.Context) ApiListIntegrationsRequest { + return ApiListIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedIntegrationList +func (a *VCSIntegrationsAPIService) ListIntegrationsExecute(r ApiListIntegrationsRequest) (*PaginatedIntegrationList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedIntegrationList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSIntegrationsAPIService.ListIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/integrations" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.platform != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "platform", r.platform, "form", "") + } + if r.scope != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "scope", r.scope, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListRepositoriesRequest struct { + ctx context.Context + ApiService *VCSIntegrationsAPIService + integrationId int64 + fields *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListRepositoriesRequest) Fields(fields string) ApiListRepositoriesRequest { + r.fields = &fields + return r +} + +// Which field to use when ordering the results. +func (r ApiListRepositoriesRequest) Ordering(ordering string) ApiListRepositoriesRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListRepositoriesRequest) Page(page int32) ApiListRepositoriesRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListRepositoriesRequest) PageSize(pageSize int32) ApiListRepositoriesRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListRepositoriesRequest) Search(search string) ApiListRepositoriesRequest { + r.search = &search + return r +} + +func (r ApiListRepositoriesRequest) Execute() (*PaginatedRepositoryList, *http.Response, error) { + return r.ApiService.ListRepositoriesExecute(r) +} + +/* +ListRepositories List integration repositories. + +Retrieve repositories for a specific integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param integrationId Unique identifier of the integration + @return ApiListRepositoriesRequest +*/ +func (a *VCSIntegrationsAPIService) ListRepositories(ctx context.Context, integrationId int64) ApiListRepositoriesRequest { + return ApiListRepositoriesRequest{ + ApiService: a, + ctx: ctx, + integrationId: integrationId, + } +} + +// Execute executes the request +// @return PaginatedRepositoryList +func (a *VCSIntegrationsAPIService) ListRepositoriesExecute(r ApiListRepositoriesRequest) (*PaginatedRepositoryList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedRepositoryList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSIntegrationsAPIService.ListRepositories") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/integrations/{integration_id}/repositories" + localVarPath = strings.Replace(localVarPath, "{"+"integration_id"+"}", url.PathEscape(parameterValueToString(r.integrationId, "integrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveIntegrationRequest struct { + ctx context.Context + ApiService *VCSIntegrationsAPIService + integrationId string + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveIntegrationRequest) Fields(fields string) ApiRetrieveIntegrationRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveIntegrationRequest) Execute() (*ResponseRetrieveIntegration, *http.Response, error) { + return r.ApiService.RetrieveIntegrationExecute(r) +} + +/* +RetrieveIntegration Retrieve details from a integration + +Retrieve details from a specific account integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param integrationId Unique identifier of the integration + @return ApiRetrieveIntegrationRequest +*/ +func (a *VCSIntegrationsAPIService) RetrieveIntegration(ctx context.Context, integrationId string) ApiRetrieveIntegrationRequest { + return ApiRetrieveIntegrationRequest{ + ApiService: a, + ctx: ctx, + integrationId: integrationId, + } +} + +// Execute executes the request +// @return ResponseRetrieveIntegration +func (a *VCSIntegrationsAPIService) RetrieveIntegrationExecute(r ApiRetrieveIntegrationRequest) (*ResponseRetrieveIntegration, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ResponseRetrieveIntegration + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSIntegrationsAPIService.RetrieveIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/integrations/{integration_id}" + localVarPath = strings.Replace(localVarPath, "{"+"integration_id"+"}", url.PathEscape(parameterValueToString(r.integrationId, "integrationId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_vcs_providers.go b/azion-api/api_vcs_providers.go new file mode 100644 index 0000000..73ef278 --- /dev/null +++ b/azion-api/api_vcs_providers.go @@ -0,0 +1,294 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// VCSProvidersAPIService VCSProvidersAPI service +type VCSProvidersAPIService service + +type ApiListProvidersRequest struct { + ctx context.Context + ApiService *VCSProvidersAPIService + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListProvidersRequest) Fields(fields string) ApiListProvidersRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListProvidersRequest) Id(id int64) ApiListProvidersRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListProvidersRequest) Name(name string) ApiListProvidersRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListProvidersRequest) Ordering(ordering string) ApiListProvidersRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListProvidersRequest) Page(page int32) ApiListProvidersRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListProvidersRequest) PageSize(pageSize int32) ApiListProvidersRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListProvidersRequest) Search(search string) ApiListProvidersRequest { + r.search = &search + return r +} + +func (r ApiListProvidersRequest) Execute() (*PaginatedPlatformList, *http.Response, error) { + return r.ApiService.ListProvidersExecute(r) +} + +/* +ListProviders List providers + +List all providers. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListProvidersRequest +*/ +func (a *VCSProvidersAPIService) ListProviders(ctx context.Context) ApiListProvidersRequest { + return ApiListProvidersRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedPlatformList +func (a *VCSProvidersAPIService) ListProvidersExecute(r ApiListProvidersRequest) (*PaginatedPlatformList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedPlatformList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VCSProvidersAPIService.ListProviders") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/vcs/providers" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_wafs.go b/azion-api/api_wafs.go new file mode 100644 index 0000000..a09d7e2 --- /dev/null +++ b/azion-api/api_wafs.go @@ -0,0 +1,1566 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// WAFsAPIService WAFsAPI service +type WAFsAPIService service + +type ApiCloneWafRequest struct { + ctx context.Context + ApiService *WAFsAPIService + wafId int64 + cloneWAFRequest *CloneWAFRequest +} + +func (r ApiCloneWafRequest) CloneWAFRequest(cloneWAFRequest CloneWAFRequest) ApiCloneWafRequest { + r.cloneWAFRequest = &cloneWAFRequest + return r +} + +func (r ApiCloneWafRequest) Execute() (*WAFResponse, *http.Response, error) { + return r.ApiService.CloneWafExecute(r) +} + +/* +CloneWaf Clone a Web Application Firewall (WAF) + +Create a new WAF by performing a deep copy of an existing WAF, including its Exceptions. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiCloneWafRequest +*/ +func (a *WAFsAPIService) CloneWaf(ctx context.Context, wafId int64) ApiCloneWafRequest { + return ApiCloneWafRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFResponse +func (a *WAFsAPIService) CloneWafExecute(r ApiCloneWafRequest) (*WAFResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.CloneWaf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cloneWAFRequest == nil { + return localVarReturnValue, nil, reportError("cloneWAFRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cloneWAFRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateWafRequest struct { + ctx context.Context + ApiService *WAFsAPIService + wAFRequest *WAFRequest +} + +func (r ApiCreateWafRequest) WAFRequest(wAFRequest WAFRequest) ApiCreateWafRequest { + r.wAFRequest = &wAFRequest + return r +} + +func (r ApiCreateWafRequest) Execute() (*WAFResponse, *http.Response, error) { + return r.ApiService.CreateWafExecute(r) +} + +/* +CreateWaf Create a Web Application Firewall (WAF) + +Create a new WAF for your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateWafRequest +*/ +func (a *WAFsAPIService) CreateWaf(ctx context.Context) ApiCreateWafRequest { + return ApiCreateWafRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return WAFResponse +func (a *WAFsAPIService) CreateWafExecute(r ApiCreateWafRequest) (*WAFResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.CreateWaf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.wAFRequest == nil { + return localVarReturnValue, nil, reportError("wAFRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.wAFRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteWafRequest struct { + ctx context.Context + ApiService *WAFsAPIService + wafId int64 +} + +func (r ApiDeleteWafRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteWafExecute(r) +} + +/* +DeleteWaf Delete a Web Application Firewall (WAF) + +Delete a specific WAF in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiDeleteWafRequest +*/ +func (a *WAFsAPIService) DeleteWaf(ctx context.Context, wafId int64) ApiDeleteWafRequest { + return ApiDeleteWafRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *WAFsAPIService) DeleteWafExecute(r ApiDeleteWafRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.DeleteWaf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListWafsRequest struct { + ctx context.Context + ApiService *WAFsAPIService + fields *string + id *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListWafsRequest) Fields(fields string) ApiListWafsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListWafsRequest) Id(id int64) ApiListWafsRequest { + r.id = &id + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListWafsRequest) Name(name string) ApiListWafsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListWafsRequest) Ordering(ordering string) ApiListWafsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListWafsRequest) Page(page int32) ApiListWafsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListWafsRequest) PageSize(pageSize int32) ApiListWafsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListWafsRequest) Search(search string) ApiListWafsRequest { + r.search = &search + return r +} + +func (r ApiListWafsRequest) Execute() (*PaginatedWAFList, *http.Response, error) { + return r.ApiService.ListWafsExecute(r) +} + +/* +ListWafs List Web Application Firewalls (WAFs) + +List all WAFs owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListWafsRequest +*/ +func (a *WAFsAPIService) ListWafs(ctx context.Context) ApiListWafsRequest { + return ApiListWafsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedWAFList +func (a *WAFsAPIService) ListWafsExecute(r ApiListWafsRequest) (*PaginatedWAFList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedWAFList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.ListWafs") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateWafRequest struct { + ctx context.Context + ApiService *WAFsAPIService + wafId int64 + patchedWAFRequest *PatchedWAFRequest +} + +func (r ApiPartialUpdateWafRequest) PatchedWAFRequest(patchedWAFRequest PatchedWAFRequest) ApiPartialUpdateWafRequest { + r.patchedWAFRequest = &patchedWAFRequest + return r +} + +func (r ApiPartialUpdateWafRequest) Execute() (*WAFResponse, *http.Response, error) { + return r.ApiService.PartialUpdateWafExecute(r) +} + +/* +PartialUpdateWaf Partially update a Web Application Firewall (WAF) + +Update one or more fields of an existing WAF without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiPartialUpdateWafRequest +*/ +func (a *WAFsAPIService) PartialUpdateWaf(ctx context.Context, wafId int64) ApiPartialUpdateWafRequest { + return ApiPartialUpdateWafRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFResponse +func (a *WAFsAPIService) PartialUpdateWafExecute(r ApiPartialUpdateWafRequest) (*WAFResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.PartialUpdateWaf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedWAFRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveWafRequest struct { + ctx context.Context + ApiService *WAFsAPIService + wafId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveWafRequest) Fields(fields string) ApiRetrieveWafRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveWafRequest) Execute() (*WAFResponse, *http.Response, error) { + return r.ApiService.RetrieveWafExecute(r) +} + +/* +RetrieveWaf Retrieve details from a Web Application Firewall (WAF) + +Retrieve details from a specific WAF in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiRetrieveWafRequest +*/ +func (a *WAFsAPIService) RetrieveWaf(ctx context.Context, wafId int64) ApiRetrieveWafRequest { + return ApiRetrieveWafRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFResponse +func (a *WAFsAPIService) RetrieveWafExecute(r ApiRetrieveWafRequest) (*WAFResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.RetrieveWaf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateWafRequest struct { + ctx context.Context + ApiService *WAFsAPIService + wafId int64 + wAFRequest *WAFRequest +} + +func (r ApiUpdateWafRequest) WAFRequest(wAFRequest WAFRequest) ApiUpdateWafRequest { + r.wAFRequest = &wAFRequest + return r +} + +func (r ApiUpdateWafRequest) Execute() (*WAFResponse, *http.Response, error) { + return r.ApiService.UpdateWafExecute(r) +} + +/* +UpdateWaf Update a Web Application Firewall (WAF) + +Update an existing WAF. This replaces the entire WAF with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiUpdateWafRequest +*/ +func (a *WAFsAPIService) UpdateWaf(ctx context.Context, wafId int64) ApiUpdateWafRequest { + return ApiUpdateWafRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFResponse +func (a *WAFsAPIService) UpdateWafExecute(r ApiUpdateWafRequest) (*WAFResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsAPIService.UpdateWaf") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.wAFRequest == nil { + return localVarReturnValue, nil, reportError("wAFRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.wAFRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_wafs_exceptions.go b/azion-api/api_wafs_exceptions.go new file mode 100644 index 0000000..1148313 --- /dev/null +++ b/azion-api/api_wafs_exceptions.go @@ -0,0 +1,1436 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// WAFsExceptionsAPIService WAFsExceptionsAPI service +type WAFsExceptionsAPIService service + +type ApiCreateWafExceptionRequest struct { + ctx context.Context + ApiService *WAFsExceptionsAPIService + wafId int64 + wAFRuleRequest *WAFRuleRequest +} + +func (r ApiCreateWafExceptionRequest) WAFRuleRequest(wAFRuleRequest WAFRuleRequest) ApiCreateWafExceptionRequest { + r.wAFRuleRequest = &wAFRuleRequest + return r +} + +func (r ApiCreateWafExceptionRequest) Execute() (*WAFRuleResponse, *http.Response, error) { + return r.ApiService.CreateWafExceptionExecute(r) +} + +/* +CreateWafException Create an Exception for a Web Application Firewall (WAF) + +Create a new Exception for a specific WAF in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiCreateWafExceptionRequest +*/ +func (a *WAFsExceptionsAPIService) CreateWafException(ctx context.Context, wafId int64) ApiCreateWafExceptionRequest { + return ApiCreateWafExceptionRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFRuleResponse +func (a *WAFsExceptionsAPIService) CreateWafExceptionExecute(r ApiCreateWafExceptionRequest) (*WAFRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsExceptionsAPIService.CreateWafException") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/exceptions" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.wAFRuleRequest == nil { + return localVarReturnValue, nil, reportError("wAFRuleRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.wAFRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteWafExceptionRequest struct { + ctx context.Context + ApiService *WAFsExceptionsAPIService + exceptionId int64 + wafId int64 +} + +func (r ApiDeleteWafExceptionRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteWafExceptionExecute(r) +} + +/* +DeleteWafException Delete an Exception from a Web Application Firewall (WAF) + +Remove a specific Exception from a WAF in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exceptionId A unique integer value identifying the WAF exception. + @param wafId A unique integer value identifying the WAF. + @return ApiDeleteWafExceptionRequest +*/ +func (a *WAFsExceptionsAPIService) DeleteWafException(ctx context.Context, exceptionId int64, wafId int64) ApiDeleteWafExceptionRequest { + return ApiDeleteWafExceptionRequest{ + ApiService: a, + ctx: ctx, + exceptionId: exceptionId, + wafId: wafId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *WAFsExceptionsAPIService) DeleteWafExceptionExecute(r ApiDeleteWafExceptionRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsExceptionsAPIService.DeleteWafException") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/exceptions/{exception_id}" + localVarPath = strings.Replace(localVarPath, "{"+"exception_id"+"}", url.PathEscape(parameterValueToString(r.exceptionId, "exceptionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListWafExceptionsRequest struct { + ctx context.Context + ApiService *WAFsExceptionsAPIService + wafId int64 + createdAtGte *time.Time + createdAtLte *time.Time + description *string + fields *string + id *int64 + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + ordering *string + page *int32 + pageSize *int32 + path *string + search *string +} + +// Filter by creation date (greater than or equal). +func (r ApiListWafExceptionsRequest) CreatedAtGte(createdAtGte time.Time) ApiListWafExceptionsRequest { + r.createdAtGte = &createdAtGte + return r +} + +// Filter by creation date (less than or equal). +func (r ApiListWafExceptionsRequest) CreatedAtLte(createdAtLte time.Time) ApiListWafExceptionsRequest { + r.createdAtLte = &createdAtLte + return r +} + +// Filter by description (case-insensitive, partial match). +func (r ApiListWafExceptionsRequest) Description(description string) ApiListWafExceptionsRequest { + r.description = &description + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListWafExceptionsRequest) Fields(fields string) ApiListWafExceptionsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListWafExceptionsRequest) Id(id int64) ApiListWafExceptionsRequest { + r.id = &id + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListWafExceptionsRequest) LastEditor(lastEditor string) ApiListWafExceptionsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListWafExceptionsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListWafExceptionsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListWafExceptionsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListWafExceptionsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Which field to use when ordering the results. +func (r ApiListWafExceptionsRequest) Ordering(ordering string) ApiListWafExceptionsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListWafExceptionsRequest) Page(page int32) ApiListWafExceptionsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListWafExceptionsRequest) PageSize(pageSize int32) ApiListWafExceptionsRequest { + r.pageSize = &pageSize + return r +} + +// Filter by path (case-insensitive, partial match). +func (r ApiListWafExceptionsRequest) Path(path string) ApiListWafExceptionsRequest { + r.path = &path + return r +} + +// A search term. +func (r ApiListWafExceptionsRequest) Search(search string) ApiListWafExceptionsRequest { + r.search = &search + return r +} + +func (r ApiListWafExceptionsRequest) Execute() (*PaginatedWAFRuleList, *http.Response, error) { + return r.ApiService.ListWafExceptionsExecute(r) +} + +/* +ListWafExceptions List Exceptions for a Web Application Firewall (WAF) + +List all Exceptions associated with a specific WAF owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param wafId A unique integer value identifying the WAF. + @return ApiListWafExceptionsRequest +*/ +func (a *WAFsExceptionsAPIService) ListWafExceptions(ctx context.Context, wafId int64) ApiListWafExceptionsRequest { + return ApiListWafExceptionsRequest{ + ApiService: a, + ctx: ctx, + wafId: wafId, + } +} + +// Execute executes the request +// @return PaginatedWAFRuleList +func (a *WAFsExceptionsAPIService) ListWafExceptionsExecute(r ApiListWafExceptionsRequest) (*PaginatedWAFRuleList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedWAFRuleList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsExceptionsAPIService.ListWafExceptions") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/exceptions" + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.createdAtGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at__gte", r.createdAtGte, "form", "") + } + if r.createdAtLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "created_at__lte", r.createdAtLte, "form", "") + } + if r.description != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "description", r.description, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.path != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "path", r.path, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateWafExceptionRequest struct { + ctx context.Context + ApiService *WAFsExceptionsAPIService + exceptionId int64 + wafId int64 + patchedWAFRuleRequest *PatchedWAFRuleRequest +} + +func (r ApiPartialUpdateWafExceptionRequest) PatchedWAFRuleRequest(patchedWAFRuleRequest PatchedWAFRuleRequest) ApiPartialUpdateWafExceptionRequest { + r.patchedWAFRuleRequest = &patchedWAFRuleRequest + return r +} + +func (r ApiPartialUpdateWafExceptionRequest) Execute() (*WAFRuleResponse, *http.Response, error) { + return r.ApiService.PartialUpdateWafExceptionExecute(r) +} + +/* +PartialUpdateWafException Partially update an Exception for a Web Application Firewall (WAF) + +Update one or more fields of an existing exception for a WAF without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exceptionId A unique integer value identifying the WAF exception. + @param wafId A unique integer value identifying the WAF. + @return ApiPartialUpdateWafExceptionRequest +*/ +func (a *WAFsExceptionsAPIService) PartialUpdateWafException(ctx context.Context, exceptionId int64, wafId int64) ApiPartialUpdateWafExceptionRequest { + return ApiPartialUpdateWafExceptionRequest{ + ApiService: a, + ctx: ctx, + exceptionId: exceptionId, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFRuleResponse +func (a *WAFsExceptionsAPIService) PartialUpdateWafExceptionExecute(r ApiPartialUpdateWafExceptionRequest) (*WAFRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsExceptionsAPIService.PartialUpdateWafException") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/exceptions/{exception_id}" + localVarPath = strings.Replace(localVarPath, "{"+"exception_id"+"}", url.PathEscape(parameterValueToString(r.exceptionId, "exceptionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedWAFRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveWafExceptionRequest struct { + ctx context.Context + ApiService *WAFsExceptionsAPIService + exceptionId int64 + wafId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveWafExceptionRequest) Fields(fields string) ApiRetrieveWafExceptionRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveWafExceptionRequest) Execute() (*WAFRuleResponse, *http.Response, error) { + return r.ApiService.RetrieveWafExceptionExecute(r) +} + +/* +RetrieveWafException Retrieve details of an Exception from a Web Application Firewall (WAF) + +Retrieve details of a specific Exception from a WAF in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exceptionId A unique integer value identifying the WAF exception. + @param wafId A unique integer value identifying the WAF. + @return ApiRetrieveWafExceptionRequest +*/ +func (a *WAFsExceptionsAPIService) RetrieveWafException(ctx context.Context, exceptionId int64, wafId int64) ApiRetrieveWafExceptionRequest { + return ApiRetrieveWafExceptionRequest{ + ApiService: a, + ctx: ctx, + exceptionId: exceptionId, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFRuleResponse +func (a *WAFsExceptionsAPIService) RetrieveWafExceptionExecute(r ApiRetrieveWafExceptionRequest) (*WAFRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsExceptionsAPIService.RetrieveWafException") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/exceptions/{exception_id}" + localVarPath = strings.Replace(localVarPath, "{"+"exception_id"+"}", url.PathEscape(parameterValueToString(r.exceptionId, "exceptionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateWafExceptionRequest struct { + ctx context.Context + ApiService *WAFsExceptionsAPIService + exceptionId int64 + wafId int64 + wAFRuleRequest *WAFRuleRequest +} + +func (r ApiUpdateWafExceptionRequest) WAFRuleRequest(wAFRuleRequest WAFRuleRequest) ApiUpdateWafExceptionRequest { + r.wAFRuleRequest = &wAFRuleRequest + return r +} + +func (r ApiUpdateWafExceptionRequest) Execute() (*WAFRuleResponse, *http.Response, error) { + return r.ApiService.UpdateWafExceptionExecute(r) +} + +/* +UpdateWafException Update an Exception for a Web Application Firewall (WAF) + +Update an existing Exception for a WAF. This replaces the entire rule with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param exceptionId A unique integer value identifying the WAF exception. + @param wafId A unique integer value identifying the WAF. + @return ApiUpdateWafExceptionRequest +*/ +func (a *WAFsExceptionsAPIService) UpdateWafException(ctx context.Context, exceptionId int64, wafId int64) ApiUpdateWafExceptionRequest { + return ApiUpdateWafExceptionRequest{ + ApiService: a, + ctx: ctx, + exceptionId: exceptionId, + wafId: wafId, + } +} + +// Execute executes the request +// @return WAFRuleResponse +func (a *WAFsExceptionsAPIService) UpdateWafExceptionExecute(r ApiUpdateWafExceptionRequest) (*WAFRuleResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WAFRuleResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WAFsExceptionsAPIService.UpdateWafException") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/wafs/{waf_id}/exceptions/{exception_id}" + localVarPath = strings.Replace(localVarPath, "{"+"exception_id"+"}", url.PathEscape(parameterValueToString(r.exceptionId, "exceptionId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"waf_id"+"}", url.PathEscape(parameterValueToString(r.wafId, "wafId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.wAFRuleRequest == nil { + return localVarReturnValue, nil, reportError("wAFRuleRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.wAFRuleRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_workload_deployments.go b/azion-api/api_workload_deployments.go new file mode 100644 index 0000000..e89ba30 --- /dev/null +++ b/azion-api/api_workload_deployments.go @@ -0,0 +1,1385 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// WorkloadDeploymentsAPIService WorkloadDeploymentsAPI service +type WorkloadDeploymentsAPIService service + +type ApiCreateWorkloadDeploymentRequest struct { + ctx context.Context + ApiService *WorkloadDeploymentsAPIService + workloadId int64 + workloadDeploymentRequest *WorkloadDeploymentRequest +} + +func (r ApiCreateWorkloadDeploymentRequest) WorkloadDeploymentRequest(workloadDeploymentRequest WorkloadDeploymentRequest) ApiCreateWorkloadDeploymentRequest { + r.workloadDeploymentRequest = &workloadDeploymentRequest + return r +} + +func (r ApiCreateWorkloadDeploymentRequest) Execute() (*WorkloadDeploymentResponse, *http.Response, error) { + return r.ApiService.CreateWorkloadDeploymentExecute(r) +} + +/* +CreateWorkloadDeployment Create a Workload Deployment + +Create a new Workload Deployment in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workloadId A unique integer value identifying the workload. + @return ApiCreateWorkloadDeploymentRequest +*/ +func (a *WorkloadDeploymentsAPIService) CreateWorkloadDeployment(ctx context.Context, workloadId int64) ApiCreateWorkloadDeploymentRequest { + return ApiCreateWorkloadDeploymentRequest{ + ApiService: a, + ctx: ctx, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadDeploymentResponse +func (a *WorkloadDeploymentsAPIService) CreateWorkloadDeploymentExecute(r ApiCreateWorkloadDeploymentRequest) (*WorkloadDeploymentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadDeploymentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadDeploymentsAPIService.CreateWorkloadDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}/deployments" + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.workloadDeploymentRequest == nil { + return localVarReturnValue, nil, reportError("workloadDeploymentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workloadDeploymentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteWorkloadDeploymentRequest struct { + ctx context.Context + ApiService *WorkloadDeploymentsAPIService + deploymentId int64 + workloadId int64 +} + +func (r ApiDeleteWorkloadDeploymentRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteWorkloadDeploymentExecute(r) +} + +/* +DeleteWorkloadDeployment Delete a Workload Deployment + +Delete a specific Workload Deployment in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param deploymentId A unique integer value identifying the deployment. + @param workloadId A unique integer value identifying the workload. + @return ApiDeleteWorkloadDeploymentRequest +*/ +func (a *WorkloadDeploymentsAPIService) DeleteWorkloadDeployment(ctx context.Context, deploymentId int64, workloadId int64) ApiDeleteWorkloadDeploymentRequest { + return ApiDeleteWorkloadDeploymentRequest{ + ApiService: a, + ctx: ctx, + deploymentId: deploymentId, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *WorkloadDeploymentsAPIService) DeleteWorkloadDeploymentExecute(r ApiDeleteWorkloadDeploymentRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadDeploymentsAPIService.DeleteWorkloadDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}/deployments/{deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"deployment_id"+"}", url.PathEscape(parameterValueToString(r.deploymentId, "deploymentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListWorkloadDeploymentsRequest struct { + ctx context.Context + ApiService *WorkloadDeploymentsAPIService + workloadId int64 + current *bool + fields *string + id *int64 + ordering *string + page *int32 + pageSize *int32 + search *string + tag *string +} + +// Filter by current status. +func (r ApiListWorkloadDeploymentsRequest) Current(current bool) ApiListWorkloadDeploymentsRequest { + r.current = ¤t + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListWorkloadDeploymentsRequest) Fields(fields string) ApiListWorkloadDeploymentsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListWorkloadDeploymentsRequest) Id(id int64) ApiListWorkloadDeploymentsRequest { + r.id = &id + return r +} + +// Which field to use when ordering the results. +func (r ApiListWorkloadDeploymentsRequest) Ordering(ordering string) ApiListWorkloadDeploymentsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListWorkloadDeploymentsRequest) Page(page int32) ApiListWorkloadDeploymentsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListWorkloadDeploymentsRequest) PageSize(pageSize int32) ApiListWorkloadDeploymentsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListWorkloadDeploymentsRequest) Search(search string) ApiListWorkloadDeploymentsRequest { + r.search = &search + return r +} + +// Filter by tag (case-insensitive, partial match). +func (r ApiListWorkloadDeploymentsRequest) Tag(tag string) ApiListWorkloadDeploymentsRequest { + r.tag = &tag + return r +} + +func (r ApiListWorkloadDeploymentsRequest) Execute() (*PaginatedWorkloadDeploymentList, *http.Response, error) { + return r.ApiService.ListWorkloadDeploymentsExecute(r) +} + +/* +ListWorkloadDeployments List Workload Deployments + +List all Workload Deployments related to your account's Workloads. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workloadId A unique integer value identifying the workload. + @return ApiListWorkloadDeploymentsRequest +*/ +func (a *WorkloadDeploymentsAPIService) ListWorkloadDeployments(ctx context.Context, workloadId int64) ApiListWorkloadDeploymentsRequest { + return ApiListWorkloadDeploymentsRequest{ + ApiService: a, + ctx: ctx, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return PaginatedWorkloadDeploymentList +func (a *WorkloadDeploymentsAPIService) ListWorkloadDeploymentsExecute(r ApiListWorkloadDeploymentsRequest) (*PaginatedWorkloadDeploymentList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedWorkloadDeploymentList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadDeploymentsAPIService.ListWorkloadDeployments") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}/deployments" + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.current != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "current", r.current, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + if r.tag != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateWorkloadDeploymentRequest struct { + ctx context.Context + ApiService *WorkloadDeploymentsAPIService + deploymentId int64 + workloadId int64 + patchedWorkloadDeploymentRequest *PatchedWorkloadDeploymentRequest +} + +func (r ApiPartialUpdateWorkloadDeploymentRequest) PatchedWorkloadDeploymentRequest(patchedWorkloadDeploymentRequest PatchedWorkloadDeploymentRequest) ApiPartialUpdateWorkloadDeploymentRequest { + r.patchedWorkloadDeploymentRequest = &patchedWorkloadDeploymentRequest + return r +} + +func (r ApiPartialUpdateWorkloadDeploymentRequest) Execute() (*WorkloadDeploymentResponse, *http.Response, error) { + return r.ApiService.PartialUpdateWorkloadDeploymentExecute(r) +} + +/* +PartialUpdateWorkloadDeployment Partially update a Workload Deployment + +Update one or more fields of an existing Workload Deployment without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param deploymentId A unique integer value identifying the deployment. + @param workloadId A unique integer value identifying the workload. + @return ApiPartialUpdateWorkloadDeploymentRequest +*/ +func (a *WorkloadDeploymentsAPIService) PartialUpdateWorkloadDeployment(ctx context.Context, deploymentId int64, workloadId int64) ApiPartialUpdateWorkloadDeploymentRequest { + return ApiPartialUpdateWorkloadDeploymentRequest{ + ApiService: a, + ctx: ctx, + deploymentId: deploymentId, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadDeploymentResponse +func (a *WorkloadDeploymentsAPIService) PartialUpdateWorkloadDeploymentExecute(r ApiPartialUpdateWorkloadDeploymentRequest) (*WorkloadDeploymentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadDeploymentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadDeploymentsAPIService.PartialUpdateWorkloadDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}/deployments/{deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"deployment_id"+"}", url.PathEscape(parameterValueToString(r.deploymentId, "deploymentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedWorkloadDeploymentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveWorkloadDeploymentRequest struct { + ctx context.Context + ApiService *WorkloadDeploymentsAPIService + deploymentId int64 + workloadId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveWorkloadDeploymentRequest) Fields(fields string) ApiRetrieveWorkloadDeploymentRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveWorkloadDeploymentRequest) Execute() (*WorkloadDeploymentResponse, *http.Response, error) { + return r.ApiService.RetrieveWorkloadDeploymentExecute(r) +} + +/* +RetrieveWorkloadDeployment Retrieve details of a Workload Deployment + +Retrieve details of a specific Workload Deployment in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param deploymentId A unique integer value identifying the deployment. + @param workloadId A unique integer value identifying the workload. + @return ApiRetrieveWorkloadDeploymentRequest +*/ +func (a *WorkloadDeploymentsAPIService) RetrieveWorkloadDeployment(ctx context.Context, deploymentId int64, workloadId int64) ApiRetrieveWorkloadDeploymentRequest { + return ApiRetrieveWorkloadDeploymentRequest{ + ApiService: a, + ctx: ctx, + deploymentId: deploymentId, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadDeploymentResponse +func (a *WorkloadDeploymentsAPIService) RetrieveWorkloadDeploymentExecute(r ApiRetrieveWorkloadDeploymentRequest) (*WorkloadDeploymentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadDeploymentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadDeploymentsAPIService.RetrieveWorkloadDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}/deployments/{deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"deployment_id"+"}", url.PathEscape(parameterValueToString(r.deploymentId, "deploymentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateWorkloadDeploymentRequest struct { + ctx context.Context + ApiService *WorkloadDeploymentsAPIService + deploymentId int64 + workloadId int64 + workloadDeploymentRequest *WorkloadDeploymentRequest +} + +func (r ApiUpdateWorkloadDeploymentRequest) WorkloadDeploymentRequest(workloadDeploymentRequest WorkloadDeploymentRequest) ApiUpdateWorkloadDeploymentRequest { + r.workloadDeploymentRequest = &workloadDeploymentRequest + return r +} + +func (r ApiUpdateWorkloadDeploymentRequest) Execute() (*WorkloadDeploymentResponse, *http.Response, error) { + return r.ApiService.UpdateWorkloadDeploymentExecute(r) +} + +/* +UpdateWorkloadDeployment Update a Workload Deployment + +Update an existing Workload Deployment. This replaces the entire Workload Deployment with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param deploymentId A unique integer value identifying the deployment. + @param workloadId A unique integer value identifying the workload. + @return ApiUpdateWorkloadDeploymentRequest +*/ +func (a *WorkloadDeploymentsAPIService) UpdateWorkloadDeployment(ctx context.Context, deploymentId int64, workloadId int64) ApiUpdateWorkloadDeploymentRequest { + return ApiUpdateWorkloadDeploymentRequest{ + ApiService: a, + ctx: ctx, + deploymentId: deploymentId, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadDeploymentResponse +func (a *WorkloadDeploymentsAPIService) UpdateWorkloadDeploymentExecute(r ApiUpdateWorkloadDeploymentRequest) (*WorkloadDeploymentResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadDeploymentResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadDeploymentsAPIService.UpdateWorkloadDeployment") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}/deployments/{deployment_id}" + localVarPath = strings.Replace(localVarPath, "{"+"deployment_id"+"}", url.PathEscape(parameterValueToString(r.deploymentId, "deploymentId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.workloadDeploymentRequest == nil { + return localVarReturnValue, nil, reportError("workloadDeploymentRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workloadDeploymentRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/api_workloads.go b/azion-api/api_workloads.go new file mode 100644 index 0000000..f461001 --- /dev/null +++ b/azion-api/api_workloads.go @@ -0,0 +1,1432 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// WorkloadsAPIService WorkloadsAPI service +type WorkloadsAPIService service + +type ApiCreateWorkloadRequest struct { + ctx context.Context + ApiService *WorkloadsAPIService + workloadRequest *WorkloadRequest +} + +func (r ApiCreateWorkloadRequest) WorkloadRequest(workloadRequest WorkloadRequest) ApiCreateWorkloadRequest { + r.workloadRequest = &workloadRequest + return r +} + +func (r ApiCreateWorkloadRequest) Execute() (*WorkloadResponse, *http.Response, error) { + return r.ApiService.CreateWorkloadExecute(r) +} + +/* +CreateWorkload Create an Workload + +Create a new Workload in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateWorkloadRequest +*/ +func (a *WorkloadsAPIService) CreateWorkload(ctx context.Context) ApiCreateWorkloadRequest { + return ApiCreateWorkloadRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return WorkloadResponse +func (a *WorkloadsAPIService) CreateWorkloadExecute(r ApiCreateWorkloadRequest) (*WorkloadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadsAPIService.CreateWorkload") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.workloadRequest == nil { + return localVarReturnValue, nil, reportError("workloadRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workloadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteWorkloadRequest struct { + ctx context.Context + ApiService *WorkloadsAPIService + workloadId int64 +} + +func (r ApiDeleteWorkloadRequest) Execute() (*DeleteResponse, *http.Response, error) { + return r.ApiService.DeleteWorkloadExecute(r) +} + +/* +DeleteWorkload Delete an Workload + +Delete a specific Workload in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workloadId A unique integer value identifying the workload. + @return ApiDeleteWorkloadRequest +*/ +func (a *WorkloadsAPIService) DeleteWorkload(ctx context.Context, workloadId int64) ApiDeleteWorkloadRequest { + return ApiDeleteWorkloadRequest{ + ApiService: a, + ctx: ctx, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return DeleteResponse +func (a *WorkloadsAPIService) DeleteWorkloadExecute(r ApiDeleteWorkloadRequest) (*DeleteResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *DeleteResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadsAPIService.DeleteWorkload") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}" + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListWorkloadsRequest struct { + ctx context.Context + ApiService *WorkloadsAPIService + active *bool + digitalCertificateId *int64 + fields *string + id *int64 + infrastructure *string + lastEditor *string + lastModifiedGte *time.Time + lastModifiedLte *time.Time + mapName *string + mtlsTrustedCaCertificateId *int64 + name *string + ordering *string + page *int32 + pageSize *int32 + search *string +} + +// Filter by active status. +func (r ApiListWorkloadsRequest) Active(active bool) ApiListWorkloadsRequest { + r.active = &active + return r +} + +// Filter by digital certificate id (accepts comma-separated values). +func (r ApiListWorkloadsRequest) DigitalCertificateId(digitalCertificateId int64) ApiListWorkloadsRequest { + r.digitalCertificateId = &digitalCertificateId + return r +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiListWorkloadsRequest) Fields(fields string) ApiListWorkloadsRequest { + r.fields = &fields + return r +} + +// Filter by id (accepts comma-separated values). +func (r ApiListWorkloadsRequest) Id(id int64) ApiListWorkloadsRequest { + r.id = &id + return r +} + +// Filter by infrastructure (accepts comma-separated values). +func (r ApiListWorkloadsRequest) Infrastructure(infrastructure string) ApiListWorkloadsRequest { + r.infrastructure = &infrastructure + return r +} + +// Filter by last editor (case-insensitive, partial match). +func (r ApiListWorkloadsRequest) LastEditor(lastEditor string) ApiListWorkloadsRequest { + r.lastEditor = &lastEditor + return r +} + +// Filter by last modified date (greater than or equal). +func (r ApiListWorkloadsRequest) LastModifiedGte(lastModifiedGte time.Time) ApiListWorkloadsRequest { + r.lastModifiedGte = &lastModifiedGte + return r +} + +// Filter by last modified date (less than or equal). +func (r ApiListWorkloadsRequest) LastModifiedLte(lastModifiedLte time.Time) ApiListWorkloadsRequest { + r.lastModifiedLte = &lastModifiedLte + return r +} + +// Filter by map name (case-insensitive, partial match). +func (r ApiListWorkloadsRequest) MapName(mapName string) ApiListWorkloadsRequest { + r.mapName = &mapName + return r +} + +// Filter by mTLS trusted CA certificate id (accepts comma-separated values). +func (r ApiListWorkloadsRequest) MtlsTrustedCaCertificateId(mtlsTrustedCaCertificateId int64) ApiListWorkloadsRequest { + r.mtlsTrustedCaCertificateId = &mtlsTrustedCaCertificateId + return r +} + +// Filter by name (case-insensitive, partial match). +func (r ApiListWorkloadsRequest) Name(name string) ApiListWorkloadsRequest { + r.name = &name + return r +} + +// Which field to use when ordering the results. +func (r ApiListWorkloadsRequest) Ordering(ordering string) ApiListWorkloadsRequest { + r.ordering = &ordering + return r +} + +// A page number within the paginated result set. +func (r ApiListWorkloadsRequest) Page(page int32) ApiListWorkloadsRequest { + r.page = &page + return r +} + +// A numeric value that indicates the number of items per page. +func (r ApiListWorkloadsRequest) PageSize(pageSize int32) ApiListWorkloadsRequest { + r.pageSize = &pageSize + return r +} + +// A search term. +func (r ApiListWorkloadsRequest) Search(search string) ApiListWorkloadsRequest { + r.search = &search + return r +} + +func (r ApiListWorkloadsRequest) Execute() (*PaginatedWorkloadList, *http.Response, error) { + return r.ApiService.ListWorkloadsExecute(r) +} + +/* +ListWorkloads List Workloads + +List all Workloads owned by your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListWorkloadsRequest +*/ +func (a *WorkloadsAPIService) ListWorkloads(ctx context.Context) ApiListWorkloadsRequest { + return ApiListWorkloadsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return PaginatedWorkloadList +func (a *WorkloadsAPIService) ListWorkloadsExecute(r ApiListWorkloadsRequest) (*PaginatedWorkloadList, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *PaginatedWorkloadList + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadsAPIService.ListWorkloads") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.active != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "active", r.active, "form", "") + } + if r.digitalCertificateId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "digital_certificate_id", r.digitalCertificateId, "form", "") + } + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "form", "") + } + if r.infrastructure != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "infrastructure", r.infrastructure, "form", "") + } + if r.lastEditor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_editor", r.lastEditor, "form", "") + } + if r.lastModifiedGte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__gte", r.lastModifiedGte, "form", "") + } + if r.lastModifiedLte != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "last_modified__lte", r.lastModifiedLte, "form", "") + } + if r.mapName != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "map_name", r.mapName, "form", "") + } + if r.mtlsTrustedCaCertificateId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "mtls_trusted_ca_certificate_id", r.mtlsTrustedCaCertificateId, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.ordering != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ordering", r.ordering, "form", "") + } + if r.page != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page", r.page, "form", "") + } + if r.pageSize != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "page_size", r.pageSize, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiPartialUpdateWorkloadRequest struct { + ctx context.Context + ApiService *WorkloadsAPIService + workloadId int64 + patchedWorkloadRequest *PatchedWorkloadRequest +} + +func (r ApiPartialUpdateWorkloadRequest) PatchedWorkloadRequest(patchedWorkloadRequest PatchedWorkloadRequest) ApiPartialUpdateWorkloadRequest { + r.patchedWorkloadRequest = &patchedWorkloadRequest + return r +} + +func (r ApiPartialUpdateWorkloadRequest) Execute() (*WorkloadResponse, *http.Response, error) { + return r.ApiService.PartialUpdateWorkloadExecute(r) +} + +/* +PartialUpdateWorkload Partially update an Workload + +Update one or more fields of an existing Workload without affecting other fields. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workloadId A unique integer value identifying the workload. + @return ApiPartialUpdateWorkloadRequest +*/ +func (a *WorkloadsAPIService) PartialUpdateWorkload(ctx context.Context, workloadId int64) ApiPartialUpdateWorkloadRequest { + return ApiPartialUpdateWorkloadRequest{ + ApiService: a, + ctx: ctx, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadResponse +func (a *WorkloadsAPIService) PartialUpdateWorkloadExecute(r ApiPartialUpdateWorkloadRequest) (*WorkloadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadsAPIService.PartialUpdateWorkload") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}" + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.patchedWorkloadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiRetrieveWorkloadRequest struct { + ctx context.Context + ApiService *WorkloadsAPIService + workloadId int64 + fields *string +} + +// Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. +func (r ApiRetrieveWorkloadRequest) Fields(fields string) ApiRetrieveWorkloadRequest { + r.fields = &fields + return r +} + +func (r ApiRetrieveWorkloadRequest) Execute() (*WorkloadResponse, *http.Response, error) { + return r.ApiService.RetrieveWorkloadExecute(r) +} + +/* +RetrieveWorkload Retrieve details of an Workload + +Retrieve details of a specific Workload in your account. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workloadId A unique integer value identifying the workload. + @return ApiRetrieveWorkloadRequest +*/ +func (a *WorkloadsAPIService) RetrieveWorkload(ctx context.Context, workloadId int64) ApiRetrieveWorkloadRequest { + return ApiRetrieveWorkloadRequest{ + ApiService: a, + ctx: ctx, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadResponse +func (a *WorkloadsAPIService) RetrieveWorkloadExecute(r ApiRetrieveWorkloadRequest) (*WorkloadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadsAPIService.RetrieveWorkload") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}" + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.fields != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "fields", r.fields, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateWorkloadRequest struct { + ctx context.Context + ApiService *WorkloadsAPIService + workloadId int64 + workloadRequest *WorkloadRequest +} + +func (r ApiUpdateWorkloadRequest) WorkloadRequest(workloadRequest WorkloadRequest) ApiUpdateWorkloadRequest { + r.workloadRequest = &workloadRequest + return r +} + +func (r ApiUpdateWorkloadRequest) Execute() (*WorkloadResponse, *http.Response, error) { + return r.ApiService.UpdateWorkloadExecute(r) +} + +/* +UpdateWorkload Update an Workload + +Update an existing Workload. This replaces the entire Workload with the new data provided. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param workloadId A unique integer value identifying the workload. + @return ApiUpdateWorkloadRequest +*/ +func (a *WorkloadsAPIService) UpdateWorkload(ctx context.Context, workloadId int64) ApiUpdateWorkloadRequest { + return ApiUpdateWorkloadRequest{ + ApiService: a, + ctx: ctx, + workloadId: workloadId, + } +} + +// Execute executes the request +// @return WorkloadResponse +func (a *WorkloadsAPIService) UpdateWorkloadExecute(r ApiUpdateWorkloadRequest) (*WorkloadResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkloadResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkloadsAPIService.UpdateWorkload") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workspace/workloads/{workload_id}" + localVarPath = strings.Replace(localVarPath, "{"+"workload_id"+"}", url.PathEscape(parameterValueToString(r.workloadId, "workloadId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.workloadRequest == nil { + return localVarReturnValue, nil, reportError("workloadRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.workloadRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["TokenAuth"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 405 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 406 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/azion-api/client.go b/azion-api/client.go new file mode 100644 index 0000000..cc9a34e --- /dev/null +++ b/azion-api/client.go @@ -0,0 +1,893 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + +) + +var ( + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) +) + +// APIClient manages communication with the azion-api API v4.0.0 +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services + + AIStudioChatThreadsAPI *AIStudioChatThreadsAPIService + + AIStudioChunksAPI *AIStudioChunksAPIService + + AIStudioDocumentsAPI *AIStudioDocumentsAPIService + + AIStudioKnowledgeBasesAPI *AIStudioKnowledgeBasesAPIService + + AIStudioMessagesAPI *AIStudioMessagesAPIService + + AIStudioToolsAPI *AIStudioToolsAPIService + + AccountsDescendantsAPI *AccountsDescendantsAPIService + + AccountsInfoAPI *AccountsInfoAPIService + + AccountsLoggedInAPI *AccountsLoggedInAPIService + + ApplicationsAPI *ApplicationsAPIService + + ApplicationsCacheSettingsAPI *ApplicationsCacheSettingsAPIService + + ApplicationsDeviceGroupsAPI *ApplicationsDeviceGroupsAPIService + + ApplicationsFunctionAPI *ApplicationsFunctionAPIService + + ApplicationsRequestRulesAPI *ApplicationsRequestRulesAPIService + + ApplicationsResponseRulesAPI *ApplicationsResponseRulesAPIService + + AuthLoginAPI *AuthLoginAPIService + + AuthMFATOTPDeviceAPI *AuthMFATOTPDeviceAPIService + + AuthRefreshAccessTokenAPI *AuthRefreshAccessTokenAPIService + + AuthRevokeAPI *AuthRevokeAPIService + + BillingInvoicesAPI *BillingInvoicesAPIService + + BillingPaymentsAPI *BillingPaymentsAPIService + + ConnectorsAPI *ConnectorsAPIService + + CustomPagesAPI *CustomPagesAPIService + + DNSDNSSECAPI *DNSDNSSECAPIService + + DNSRecordsAPI *DNSRecordsAPIService + + DNSZonesAPI *DNSZonesAPIService + + DataStreamDataSourcesAPI *DataStreamDataSourcesAPIService + + DataStreamStreamsAPI *DataStreamStreamsAPIService + + DataStreamTemplatesAPI *DataStreamTemplatesAPIService + + DigitalCertificatesCertificateRevocationListsAPI *DigitalCertificatesCertificateRevocationListsAPIService + + DigitalCertificatesCertificateSigningRequestsAPI *DigitalCertificatesCertificateSigningRequestsAPIService + + DigitalCertificatesCertificatesAPI *DigitalCertificatesCertificatesAPIService + + DigitalCertificatesRequestACertificateAPI *DigitalCertificatesRequestACertificateAPIService + + FavoritesAPI *FavoritesAPIService + + FirewallsAPI *FirewallsAPIService + + FirewallsFunctionAPI *FirewallsFunctionAPIService + + FirewallsRulesEngineAPI *FirewallsRulesEngineAPIService + + FunctionsAPI *FunctionsAPIService + + IdentityGrantsAPI *IdentityGrantsAPIService + + IdentityGroupMembersAPI *IdentityGroupMembersAPIService + + IdentityGroupsAPI *IdentityGroupsAPIService + + IdentityLoggedInUserAPI *IdentityLoggedInUserAPIService + + IdentityServiceTokenRenewAPI *IdentityServiceTokenRenewAPIService + + IdentityServiceTokensAPI *IdentityServiceTokensAPIService + + IdentityUserInfoAPI *IdentityUserInfoAPIService + + IdentityUsersAPI *IdentityUsersAPIService + + KVNamespacesAPI *KVNamespacesAPIService + + MetricsDashboardAPI *MetricsDashboardAPIService + + MetricsFoldersAPI *MetricsFoldersAPIService + + MetricsLibraryReportsAPI *MetricsLibraryReportsAPIService + + MetricsRecommendationsAPI *MetricsRecommendationsAPIService + + MetricsReportsAPI *MetricsReportsAPIService + + MetricsRowsAPI *MetricsRowsAPIService + + NetworkListsAPI *NetworkListsAPIService + + OrchestratorNodeGroupsAPI *OrchestratorNodeGroupsAPIService + + OrchestratorNodeServicesAPI *OrchestratorNodeServicesAPIService + + OrchestratorNodesAPI *OrchestratorNodesAPIService + + OrchestratorServiceResourcesAPI *OrchestratorServiceResourcesAPIService + + OrchestratorServicesAPI *OrchestratorServicesAPIService + + PolicyLockoutPolicyAPI *PolicyLockoutPolicyAPIService + + PolicyPoliciesAPI *PolicyPoliciesAPIService + + PolicySessionTimeoutPolicyAPI *PolicySessionTimeoutPolicyAPIService + + PublisherManagementAPI *PublisherManagementAPIService + + PurgeAPI *PurgeAPIService + + SQLAPI *SQLAPIService + + StorageBucketsAPI *StorageBucketsAPIService + + StorageCredentialsAPI *StorageCredentialsAPIService + + StorageObjectsAPI *StorageObjectsAPIService + + UsersLockoutAPI *UsersLockoutAPIService + + VCSContinuousDeploymentExecutionsAPI *VCSContinuousDeploymentExecutionsAPIService + + VCSContinuousDeploymentExecutorAPI *VCSContinuousDeploymentExecutorAPIService + + VCSContinuousDeploymentsAPI *VCSContinuousDeploymentsAPIService + + VCSExecutionScriptsAPI *VCSExecutionScriptsAPIService + + VCSIntegrationsAPI *VCSIntegrationsAPIService + + VCSProvidersAPI *VCSProvidersAPIService + + WAFsAPI *WAFsAPIService + + WAFsExceptionsAPI *WAFsExceptionsAPIService + + WorkloadDeploymentsAPI *WorkloadDeploymentsAPIService + + WorkloadsAPI *WorkloadsAPIService +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + + // API Services + c.AIStudioChatThreadsAPI = (*AIStudioChatThreadsAPIService)(&c.common) + c.AIStudioChunksAPI = (*AIStudioChunksAPIService)(&c.common) + c.AIStudioDocumentsAPI = (*AIStudioDocumentsAPIService)(&c.common) + c.AIStudioKnowledgeBasesAPI = (*AIStudioKnowledgeBasesAPIService)(&c.common) + c.AIStudioMessagesAPI = (*AIStudioMessagesAPIService)(&c.common) + c.AIStudioToolsAPI = (*AIStudioToolsAPIService)(&c.common) + c.AccountsDescendantsAPI = (*AccountsDescendantsAPIService)(&c.common) + c.AccountsInfoAPI = (*AccountsInfoAPIService)(&c.common) + c.AccountsLoggedInAPI = (*AccountsLoggedInAPIService)(&c.common) + c.ApplicationsAPI = (*ApplicationsAPIService)(&c.common) + c.ApplicationsCacheSettingsAPI = (*ApplicationsCacheSettingsAPIService)(&c.common) + c.ApplicationsDeviceGroupsAPI = (*ApplicationsDeviceGroupsAPIService)(&c.common) + c.ApplicationsFunctionAPI = (*ApplicationsFunctionAPIService)(&c.common) + c.ApplicationsRequestRulesAPI = (*ApplicationsRequestRulesAPIService)(&c.common) + c.ApplicationsResponseRulesAPI = (*ApplicationsResponseRulesAPIService)(&c.common) + c.AuthLoginAPI = (*AuthLoginAPIService)(&c.common) + c.AuthMFATOTPDeviceAPI = (*AuthMFATOTPDeviceAPIService)(&c.common) + c.AuthRefreshAccessTokenAPI = (*AuthRefreshAccessTokenAPIService)(&c.common) + c.AuthRevokeAPI = (*AuthRevokeAPIService)(&c.common) + c.BillingInvoicesAPI = (*BillingInvoicesAPIService)(&c.common) + c.BillingPaymentsAPI = (*BillingPaymentsAPIService)(&c.common) + c.ConnectorsAPI = (*ConnectorsAPIService)(&c.common) + c.CustomPagesAPI = (*CustomPagesAPIService)(&c.common) + c.DNSDNSSECAPI = (*DNSDNSSECAPIService)(&c.common) + c.DNSRecordsAPI = (*DNSRecordsAPIService)(&c.common) + c.DNSZonesAPI = (*DNSZonesAPIService)(&c.common) + c.DataStreamDataSourcesAPI = (*DataStreamDataSourcesAPIService)(&c.common) + c.DataStreamStreamsAPI = (*DataStreamStreamsAPIService)(&c.common) + c.DataStreamTemplatesAPI = (*DataStreamTemplatesAPIService)(&c.common) + c.DigitalCertificatesCertificateRevocationListsAPI = (*DigitalCertificatesCertificateRevocationListsAPIService)(&c.common) + c.DigitalCertificatesCertificateSigningRequestsAPI = (*DigitalCertificatesCertificateSigningRequestsAPIService)(&c.common) + c.DigitalCertificatesCertificatesAPI = (*DigitalCertificatesCertificatesAPIService)(&c.common) + c.DigitalCertificatesRequestACertificateAPI = (*DigitalCertificatesRequestACertificateAPIService)(&c.common) + c.FavoritesAPI = (*FavoritesAPIService)(&c.common) + c.FirewallsAPI = (*FirewallsAPIService)(&c.common) + c.FirewallsFunctionAPI = (*FirewallsFunctionAPIService)(&c.common) + c.FirewallsRulesEngineAPI = (*FirewallsRulesEngineAPIService)(&c.common) + c.FunctionsAPI = (*FunctionsAPIService)(&c.common) + c.IdentityGrantsAPI = (*IdentityGrantsAPIService)(&c.common) + c.IdentityGroupMembersAPI = (*IdentityGroupMembersAPIService)(&c.common) + c.IdentityGroupsAPI = (*IdentityGroupsAPIService)(&c.common) + c.IdentityLoggedInUserAPI = (*IdentityLoggedInUserAPIService)(&c.common) + c.IdentityServiceTokenRenewAPI = (*IdentityServiceTokenRenewAPIService)(&c.common) + c.IdentityServiceTokensAPI = (*IdentityServiceTokensAPIService)(&c.common) + c.IdentityUserInfoAPI = (*IdentityUserInfoAPIService)(&c.common) + c.IdentityUsersAPI = (*IdentityUsersAPIService)(&c.common) + c.KVNamespacesAPI = (*KVNamespacesAPIService)(&c.common) + c.MetricsDashboardAPI = (*MetricsDashboardAPIService)(&c.common) + c.MetricsFoldersAPI = (*MetricsFoldersAPIService)(&c.common) + c.MetricsLibraryReportsAPI = (*MetricsLibraryReportsAPIService)(&c.common) + c.MetricsRecommendationsAPI = (*MetricsRecommendationsAPIService)(&c.common) + c.MetricsReportsAPI = (*MetricsReportsAPIService)(&c.common) + c.MetricsRowsAPI = (*MetricsRowsAPIService)(&c.common) + c.NetworkListsAPI = (*NetworkListsAPIService)(&c.common) + c.OrchestratorNodeGroupsAPI = (*OrchestratorNodeGroupsAPIService)(&c.common) + c.OrchestratorNodeServicesAPI = (*OrchestratorNodeServicesAPIService)(&c.common) + c.OrchestratorNodesAPI = (*OrchestratorNodesAPIService)(&c.common) + c.OrchestratorServiceResourcesAPI = (*OrchestratorServiceResourcesAPIService)(&c.common) + c.OrchestratorServicesAPI = (*OrchestratorServicesAPIService)(&c.common) + c.PolicyLockoutPolicyAPI = (*PolicyLockoutPolicyAPIService)(&c.common) + c.PolicyPoliciesAPI = (*PolicyPoliciesAPIService)(&c.common) + c.PolicySessionTimeoutPolicyAPI = (*PolicySessionTimeoutPolicyAPIService)(&c.common) + c.PublisherManagementAPI = (*PublisherManagementAPIService)(&c.common) + c.PurgeAPI = (*PurgeAPIService)(&c.common) + c.SQLAPI = (*SQLAPIService)(&c.common) + c.StorageBucketsAPI = (*StorageBucketsAPIService)(&c.common) + c.StorageCredentialsAPI = (*StorageCredentialsAPIService)(&c.common) + c.StorageObjectsAPI = (*StorageObjectsAPIService)(&c.common) + c.UsersLockoutAPI = (*UsersLockoutAPIService)(&c.common) + c.VCSContinuousDeploymentExecutionsAPI = (*VCSContinuousDeploymentExecutionsAPIService)(&c.common) + c.VCSContinuousDeploymentExecutorAPI = (*VCSContinuousDeploymentExecutorAPIService)(&c.common) + c.VCSContinuousDeploymentsAPI = (*VCSContinuousDeploymentsAPIService)(&c.common) + c.VCSExecutionScriptsAPI = (*VCSExecutionScriptsAPIService)(&c.common) + c.VCSIntegrationsAPI = (*VCSIntegrationsAPIService)(&c.common) + c.VCSProvidersAPI = (*VCSProvidersAPIService)(&c.common) + c.WAFsAPI = (*WAFsAPIService)(&c.common) + c.WAFsExceptionsAPI = (*WAFsExceptionsAPIService)(&c.common) + c.WorkloadDeploymentsAPI = (*WorkloadDeploymentsAPIService)(&c.common) + c.WorkloadsAPI = (*WorkloadsAPIService)(&c.common) + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, style string, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if XmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if JsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + defer file.Close() + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if JsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if XmlCheck.MatchString(contentType) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/azion-api/configuration.go b/azion-api/configuration.go new file mode 100644 index 0000000..2b8768a --- /dev/null +++ b/azion-api/configuration.go @@ -0,0 +1,222 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "context" + "fmt" + "net/http" + "strings" +) + +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). + +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKeys takes a string apikey as authentication for the request + ContextAPIKeys = contextKey("apiKeys") + + // ContextServerIndex uses a server configuration from the index. + ContextServerIndex = contextKey("serverIndex") + + // ContextOperationServerIndices uses a server configuration from the index mapping. + ContextOperationServerIndices = contextKey("serverOperationIndices") + + // ContextServerVariables overrides a server configuration variables. + ContextServerVariables = contextKey("serverVariables") + + // ContextOperationServerVariables overrides a server configuration variables using operation specific values. + ContextOperationServerVariables = contextKey("serverOperationVariables") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth +type BasicAuth struct { + UserName string `json:"userName,omitempty"` + Password string `json:"password,omitempty"` +} + +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey +type APIKey struct { + Key string + Prefix string +} + +// ServerVariable stores the information about a server variable +type ServerVariable struct { + Description string + DefaultValue string + EnumValues []string +} + +// ServerConfiguration stores the information about a server +type ServerConfiguration struct { + URL string + Description string + Variables map[string]ServerVariable +} + +// ServerConfigurations stores multiple ServerConfiguration items +type ServerConfigurations []ServerConfiguration + +// Configuration stores the configuration of the API client +type Configuration struct { + Host string `json:"host,omitempty"` + Scheme string `json:"scheme,omitempty"` + DefaultHeader map[string]string `json:"defaultHeader,omitempty"` + UserAgent string `json:"userAgent,omitempty"` + Debug bool `json:"debug,omitempty"` + Servers ServerConfigurations + OperationServers map[string]ServerConfigurations + HTTPClient *http.Client +} + +// NewConfiguration returns a new Configuration object +func NewConfiguration() *Configuration { + cfg := &Configuration{ + DefaultHeader: make(map[string]string), + UserAgent: "OpenAPI-Generator/1.0.0/go", + Debug: false, + Servers: ServerConfigurations{ + { + URL: "https://stage-api.azion.com/v4", + Description: "No description provided", + }, + }, + OperationServers: map[string]ServerConfigurations{ + }, + } + return cfg +} + +// AddDefaultHeader adds a new HTTP header to the default header in the request +func (c *Configuration) AddDefaultHeader(key string, value string) { + c.DefaultHeader[key] = value +} + +// URL formats template on a index using given variables +func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { + if index < 0 || len(sc) <= index { + return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1) + } + server := sc[index] + url := server.URL + + // go through variables and replace placeholders + for name, variable := range server.Variables { + if value, ok := variables[name]; ok { + found := bool(len(variable.EnumValues) == 0) + for _, enumValue := range variable.EnumValues { + if value == enumValue { + found = true + } + } + if !found { + return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) + } + url = strings.Replace(url, "{"+name+"}", value, -1) + } else { + url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) + } + } + return url, nil +} + +// ServerURL returns URL based on server settings +func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { + return c.Servers.URL(index, variables) +} + +func getServerIndex(ctx context.Context) (int, error) { + si := ctx.Value(ContextServerIndex) + if si != nil { + if index, ok := si.(int); ok { + return index, nil + } + return 0, reportError("Invalid type %T should be int", si) + } + return 0, nil +} + +func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { + osi := ctx.Value(ContextOperationServerIndices) + if osi != nil { + if operationIndices, ok := osi.(map[string]int); !ok { + return 0, reportError("Invalid type %T should be map[string]int", osi) + } else { + index, ok := operationIndices[endpoint] + if ok { + return index, nil + } + } + } + return getServerIndex(ctx) +} + +func getServerVariables(ctx context.Context) (map[string]string, error) { + sv := ctx.Value(ContextServerVariables) + if sv != nil { + if variables, ok := sv.(map[string]string); ok { + return variables, nil + } + return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) + } + return nil, nil +} + +func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { + osv := ctx.Value(ContextOperationServerVariables) + if osv != nil { + if operationVariables, ok := osv.(map[string]map[string]string); !ok { + return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) + } else { + variables, ok := operationVariables[endpoint] + if ok { + return variables, nil + } + } + } + return getServerVariables(ctx) +} + +// ServerURLWithContext returns a new server URL given an endpoint +func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { + sc, ok := c.OperationServers[endpoint] + if !ok { + sc = c.Servers + } + + if ctx == nil { + return sc.URL(0, nil) + } + + index, err := getServerOperationIndex(ctx, endpoint) + if err != nil { + return "", err + } + + variables, err := getServerOperationVariables(ctx, endpoint) + if err != nil { + return "", err + } + + return sc.URL(index, variables) +} diff --git a/azion-api/docs/AIStudioChatThreadsAPI.md b/azion-api/docs/AIStudioChatThreadsAPI.md new file mode 100644 index 0000000..02a86dd --- /dev/null +++ b/azion-api/docs/AIStudioChatThreadsAPI.md @@ -0,0 +1,440 @@ +# \AIStudioChatThreadsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateChatThread**](AIStudioChatThreadsAPI.md#CreateChatThread) | **Post** /workspace/ai/threads | Create a chat thread +[**DestroyAChatThread**](AIStudioChatThreadsAPI.md#DestroyAChatThread) | **Delete** /workspace/ai/threads/{thread_id} | Destroy a chat thread +[**ListChatThreads**](AIStudioChatThreadsAPI.md#ListChatThreads) | **Get** /workspace/ai/threads | List chat threads +[**PartialUpdateChatThread**](AIStudioChatThreadsAPI.md#PartialUpdateChatThread) | **Patch** /workspace/ai/threads/{thread_id} | Partially update a chat thread +[**RetriveChatThread**](AIStudioChatThreadsAPI.md#RetriveChatThread) | **Get** /workspace/ai/threads/{thread_id} | Retrieve details from a chat thread +[**UpdateChatThread**](AIStudioChatThreadsAPI.md#UpdateChatThread) | **Put** /workspace/ai/threads/{thread_id} | Update a chat thread + + + +## CreateChatThread + +> ResponseChatThread CreateChatThread(ctx).ChatThreadRequest(chatThreadRequest).Execute() + +Create a chat thread + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + chatThreadRequest := *openapiclient.NewChatThreadRequest() // ChatThreadRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChatThreadsAPI.CreateChatThread(context.Background()).ChatThreadRequest(chatThreadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChatThreadsAPI.CreateChatThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateChatThread`: ResponseChatThread + fmt.Fprintf(os.Stdout, "Response from `AIStudioChatThreadsAPI.CreateChatThread`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateChatThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chatThreadRequest** | [**ChatThreadRequest**](ChatThreadRequest.md) | | + +### Return type + +[**ResponseChatThread**](ResponseChatThread.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyAChatThread + +> ResponseDeleteChatThread DestroyAChatThread(ctx, threadId).Execute() + +Destroy a chat thread + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + threadId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChatThreadsAPI.DestroyAChatThread(context.Background(), threadId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChatThreadsAPI.DestroyAChatThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyAChatThread`: ResponseDeleteChatThread + fmt.Fprintf(os.Stdout, "Response from `AIStudioChatThreadsAPI.DestroyAChatThread`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyAChatThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteChatThread**](ResponseDeleteChatThread.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListChatThreads + +> PaginatedChatThreadList ListChatThreads(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List chat threads + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChatThreadsAPI.ListChatThreads(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChatThreadsAPI.ListChatThreads``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListChatThreads`: PaginatedChatThreadList + fmt.Fprintf(os.Stdout, "Response from `AIStudioChatThreadsAPI.ListChatThreads`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListChatThreadsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedChatThreadList**](PaginatedChatThreadList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateChatThread + +> ResponseChatThread PartialUpdateChatThread(ctx, threadId).PatchedChatThreadRequest(patchedChatThreadRequest).Execute() + +Partially update a chat thread + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + threadId := int64(789) // int64 | + patchedChatThreadRequest := *openapiclient.NewPatchedChatThreadRequest() // PatchedChatThreadRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChatThreadsAPI.PartialUpdateChatThread(context.Background(), threadId).PatchedChatThreadRequest(patchedChatThreadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChatThreadsAPI.PartialUpdateChatThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateChatThread`: ResponseChatThread + fmt.Fprintf(os.Stdout, "Response from `AIStudioChatThreadsAPI.PartialUpdateChatThread`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateChatThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedChatThreadRequest** | [**PatchedChatThreadRequest**](PatchedChatThreadRequest.md) | | + +### Return type + +[**ResponseChatThread**](ResponseChatThread.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetriveChatThread + +> ResponseRetrieveChatThread RetriveChatThread(ctx, threadId).Fields(fields).Execute() + +Retrieve details from a chat thread + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + threadId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChatThreadsAPI.RetriveChatThread(context.Background(), threadId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChatThreadsAPI.RetriveChatThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetriveChatThread`: ResponseRetrieveChatThread + fmt.Fprintf(os.Stdout, "Response from `AIStudioChatThreadsAPI.RetriveChatThread`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetriveChatThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveChatThread**](ResponseRetrieveChatThread.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateChatThread + +> ResponseChatThread UpdateChatThread(ctx, threadId).ChatThreadRequest(chatThreadRequest).Execute() + +Update a chat thread + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + threadId := int64(789) // int64 | + chatThreadRequest := *openapiclient.NewChatThreadRequest() // ChatThreadRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChatThreadsAPI.UpdateChatThread(context.Background(), threadId).ChatThreadRequest(chatThreadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChatThreadsAPI.UpdateChatThread``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateChatThread`: ResponseChatThread + fmt.Fprintf(os.Stdout, "Response from `AIStudioChatThreadsAPI.UpdateChatThread`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateChatThreadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **chatThreadRequest** | [**ChatThreadRequest**](ChatThreadRequest.md) | | + +### Return type + +[**ResponseChatThread**](ResponseChatThread.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AIStudioChunksAPI.md b/azion-api/docs/AIStudioChunksAPI.md new file mode 100644 index 0000000..16de5df --- /dev/null +++ b/azion-api/docs/AIStudioChunksAPI.md @@ -0,0 +1,92 @@ +# \AIStudioChunksAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListChunks**](AIStudioChunksAPI.md#ListChunks) | **Get** /workspace/ai/kbs/{kb_id}/documents/{document_id}/chunks | List chunks + + + +## ListChunks + +> PaginatedChunkList ListChunks(ctx, documentId, kbId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List chunks + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + documentId := int64(789) // int64 | + kbId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioChunksAPI.ListChunks(context.Background(), documentId, kbId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioChunksAPI.ListChunks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListChunks`: PaginatedChunkList + fmt.Fprintf(os.Stdout, "Response from `AIStudioChunksAPI.ListChunks`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**documentId** | **int64** | | +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListChunksRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedChunkList**](PaginatedChunkList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AIStudioDocumentsAPI.md b/azion-api/docs/AIStudioDocumentsAPI.md new file mode 100644 index 0000000..a6d456a --- /dev/null +++ b/azion-api/docs/AIStudioDocumentsAPI.md @@ -0,0 +1,404 @@ +# \AIStudioDocumentsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDocument**](AIStudioDocumentsAPI.md#CreateDocument) | **Post** /workspace/ai/kbs/{kb_id}/documents | Create a document +[**DestroyADocument**](AIStudioDocumentsAPI.md#DestroyADocument) | **Delete** /workspace/ai/kbs/{kb_id}/documents/{document_id} | Destroy a document +[**ListDocuments**](AIStudioDocumentsAPI.md#ListDocuments) | **Get** /workspace/ai/kbs/{kb_id}/documents | List documents +[**RetriveDocument**](AIStudioDocumentsAPI.md#RetriveDocument) | **Get** /workspace/ai/kbs/{kb_id}/documents/{document_id} | Retrieve details from a document +[**UpdateDocument**](AIStudioDocumentsAPI.md#UpdateDocument) | **Put** /workspace/ai/kbs/{kb_id}/documents/{document_id} | Update a document + + + +## CreateDocument + +> ResponseDocument CreateDocument(ctx, kbId).Name(name).Description(description).Type_(type_).SourceUri(sourceUri).ChunkStrategy(chunkStrategy).Execute() + +Create a document + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := int64(789) // int64 | + name := "name_example" // string | (optional) + description := "description_example" // string | (optional) + type_ := "type__example" // string | (optional) + sourceUri := "sourceUri_example" // string | (optional) + chunkStrategy := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioDocumentsAPI.CreateDocument(context.Background(), kbId).Name(name).Description(description).Type_(type_).SourceUri(sourceUri).ChunkStrategy(chunkStrategy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioDocumentsAPI.CreateDocument``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDocument`: ResponseDocument + fmt.Fprintf(os.Stdout, "Response from `AIStudioDocumentsAPI.CreateDocument`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDocumentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **name** | **string** | | + **description** | **string** | | + **type_** | **string** | | + **sourceUri** | **string** | | + **chunkStrategy** | **map[string]interface{}** | | + +### Return type + +[**ResponseDocument**](ResponseDocument.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyADocument + +> ResponseDeleteDocument DestroyADocument(ctx, documentId, kbId).Execute() + +Destroy a document + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + documentId := int64(789) // int64 | + kbId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioDocumentsAPI.DestroyADocument(context.Background(), documentId, kbId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioDocumentsAPI.DestroyADocument``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyADocument`: ResponseDeleteDocument + fmt.Fprintf(os.Stdout, "Response from `AIStudioDocumentsAPI.DestroyADocument`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**documentId** | **int64** | | +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyADocumentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ResponseDeleteDocument**](ResponseDeleteDocument.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDocuments + +> PaginatedDocumentList ListDocuments(ctx, kbId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List documents + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioDocumentsAPI.ListDocuments(context.Background(), kbId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioDocumentsAPI.ListDocuments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDocuments`: PaginatedDocumentList + fmt.Fprintf(os.Stdout, "Response from `AIStudioDocumentsAPI.ListDocuments`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDocumentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedDocumentList**](PaginatedDocumentList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetriveDocument + +> ResponseRetrieveDocument RetriveDocument(ctx, documentId, kbId).Fields(fields).Execute() + +Retrieve details from a document + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + documentId := int64(789) // int64 | + kbId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioDocumentsAPI.RetriveDocument(context.Background(), documentId, kbId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioDocumentsAPI.RetriveDocument``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetriveDocument`: ResponseRetrieveDocument + fmt.Fprintf(os.Stdout, "Response from `AIStudioDocumentsAPI.RetriveDocument`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**documentId** | **int64** | | +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetriveDocumentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveDocument**](ResponseRetrieveDocument.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDocument + +> ResponseDocument UpdateDocument(ctx, documentId, kbId).Name(name).Description(description).Type_(type_).SourceUri(sourceUri).ChunkStrategy(chunkStrategy).Execute() + +Update a document + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + documentId := int64(789) // int64 | + kbId := int64(789) // int64 | + name := "name_example" // string | (optional) + description := "description_example" // string | (optional) + type_ := "type__example" // string | (optional) + sourceUri := "sourceUri_example" // string | (optional) + chunkStrategy := map[string]interface{}{"key": interface{}(123)} // map[string]interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioDocumentsAPI.UpdateDocument(context.Background(), documentId, kbId).Name(name).Description(description).Type_(type_).SourceUri(sourceUri).ChunkStrategy(chunkStrategy).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioDocumentsAPI.UpdateDocument``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDocument`: ResponseDocument + fmt.Fprintf(os.Stdout, "Response from `AIStudioDocumentsAPI.UpdateDocument`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**documentId** | **int64** | | +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDocumentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **name** | **string** | | + **description** | **string** | | + **type_** | **string** | | + **sourceUri** | **string** | | + **chunkStrategy** | **map[string]interface{}** | | + +### Return type + +[**ResponseDocument**](ResponseDocument.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded, application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AIStudioKnowledgeBasesAPI.md b/azion-api/docs/AIStudioKnowledgeBasesAPI.md new file mode 100644 index 0000000..a2ac3dd --- /dev/null +++ b/azion-api/docs/AIStudioKnowledgeBasesAPI.md @@ -0,0 +1,586 @@ +# \AIStudioKnowledgeBasesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AskKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#AskKnowledgeBase) | **Post** /workspace/ai/kbs/{kb_id}/ask | Ask the knowledge base +[**CreateKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#CreateKnowledgeBase) | **Post** /workspace/ai/kbs | Create a knowledge base +[**DestroyAKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#DestroyAKnowledgeBase) | **Delete** /workspace/ai/kbs/{kb_id} | Destroy a knowledge base +[**ListKnowledgeBases**](AIStudioKnowledgeBasesAPI.md#ListKnowledgeBases) | **Get** /workspace/ai/kbs | List knowledge bases +[**PartialUpdateKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#PartialUpdateKnowledgeBase) | **Patch** /workspace/ai/kbs/{kb_id} | Partially update a knowledge base +[**QueryChunkFromKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#QueryChunkFromKnowledgeBase) | **Post** /workspace/ai/kbs/{kb_id}/query | Query a chunk from a knowledge base +[**RetriveKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#RetriveKnowledgeBase) | **Get** /workspace/ai/kbs/{kb_id} | Retrieve details from a knowledge base +[**UpdateKnowledgeBase**](AIStudioKnowledgeBasesAPI.md#UpdateKnowledgeBase) | **Put** /workspace/ai/kbs/{kb_id} | Update a knowledge base + + + +## AskKnowledgeBase + +> KBAskResponse AskKnowledgeBase(ctx, kbId).KBAskRequest(kBAskRequest).Execute() + +Ask the knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := int64(789) // int64 | + kBAskRequest := *openapiclient.NewKBAskRequest("Question_example") // KBAskRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.AskKnowledgeBase(context.Background(), kbId).KBAskRequest(kBAskRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.AskKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AskKnowledgeBase`: KBAskResponse + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.AskKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAskKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **kBAskRequest** | [**KBAskRequest**](KBAskRequest.md) | | + +### Return type + +[**KBAskResponse**](KBAskResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateKnowledgeBase + +> ResponseKnowledgeBase CreateKnowledgeBase(ctx).KnowledgeBaseRequest(knowledgeBaseRequest).Execute() + +Create a knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + knowledgeBaseRequest := *openapiclient.NewKnowledgeBaseRequest("Name_example") // KnowledgeBaseRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.CreateKnowledgeBase(context.Background()).KnowledgeBaseRequest(knowledgeBaseRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.CreateKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateKnowledgeBase`: ResponseKnowledgeBase + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.CreateKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **knowledgeBaseRequest** | [**KnowledgeBaseRequest**](KnowledgeBaseRequest.md) | | + +### Return type + +[**ResponseKnowledgeBase**](ResponseKnowledgeBase.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyAKnowledgeBase + +> ResponseDeleteKnowledgeBase DestroyAKnowledgeBase(ctx, kbId).Execute() + +Destroy a knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := "kbId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.DestroyAKnowledgeBase(context.Background(), kbId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.DestroyAKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyAKnowledgeBase`: ResponseDeleteKnowledgeBase + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.DestroyAKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyAKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteKnowledgeBase**](ResponseDeleteKnowledgeBase.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListKnowledgeBases + +> PaginatedKnowledgeBaseList ListKnowledgeBases(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List knowledge bases + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.ListKnowledgeBases(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.ListKnowledgeBases``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListKnowledgeBases`: PaginatedKnowledgeBaseList + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.ListKnowledgeBases`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListKnowledgeBasesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedKnowledgeBaseList**](PaginatedKnowledgeBaseList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateKnowledgeBase + +> ResponseKnowledgeBase PartialUpdateKnowledgeBase(ctx, kbId).PatchedKnowledgeBaseRequest(patchedKnowledgeBaseRequest).Execute() + +Partially update a knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := "kbId_example" // string | + patchedKnowledgeBaseRequest := *openapiclient.NewPatchedKnowledgeBaseRequest() // PatchedKnowledgeBaseRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.PartialUpdateKnowledgeBase(context.Background(), kbId).PatchedKnowledgeBaseRequest(patchedKnowledgeBaseRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.PartialUpdateKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateKnowledgeBase`: ResponseKnowledgeBase + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.PartialUpdateKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedKnowledgeBaseRequest** | [**PatchedKnowledgeBaseRequest**](PatchedKnowledgeBaseRequest.md) | | + +### Return type + +[**ResponseKnowledgeBase**](ResponseKnowledgeBase.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## QueryChunkFromKnowledgeBase + +> KBQueryResponse QueryChunkFromKnowledgeBase(ctx, kbId).KBQueryRequest(kBQueryRequest).Execute() + +Query a chunk from a knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := int64(789) // int64 | + kBQueryRequest := *openapiclient.NewKBQueryRequest("Query_example") // KBQueryRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.QueryChunkFromKnowledgeBase(context.Background(), kbId).KBQueryRequest(kBQueryRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.QueryChunkFromKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `QueryChunkFromKnowledgeBase`: KBQueryResponse + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.QueryChunkFromKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiQueryChunkFromKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **kBQueryRequest** | [**KBQueryRequest**](KBQueryRequest.md) | | + +### Return type + +[**KBQueryResponse**](KBQueryResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetriveKnowledgeBase + +> ResponseRetrieveKnowledgeBase RetriveKnowledgeBase(ctx, kbId).Fields(fields).Execute() + +Retrieve details from a knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := "kbId_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.RetriveKnowledgeBase(context.Background(), kbId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.RetriveKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetriveKnowledgeBase`: ResponseRetrieveKnowledgeBase + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.RetriveKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetriveKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveKnowledgeBase**](ResponseRetrieveKnowledgeBase.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateKnowledgeBase + +> ResponseKnowledgeBase UpdateKnowledgeBase(ctx, kbId).KnowledgeBaseRequest(knowledgeBaseRequest).Execute() + +Update a knowledge base + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := "kbId_example" // string | + knowledgeBaseRequest := *openapiclient.NewKnowledgeBaseRequest("Name_example") // KnowledgeBaseRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioKnowledgeBasesAPI.UpdateKnowledgeBase(context.Background(), kbId).KnowledgeBaseRequest(knowledgeBaseRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioKnowledgeBasesAPI.UpdateKnowledgeBase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateKnowledgeBase`: ResponseKnowledgeBase + fmt.Fprintf(os.Stdout, "Response from `AIStudioKnowledgeBasesAPI.UpdateKnowledgeBase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateKnowledgeBaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **knowledgeBaseRequest** | [**KnowledgeBaseRequest**](KnowledgeBaseRequest.md) | | + +### Return type + +[**ResponseKnowledgeBase**](ResponseKnowledgeBase.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AIStudioMessagesAPI.md b/azion-api/docs/AIStudioMessagesAPI.md new file mode 100644 index 0000000..6d82f36 --- /dev/null +++ b/azion-api/docs/AIStudioMessagesAPI.md @@ -0,0 +1,388 @@ +# \AIStudioMessagesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMessage**](AIStudioMessagesAPI.md#CreateMessage) | **Post** /workspace/ai/threads/{thread_id}/messages | Create a message +[**DestroyAMessage**](AIStudioMessagesAPI.md#DestroyAMessage) | **Delete** /workspace/ai/threads/{thread_id}/messages/{message_id} | Destroy a message +[**ListMessages**](AIStudioMessagesAPI.md#ListMessages) | **Get** /workspace/ai/threads/{thread_id}/messages | List messages +[**RetriveMessage**](AIStudioMessagesAPI.md#RetriveMessage) | **Get** /workspace/ai/threads/{thread_id}/messages/{message_id} | Retrieve details from a message +[**UpdateMessage**](AIStudioMessagesAPI.md#UpdateMessage) | **Put** /workspace/ai/threads/{thread_id}/messages/{message_id} | Update a message + + + +## CreateMessage + +> ResponseMessage CreateMessage(ctx, threadId).MessageRequest(messageRequest).Execute() + +Create a message + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + threadId := int64(789) // int64 | + messageRequest := *openapiclient.NewMessageRequest(map[string]interface{}{"key": interface{}(123)}) // MessageRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioMessagesAPI.CreateMessage(context.Background(), threadId).MessageRequest(messageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioMessagesAPI.CreateMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateMessage`: ResponseMessage + fmt.Fprintf(os.Stdout, "Response from `AIStudioMessagesAPI.CreateMessage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateMessageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **messageRequest** | [**MessageRequest**](MessageRequest.md) | | + +### Return type + +[**ResponseMessage**](ResponseMessage.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyAMessage + +> ResponseDeleteMessage DestroyAMessage(ctx, messageId, threadId).Execute() + +Destroy a message + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + messageId := int64(789) // int64 | + threadId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioMessagesAPI.DestroyAMessage(context.Background(), messageId, threadId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioMessagesAPI.DestroyAMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyAMessage`: ResponseDeleteMessage + fmt.Fprintf(os.Stdout, "Response from `AIStudioMessagesAPI.DestroyAMessage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**messageId** | **int64** | | +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyAMessageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ResponseDeleteMessage**](ResponseDeleteMessage.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListMessages + +> PaginatedMessageList ListMessages(ctx, threadId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List messages + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + threadId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioMessagesAPI.ListMessages(context.Background(), threadId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioMessagesAPI.ListMessages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListMessages`: PaginatedMessageList + fmt.Fprintf(os.Stdout, "Response from `AIStudioMessagesAPI.ListMessages`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListMessagesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedMessageList**](PaginatedMessageList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetriveMessage + +> ResponseRetrieveMessage RetriveMessage(ctx, messageId, threadId).Fields(fields).Execute() + +Retrieve details from a message + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + messageId := int64(789) // int64 | + threadId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioMessagesAPI.RetriveMessage(context.Background(), messageId, threadId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioMessagesAPI.RetriveMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetriveMessage`: ResponseRetrieveMessage + fmt.Fprintf(os.Stdout, "Response from `AIStudioMessagesAPI.RetriveMessage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**messageId** | **int64** | | +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetriveMessageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveMessage**](ResponseRetrieveMessage.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMessage + +> ResponseMessage UpdateMessage(ctx, messageId, threadId).MessageRequest(messageRequest).Execute() + +Update a message + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + messageId := int64(789) // int64 | + threadId := int64(789) // int64 | + messageRequest := *openapiclient.NewMessageRequest(map[string]interface{}{"key": interface{}(123)}) // MessageRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioMessagesAPI.UpdateMessage(context.Background(), messageId, threadId).MessageRequest(messageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioMessagesAPI.UpdateMessage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateMessage`: ResponseMessage + fmt.Fprintf(os.Stdout, "Response from `AIStudioMessagesAPI.UpdateMessage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**messageId** | **int64** | | +**threadId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateMessageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **messageRequest** | [**MessageRequest**](MessageRequest.md) | | + +### Return type + +[**ResponseMessage**](ResponseMessage.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AIStudioToolsAPI.md b/azion-api/docs/AIStudioToolsAPI.md new file mode 100644 index 0000000..f9f29d3 --- /dev/null +++ b/azion-api/docs/AIStudioToolsAPI.md @@ -0,0 +1,666 @@ +# \AIStudioToolsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddKnowledgeBaseToATool**](AIStudioToolsAPI.md#AddKnowledgeBaseToATool) | **Post** /workspace/ai/tools/{tool_id}/kbs | Add a knowledge base to a tool +[**CreateTool**](AIStudioToolsAPI.md#CreateTool) | **Post** /workspace/ai/tools | Create a tool +[**DestroyATool**](AIStudioToolsAPI.md#DestroyATool) | **Delete** /workspace/ai/tools/{tool_id} | Destroy a tool +[**ListKnowledgeBasesLinkedToATool**](AIStudioToolsAPI.md#ListKnowledgeBasesLinkedToATool) | **Get** /workspace/ai/tools/{tool_id}/kbs | List knowledge bases linked to a tool +[**ListTools**](AIStudioToolsAPI.md#ListTools) | **Get** /workspace/ai/tools | List tools +[**PartialUpdateTool**](AIStudioToolsAPI.md#PartialUpdateTool) | **Patch** /workspace/ai/tools/{tool_id} | Partially update a tool +[**RemoveKnowledgeBaseFromATool**](AIStudioToolsAPI.md#RemoveKnowledgeBaseFromATool) | **Delete** /workspace/ai/tools/{tool_id}/kbs/{kb_id} | Remove a knowledge base from a tool +[**RetriveTool**](AIStudioToolsAPI.md#RetriveTool) | **Get** /workspace/ai/tools/{tool_id} | Retrieve details from a tool +[**UpdateTool**](AIStudioToolsAPI.md#UpdateTool) | **Put** /workspace/ai/tools/{tool_id} | Update a tool + + + +## AddKnowledgeBaseToATool + +> ToolKBLink AddKnowledgeBaseToATool(ctx, toolId).ToolRequest(toolRequest).Execute() + +Add a knowledge base to a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolId := int64(789) // int64 | + toolRequest := *openapiclient.NewToolRequest("Name_example", "Type_example") // ToolRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.AddKnowledgeBaseToATool(context.Background(), toolId).ToolRequest(toolRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.AddKnowledgeBaseToATool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddKnowledgeBaseToATool`: ToolKBLink + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.AddKnowledgeBaseToATool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddKnowledgeBaseToAToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **toolRequest** | [**ToolRequest**](ToolRequest.md) | | + +### Return type + +[**ToolKBLink**](ToolKBLink.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateTool + +> ResponseTool CreateTool(ctx).ToolRequest(toolRequest).Execute() + +Create a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolRequest := *openapiclient.NewToolRequest("Name_example", "Type_example") // ToolRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.CreateTool(context.Background()).ToolRequest(toolRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.CreateTool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateTool`: ResponseTool + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.CreateTool`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **toolRequest** | [**ToolRequest**](ToolRequest.md) | | + +### Return type + +[**ResponseTool**](ResponseTool.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyATool + +> ResponseDeleteTool DestroyATool(ctx, toolId).Execute() + +Destroy a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.DestroyATool(context.Background(), toolId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.DestroyATool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyATool`: ResponseDeleteTool + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.DestroyATool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyAToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteTool**](ResponseDeleteTool.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListKnowledgeBasesLinkedToATool + +> PaginatedKnowledgeBaseList ListKnowledgeBasesLinkedToATool(ctx, toolId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List knowledge bases linked to a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.ListKnowledgeBasesLinkedToATool(context.Background(), toolId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.ListKnowledgeBasesLinkedToATool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListKnowledgeBasesLinkedToATool`: PaginatedKnowledgeBaseList + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.ListKnowledgeBasesLinkedToATool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListKnowledgeBasesLinkedToAToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedKnowledgeBaseList**](PaginatedKnowledgeBaseList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTools + +> PaginatedToolList ListTools(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List tools + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.ListTools(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.ListTools``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTools`: PaginatedToolList + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.ListTools`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListToolsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedToolList**](PaginatedToolList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateTool + +> ResponseTool PartialUpdateTool(ctx, toolId).PatchedToolRequest(patchedToolRequest).Execute() + +Partially update a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolId := int64(789) // int64 | + patchedToolRequest := *openapiclient.NewPatchedToolRequest() // PatchedToolRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.PartialUpdateTool(context.Background(), toolId).PatchedToolRequest(patchedToolRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.PartialUpdateTool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateTool`: ResponseTool + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.PartialUpdateTool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedToolRequest** | [**PatchedToolRequest**](PatchedToolRequest.md) | | + +### Return type + +[**ResponseTool**](ResponseTool.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveKnowledgeBaseFromATool + +> RemoveKnowledgeBaseFromATool(ctx, kbId, toolId).Execute() + +Remove a knowledge base from a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + kbId := int64(789) // int64 | + toolId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.AIStudioToolsAPI.RemoveKnowledgeBaseFromATool(context.Background(), kbId, toolId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.RemoveKnowledgeBaseFromATool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**kbId** | **int64** | | +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveKnowledgeBaseFromAToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetriveTool + +> ResponseRetrieveTool RetriveTool(ctx, toolId).Fields(fields).Execute() + +Retrieve details from a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.RetriveTool(context.Background(), toolId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.RetriveTool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetriveTool`: ResponseRetrieveTool + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.RetriveTool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetriveToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveTool**](ResponseRetrieveTool.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTool + +> ResponseTool UpdateTool(ctx, toolId).ToolRequest(toolRequest).Execute() + +Update a tool + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + toolId := int64(789) // int64 | + toolRequest := *openapiclient.NewToolRequest("Name_example", "Type_example") // ToolRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AIStudioToolsAPI.UpdateTool(context.Background(), toolId).ToolRequest(toolRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AIStudioToolsAPI.UpdateTool``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateTool`: ResponseTool + fmt.Fprintf(os.Stdout, "Response from `AIStudioToolsAPI.UpdateTool`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**toolId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateToolRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **toolRequest** | [**ToolRequest**](ToolRequest.md) | | + +### Return type + +[**ResponseTool**](ResponseTool.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AWS4HMAC.md b/azion-api/docs/AWS4HMAC.md new file mode 100644 index 0000000..a514923 --- /dev/null +++ b/azion-api/docs/AWS4HMAC.md @@ -0,0 +1,77 @@ +# AWS4HMAC + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | * `aws4_hmac_sha256` - AWS for HMAC - SHA256 | [optional] +**Attributes** | [**AWS4HMACAttributes**](AWS4HMACAttributes.md) | | + +## Methods + +### NewAWS4HMAC + +`func NewAWS4HMAC(attributes AWS4HMACAttributes, ) *AWS4HMAC` + +NewAWS4HMAC instantiates a new AWS4HMAC object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWS4HMACWithDefaults + +`func NewAWS4HMACWithDefaults() *AWS4HMAC` + +NewAWS4HMACWithDefaults instantiates a new AWS4HMAC object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *AWS4HMAC) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AWS4HMAC) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AWS4HMAC) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AWS4HMAC) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetAttributes + +`func (o *AWS4HMAC) GetAttributes() AWS4HMACAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *AWS4HMAC) GetAttributesOk() (*AWS4HMACAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *AWS4HMAC) SetAttributes(v AWS4HMACAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AWS4HMACAttributes.md b/azion-api/docs/AWS4HMACAttributes.md new file mode 100644 index 0000000..3e46a5d --- /dev/null +++ b/azion-api/docs/AWS4HMACAttributes.md @@ -0,0 +1,119 @@ +# AWS4HMACAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Region** | **string** | | +**Service** | Pointer to **string** | | [optional] +**AccessKey** | **string** | | +**SecretKey** | **string** | | + +## Methods + +### NewAWS4HMACAttributes + +`func NewAWS4HMACAttributes(region string, accessKey string, secretKey string, ) *AWS4HMACAttributes` + +NewAWS4HMACAttributes instantiates a new AWS4HMACAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWS4HMACAttributesWithDefaults + +`func NewAWS4HMACAttributesWithDefaults() *AWS4HMACAttributes` + +NewAWS4HMACAttributesWithDefaults instantiates a new AWS4HMACAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRegion + +`func (o *AWS4HMACAttributes) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *AWS4HMACAttributes) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *AWS4HMACAttributes) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetService + +`func (o *AWS4HMACAttributes) GetService() string` + +GetService returns the Service field if non-nil, zero value otherwise. + +### GetServiceOk + +`func (o *AWS4HMACAttributes) GetServiceOk() (*string, bool)` + +GetServiceOk returns a tuple with the Service field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetService + +`func (o *AWS4HMACAttributes) SetService(v string)` + +SetService sets Service field to given value. + +### HasService + +`func (o *AWS4HMACAttributes) HasService() bool` + +HasService returns a boolean if a field has been set. + +### GetAccessKey + +`func (o *AWS4HMACAttributes) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *AWS4HMACAttributes) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *AWS4HMACAttributes) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *AWS4HMACAttributes) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *AWS4HMACAttributes) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *AWS4HMACAttributes) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AWS4HMACAttributesRequest.md b/azion-api/docs/AWS4HMACAttributesRequest.md new file mode 100644 index 0000000..2ba33ca --- /dev/null +++ b/azion-api/docs/AWS4HMACAttributesRequest.md @@ -0,0 +1,119 @@ +# AWS4HMACAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Region** | **string** | | +**Service** | Pointer to **string** | | [optional] +**AccessKey** | **string** | | +**SecretKey** | **string** | | + +## Methods + +### NewAWS4HMACAttributesRequest + +`func NewAWS4HMACAttributesRequest(region string, accessKey string, secretKey string, ) *AWS4HMACAttributesRequest` + +NewAWS4HMACAttributesRequest instantiates a new AWS4HMACAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWS4HMACAttributesRequestWithDefaults + +`func NewAWS4HMACAttributesRequestWithDefaults() *AWS4HMACAttributesRequest` + +NewAWS4HMACAttributesRequestWithDefaults instantiates a new AWS4HMACAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRegion + +`func (o *AWS4HMACAttributesRequest) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *AWS4HMACAttributesRequest) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *AWS4HMACAttributesRequest) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetService + +`func (o *AWS4HMACAttributesRequest) GetService() string` + +GetService returns the Service field if non-nil, zero value otherwise. + +### GetServiceOk + +`func (o *AWS4HMACAttributesRequest) GetServiceOk() (*string, bool)` + +GetServiceOk returns a tuple with the Service field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetService + +`func (o *AWS4HMACAttributesRequest) SetService(v string)` + +SetService sets Service field to given value. + +### HasService + +`func (o *AWS4HMACAttributesRequest) HasService() bool` + +HasService returns a boolean if a field has been set. + +### GetAccessKey + +`func (o *AWS4HMACAttributesRequest) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *AWS4HMACAttributesRequest) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *AWS4HMACAttributesRequest) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *AWS4HMACAttributesRequest) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *AWS4HMACAttributesRequest) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *AWS4HMACAttributesRequest) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AWS4HMACRequest.md b/azion-api/docs/AWS4HMACRequest.md new file mode 100644 index 0000000..f7e8879 --- /dev/null +++ b/azion-api/docs/AWS4HMACRequest.md @@ -0,0 +1,77 @@ +# AWS4HMACRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | * `aws4_hmac_sha256` - AWS for HMAC - SHA256 | [optional] +**Attributes** | [**AWS4HMACAttributesRequest**](AWS4HMACAttributesRequest.md) | | + +## Methods + +### NewAWS4HMACRequest + +`func NewAWS4HMACRequest(attributes AWS4HMACAttributesRequest, ) *AWS4HMACRequest` + +NewAWS4HMACRequest instantiates a new AWS4HMACRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWS4HMACRequestWithDefaults + +`func NewAWS4HMACRequestWithDefaults() *AWS4HMACRequest` + +NewAWS4HMACRequestWithDefaults instantiates a new AWS4HMACRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *AWS4HMACRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AWS4HMACRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AWS4HMACRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *AWS4HMACRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetAttributes + +`func (o *AWS4HMACRequest) GetAttributes() AWS4HMACAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *AWS4HMACRequest) GetAttributesOk() (*AWS4HMACAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *AWS4HMACRequest) SetAttributes(v AWS4HMACAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AWSKinesisFirehoseEndpoint.md b/azion-api/docs/AWSKinesisFirehoseEndpoint.md new file mode 100644 index 0000000..661f212 --- /dev/null +++ b/azion-api/docs/AWSKinesisFirehoseEndpoint.md @@ -0,0 +1,135 @@ +# AWSKinesisFirehoseEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**StreamName** | **string** | | +**Region** | **string** | | +**SecretKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (aws_kinesis_firehose) | + +## Methods + +### NewAWSKinesisFirehoseEndpoint + +`func NewAWSKinesisFirehoseEndpoint(accessKey string, streamName string, region string, secretKey string, type_ string, ) *AWSKinesisFirehoseEndpoint` + +NewAWSKinesisFirehoseEndpoint instantiates a new AWSKinesisFirehoseEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWSKinesisFirehoseEndpointWithDefaults + +`func NewAWSKinesisFirehoseEndpointWithDefaults() *AWSKinesisFirehoseEndpoint` + +NewAWSKinesisFirehoseEndpointWithDefaults instantiates a new AWSKinesisFirehoseEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *AWSKinesisFirehoseEndpoint) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *AWSKinesisFirehoseEndpoint) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *AWSKinesisFirehoseEndpoint) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetStreamName + +`func (o *AWSKinesisFirehoseEndpoint) GetStreamName() string` + +GetStreamName returns the StreamName field if non-nil, zero value otherwise. + +### GetStreamNameOk + +`func (o *AWSKinesisFirehoseEndpoint) GetStreamNameOk() (*string, bool)` + +GetStreamNameOk returns a tuple with the StreamName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamName + +`func (o *AWSKinesisFirehoseEndpoint) SetStreamName(v string)` + +SetStreamName sets StreamName field to given value. + + +### GetRegion + +`func (o *AWSKinesisFirehoseEndpoint) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *AWSKinesisFirehoseEndpoint) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *AWSKinesisFirehoseEndpoint) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetSecretKey + +`func (o *AWSKinesisFirehoseEndpoint) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *AWSKinesisFirehoseEndpoint) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *AWSKinesisFirehoseEndpoint) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetType + +`func (o *AWSKinesisFirehoseEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AWSKinesisFirehoseEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AWSKinesisFirehoseEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AWSKinesisFirehoseEndpointRequest.md b/azion-api/docs/AWSKinesisFirehoseEndpointRequest.md new file mode 100644 index 0000000..2109d0b --- /dev/null +++ b/azion-api/docs/AWSKinesisFirehoseEndpointRequest.md @@ -0,0 +1,135 @@ +# AWSKinesisFirehoseEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**StreamName** | **string** | | +**Region** | **string** | | +**SecretKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (aws_kinesis_firehose) | + +## Methods + +### NewAWSKinesisFirehoseEndpointRequest + +`func NewAWSKinesisFirehoseEndpointRequest(accessKey string, streamName string, region string, secretKey string, type_ string, ) *AWSKinesisFirehoseEndpointRequest` + +NewAWSKinesisFirehoseEndpointRequest instantiates a new AWSKinesisFirehoseEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAWSKinesisFirehoseEndpointRequestWithDefaults + +`func NewAWSKinesisFirehoseEndpointRequestWithDefaults() *AWSKinesisFirehoseEndpointRequest` + +NewAWSKinesisFirehoseEndpointRequestWithDefaults instantiates a new AWSKinesisFirehoseEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *AWSKinesisFirehoseEndpointRequest) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *AWSKinesisFirehoseEndpointRequest) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *AWSKinesisFirehoseEndpointRequest) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetStreamName + +`func (o *AWSKinesisFirehoseEndpointRequest) GetStreamName() string` + +GetStreamName returns the StreamName field if non-nil, zero value otherwise. + +### GetStreamNameOk + +`func (o *AWSKinesisFirehoseEndpointRequest) GetStreamNameOk() (*string, bool)` + +GetStreamNameOk returns a tuple with the StreamName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamName + +`func (o *AWSKinesisFirehoseEndpointRequest) SetStreamName(v string)` + +SetStreamName sets StreamName field to given value. + + +### GetRegion + +`func (o *AWSKinesisFirehoseEndpointRequest) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *AWSKinesisFirehoseEndpointRequest) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *AWSKinesisFirehoseEndpointRequest) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetSecretKey + +`func (o *AWSKinesisFirehoseEndpointRequest) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *AWSKinesisFirehoseEndpointRequest) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *AWSKinesisFirehoseEndpointRequest) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetType + +`func (o *AWSKinesisFirehoseEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AWSKinesisFirehoseEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AWSKinesisFirehoseEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Account.md b/azion-api/docs/Account.md new file mode 100644 index 0000000..02dfe44 --- /dev/null +++ b/azion-api/docs/Account.md @@ -0,0 +1,329 @@ +# Account + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ParentId** | **int64** | | +**Created** | **time.Time** | | +**Info** | **map[string]map[string]interface{}** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | +**Status** | **string** | * `active` - Active account status, can be used for regular operations. * `suspended` - Suspended account status, for accounts with limited access to support and payments only. * `disabled` - Disabled account status, services are offline, user can only access support. * `closed` - Closed account status, services are offline but can be reactivated. | +**Reason** | **string** | * `trial` - Trial account status, currently on a trial period. * `online` - Online account status, used for online sales operations. * `regular` - Regular account status, indicates the customer has an active contract. * `overdue` - Overdue status, the account failed necessary payments after retries. * `quarantine` - Quarantine status, the account is suspended due to suspected misuse or security breach. * `violation` - Violation status, temporarily suspended due to administrative, technical, security, or policy violations. * `idle` - Idle status, the account was removed due to inactivity. * `terminated` - Terminated status, the account was shut down by the service provider. * `voluntary` - Voluntary status, the account was canceled by its owner. | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] +**WorkspaceId** | **string** | | + +## Methods + +### NewAccount + +`func NewAccount(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]map[string]interface{}, type_ string, status string, reason string, currencyIsoCode string, workspaceId string, ) *Account` + +NewAccount instantiates a new Account object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccountWithDefaults + +`func NewAccountWithDefaults() *Account` + +NewAccountWithDefaults instantiates a new Account object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Account) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Account) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Account) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Account) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Account) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Account) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *Account) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Account) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Account) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *Account) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Account) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Account) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Account) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Account) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Account) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetParentId + +`func (o *Account) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *Account) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *Account) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCreated + +`func (o *Account) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Account) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Account) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetInfo + +`func (o *Account) GetInfo() map[string]map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *Account) GetInfoOk() (*map[string]map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *Account) SetInfo(v map[string]map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetType + +`func (o *Account) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Account) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Account) SetType(v string)` + +SetType sets Type field to given value. + + +### GetStatus + +`func (o *Account) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Account) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Account) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetReason + +`func (o *Account) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *Account) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *Account) SetReason(v string)` + +SetReason sets Reason field to given value. + + +### GetCurrencyIsoCode + +`func (o *Account) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *Account) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *Account) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *Account) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *Account) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *Account) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *Account) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + +### GetWorkspaceId + +`func (o *Account) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *Account) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *Account) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AccountInfo.md b/azion-api/docs/AccountInfo.md new file mode 100644 index 0000000..369bdf4 --- /dev/null +++ b/azion-api/docs/AccountInfo.md @@ -0,0 +1,61 @@ +# AccountInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Info** | **map[string]interface{}** | | + +## Methods + +### NewAccountInfo + +`func NewAccountInfo(info map[string]interface{}, ) *AccountInfo` + +NewAccountInfo instantiates a new AccountInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccountInfoWithDefaults + +`func NewAccountInfoWithDefaults() *AccountInfo` + +NewAccountInfoWithDefaults instantiates a new AccountInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetInfo + +`func (o *AccountInfo) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *AccountInfo) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *AccountInfo) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### SetInfoNil + +`func (o *AccountInfo) SetInfoNil(b bool)` + + SetInfoNil sets the value for Info to be an explicit nil + +### UnsetInfo +`func (o *AccountInfo) UnsetInfo()` + +UnsetInfo ensures that no value is present for Info, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AccountInfoRequest.md b/azion-api/docs/AccountInfoRequest.md new file mode 100644 index 0000000..e449d5d --- /dev/null +++ b/azion-api/docs/AccountInfoRequest.md @@ -0,0 +1,82 @@ +# AccountInfoRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Industry** | Pointer to **string** | The industry type. Common values: Education, Energy, Finance, Games, Health, Media, Public Sector, Retail, Services, Technology, Telecom, Transportation, Other. | [optional] +**CompanySize** | Pointer to **int64** | The size of the company. Must be an integer greater than or equal to 1. | [optional] + +## Methods + +### NewAccountInfoRequest + +`func NewAccountInfoRequest() *AccountInfoRequest` + +NewAccountInfoRequest instantiates a new AccountInfoRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccountInfoRequestWithDefaults + +`func NewAccountInfoRequestWithDefaults() *AccountInfoRequest` + +NewAccountInfoRequestWithDefaults instantiates a new AccountInfoRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIndustry + +`func (o *AccountInfoRequest) GetIndustry() string` + +GetIndustry returns the Industry field if non-nil, zero value otherwise. + +### GetIndustryOk + +`func (o *AccountInfoRequest) GetIndustryOk() (*string, bool)` + +GetIndustryOk returns a tuple with the Industry field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIndustry + +`func (o *AccountInfoRequest) SetIndustry(v string)` + +SetIndustry sets Industry field to given value. + +### HasIndustry + +`func (o *AccountInfoRequest) HasIndustry() bool` + +HasIndustry returns a boolean if a field has been set. + +### GetCompanySize + +`func (o *AccountInfoRequest) GetCompanySize() int64` + +GetCompanySize returns the CompanySize field if non-nil, zero value otherwise. + +### GetCompanySizeOk + +`func (o *AccountInfoRequest) GetCompanySizeOk() (*int64, bool)` + +GetCompanySizeOk returns a tuple with the CompanySize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCompanySize + +`func (o *AccountInfoRequest) SetCompanySize(v int64)` + +SetCompanySize sets CompanySize field to given value. + +### HasCompanySize + +`func (o *AccountInfoRequest) HasCompanySize() bool` + +HasCompanySize returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AccountRequest.md b/azion-api/docs/AccountRequest.md new file mode 100644 index 0000000..fe00680 --- /dev/null +++ b/azion-api/docs/AccountRequest.md @@ -0,0 +1,119 @@ +# AccountRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] + +## Methods + +### NewAccountRequest + +`func NewAccountRequest(name string, type_ string, currencyIsoCode string, ) *AccountRequest` + +NewAccountRequest instantiates a new AccountRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAccountRequestWithDefaults + +`func NewAccountRequestWithDefaults() *AccountRequest` + +NewAccountRequestWithDefaults instantiates a new AccountRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *AccountRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AccountRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *AccountRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *AccountRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AccountRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AccountRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCurrencyIsoCode + +`func (o *AccountRequest) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *AccountRequest) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *AccountRequest) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *AccountRequest) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *AccountRequest) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *AccountRequest) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *AccountRequest) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AccountsDescendantsAPI.md b/azion-api/docs/AccountsDescendantsAPI.md new file mode 100644 index 0000000..fb92e63 --- /dev/null +++ b/azion-api/docs/AccountsDescendantsAPI.md @@ -0,0 +1,392 @@ +# \AccountsDescendantsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDescendantAccount**](AccountsDescendantsAPI.md#CreateDescendantAccount) | **Post** /account/accounts | Create a new account +[**ListDescendantsAccounts**](AccountsDescendantsAPI.md#ListDescendantsAccounts) | **Get** /account/accounts | List accounts +[**PartialUpdateDescendantAccount**](AccountsDescendantsAPI.md#PartialUpdateDescendantAccount) | **Patch** /account/accounts/{account_id} | Partially update account details +[**RetrieveDescendantAccount**](AccountsDescendantsAPI.md#RetrieveDescendantAccount) | **Get** /account/accounts/{account_id} | Retrieve account details +[**UpdateDescendantAccount**](AccountsDescendantsAPI.md#UpdateDescendantAccount) | **Put** /account/accounts/{account_id} | Update account details + + + +## CreateDescendantAccount + +> ResponseAccount CreateDescendantAccount(ctx).CreateAccountRequest(createAccountRequest).Execute() + +Create a new account + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + createAccountRequest := openapiclient.CreateAccountRequest{CreateBrandRequest: openapiclient.NewCreateBrandRequest("Name_example", int64(123), "Type_example")} // CreateAccountRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsDescendantsAPI.CreateDescendantAccount(context.Background()).CreateAccountRequest(createAccountRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsDescendantsAPI.CreateDescendantAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDescendantAccount`: ResponseAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsDescendantsAPI.CreateDescendantAccount`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDescendantAccountRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createAccountRequest** | [**CreateAccountRequest**](CreateAccountRequest.md) | | + +### Return type + +[**ResponseAccount**](ResponseAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDescendantsAccounts + +> PaginatedAccountList ListDescendantsAccounts(ctx).Active(active).Created(created).CreatedGte(createdGte).CreatedLte(createdLte).Fields(fields).Id(id).LastEditor(lastEditor).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).ParentId(parentId).Search(search).Execute() + +List accounts + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + created := time.Now() // time.Time | Filter by created date (exact match). (optional) + createdGte := time.Now() // time.Time | Filter by created date (greater than or equal). (optional) + createdLte := time.Now() // time.Time | Filter by created date (less than or equal). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := "id_example" // string | Filter by account ID (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModified := time.Now() // time.Time | Filter by last modified date (exact match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + parentId := "parentId_example" // string | Filter by parent account ID (accepts comma-separated values). (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsDescendantsAPI.ListDescendantsAccounts(context.Background()).Active(active).Created(created).CreatedGte(createdGte).CreatedLte(createdLte).Fields(fields).Id(id).LastEditor(lastEditor).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).ParentId(parentId).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsDescendantsAPI.ListDescendantsAccounts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDescendantsAccounts`: PaginatedAccountList + fmt.Fprintf(os.Stdout, "Response from `AccountsDescendantsAPI.ListDescendantsAccounts`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDescendantsAccountsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **created** | **time.Time** | Filter by created date (exact match). | + **createdGte** | **time.Time** | Filter by created date (greater than or equal). | + **createdLte** | **time.Time** | Filter by created date (less than or equal). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **string** | Filter by account ID (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModified** | **time.Time** | Filter by last modified date (exact match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **parentId** | **string** | Filter by parent account ID (accepts comma-separated values). | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedAccountList**](PaginatedAccountList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateDescendantAccount + +> ResponseAccount PartialUpdateDescendantAccount(ctx, accountId).PatchedAccountRequest(patchedAccountRequest).Execute() + +Partially update account details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accountId := int64(789) // int64 | A unique integer value identifying the account. + patchedAccountRequest := openapiclient.PatchedAccountRequest{PatchedBrandRequest: openapiclient.NewPatchedBrandRequest("Type_example")} // PatchedAccountRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsDescendantsAPI.PartialUpdateDescendantAccount(context.Background(), accountId).PatchedAccountRequest(patchedAccountRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsDescendantsAPI.PartialUpdateDescendantAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDescendantAccount`: ResponseAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsDescendantsAPI.PartialUpdateDescendantAccount`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**accountId** | **int64** | A unique integer value identifying the account. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDescendantAccountRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedAccountRequest** | [**PatchedAccountRequest**](PatchedAccountRequest.md) | | + +### Return type + +[**ResponseAccount**](ResponseAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDescendantAccount + +> ResponseRetrieveAccount RetrieveDescendantAccount(ctx, accountId).Fields(fields).Execute() + +Retrieve account details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accountId := int64(789) // int64 | A unique integer value identifying the account. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsDescendantsAPI.RetrieveDescendantAccount(context.Background(), accountId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsDescendantsAPI.RetrieveDescendantAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDescendantAccount`: ResponseRetrieveAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsDescendantsAPI.RetrieveDescendantAccount`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**accountId** | **int64** | A unique integer value identifying the account. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDescendantAccountRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveAccount**](ResponseRetrieveAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDescendantAccount + +> ResponseAccount UpdateDescendantAccount(ctx, accountId).AccountRequest(accountRequest).Execute() + +Update account details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accountId := int64(789) // int64 | A unique integer value identifying the account. + accountRequest := openapiclient.AccountRequest{BrandRequest: openapiclient.NewBrandRequest("Name_example", "Type_example")} // AccountRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsDescendantsAPI.UpdateDescendantAccount(context.Background(), accountId).AccountRequest(accountRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsDescendantsAPI.UpdateDescendantAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDescendantAccount`: ResponseAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsDescendantsAPI.UpdateDescendantAccount`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**accountId** | **int64** | A unique integer value identifying the account. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDescendantAccountRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **accountRequest** | [**AccountRequest**](AccountRequest.md) | | + +### Return type + +[**ResponseAccount**](ResponseAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AccountsInfoAPI.md b/azion-api/docs/AccountsInfoAPI.md new file mode 100644 index 0000000..9434667 --- /dev/null +++ b/azion-api/docs/AccountsInfoAPI.md @@ -0,0 +1,154 @@ +# \AccountsInfoAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveAccountInfoDetails**](AccountsInfoAPI.md#RetrieveAccountInfoDetails) | **Get** /account/accounts/{account_id}/info | Retrieve account information details +[**UpdateAccountInfoDetails**](AccountsInfoAPI.md#UpdateAccountInfoDetails) | **Put** /account/accounts/{account_id}/info | Update account information details + + + +## RetrieveAccountInfoDetails + +> ResponseRetrieveAccountInfo RetrieveAccountInfoDetails(ctx, accountId).Fields(fields).Execute() + +Retrieve account information details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accountId := int64(789) // int64 | A unique integer value identifying the account. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsInfoAPI.RetrieveAccountInfoDetails(context.Background(), accountId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsInfoAPI.RetrieveAccountInfoDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveAccountInfoDetails`: ResponseRetrieveAccountInfo + fmt.Fprintf(os.Stdout, "Response from `AccountsInfoAPI.RetrieveAccountInfoDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**accountId** | **int64** | A unique integer value identifying the account. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveAccountInfoDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveAccountInfo**](ResponseRetrieveAccountInfo.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateAccountInfoDetails + +> ResponseAccountInfo UpdateAccountInfoDetails(ctx, accountId).UpdateAccountInfoDetailsRequest(updateAccountInfoDetailsRequest).Execute() + +Update account information details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accountId := int64(789) // int64 | A unique integer value identifying the account. + updateAccountInfoDetailsRequest := *openapiclient.NewUpdateAccountInfoDetailsRequest() // UpdateAccountInfoDetailsRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsInfoAPI.UpdateAccountInfoDetails(context.Background(), accountId).UpdateAccountInfoDetailsRequest(updateAccountInfoDetailsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsInfoAPI.UpdateAccountInfoDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateAccountInfoDetails`: ResponseAccountInfo + fmt.Fprintf(os.Stdout, "Response from `AccountsInfoAPI.UpdateAccountInfoDetails`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**accountId** | **int64** | A unique integer value identifying the account. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAccountInfoDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateAccountInfoDetailsRequest** | [**UpdateAccountInfoDetailsRequest**](UpdateAccountInfoDetailsRequest.md) | | + +### Return type + +[**ResponseAccountInfo**](ResponseAccountInfo.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AccountsLoggedInAPI.md b/azion-api/docs/AccountsLoggedInAPI.md new file mode 100644 index 0000000..0eb9257 --- /dev/null +++ b/azion-api/docs/AccountsLoggedInAPI.md @@ -0,0 +1,209 @@ +# \AccountsLoggedInAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**PartialUpdateLoggedAccount**](AccountsLoggedInAPI.md#PartialUpdateLoggedAccount) | **Patch** /account/account | Partially update logged account details +[**RetrieveLoggedAccountDetails**](AccountsLoggedInAPI.md#RetrieveLoggedAccountDetails) | **Get** /account/account | Retrieve logged account details +[**UpdateLoggedAccount**](AccountsLoggedInAPI.md#UpdateLoggedAccount) | **Put** /account/account | Update logged account details + + + +## PartialUpdateLoggedAccount + +> ResponseAccount PartialUpdateLoggedAccount(ctx).PatchedAccountRequest(patchedAccountRequest).Execute() + +Partially update logged account details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + patchedAccountRequest := openapiclient.PatchedAccountRequest{PatchedBrandRequest: openapiclient.NewPatchedBrandRequest("Type_example")} // PatchedAccountRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsLoggedInAPI.PartialUpdateLoggedAccount(context.Background()).PatchedAccountRequest(patchedAccountRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsLoggedInAPI.PartialUpdateLoggedAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateLoggedAccount`: ResponseAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsLoggedInAPI.PartialUpdateLoggedAccount`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateLoggedAccountRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patchedAccountRequest** | [**PatchedAccountRequest**](PatchedAccountRequest.md) | | + +### Return type + +[**ResponseAccount**](ResponseAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveLoggedAccountDetails + +> ResponseRetrieveAccount RetrieveLoggedAccountDetails(ctx).Fields(fields).Execute() + +Retrieve logged account details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsLoggedInAPI.RetrieveLoggedAccountDetails(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsLoggedInAPI.RetrieveLoggedAccountDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveLoggedAccountDetails`: ResponseRetrieveAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsLoggedInAPI.RetrieveLoggedAccountDetails`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveLoggedAccountDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveAccount**](ResponseRetrieveAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateLoggedAccount + +> ResponseAccount UpdateLoggedAccount(ctx).AccountRequest(accountRequest).Execute() + +Update logged account details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accountRequest := openapiclient.AccountRequest{BrandRequest: openapiclient.NewBrandRequest("Name_example", "Type_example")} // AccountRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AccountsLoggedInAPI.UpdateLoggedAccount(context.Background()).AccountRequest(accountRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AccountsLoggedInAPI.UpdateLoggedAccount``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateLoggedAccount`: ResponseAccount + fmt.Fprintf(os.Stdout, "Response from `AccountsLoggedInAPI.UpdateLoggedAccount`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateLoggedAccountRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountRequest** | [**AccountRequest**](AccountRequest.md) | | + +### Return type + +[**ResponseAccount**](ResponseAccount.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Address.md b/azion-api/docs/Address.md new file mode 100644 index 0000000..cb56917 --- /dev/null +++ b/azion-api/docs/Address.md @@ -0,0 +1,165 @@ +# Address + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | Pointer to **bool** | Indicates if the address is active for use | [optional] +**Address** | **string** | IPv4/IPv6 address or CNAME to resolve | +**HttpPort** | Pointer to **int64** | Port number for HTTP connections | [optional] +**HttpsPort** | Pointer to **int64** | Port number for HTTPS connections | [optional] +**Modules** | Pointer to [**NullableAddressModules**](AddressModules.md) | | [optional] + +## Methods + +### NewAddress + +`func NewAddress(address string, ) *Address` + +NewAddress instantiates a new Address object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressWithDefaults + +`func NewAddressWithDefaults() *Address` + +NewAddressWithDefaults instantiates a new Address object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActive + +`func (o *Address) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Address) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Address) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Address) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAddress + +`func (o *Address) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *Address) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *Address) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetHttpPort + +`func (o *Address) GetHttpPort() int64` + +GetHttpPort returns the HttpPort field if non-nil, zero value otherwise. + +### GetHttpPortOk + +`func (o *Address) GetHttpPortOk() (*int64, bool)` + +GetHttpPortOk returns a tuple with the HttpPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpPort + +`func (o *Address) SetHttpPort(v int64)` + +SetHttpPort sets HttpPort field to given value. + +### HasHttpPort + +`func (o *Address) HasHttpPort() bool` + +HasHttpPort returns a boolean if a field has been set. + +### GetHttpsPort + +`func (o *Address) GetHttpsPort() int64` + +GetHttpsPort returns the HttpsPort field if non-nil, zero value otherwise. + +### GetHttpsPortOk + +`func (o *Address) GetHttpsPortOk() (*int64, bool)` + +GetHttpsPortOk returns a tuple with the HttpsPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsPort + +`func (o *Address) SetHttpsPort(v int64)` + +SetHttpsPort sets HttpsPort field to given value. + +### HasHttpsPort + +`func (o *Address) HasHttpsPort() bool` + +HasHttpsPort returns a boolean if a field has been set. + +### GetModules + +`func (o *Address) GetModules() AddressModules` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *Address) GetModulesOk() (*AddressModules, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *Address) SetModules(v AddressModules)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *Address) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### SetModulesNil + +`func (o *Address) SetModulesNil(b bool)` + + SetModulesNil sets the value for Modules to be an explicit nil + +### UnsetModules +`func (o *Address) UnsetModules()` + +UnsetModules ensures that no value is present for Modules, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AddressLoadBalancerModule.md b/azion-api/docs/AddressLoadBalancerModule.md new file mode 100644 index 0000000..15f5df5 --- /dev/null +++ b/azion-api/docs/AddressLoadBalancerModule.md @@ -0,0 +1,82 @@ +# AddressLoadBalancerModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ServerRole** | Pointer to **string** | Role of the address in load balancing * `primary` - Primary * `backup` - Backup | [optional] +**Weight** | Pointer to **int64** | Weight used in load balancing strategy | [optional] + +## Methods + +### NewAddressLoadBalancerModule + +`func NewAddressLoadBalancerModule() *AddressLoadBalancerModule` + +NewAddressLoadBalancerModule instantiates a new AddressLoadBalancerModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressLoadBalancerModuleWithDefaults + +`func NewAddressLoadBalancerModuleWithDefaults() *AddressLoadBalancerModule` + +NewAddressLoadBalancerModuleWithDefaults instantiates a new AddressLoadBalancerModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetServerRole + +`func (o *AddressLoadBalancerModule) GetServerRole() string` + +GetServerRole returns the ServerRole field if non-nil, zero value otherwise. + +### GetServerRoleOk + +`func (o *AddressLoadBalancerModule) GetServerRoleOk() (*string, bool)` + +GetServerRoleOk returns a tuple with the ServerRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServerRole + +`func (o *AddressLoadBalancerModule) SetServerRole(v string)` + +SetServerRole sets ServerRole field to given value. + +### HasServerRole + +`func (o *AddressLoadBalancerModule) HasServerRole() bool` + +HasServerRole returns a boolean if a field has been set. + +### GetWeight + +`func (o *AddressLoadBalancerModule) GetWeight() int64` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *AddressLoadBalancerModule) GetWeightOk() (*int64, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *AddressLoadBalancerModule) SetWeight(v int64)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *AddressLoadBalancerModule) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AddressLoadBalancerModuleRequest.md b/azion-api/docs/AddressLoadBalancerModuleRequest.md new file mode 100644 index 0000000..ee558e7 --- /dev/null +++ b/azion-api/docs/AddressLoadBalancerModuleRequest.md @@ -0,0 +1,82 @@ +# AddressLoadBalancerModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ServerRole** | Pointer to **string** | Role of the address in load balancing * `primary` - Primary * `backup` - Backup | [optional] +**Weight** | Pointer to **int64** | Weight used in load balancing strategy | [optional] + +## Methods + +### NewAddressLoadBalancerModuleRequest + +`func NewAddressLoadBalancerModuleRequest() *AddressLoadBalancerModuleRequest` + +NewAddressLoadBalancerModuleRequest instantiates a new AddressLoadBalancerModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressLoadBalancerModuleRequestWithDefaults + +`func NewAddressLoadBalancerModuleRequestWithDefaults() *AddressLoadBalancerModuleRequest` + +NewAddressLoadBalancerModuleRequestWithDefaults instantiates a new AddressLoadBalancerModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetServerRole + +`func (o *AddressLoadBalancerModuleRequest) GetServerRole() string` + +GetServerRole returns the ServerRole field if non-nil, zero value otherwise. + +### GetServerRoleOk + +`func (o *AddressLoadBalancerModuleRequest) GetServerRoleOk() (*string, bool)` + +GetServerRoleOk returns a tuple with the ServerRole field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServerRole + +`func (o *AddressLoadBalancerModuleRequest) SetServerRole(v string)` + +SetServerRole sets ServerRole field to given value. + +### HasServerRole + +`func (o *AddressLoadBalancerModuleRequest) HasServerRole() bool` + +HasServerRole returns a boolean if a field has been set. + +### GetWeight + +`func (o *AddressLoadBalancerModuleRequest) GetWeight() int64` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *AddressLoadBalancerModuleRequest) GetWeightOk() (*int64, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *AddressLoadBalancerModuleRequest) SetWeight(v int64)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *AddressLoadBalancerModuleRequest) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AddressModules.md b/azion-api/docs/AddressModules.md new file mode 100644 index 0000000..6e632e4 --- /dev/null +++ b/azion-api/docs/AddressModules.md @@ -0,0 +1,56 @@ +# AddressModules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LoadBalancer** | Pointer to [**AddressLoadBalancerModule**](AddressLoadBalancerModule.md) | | [optional] + +## Methods + +### NewAddressModules + +`func NewAddressModules() *AddressModules` + +NewAddressModules instantiates a new AddressModules object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressModulesWithDefaults + +`func NewAddressModulesWithDefaults() *AddressModules` + +NewAddressModulesWithDefaults instantiates a new AddressModules object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLoadBalancer + +`func (o *AddressModules) GetLoadBalancer() AddressLoadBalancerModule` + +GetLoadBalancer returns the LoadBalancer field if non-nil, zero value otherwise. + +### GetLoadBalancerOk + +`func (o *AddressModules) GetLoadBalancerOk() (*AddressLoadBalancerModule, bool)` + +GetLoadBalancerOk returns a tuple with the LoadBalancer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoadBalancer + +`func (o *AddressModules) SetLoadBalancer(v AddressLoadBalancerModule)` + +SetLoadBalancer sets LoadBalancer field to given value. + +### HasLoadBalancer + +`func (o *AddressModules) HasLoadBalancer() bool` + +HasLoadBalancer returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AddressModulesRequest.md b/azion-api/docs/AddressModulesRequest.md new file mode 100644 index 0000000..a032f49 --- /dev/null +++ b/azion-api/docs/AddressModulesRequest.md @@ -0,0 +1,56 @@ +# AddressModulesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LoadBalancer** | Pointer to [**AddressLoadBalancerModuleRequest**](AddressLoadBalancerModuleRequest.md) | | [optional] + +## Methods + +### NewAddressModulesRequest + +`func NewAddressModulesRequest() *AddressModulesRequest` + +NewAddressModulesRequest instantiates a new AddressModulesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressModulesRequestWithDefaults + +`func NewAddressModulesRequestWithDefaults() *AddressModulesRequest` + +NewAddressModulesRequestWithDefaults instantiates a new AddressModulesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLoadBalancer + +`func (o *AddressModulesRequest) GetLoadBalancer() AddressLoadBalancerModuleRequest` + +GetLoadBalancer returns the LoadBalancer field if non-nil, zero value otherwise. + +### GetLoadBalancerOk + +`func (o *AddressModulesRequest) GetLoadBalancerOk() (*AddressLoadBalancerModuleRequest, bool)` + +GetLoadBalancerOk returns a tuple with the LoadBalancer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoadBalancer + +`func (o *AddressModulesRequest) SetLoadBalancer(v AddressLoadBalancerModuleRequest)` + +SetLoadBalancer sets LoadBalancer field to given value. + +### HasLoadBalancer + +`func (o *AddressModulesRequest) HasLoadBalancer() bool` + +HasLoadBalancer returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AddressRequest.md b/azion-api/docs/AddressRequest.md new file mode 100644 index 0000000..4a448d5 --- /dev/null +++ b/azion-api/docs/AddressRequest.md @@ -0,0 +1,165 @@ +# AddressRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | Pointer to **bool** | Indicates if the address is active for use | [optional] +**Address** | **string** | IPv4/IPv6 address or CNAME to resolve | +**HttpPort** | Pointer to **int64** | Port number for HTTP connections | [optional] +**HttpsPort** | Pointer to **int64** | Port number for HTTPS connections | [optional] +**Modules** | Pointer to [**NullableAddressModulesRequest**](AddressModulesRequest.md) | | [optional] + +## Methods + +### NewAddressRequest + +`func NewAddressRequest(address string, ) *AddressRequest` + +NewAddressRequest instantiates a new AddressRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAddressRequestWithDefaults + +`func NewAddressRequestWithDefaults() *AddressRequest` + +NewAddressRequestWithDefaults instantiates a new AddressRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActive + +`func (o *AddressRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *AddressRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *AddressRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *AddressRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAddress + +`func (o *AddressRequest) GetAddress() string` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *AddressRequest) GetAddressOk() (*string, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *AddressRequest) SetAddress(v string)` + +SetAddress sets Address field to given value. + + +### GetHttpPort + +`func (o *AddressRequest) GetHttpPort() int64` + +GetHttpPort returns the HttpPort field if non-nil, zero value otherwise. + +### GetHttpPortOk + +`func (o *AddressRequest) GetHttpPortOk() (*int64, bool)` + +GetHttpPortOk returns a tuple with the HttpPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpPort + +`func (o *AddressRequest) SetHttpPort(v int64)` + +SetHttpPort sets HttpPort field to given value. + +### HasHttpPort + +`func (o *AddressRequest) HasHttpPort() bool` + +HasHttpPort returns a boolean if a field has been set. + +### GetHttpsPort + +`func (o *AddressRequest) GetHttpsPort() int64` + +GetHttpsPort returns the HttpsPort field if non-nil, zero value otherwise. + +### GetHttpsPortOk + +`func (o *AddressRequest) GetHttpsPortOk() (*int64, bool)` + +GetHttpsPortOk returns a tuple with the HttpsPort field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsPort + +`func (o *AddressRequest) SetHttpsPort(v int64)` + +SetHttpsPort sets HttpsPort field to given value. + +### HasHttpsPort + +`func (o *AddressRequest) HasHttpsPort() bool` + +HasHttpsPort returns a boolean if a field has been set. + +### GetModules + +`func (o *AddressRequest) GetModules() AddressModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *AddressRequest) GetModulesOk() (*AddressModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *AddressRequest) SetModules(v AddressModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *AddressRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### SetModulesNil + +`func (o *AddressRequest) SetModulesNil(b bool)` + + SetModulesNil sets the value for Modules to be an explicit nil + +### UnsetModules +`func (o *AddressRequest) UnsetModules()` + +UnsetModules ensures that no value is present for Modules, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AggregatedField.md b/azion-api/docs/AggregatedField.md new file mode 100644 index 0000000..e1f527c --- /dev/null +++ b/azion-api/docs/AggregatedField.md @@ -0,0 +1,72 @@ +# AggregatedField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Aggregation** | **string** | | +**Variable** | **string** | | + +## Methods + +### NewAggregatedField + +`func NewAggregatedField(aggregation string, variable string, ) *AggregatedField` + +NewAggregatedField instantiates a new AggregatedField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAggregatedFieldWithDefaults + +`func NewAggregatedFieldWithDefaults() *AggregatedField` + +NewAggregatedFieldWithDefaults instantiates a new AggregatedField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAggregation + +`func (o *AggregatedField) GetAggregation() string` + +GetAggregation returns the Aggregation field if non-nil, zero value otherwise. + +### GetAggregationOk + +`func (o *AggregatedField) GetAggregationOk() (*string, bool)` + +GetAggregationOk returns a tuple with the Aggregation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregation + +`func (o *AggregatedField) SetAggregation(v string)` + +SetAggregation sets Aggregation field to given value. + + +### GetVariable + +`func (o *AggregatedField) GetVariable() string` + +GetVariable returns the Variable field if non-nil, zero value otherwise. + +### GetVariableOk + +`func (o *AggregatedField) GetVariableOk() (*string, bool)` + +GetVariableOk returns a tuple with the Variable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariable + +`func (o *AggregatedField) SetVariable(v string)` + +SetVariable sets Variable field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AggregatedFieldRequest.md b/azion-api/docs/AggregatedFieldRequest.md new file mode 100644 index 0000000..89c89c3 --- /dev/null +++ b/azion-api/docs/AggregatedFieldRequest.md @@ -0,0 +1,72 @@ +# AggregatedFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Aggregation** | **string** | | +**Variable** | **string** | | + +## Methods + +### NewAggregatedFieldRequest + +`func NewAggregatedFieldRequest(aggregation string, variable string, ) *AggregatedFieldRequest` + +NewAggregatedFieldRequest instantiates a new AggregatedFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAggregatedFieldRequestWithDefaults + +`func NewAggregatedFieldRequestWithDefaults() *AggregatedFieldRequest` + +NewAggregatedFieldRequestWithDefaults instantiates a new AggregatedFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAggregation + +`func (o *AggregatedFieldRequest) GetAggregation() string` + +GetAggregation returns the Aggregation field if non-nil, zero value otherwise. + +### GetAggregationOk + +`func (o *AggregatedFieldRequest) GetAggregationOk() (*string, bool)` + +GetAggregationOk returns a tuple with the Aggregation field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregation + +`func (o *AggregatedFieldRequest) SetAggregation(v string)` + +SetAggregation sets Aggregation field to given value. + + +### GetVariable + +`func (o *AggregatedFieldRequest) GetVariable() string` + +GetVariable returns the Variable field if non-nil, zero value otherwise. + +### GetVariableOk + +`func (o *AggregatedFieldRequest) GetVariableOk() (*string, bool)` + +GetVariableOk returns a tuple with the Variable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariable + +`func (o *AggregatedFieldRequest) SetVariable(v string)` + +SetVariable sets Variable field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AlgType.md b/azion-api/docs/AlgType.md new file mode 100644 index 0000000..f5bd626 --- /dev/null +++ b/azion-api/docs/AlgType.md @@ -0,0 +1,72 @@ +# AlgType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Slug** | **string** | | + +## Methods + +### NewAlgType + +`func NewAlgType(id int64, slug string, ) *AlgType` + +NewAlgType instantiates a new AlgType object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAlgTypeWithDefaults + +`func NewAlgTypeWithDefaults() *AlgType` + +NewAlgTypeWithDefaults instantiates a new AlgType object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *AlgType) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *AlgType) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *AlgType) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetSlug + +`func (o *AlgType) GetSlug() string` + +GetSlug returns the Slug field if non-nil, zero value otherwise. + +### GetSlugOk + +`func (o *AlgType) GetSlugOk() (*string, bool)` + +GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlug + +`func (o *AlgType) SetSlug(v string)` + +SetSlug sets Slug field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Application.md b/azion-api/docs/Application.md new file mode 100644 index 0000000..a9e70bd --- /dev/null +++ b/azion-api/docs/Application.md @@ -0,0 +1,213 @@ +# Application + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Modules** | Pointer to [**ApplicationModules**](ApplicationModules.md) | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Debug** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | + +## Methods + +### NewApplication + +`func NewApplication(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, ) *Application` + +NewApplication instantiates a new Application object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationWithDefaults + +`func NewApplicationWithDefaults() *Application` + +NewApplicationWithDefaults instantiates a new Application object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Application) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Application) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Application) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Application) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Application) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Application) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *Application) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Application) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Application) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Application) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Application) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Application) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetModules + +`func (o *Application) GetModules() ApplicationModules` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *Application) GetModulesOk() (*ApplicationModules, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *Application) SetModules(v ApplicationModules)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *Application) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### GetActive + +`func (o *Application) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Application) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Application) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Application) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDebug + +`func (o *Application) GetDebug() bool` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *Application) GetDebugOk() (*bool, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *Application) SetDebug(v bool)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *Application) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *Application) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Application) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Application) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationAcceleratorModule.md b/azion-api/docs/ApplicationAcceleratorModule.md new file mode 100644 index 0000000..dd8e9a0 --- /dev/null +++ b/azion-api/docs/ApplicationAcceleratorModule.md @@ -0,0 +1,56 @@ +# ApplicationAcceleratorModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewApplicationAcceleratorModule + +`func NewApplicationAcceleratorModule() *ApplicationAcceleratorModule` + +NewApplicationAcceleratorModule instantiates a new ApplicationAcceleratorModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationAcceleratorModuleWithDefaults + +`func NewApplicationAcceleratorModuleWithDefaults() *ApplicationAcceleratorModule` + +NewApplicationAcceleratorModuleWithDefaults instantiates a new ApplicationAcceleratorModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *ApplicationAcceleratorModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ApplicationAcceleratorModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ApplicationAcceleratorModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ApplicationAcceleratorModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationAcceleratorModuleRequest.md b/azion-api/docs/ApplicationAcceleratorModuleRequest.md new file mode 100644 index 0000000..e84f18c --- /dev/null +++ b/azion-api/docs/ApplicationAcceleratorModuleRequest.md @@ -0,0 +1,56 @@ +# ApplicationAcceleratorModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewApplicationAcceleratorModuleRequest + +`func NewApplicationAcceleratorModuleRequest() *ApplicationAcceleratorModuleRequest` + +NewApplicationAcceleratorModuleRequest instantiates a new ApplicationAcceleratorModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationAcceleratorModuleRequestWithDefaults + +`func NewApplicationAcceleratorModuleRequestWithDefaults() *ApplicationAcceleratorModuleRequest` + +NewApplicationAcceleratorModuleRequestWithDefaults instantiates a new ApplicationAcceleratorModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *ApplicationAcceleratorModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ApplicationAcceleratorModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ApplicationAcceleratorModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ApplicationAcceleratorModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationCriterionArgument.md b/azion-api/docs/ApplicationCriterionArgument.md new file mode 100644 index 0000000..fb93bed --- /dev/null +++ b/azion-api/docs/ApplicationCriterionArgument.md @@ -0,0 +1,30 @@ +# ApplicationCriterionArgument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewApplicationCriterionArgument + +`func NewApplicationCriterionArgument() *ApplicationCriterionArgument` + +NewApplicationCriterionArgument instantiates a new ApplicationCriterionArgument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCriterionArgumentWithDefaults + +`func NewApplicationCriterionArgumentWithDefaults() *ApplicationCriterionArgument` + +NewApplicationCriterionArgumentWithDefaults instantiates a new ApplicationCriterionArgument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationCriterionArgumentRequest.md b/azion-api/docs/ApplicationCriterionArgumentRequest.md new file mode 100644 index 0000000..30831d6 --- /dev/null +++ b/azion-api/docs/ApplicationCriterionArgumentRequest.md @@ -0,0 +1,30 @@ +# ApplicationCriterionArgumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewApplicationCriterionArgumentRequest + +`func NewApplicationCriterionArgumentRequest() *ApplicationCriterionArgumentRequest` + +NewApplicationCriterionArgumentRequest instantiates a new ApplicationCriterionArgumentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCriterionArgumentRequestWithDefaults + +`func NewApplicationCriterionArgumentRequestWithDefaults() *ApplicationCriterionArgumentRequest` + +NewApplicationCriterionArgumentRequestWithDefaults instantiates a new ApplicationCriterionArgumentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationCriterionField.md b/azion-api/docs/ApplicationCriterionField.md new file mode 100644 index 0000000..4c76b18 --- /dev/null +++ b/azion-api/docs/ApplicationCriterionField.md @@ -0,0 +1,129 @@ +# ApplicationCriterionField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conditional** | **string** | * `if` - if * `or` - or * `and` - and | +**Variable** | **string** | * `${arg_<name>}` - ${arg_<name>} * `${args}` - ${args} * `${cookie_<name>}` - ${cookie_<name>} * `${device_group}` - ${device_group} * `${geoip_city_continent_code}` - ${geoip_city_continent_code} * `${geoip_city_country_code}` - ${geoip_city_country_code} * `${geoip_city_country_name}` - ${geoip_city_country_name} * `${geoip_city}` - ${geoip_city} * `${geoip_continent_code}` - ${geoip_continent_code} * `${geoip_country_code}` - ${geoip_country_code} * `${geoip_country_name}` - ${geoip_country_name} * `${geoip_region_name}` - ${geoip_region_name} * `${geoip_region}` - ${geoip_region} * `${host}` - ${host} * `${domain}` - ${domain} * `${http_<header_name>}` - ${http_<header_name>} * `${remote_addr}` - ${remote_addr} * `${remote_user}` - ${remote_user} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${request}` - ${request} * `${scheme}` - ${scheme} * `${sent_http_<header_name>}` - ${sent_http_<header_name>} * `${status}` - ${status} * `${upstream_addr}` - ${upstream_addr} * `${upstream_cookie_<name>}` - ${upstream_cookie_<name>} * `${upstream_http_<header_name>}` - ${upstream_http_<header_name>} * `${upstream_status}` - ${upstream_status} * `${uri}` - ${uri} * `${server_addr}` - ${server_addr} * `${server_port}` - ${server_port} * `${ssl_client_cert}` - ${ssl_client_cert} * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} * `${ssl_client_i_dn}` - ${ssl_client_i_dn} * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} * `${ssl_client_s_dn}` - ${ssl_client_s_dn} * `${ssl_client_serial}` - ${ssl_client_serial} * `${ssl_client_v_end}` - ${ssl_client_v_end} * `${ssl_client_v_remain}` - ${ssl_client_v_remain} * `${ssl_client_v_start}` - ${ssl_client_v_start} * `${ssl_client_verify}` - ${ssl_client_verify} * `${tcpinfo_rtt}` - ${tcpinfo_rtt} * `${remote_port}` - ${remote_port} * `${request_body}` - ${request_body} | +**Operator** | **string** | * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with | +**Argument** | Pointer to [**NullableApplicationCriterionArgument**](ApplicationCriterionArgument.md) | | [optional] + +## Methods + +### NewApplicationCriterionField + +`func NewApplicationCriterionField(conditional string, variable string, operator string, ) *ApplicationCriterionField` + +NewApplicationCriterionField instantiates a new ApplicationCriterionField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCriterionFieldWithDefaults + +`func NewApplicationCriterionFieldWithDefaults() *ApplicationCriterionField` + +NewApplicationCriterionFieldWithDefaults instantiates a new ApplicationCriterionField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConditional + +`func (o *ApplicationCriterionField) GetConditional() string` + +GetConditional returns the Conditional field if non-nil, zero value otherwise. + +### GetConditionalOk + +`func (o *ApplicationCriterionField) GetConditionalOk() (*string, bool)` + +GetConditionalOk returns a tuple with the Conditional field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditional + +`func (o *ApplicationCriterionField) SetConditional(v string)` + +SetConditional sets Conditional field to given value. + + +### GetVariable + +`func (o *ApplicationCriterionField) GetVariable() string` + +GetVariable returns the Variable field if non-nil, zero value otherwise. + +### GetVariableOk + +`func (o *ApplicationCriterionField) GetVariableOk() (*string, bool)` + +GetVariableOk returns a tuple with the Variable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariable + +`func (o *ApplicationCriterionField) SetVariable(v string)` + +SetVariable sets Variable field to given value. + + +### GetOperator + +`func (o *ApplicationCriterionField) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *ApplicationCriterionField) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *ApplicationCriterionField) SetOperator(v string)` + +SetOperator sets Operator field to given value. + + +### GetArgument + +`func (o *ApplicationCriterionField) GetArgument() ApplicationCriterionArgument` + +GetArgument returns the Argument field if non-nil, zero value otherwise. + +### GetArgumentOk + +`func (o *ApplicationCriterionField) GetArgumentOk() (*ApplicationCriterionArgument, bool)` + +GetArgumentOk returns a tuple with the Argument field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgument + +`func (o *ApplicationCriterionField) SetArgument(v ApplicationCriterionArgument)` + +SetArgument sets Argument field to given value. + +### HasArgument + +`func (o *ApplicationCriterionField) HasArgument() bool` + +HasArgument returns a boolean if a field has been set. + +### SetArgumentNil + +`func (o *ApplicationCriterionField) SetArgumentNil(b bool)` + + SetArgumentNil sets the value for Argument to be an explicit nil + +### UnsetArgument +`func (o *ApplicationCriterionField) UnsetArgument()` + +UnsetArgument ensures that no value is present for Argument, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationCriterionFieldRequest.md b/azion-api/docs/ApplicationCriterionFieldRequest.md new file mode 100644 index 0000000..ade7e94 --- /dev/null +++ b/azion-api/docs/ApplicationCriterionFieldRequest.md @@ -0,0 +1,129 @@ +# ApplicationCriterionFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conditional** | **string** | * `if` - if * `or` - or * `and` - and | +**Variable** | **string** | * `${arg_<name>}` - ${arg_<name>} * `${args}` - ${args} * `${cookie_<name>}` - ${cookie_<name>} * `${device_group}` - ${device_group} * `${geoip_city_continent_code}` - ${geoip_city_continent_code} * `${geoip_city_country_code}` - ${geoip_city_country_code} * `${geoip_city_country_name}` - ${geoip_city_country_name} * `${geoip_city}` - ${geoip_city} * `${geoip_continent_code}` - ${geoip_continent_code} * `${geoip_country_code}` - ${geoip_country_code} * `${geoip_country_name}` - ${geoip_country_name} * `${geoip_region_name}` - ${geoip_region_name} * `${geoip_region}` - ${geoip_region} * `${host}` - ${host} * `${domain}` - ${domain} * `${http_<header_name>}` - ${http_<header_name>} * `${remote_addr}` - ${remote_addr} * `${remote_user}` - ${remote_user} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${request}` - ${request} * `${scheme}` - ${scheme} * `${sent_http_<header_name>}` - ${sent_http_<header_name>} * `${status}` - ${status} * `${upstream_addr}` - ${upstream_addr} * `${upstream_cookie_<name>}` - ${upstream_cookie_<name>} * `${upstream_http_<header_name>}` - ${upstream_http_<header_name>} * `${upstream_status}` - ${upstream_status} * `${uri}` - ${uri} * `${server_addr}` - ${server_addr} * `${server_port}` - ${server_port} * `${ssl_client_cert}` - ${ssl_client_cert} * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} * `${ssl_client_i_dn}` - ${ssl_client_i_dn} * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} * `${ssl_client_s_dn}` - ${ssl_client_s_dn} * `${ssl_client_serial}` - ${ssl_client_serial} * `${ssl_client_v_end}` - ${ssl_client_v_end} * `${ssl_client_v_remain}` - ${ssl_client_v_remain} * `${ssl_client_v_start}` - ${ssl_client_v_start} * `${ssl_client_verify}` - ${ssl_client_verify} * `${tcpinfo_rtt}` - ${tcpinfo_rtt} * `${remote_port}` - ${remote_port} * `${request_body}` - ${request_body} | +**Operator** | **string** | * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with | +**Argument** | Pointer to [**NullableApplicationCriterionArgumentRequest**](ApplicationCriterionArgumentRequest.md) | | [optional] + +## Methods + +### NewApplicationCriterionFieldRequest + +`func NewApplicationCriterionFieldRequest(conditional string, variable string, operator string, ) *ApplicationCriterionFieldRequest` + +NewApplicationCriterionFieldRequest instantiates a new ApplicationCriterionFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationCriterionFieldRequestWithDefaults + +`func NewApplicationCriterionFieldRequestWithDefaults() *ApplicationCriterionFieldRequest` + +NewApplicationCriterionFieldRequestWithDefaults instantiates a new ApplicationCriterionFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConditional + +`func (o *ApplicationCriterionFieldRequest) GetConditional() string` + +GetConditional returns the Conditional field if non-nil, zero value otherwise. + +### GetConditionalOk + +`func (o *ApplicationCriterionFieldRequest) GetConditionalOk() (*string, bool)` + +GetConditionalOk returns a tuple with the Conditional field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditional + +`func (o *ApplicationCriterionFieldRequest) SetConditional(v string)` + +SetConditional sets Conditional field to given value. + + +### GetVariable + +`func (o *ApplicationCriterionFieldRequest) GetVariable() string` + +GetVariable returns the Variable field if non-nil, zero value otherwise. + +### GetVariableOk + +`func (o *ApplicationCriterionFieldRequest) GetVariableOk() (*string, bool)` + +GetVariableOk returns a tuple with the Variable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariable + +`func (o *ApplicationCriterionFieldRequest) SetVariable(v string)` + +SetVariable sets Variable field to given value. + + +### GetOperator + +`func (o *ApplicationCriterionFieldRequest) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *ApplicationCriterionFieldRequest) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *ApplicationCriterionFieldRequest) SetOperator(v string)` + +SetOperator sets Operator field to given value. + + +### GetArgument + +`func (o *ApplicationCriterionFieldRequest) GetArgument() ApplicationCriterionArgumentRequest` + +GetArgument returns the Argument field if non-nil, zero value otherwise. + +### GetArgumentOk + +`func (o *ApplicationCriterionFieldRequest) GetArgumentOk() (*ApplicationCriterionArgumentRequest, bool)` + +GetArgumentOk returns a tuple with the Argument field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgument + +`func (o *ApplicationCriterionFieldRequest) SetArgument(v ApplicationCriterionArgumentRequest)` + +SetArgument sets Argument field to given value. + +### HasArgument + +`func (o *ApplicationCriterionFieldRequest) HasArgument() bool` + +HasArgument returns a boolean if a field has been set. + +### SetArgumentNil + +`func (o *ApplicationCriterionFieldRequest) SetArgumentNil(b bool)` + + SetArgumentNil sets the value for Argument to be an explicit nil + +### UnsetArgument +`func (o *ApplicationCriterionFieldRequest) UnsetArgument()` + +UnsetArgument ensures that no value is present for Argument, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationModules.md b/azion-api/docs/ApplicationModules.md new file mode 100644 index 0000000..14cf2da --- /dev/null +++ b/azion-api/docs/ApplicationModules.md @@ -0,0 +1,134 @@ +# ApplicationModules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cache** | Pointer to [**CacheModule**](CacheModule.md) | | [optional] +**Functions** | Pointer to [**FunctionModule**](FunctionModule.md) | | [optional] +**ApplicationAccelerator** | Pointer to [**ApplicationAcceleratorModule**](ApplicationAcceleratorModule.md) | | [optional] +**ImageProcessor** | Pointer to [**ImageProcessorModule**](ImageProcessorModule.md) | | [optional] + +## Methods + +### NewApplicationModules + +`func NewApplicationModules() *ApplicationModules` + +NewApplicationModules instantiates a new ApplicationModules object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationModulesWithDefaults + +`func NewApplicationModulesWithDefaults() *ApplicationModules` + +NewApplicationModulesWithDefaults instantiates a new ApplicationModules object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCache + +`func (o *ApplicationModules) GetCache() CacheModule` + +GetCache returns the Cache field if non-nil, zero value otherwise. + +### GetCacheOk + +`func (o *ApplicationModules) GetCacheOk() (*CacheModule, bool)` + +GetCacheOk returns a tuple with the Cache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache + +`func (o *ApplicationModules) SetCache(v CacheModule)` + +SetCache sets Cache field to given value. + +### HasCache + +`func (o *ApplicationModules) HasCache() bool` + +HasCache returns a boolean if a field has been set. + +### GetFunctions + +`func (o *ApplicationModules) GetFunctions() FunctionModule` + +GetFunctions returns the Functions field if non-nil, zero value otherwise. + +### GetFunctionsOk + +`func (o *ApplicationModules) GetFunctionsOk() (*FunctionModule, bool)` + +GetFunctionsOk returns a tuple with the Functions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctions + +`func (o *ApplicationModules) SetFunctions(v FunctionModule)` + +SetFunctions sets Functions field to given value. + +### HasFunctions + +`func (o *ApplicationModules) HasFunctions() bool` + +HasFunctions returns a boolean if a field has been set. + +### GetApplicationAccelerator + +`func (o *ApplicationModules) GetApplicationAccelerator() ApplicationAcceleratorModule` + +GetApplicationAccelerator returns the ApplicationAccelerator field if non-nil, zero value otherwise. + +### GetApplicationAcceleratorOk + +`func (o *ApplicationModules) GetApplicationAcceleratorOk() (*ApplicationAcceleratorModule, bool)` + +GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationAccelerator + +`func (o *ApplicationModules) SetApplicationAccelerator(v ApplicationAcceleratorModule)` + +SetApplicationAccelerator sets ApplicationAccelerator field to given value. + +### HasApplicationAccelerator + +`func (o *ApplicationModules) HasApplicationAccelerator() bool` + +HasApplicationAccelerator returns a boolean if a field has been set. + +### GetImageProcessor + +`func (o *ApplicationModules) GetImageProcessor() ImageProcessorModule` + +GetImageProcessor returns the ImageProcessor field if non-nil, zero value otherwise. + +### GetImageProcessorOk + +`func (o *ApplicationModules) GetImageProcessorOk() (*ImageProcessorModule, bool)` + +GetImageProcessorOk returns a tuple with the ImageProcessor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImageProcessor + +`func (o *ApplicationModules) SetImageProcessor(v ImageProcessorModule)` + +SetImageProcessor sets ImageProcessor field to given value. + +### HasImageProcessor + +`func (o *ApplicationModules) HasImageProcessor() bool` + +HasImageProcessor returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationModulesRequest.md b/azion-api/docs/ApplicationModulesRequest.md new file mode 100644 index 0000000..fc47ffc --- /dev/null +++ b/azion-api/docs/ApplicationModulesRequest.md @@ -0,0 +1,134 @@ +# ApplicationModulesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cache** | Pointer to [**CacheModuleRequest**](CacheModuleRequest.md) | | [optional] +**Functions** | Pointer to [**FunctionModuleRequest**](FunctionModuleRequest.md) | | [optional] +**ApplicationAccelerator** | Pointer to [**ApplicationAcceleratorModuleRequest**](ApplicationAcceleratorModuleRequest.md) | | [optional] +**ImageProcessor** | Pointer to [**ImageProcessorModuleRequest**](ImageProcessorModuleRequest.md) | | [optional] + +## Methods + +### NewApplicationModulesRequest + +`func NewApplicationModulesRequest() *ApplicationModulesRequest` + +NewApplicationModulesRequest instantiates a new ApplicationModulesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationModulesRequestWithDefaults + +`func NewApplicationModulesRequestWithDefaults() *ApplicationModulesRequest` + +NewApplicationModulesRequestWithDefaults instantiates a new ApplicationModulesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCache + +`func (o *ApplicationModulesRequest) GetCache() CacheModuleRequest` + +GetCache returns the Cache field if non-nil, zero value otherwise. + +### GetCacheOk + +`func (o *ApplicationModulesRequest) GetCacheOk() (*CacheModuleRequest, bool)` + +GetCacheOk returns a tuple with the Cache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache + +`func (o *ApplicationModulesRequest) SetCache(v CacheModuleRequest)` + +SetCache sets Cache field to given value. + +### HasCache + +`func (o *ApplicationModulesRequest) HasCache() bool` + +HasCache returns a boolean if a field has been set. + +### GetFunctions + +`func (o *ApplicationModulesRequest) GetFunctions() FunctionModuleRequest` + +GetFunctions returns the Functions field if non-nil, zero value otherwise. + +### GetFunctionsOk + +`func (o *ApplicationModulesRequest) GetFunctionsOk() (*FunctionModuleRequest, bool)` + +GetFunctionsOk returns a tuple with the Functions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctions + +`func (o *ApplicationModulesRequest) SetFunctions(v FunctionModuleRequest)` + +SetFunctions sets Functions field to given value. + +### HasFunctions + +`func (o *ApplicationModulesRequest) HasFunctions() bool` + +HasFunctions returns a boolean if a field has been set. + +### GetApplicationAccelerator + +`func (o *ApplicationModulesRequest) GetApplicationAccelerator() ApplicationAcceleratorModuleRequest` + +GetApplicationAccelerator returns the ApplicationAccelerator field if non-nil, zero value otherwise. + +### GetApplicationAcceleratorOk + +`func (o *ApplicationModulesRequest) GetApplicationAcceleratorOk() (*ApplicationAcceleratorModuleRequest, bool)` + +GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationAccelerator + +`func (o *ApplicationModulesRequest) SetApplicationAccelerator(v ApplicationAcceleratorModuleRequest)` + +SetApplicationAccelerator sets ApplicationAccelerator field to given value. + +### HasApplicationAccelerator + +`func (o *ApplicationModulesRequest) HasApplicationAccelerator() bool` + +HasApplicationAccelerator returns a boolean if a field has been set. + +### GetImageProcessor + +`func (o *ApplicationModulesRequest) GetImageProcessor() ImageProcessorModuleRequest` + +GetImageProcessor returns the ImageProcessor field if non-nil, zero value otherwise. + +### GetImageProcessorOk + +`func (o *ApplicationModulesRequest) GetImageProcessorOk() (*ImageProcessorModuleRequest, bool)` + +GetImageProcessorOk returns a tuple with the ImageProcessor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetImageProcessor + +`func (o *ApplicationModulesRequest) SetImageProcessor(v ImageProcessorModuleRequest)` + +SetImageProcessor sets ImageProcessor field to given value. + +### HasImageProcessor + +`func (o *ApplicationModulesRequest) HasImageProcessor() bool` + +HasImageProcessor returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationRequest.md b/azion-api/docs/ApplicationRequest.md new file mode 100644 index 0000000..15deb21 --- /dev/null +++ b/azion-api/docs/ApplicationRequest.md @@ -0,0 +1,129 @@ +# ApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Modules** | Pointer to [**ApplicationModulesRequest**](ApplicationModulesRequest.md) | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Debug** | Pointer to **bool** | | [optional] + +## Methods + +### NewApplicationRequest + +`func NewApplicationRequest(name string, ) *ApplicationRequest` + +NewApplicationRequest instantiates a new ApplicationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationRequestWithDefaults + +`func NewApplicationRequestWithDefaults() *ApplicationRequest` + +NewApplicationRequestWithDefaults instantiates a new ApplicationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ApplicationRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ApplicationRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ApplicationRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetModules + +`func (o *ApplicationRequest) GetModules() ApplicationModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *ApplicationRequest) GetModulesOk() (*ApplicationModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *ApplicationRequest) SetModules(v ApplicationModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *ApplicationRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### GetActive + +`func (o *ApplicationRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ApplicationRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ApplicationRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ApplicationRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDebug + +`func (o *ApplicationRequest) GetDebug() bool` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *ApplicationRequest) GetDebugOk() (*bool, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *ApplicationRequest) SetDebug(v bool)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *ApplicationRequest) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationRequestPhaseRuleEngineOrder.md b/azion-api/docs/ApplicationRequestPhaseRuleEngineOrder.md new file mode 100644 index 0000000..730c44b --- /dev/null +++ b/azion-api/docs/ApplicationRequestPhaseRuleEngineOrder.md @@ -0,0 +1,51 @@ +# ApplicationRequestPhaseRuleEngineOrder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Order** | **[]int64** | | + +## Methods + +### NewApplicationRequestPhaseRuleEngineOrder + +`func NewApplicationRequestPhaseRuleEngineOrder(order []int64, ) *ApplicationRequestPhaseRuleEngineOrder` + +NewApplicationRequestPhaseRuleEngineOrder instantiates a new ApplicationRequestPhaseRuleEngineOrder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationRequestPhaseRuleEngineOrderWithDefaults + +`func NewApplicationRequestPhaseRuleEngineOrderWithDefaults() *ApplicationRequestPhaseRuleEngineOrder` + +NewApplicationRequestPhaseRuleEngineOrderWithDefaults instantiates a new ApplicationRequestPhaseRuleEngineOrder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrder + +`func (o *ApplicationRequestPhaseRuleEngineOrder) GetOrder() []int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ApplicationRequestPhaseRuleEngineOrder) GetOrderOk() (*[]int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ApplicationRequestPhaseRuleEngineOrder) SetOrder(v []int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationResponse.md b/azion-api/docs/ApplicationResponse.md new file mode 100644 index 0000000..e89b4ac --- /dev/null +++ b/azion-api/docs/ApplicationResponse.md @@ -0,0 +1,77 @@ +# ApplicationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Application**](Application.md) | | + +## Methods + +### NewApplicationResponse + +`func NewApplicationResponse(data Application, ) *ApplicationResponse` + +NewApplicationResponse instantiates a new ApplicationResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationResponseWithDefaults + +`func NewApplicationResponseWithDefaults() *ApplicationResponse` + +NewApplicationResponseWithDefaults instantiates a new ApplicationResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ApplicationResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ApplicationResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ApplicationResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ApplicationResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ApplicationResponse) GetData() Application` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ApplicationResponse) GetDataOk() (*Application, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ApplicationResponse) SetData(v Application)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationResponsePhaseRuleEngineOrderRequest.md b/azion-api/docs/ApplicationResponsePhaseRuleEngineOrderRequest.md new file mode 100644 index 0000000..3c6bd48 --- /dev/null +++ b/azion-api/docs/ApplicationResponsePhaseRuleEngineOrderRequest.md @@ -0,0 +1,51 @@ +# ApplicationResponsePhaseRuleEngineOrderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Order** | **[]int64** | | + +## Methods + +### NewApplicationResponsePhaseRuleEngineOrderRequest + +`func NewApplicationResponsePhaseRuleEngineOrderRequest(order []int64, ) *ApplicationResponsePhaseRuleEngineOrderRequest` + +NewApplicationResponsePhaseRuleEngineOrderRequest instantiates a new ApplicationResponsePhaseRuleEngineOrderRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewApplicationResponsePhaseRuleEngineOrderRequestWithDefaults + +`func NewApplicationResponsePhaseRuleEngineOrderRequestWithDefaults() *ApplicationResponsePhaseRuleEngineOrderRequest` + +NewApplicationResponsePhaseRuleEngineOrderRequestWithDefaults instantiates a new ApplicationResponsePhaseRuleEngineOrderRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrder + +`func (o *ApplicationResponsePhaseRuleEngineOrderRequest) GetOrder() []int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ApplicationResponsePhaseRuleEngineOrderRequest) GetOrderOk() (*[]int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ApplicationResponsePhaseRuleEngineOrderRequest) SetOrder(v []int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ApplicationsAPI.md b/azion-api/docs/ApplicationsAPI.md new file mode 100644 index 0000000..f2ce037 --- /dev/null +++ b/azion-api/docs/ApplicationsAPI.md @@ -0,0 +1,526 @@ +# \ApplicationsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CloneApplication**](ApplicationsAPI.md#CloneApplication) | **Post** /workspace/applications/{application_id}/clone | Clone an Application +[**CreateApplication**](ApplicationsAPI.md#CreateApplication) | **Post** /workspace/applications | Create an Application +[**DeleteApplication**](ApplicationsAPI.md#DeleteApplication) | **Delete** /workspace/applications/{application_id} | Delete an Application +[**ListApplications**](ApplicationsAPI.md#ListApplications) | **Get** /workspace/applications | List Applications +[**PartialUpdateApplication**](ApplicationsAPI.md#PartialUpdateApplication) | **Patch** /workspace/applications/{application_id} | Partially update an Application +[**RetrieveApplication**](ApplicationsAPI.md#RetrieveApplication) | **Get** /workspace/applications/{application_id} | Retrieve details of an Application +[**UpdateApplication**](ApplicationsAPI.md#UpdateApplication) | **Put** /workspace/applications/{application_id} | Update an Application + + + +## CloneApplication + +> ApplicationResponse CloneApplication(ctx, applicationId).CloneApplicationRequest(cloneApplicationRequest).Execute() + +Clone an Application + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + cloneApplicationRequest := *openapiclient.NewCloneApplicationRequest("Name_example") // CloneApplicationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.CloneApplication(context.Background(), applicationId).CloneApplicationRequest(cloneApplicationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.CloneApplication``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CloneApplication`: ApplicationResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.CloneApplication`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCloneApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cloneApplicationRequest** | [**CloneApplicationRequest**](CloneApplicationRequest.md) | | + +### Return type + +[**ApplicationResponse**](ApplicationResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateApplication + +> ApplicationResponse CreateApplication(ctx).ApplicationRequest(applicationRequest).Execute() + +Create an Application + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationRequest := *openapiclient.NewApplicationRequest("Name_example") // ApplicationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.CreateApplication(context.Background()).ApplicationRequest(applicationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.CreateApplication``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApplication`: ApplicationResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.CreateApplication`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationRequest** | [**ApplicationRequest**](ApplicationRequest.md) | | + +### Return type + +[**ApplicationResponse**](ApplicationResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApplication + +> DeleteResponse DeleteApplication(ctx, applicationId).Execute() + +Delete an Application + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.DeleteApplication(context.Background(), applicationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.DeleteApplication``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApplication`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.DeleteApplication`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApplications + +> PaginatedApplicationList ListApplications(ctx).Active(active).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Applications + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.ListApplications(context.Background()).Active(active).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.ListApplications``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListApplications`: PaginatedApplicationList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.ListApplications`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListApplicationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedApplicationList**](PaginatedApplicationList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateApplication + +> ApplicationResponse PartialUpdateApplication(ctx, applicationId).PatchedApplicationRequest(patchedApplicationRequest).Execute() + +Partially update an Application + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + patchedApplicationRequest := *openapiclient.NewPatchedApplicationRequest() // PatchedApplicationRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.PartialUpdateApplication(context.Background(), applicationId).PatchedApplicationRequest(patchedApplicationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.PartialUpdateApplication``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateApplication`: ApplicationResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.PartialUpdateApplication`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedApplicationRequest** | [**PatchedApplicationRequest**](PatchedApplicationRequest.md) | | + +### Return type + +[**ApplicationResponse**](ApplicationResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveApplication + +> ApplicationResponse RetrieveApplication(ctx, applicationId).Fields(fields).Execute() + +Retrieve details of an Application + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.RetrieveApplication(context.Background(), applicationId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.RetrieveApplication``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveApplication`: ApplicationResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.RetrieveApplication`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ApplicationResponse**](ApplicationResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplication + +> ApplicationResponse UpdateApplication(ctx, applicationId).ApplicationRequest(applicationRequest).Execute() + +Update an Application + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + applicationRequest := *openapiclient.NewApplicationRequest("Name_example") // ApplicationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsAPI.UpdateApplication(context.Background(), applicationId).ApplicationRequest(applicationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsAPI.UpdateApplication``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApplication`: ApplicationResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsAPI.UpdateApplication`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApplicationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **applicationRequest** | [**ApplicationRequest**](ApplicationRequest.md) | | + +### Return type + +[**ApplicationResponse**](ApplicationResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/ApplicationsCacheSettingsAPI.md b/azion-api/docs/ApplicationsCacheSettingsAPI.md new file mode 100644 index 0000000..676fa8d --- /dev/null +++ b/azion-api/docs/ApplicationsCacheSettingsAPI.md @@ -0,0 +1,468 @@ +# \ApplicationsCacheSettingsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCacheSetting**](ApplicationsCacheSettingsAPI.md#CreateCacheSetting) | **Post** /workspace/applications/{application_id}/cache_settings | Create an Applications Cache Setting +[**DeleteCacheSetting**](ApplicationsCacheSettingsAPI.md#DeleteCacheSetting) | **Delete** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Delete an Applications Cache Setting +[**ListCacheSettings**](ApplicationsCacheSettingsAPI.md#ListCacheSettings) | **Get** /workspace/applications/{application_id}/cache_settings | List all Applications Cache Settings +[**PartialUpdateCacheSetting**](ApplicationsCacheSettingsAPI.md#PartialUpdateCacheSetting) | **Patch** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Partially update an Applications Cache Setting +[**RetrieveCacheSetting**](ApplicationsCacheSettingsAPI.md#RetrieveCacheSetting) | **Get** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Retrieve details of an Applications Cache Setting +[**UpdateCacheSetting**](ApplicationsCacheSettingsAPI.md#UpdateCacheSetting) | **Put** /workspace/applications/{application_id}/cache_settings/{cache_setting_id} | Update an Applications Cache Setting + + + +## CreateCacheSetting + +> CacheSettingResponse CreateCacheSetting(ctx, applicationId).CacheSettingRequest(cacheSettingRequest).Execute() + +Create an Applications Cache Setting + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + cacheSettingRequest := *openapiclient.NewCacheSettingRequest("Name_example") // CacheSettingRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsCacheSettingsAPI.CreateCacheSetting(context.Background(), applicationId).CacheSettingRequest(cacheSettingRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsCacheSettingsAPI.CreateCacheSetting``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCacheSetting`: CacheSettingResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsCacheSettingsAPI.CreateCacheSetting`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCacheSettingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cacheSettingRequest** | [**CacheSettingRequest**](CacheSettingRequest.md) | | + +### Return type + +[**CacheSettingResponse**](CacheSettingResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCacheSetting + +> DeleteResponse DeleteCacheSetting(ctx, applicationId, cacheSettingId).Execute() + +Delete an Applications Cache Setting + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + cacheSettingId := int64(789) // int64 | A unique integer value identifying the cache setting. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsCacheSettingsAPI.DeleteCacheSetting(context.Background(), applicationId, cacheSettingId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsCacheSettingsAPI.DeleteCacheSetting``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteCacheSetting`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsCacheSettingsAPI.DeleteCacheSetting`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**cacheSettingId** | **int64** | A unique integer value identifying the cache setting. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteCacheSettingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCacheSettings + +> PaginatedCacheSettingList ListCacheSettings(ctx, applicationId).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List all Applications Cache Settings + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsCacheSettingsAPI.ListCacheSettings(context.Background(), applicationId).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsCacheSettingsAPI.ListCacheSettings``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCacheSettings`: PaginatedCacheSettingList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsCacheSettingsAPI.ListCacheSettings`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListCacheSettingsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedCacheSettingList**](PaginatedCacheSettingList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateCacheSetting + +> CacheSettingResponse PartialUpdateCacheSetting(ctx, applicationId, cacheSettingId).PatchedCacheSettingRequest(patchedCacheSettingRequest).Execute() + +Partially update an Applications Cache Setting + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + cacheSettingId := int64(789) // int64 | A unique integer value identifying the cache setting. + patchedCacheSettingRequest := *openapiclient.NewPatchedCacheSettingRequest() // PatchedCacheSettingRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsCacheSettingsAPI.PartialUpdateCacheSetting(context.Background(), applicationId, cacheSettingId).PatchedCacheSettingRequest(patchedCacheSettingRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsCacheSettingsAPI.PartialUpdateCacheSetting``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateCacheSetting`: CacheSettingResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsCacheSettingsAPI.PartialUpdateCacheSetting`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**cacheSettingId** | **int64** | A unique integer value identifying the cache setting. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateCacheSettingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedCacheSettingRequest** | [**PatchedCacheSettingRequest**](PatchedCacheSettingRequest.md) | | + +### Return type + +[**CacheSettingResponse**](CacheSettingResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveCacheSetting + +> CacheSetting RetrieveCacheSetting(ctx, applicationId, cacheSettingId).Fields(fields).Execute() + +Retrieve details of an Applications Cache Setting + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + cacheSettingId := int64(789) // int64 | A unique integer value identifying the cache setting. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsCacheSettingsAPI.RetrieveCacheSetting(context.Background(), applicationId, cacheSettingId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsCacheSettingsAPI.RetrieveCacheSetting``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveCacheSetting`: CacheSetting + fmt.Fprintf(os.Stdout, "Response from `ApplicationsCacheSettingsAPI.RetrieveCacheSetting`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**cacheSettingId** | **int64** | A unique integer value identifying the cache setting. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveCacheSettingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**CacheSetting**](CacheSetting.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCacheSetting + +> CacheSettingResponse UpdateCacheSetting(ctx, applicationId, cacheSettingId).CacheSettingRequest(cacheSettingRequest).Execute() + +Update an Applications Cache Setting + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + cacheSettingId := int64(789) // int64 | A unique integer value identifying the cache setting. + cacheSettingRequest := *openapiclient.NewCacheSettingRequest("Name_example") // CacheSettingRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsCacheSettingsAPI.UpdateCacheSetting(context.Background(), applicationId, cacheSettingId).CacheSettingRequest(cacheSettingRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsCacheSettingsAPI.UpdateCacheSetting``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCacheSetting`: CacheSettingResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsCacheSettingsAPI.UpdateCacheSetting`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**cacheSettingId** | **int64** | A unique integer value identifying the cache setting. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateCacheSettingRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **cacheSettingRequest** | [**CacheSettingRequest**](CacheSettingRequest.md) | | + +### Return type + +[**CacheSettingResponse**](CacheSettingResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/ApplicationsDeviceGroupsAPI.md b/azion-api/docs/ApplicationsDeviceGroupsAPI.md new file mode 100644 index 0000000..6d0ae68 --- /dev/null +++ b/azion-api/docs/ApplicationsDeviceGroupsAPI.md @@ -0,0 +1,470 @@ +# \ApplicationsDeviceGroupsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDeviceGroup**](ApplicationsDeviceGroupsAPI.md#CreateDeviceGroup) | **Post** /workspace/applications/{application_id}/device_groups | Create an Applications Device Group +[**DeleteDeviceGroup**](ApplicationsDeviceGroupsAPI.md#DeleteDeviceGroup) | **Delete** /workspace/applications/{application_id}/device_groups/{device_group_id} | Delete an Applications Device Group +[**ListDeviceGroups**](ApplicationsDeviceGroupsAPI.md#ListDeviceGroups) | **Get** /workspace/applications/{application_id}/device_groups | List Applications Device Groups +[**PartialUpdateDeviceGroup**](ApplicationsDeviceGroupsAPI.md#PartialUpdateDeviceGroup) | **Patch** /workspace/applications/{application_id}/device_groups/{device_group_id} | Partially update an Applications Device Group +[**RetrieveDeviceGroup**](ApplicationsDeviceGroupsAPI.md#RetrieveDeviceGroup) | **Get** /workspace/applications/{application_id}/device_groups/{device_group_id} | Retrieve details of a Device Group +[**UpdateDeviceGroup**](ApplicationsDeviceGroupsAPI.md#UpdateDeviceGroup) | **Put** /workspace/applications/{application_id}/device_groups/{device_group_id} | Update an Applications Device Group + + + +## CreateDeviceGroup + +> DeviceGroupResponse CreateDeviceGroup(ctx, applicationId).DeviceGroupRequest(deviceGroupRequest).Execute() + +Create an Applications Device Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + deviceGroupRequest := *openapiclient.NewDeviceGroupRequest("Name_example", "UserAgent_example") // DeviceGroupRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsDeviceGroupsAPI.CreateDeviceGroup(context.Background(), applicationId).DeviceGroupRequest(deviceGroupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsDeviceGroupsAPI.CreateDeviceGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDeviceGroup`: DeviceGroupResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsDeviceGroupsAPI.CreateDeviceGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDeviceGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **deviceGroupRequest** | [**DeviceGroupRequest**](DeviceGroupRequest.md) | | + +### Return type + +[**DeviceGroupResponse**](DeviceGroupResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDeviceGroup + +> DeleteResponse DeleteDeviceGroup(ctx, applicationId, deviceGroupId).Execute() + +Delete an Applications Device Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + deviceGroupId := int64(789) // int64 | A unique integer value identifying the device group. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsDeviceGroupsAPI.DeleteDeviceGroup(context.Background(), applicationId, deviceGroupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsDeviceGroupsAPI.DeleteDeviceGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteDeviceGroup`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsDeviceGroupsAPI.DeleteDeviceGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**deviceGroupId** | **int64** | A unique integer value identifying the device group. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDeviceGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDeviceGroups + +> PaginatedDeviceGroupList ListDeviceGroups(ctx, applicationId).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).UserAgent(userAgent).Execute() + +List Applications Device Groups + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + userAgent := "userAgent_example" // string | Filter by user agent (case-insensitive, partial match). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsDeviceGroupsAPI.ListDeviceGroups(context.Background(), applicationId).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).UserAgent(userAgent).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsDeviceGroupsAPI.ListDeviceGroups``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDeviceGroups`: PaginatedDeviceGroupList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsDeviceGroupsAPI.ListDeviceGroups`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDeviceGroupsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **userAgent** | **string** | Filter by user agent (case-insensitive, partial match). | + +### Return type + +[**PaginatedDeviceGroupList**](PaginatedDeviceGroupList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateDeviceGroup + +> DeviceGroupResponse PartialUpdateDeviceGroup(ctx, applicationId, deviceGroupId).PatchedDeviceGroupRequest(patchedDeviceGroupRequest).Execute() + +Partially update an Applications Device Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + deviceGroupId := int64(789) // int64 | A unique integer value identifying the device group. + patchedDeviceGroupRequest := *openapiclient.NewPatchedDeviceGroupRequest() // PatchedDeviceGroupRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsDeviceGroupsAPI.PartialUpdateDeviceGroup(context.Background(), applicationId, deviceGroupId).PatchedDeviceGroupRequest(patchedDeviceGroupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsDeviceGroupsAPI.PartialUpdateDeviceGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDeviceGroup`: DeviceGroupResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsDeviceGroupsAPI.PartialUpdateDeviceGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**deviceGroupId** | **int64** | A unique integer value identifying the device group. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDeviceGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedDeviceGroupRequest** | [**PatchedDeviceGroupRequest**](PatchedDeviceGroupRequest.md) | | + +### Return type + +[**DeviceGroupResponse**](DeviceGroupResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDeviceGroup + +> DeviceGroupResponse RetrieveDeviceGroup(ctx, applicationId, deviceGroupId).Fields(fields).Execute() + +Retrieve details of a Device Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + deviceGroupId := int64(789) // int64 | A unique integer value identifying the device group. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsDeviceGroupsAPI.RetrieveDeviceGroup(context.Background(), applicationId, deviceGroupId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsDeviceGroupsAPI.RetrieveDeviceGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDeviceGroup`: DeviceGroupResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsDeviceGroupsAPI.RetrieveDeviceGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**deviceGroupId** | **int64** | A unique integer value identifying the device group. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDeviceGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**DeviceGroupResponse**](DeviceGroupResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDeviceGroup + +> DeviceGroupResponse UpdateDeviceGroup(ctx, applicationId, deviceGroupId).DeviceGroupRequest(deviceGroupRequest).Execute() + +Update an Applications Device Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + deviceGroupId := int64(789) // int64 | A unique integer value identifying the device group. + deviceGroupRequest := *openapiclient.NewDeviceGroupRequest("Name_example", "UserAgent_example") // DeviceGroupRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsDeviceGroupsAPI.UpdateDeviceGroup(context.Background(), applicationId, deviceGroupId).DeviceGroupRequest(deviceGroupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsDeviceGroupsAPI.UpdateDeviceGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDeviceGroup`: DeviceGroupResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsDeviceGroupsAPI.UpdateDeviceGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**deviceGroupId** | **int64** | A unique integer value identifying the device group. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDeviceGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **deviceGroupRequest** | [**DeviceGroupRequest**](DeviceGroupRequest.md) | | + +### Return type + +[**DeviceGroupResponse**](DeviceGroupResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/ApplicationsFunctionAPI.md b/azion-api/docs/ApplicationsFunctionAPI.md new file mode 100644 index 0000000..ff6f88e --- /dev/null +++ b/azion-api/docs/ApplicationsFunctionAPI.md @@ -0,0 +1,475 @@ +# \ApplicationsFunctionAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApplicationFunctionInstance**](ApplicationsFunctionAPI.md#CreateApplicationFunctionInstance) | **Post** /workspace/applications/{application_id}/functions | Create an Application Function Instance +[**DeleteApplicationFunctionInstance**](ApplicationsFunctionAPI.md#DeleteApplicationFunctionInstance) | **Delete** /workspace/applications/{application_id}/functions/{function_id} | Delete an Application Function Instance +[**ListApplicationFunctionInstances**](ApplicationsFunctionAPI.md#ListApplicationFunctionInstances) | **Get** /workspace/applications/{application_id}/functions | List Function Instances +[**PartialUpdateApplicationFunctionInstance**](ApplicationsFunctionAPI.md#PartialUpdateApplicationFunctionInstance) | **Patch** /workspace/applications/{application_id}/functions/{function_id} | Partially update an Application Function Instance +[**RetrieveApplicationFunctionInstance**](ApplicationsFunctionAPI.md#RetrieveApplicationFunctionInstance) | **Get** /workspace/applications/{application_id}/functions/{function_id} | Retrieve details of an Application Function Instance +[**UpdateApplicationFunctionInstance**](ApplicationsFunctionAPI.md#UpdateApplicationFunctionInstance) | **Put** /workspace/applications/{application_id}/functions/{function_id} | Update an Application Function Instance + + + +## CreateApplicationFunctionInstance + +> FunctionInstanceResponse CreateApplicationFunctionInstance(ctx, applicationId).FunctionInstanceRequest(functionInstanceRequest).Execute() + +Create an Application Function Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + functionInstanceRequest := *openapiclient.NewFunctionInstanceRequest("Name_example", int64(123)) // FunctionInstanceRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsFunctionAPI.CreateApplicationFunctionInstance(context.Background(), applicationId).FunctionInstanceRequest(functionInstanceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsFunctionAPI.CreateApplicationFunctionInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApplicationFunctionInstance`: FunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsFunctionAPI.CreateApplicationFunctionInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateApplicationFunctionInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **functionInstanceRequest** | [**FunctionInstanceRequest**](FunctionInstanceRequest.md) | | + +### Return type + +[**FunctionInstanceResponse**](FunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApplicationFunctionInstance + +> DeleteResponse DeleteApplicationFunctionInstance(ctx, applicationId, functionId).Execute() + +Delete an Application Function Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsFunctionAPI.DeleteApplicationFunctionInstance(context.Background(), applicationId, functionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsFunctionAPI.DeleteApplicationFunctionInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApplicationFunctionInstance`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsFunctionAPI.DeleteApplicationFunctionInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApplicationFunctionInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApplicationFunctionInstances + +> PaginatedFunctionInstanceList ListApplicationFunctionInstances(ctx, applicationId).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Function Instances + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsFunctionAPI.ListApplicationFunctionInstances(context.Background(), applicationId).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsFunctionAPI.ListApplicationFunctionInstances``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListApplicationFunctionInstances`: PaginatedFunctionInstanceList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsFunctionAPI.ListApplicationFunctionInstances`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListApplicationFunctionInstancesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFunctionInstanceList**](PaginatedFunctionInstanceList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateApplicationFunctionInstance + +> FunctionInstanceResponse PartialUpdateApplicationFunctionInstance(ctx, applicationId, functionId).PatchedFunctionInstanceRequest(patchedFunctionInstanceRequest).Execute() + +Partially update an Application Function Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + patchedFunctionInstanceRequest := *openapiclient.NewPatchedFunctionInstanceRequest() // PatchedFunctionInstanceRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsFunctionAPI.PartialUpdateApplicationFunctionInstance(context.Background(), applicationId, functionId).PatchedFunctionInstanceRequest(patchedFunctionInstanceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsFunctionAPI.PartialUpdateApplicationFunctionInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateApplicationFunctionInstance`: FunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsFunctionAPI.PartialUpdateApplicationFunctionInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateApplicationFunctionInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedFunctionInstanceRequest** | [**PatchedFunctionInstanceRequest**](PatchedFunctionInstanceRequest.md) | | + +### Return type + +[**FunctionInstanceResponse**](FunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveApplicationFunctionInstance + +> FunctionInstanceResponse RetrieveApplicationFunctionInstance(ctx, applicationId, functionId).Fields(fields).Execute() + +Retrieve details of an Application Function Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsFunctionAPI.RetrieveApplicationFunctionInstance(context.Background(), applicationId, functionId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsFunctionAPI.RetrieveApplicationFunctionInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveApplicationFunctionInstance`: FunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsFunctionAPI.RetrieveApplicationFunctionInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveApplicationFunctionInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**FunctionInstanceResponse**](FunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplicationFunctionInstance + +> FunctionInstanceResponse UpdateApplicationFunctionInstance(ctx, applicationId, functionId).FunctionInstanceRequest(functionInstanceRequest).Execute() + +Update an Application Function Instance + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + functionInstanceRequest := *openapiclient.NewFunctionInstanceRequest("Name_example", int64(123)) // FunctionInstanceRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsFunctionAPI.UpdateApplicationFunctionInstance(context.Background(), applicationId, functionId).FunctionInstanceRequest(functionInstanceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsFunctionAPI.UpdateApplicationFunctionInstance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApplicationFunctionInstance`: FunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsFunctionAPI.UpdateApplicationFunctionInstance`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApplicationFunctionInstanceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **functionInstanceRequest** | [**FunctionInstanceRequest**](FunctionInstanceRequest.md) | | + +### Return type + +[**FunctionInstanceResponse**](FunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/ApplicationsRequestRulesAPI.md b/azion-api/docs/ApplicationsRequestRulesAPI.md new file mode 100644 index 0000000..ed7584f --- /dev/null +++ b/azion-api/docs/ApplicationsRequestRulesAPI.md @@ -0,0 +1,556 @@ +# \ApplicationsRequestRulesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApplicationRequestRule**](ApplicationsRequestRulesAPI.md#CreateApplicationRequestRule) | **Post** /workspace/applications/{application_id}/request_rules | Create an Application Request Rule +[**DeleteApplicationRequestRule**](ApplicationsRequestRulesAPI.md#DeleteApplicationRequestRule) | **Delete** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Delete an Application Request Rule +[**ListApplicationRequestRules**](ApplicationsRequestRulesAPI.md#ListApplicationRequestRules) | **Get** /workspace/applications/{application_id}/request_rules | List Application Request Rules +[**PartialUpdateApplicationRequestRule**](ApplicationsRequestRulesAPI.md#PartialUpdateApplicationRequestRule) | **Patch** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Partially update an Application Request Rule +[**RetrieveApplicationRequestRule**](ApplicationsRequestRulesAPI.md#RetrieveApplicationRequestRule) | **Get** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Retrieve details of an Application Request Rule +[**UpdateApplicationRequestRule**](ApplicationsRequestRulesAPI.md#UpdateApplicationRequestRule) | **Put** /workspace/applications/{application_id}/request_rules/{request_rule_id} | Update an Application Request Rule +[**UpdateApplicationRequestRulesOrder**](ApplicationsRequestRulesAPI.md#UpdateApplicationRequestRulesOrder) | **Put** /workspace/applications/{application_id}/request_rules/order | Ordering Application Request Rules + + + +## CreateApplicationRequestRule + +> RequestPhaseRuleResponse CreateApplicationRequestRule(ctx, applicationId).RequestPhaseRule2(requestPhaseRule2).Execute() + +Create an Application Request Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + requestPhaseRule2 := *openapiclient.NewRequestPhaseRule2("Name_example", [][]ApplicationCriterionFieldRequest{[]openapiclient.ApplicationCriterionFieldRequest{*openapiclient.NewApplicationCriterionFieldRequest("Conditional_example", "Variable_example", "Operator_example")}}, []openapiclient.RequestPhaseBehavior2{openapiclient.RequestPhaseBehavior2{BehaviorArgs: openapiclient.NewBehaviorArgs("Type_example", *openapiclient.NewBehaviorArgsAttributes(openapiclient.BehaviorArgsAttributes_value{Int64: new(int64)}))}}) // RequestPhaseRule2 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.CreateApplicationRequestRule(context.Background(), applicationId).RequestPhaseRule2(requestPhaseRule2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.CreateApplicationRequestRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApplicationRequestRule`: RequestPhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.CreateApplicationRequestRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateApplicationRequestRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **requestPhaseRule2** | [**RequestPhaseRule2**](RequestPhaseRule2.md) | | + +### Return type + +[**RequestPhaseRuleResponse**](RequestPhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApplicationRequestRule + +> DeleteResponse DeleteApplicationRequestRule(ctx, applicationId, requestRuleId).Execute() + +Delete an Application Request Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.DeleteApplicationRequestRule(context.Background(), applicationId, requestRuleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.DeleteApplicationRequestRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApplicationRequestRule`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.DeleteApplicationRequestRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApplicationRequestRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApplicationRequestRules + +> PaginatedRequestPhaseRuleList ListApplicationRequestRules(ctx, applicationId).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).OrderGte(orderGte).OrderLte(orderLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Application Request Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + description := "description_example" // string | Filter by description (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + orderGte := int64(789) // int64 | Filter by order (greater than or equal). (optional) + orderLte := int64(789) // int64 | Filter by order (less than or equal). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.ListApplicationRequestRules(context.Background(), applicationId).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).OrderGte(orderGte).OrderLte(orderLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.ListApplicationRequestRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListApplicationRequestRules`: PaginatedRequestPhaseRuleList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.ListApplicationRequestRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListApplicationRequestRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **description** | **string** | Filter by description (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **orderGte** | **int64** | Filter by order (greater than or equal). | + **orderLte** | **int64** | Filter by order (less than or equal). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedRequestPhaseRuleList**](PaginatedRequestPhaseRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateApplicationRequestRule + +> RequestPhaseRuleResponse PartialUpdateApplicationRequestRule(ctx, applicationId, requestRuleId).PatchedRequestPhaseRule(patchedRequestPhaseRule).Execute() + +Partially update an Application Request Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + patchedRequestPhaseRule := *openapiclient.NewPatchedRequestPhaseRule() // PatchedRequestPhaseRule | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.PartialUpdateApplicationRequestRule(context.Background(), applicationId, requestRuleId).PatchedRequestPhaseRule(patchedRequestPhaseRule).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.PartialUpdateApplicationRequestRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateApplicationRequestRule`: RequestPhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.PartialUpdateApplicationRequestRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateApplicationRequestRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedRequestPhaseRule** | [**PatchedRequestPhaseRule**](PatchedRequestPhaseRule.md) | | + +### Return type + +[**RequestPhaseRuleResponse**](RequestPhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveApplicationRequestRule + +> RequestPhaseRuleResponse RetrieveApplicationRequestRule(ctx, applicationId, requestRuleId).Fields(fields).Execute() + +Retrieve details of an Application Request Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.RetrieveApplicationRequestRule(context.Background(), applicationId, requestRuleId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.RetrieveApplicationRequestRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveApplicationRequestRule`: RequestPhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.RetrieveApplicationRequestRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveApplicationRequestRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**RequestPhaseRuleResponse**](RequestPhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplicationRequestRule + +> RequestPhaseRuleResponse UpdateApplicationRequestRule(ctx, applicationId, requestRuleId).RequestPhaseRule2(requestPhaseRule2).Execute() + +Update an Application Request Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + requestPhaseRule2 := *openapiclient.NewRequestPhaseRule2("Name_example", [][]ApplicationCriterionFieldRequest{[]openapiclient.ApplicationCriterionFieldRequest{*openapiclient.NewApplicationCriterionFieldRequest("Conditional_example", "Variable_example", "Operator_example")}}, []openapiclient.RequestPhaseBehavior2{openapiclient.RequestPhaseBehavior2{BehaviorArgs: openapiclient.NewBehaviorArgs("Type_example", *openapiclient.NewBehaviorArgsAttributes(openapiclient.BehaviorArgsAttributes_value{Int64: new(int64)}))}}) // RequestPhaseRule2 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.UpdateApplicationRequestRule(context.Background(), applicationId, requestRuleId).RequestPhaseRule2(requestPhaseRule2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.UpdateApplicationRequestRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApplicationRequestRule`: RequestPhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.UpdateApplicationRequestRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApplicationRequestRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **requestPhaseRule2** | [**RequestPhaseRule2**](RequestPhaseRule2.md) | | + +### Return type + +[**RequestPhaseRuleResponse**](RequestPhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplicationRequestRulesOrder + +> PaginatedRequestPhaseRuleList UpdateApplicationRequestRulesOrder(ctx, applicationId).ApplicationRequestPhaseRuleEngineOrder(applicationRequestPhaseRuleEngineOrder).Search(search).Execute() + +Ordering Application Request Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + applicationRequestPhaseRuleEngineOrder := *openapiclient.NewApplicationRequestPhaseRuleEngineOrder([]int64{int64(123)}) // ApplicationRequestPhaseRuleEngineOrder | + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsRequestRulesAPI.UpdateApplicationRequestRulesOrder(context.Background(), applicationId).ApplicationRequestPhaseRuleEngineOrder(applicationRequestPhaseRuleEngineOrder).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsRequestRulesAPI.UpdateApplicationRequestRulesOrder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApplicationRequestRulesOrder`: PaginatedRequestPhaseRuleList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsRequestRulesAPI.UpdateApplicationRequestRulesOrder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApplicationRequestRulesOrderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **applicationRequestPhaseRuleEngineOrder** | [**ApplicationRequestPhaseRuleEngineOrder**](ApplicationRequestPhaseRuleEngineOrder.md) | | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedRequestPhaseRuleList**](PaginatedRequestPhaseRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/ApplicationsResponseRulesAPI.md b/azion-api/docs/ApplicationsResponseRulesAPI.md new file mode 100644 index 0000000..ea53b7e --- /dev/null +++ b/azion-api/docs/ApplicationsResponseRulesAPI.md @@ -0,0 +1,556 @@ +# \ApplicationsResponseRulesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApplicationResponseRule**](ApplicationsResponseRulesAPI.md#CreateApplicationResponseRule) | **Post** /workspace/applications/{application_id}/response_rules | Create an Application Response Rule +[**DeleteApplicationResponseRule**](ApplicationsResponseRulesAPI.md#DeleteApplicationResponseRule) | **Delete** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Delete an Application Response Rule +[**ListApplicationResponseRules**](ApplicationsResponseRulesAPI.md#ListApplicationResponseRules) | **Get** /workspace/applications/{application_id}/response_rules | List Application Response Rules +[**PartialUpdateApplicationResponseRule**](ApplicationsResponseRulesAPI.md#PartialUpdateApplicationResponseRule) | **Patch** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Partially update an Application Response Rule +[**RetrieveApplicationResponseRule**](ApplicationsResponseRulesAPI.md#RetrieveApplicationResponseRule) | **Get** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Retrieve details of an Application Response Rule +[**UpdateApplicationResponseRule**](ApplicationsResponseRulesAPI.md#UpdateApplicationResponseRule) | **Put** /workspace/applications/{application_id}/response_rules/{response_rule_id} | Update an Application Response Rule +[**UpdateApplicationResponseRulesOrder**](ApplicationsResponseRulesAPI.md#UpdateApplicationResponseRulesOrder) | **Put** /workspace/applications/{application_id}/response_rules/order | Ordering Application Response Rules + + + +## CreateApplicationResponseRule + +> ResponsePhaseRuleResponse CreateApplicationResponseRule(ctx, applicationId).ResponsePhaseRuleRequest(responsePhaseRuleRequest).Execute() + +Create an Application Response Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + responsePhaseRuleRequest := *openapiclient.NewResponsePhaseRuleRequest("Name_example", [][]ApplicationCriterionFieldRequest{[]openapiclient.ApplicationCriterionFieldRequest{*openapiclient.NewApplicationCriterionFieldRequest("Conditional_example", "Variable_example", "Operator_example")}}, []openapiclient.ResponsePhaseBehaviorRequest{openapiclient.ResponsePhaseBehaviorRequest{BehaviorArgs: openapiclient.NewBehaviorArgs("Type_example", *openapiclient.NewBehaviorArgsAttributes(openapiclient.BehaviorArgsAttributes_value{Int64: new(int64)}))}}) // ResponsePhaseRuleRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.CreateApplicationResponseRule(context.Background(), applicationId).ResponsePhaseRuleRequest(responsePhaseRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.CreateApplicationResponseRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateApplicationResponseRule`: ResponsePhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.CreateApplicationResponseRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateApplicationResponseRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **responsePhaseRuleRequest** | [**ResponsePhaseRuleRequest**](ResponsePhaseRuleRequest.md) | | + +### Return type + +[**ResponsePhaseRuleResponse**](ResponsePhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteApplicationResponseRule + +> DeleteResponse DeleteApplicationResponseRule(ctx, applicationId, responseRuleId).Execute() + +Delete an Application Response Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + responseRuleId := int64(789) // int64 | A unique integer value identifying the response rule. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.DeleteApplicationResponseRule(context.Background(), applicationId, responseRuleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.DeleteApplicationResponseRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteApplicationResponseRule`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.DeleteApplicationResponseRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**responseRuleId** | **int64** | A unique integer value identifying the response rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteApplicationResponseRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListApplicationResponseRules + +> PaginatedResponsePhaseRuleList ListApplicationResponseRules(ctx, applicationId).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).OrderGte(orderGte).OrderLte(orderLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Application Response Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + description := "description_example" // string | Filter by description (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + orderGte := int64(789) // int64 | Filter by order (greater than or equal). (optional) + orderLte := int64(789) // int64 | Filter by order (less than or equal). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.ListApplicationResponseRules(context.Background(), applicationId).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).OrderGte(orderGte).OrderLte(orderLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.ListApplicationResponseRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListApplicationResponseRules`: PaginatedResponsePhaseRuleList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.ListApplicationResponseRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListApplicationResponseRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **description** | **string** | Filter by description (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **orderGte** | **int64** | Filter by order (greater than or equal). | + **orderLte** | **int64** | Filter by order (less than or equal). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedResponsePhaseRuleList**](PaginatedResponsePhaseRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateApplicationResponseRule + +> ResponsePhaseRuleResponse PartialUpdateApplicationResponseRule(ctx, applicationId, responseRuleId).PatchedResponsePhaseRuleRequest(patchedResponsePhaseRuleRequest).Execute() + +Partially update an Application Response Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + responseRuleId := int64(789) // int64 | A unique integer value identifying the response rule. + patchedResponsePhaseRuleRequest := *openapiclient.NewPatchedResponsePhaseRuleRequest() // PatchedResponsePhaseRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.PartialUpdateApplicationResponseRule(context.Background(), applicationId, responseRuleId).PatchedResponsePhaseRuleRequest(patchedResponsePhaseRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.PartialUpdateApplicationResponseRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateApplicationResponseRule`: ResponsePhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.PartialUpdateApplicationResponseRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**responseRuleId** | **int64** | A unique integer value identifying the response rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateApplicationResponseRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedResponsePhaseRuleRequest** | [**PatchedResponsePhaseRuleRequest**](PatchedResponsePhaseRuleRequest.md) | | + +### Return type + +[**ResponsePhaseRuleResponse**](ResponsePhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveApplicationResponseRule + +> RequestPhaseRuleResponse RetrieveApplicationResponseRule(ctx, applicationId, responseRuleId).Fields(fields).Execute() + +Retrieve details of an Application Response Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + responseRuleId := int64(789) // int64 | A unique integer value identifying the response rule. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.RetrieveApplicationResponseRule(context.Background(), applicationId, responseRuleId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.RetrieveApplicationResponseRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveApplicationResponseRule`: RequestPhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.RetrieveApplicationResponseRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**responseRuleId** | **int64** | A unique integer value identifying the response rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveApplicationResponseRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**RequestPhaseRuleResponse**](RequestPhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplicationResponseRule + +> ResponsePhaseRuleResponse UpdateApplicationResponseRule(ctx, applicationId, responseRuleId).ResponsePhaseRuleRequest(responsePhaseRuleRequest).Execute() + +Update an Application Response Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + responseRuleId := int64(789) // int64 | A unique integer value identifying the response rule. + responsePhaseRuleRequest := *openapiclient.NewResponsePhaseRuleRequest("Name_example", [][]ApplicationCriterionFieldRequest{[]openapiclient.ApplicationCriterionFieldRequest{*openapiclient.NewApplicationCriterionFieldRequest("Conditional_example", "Variable_example", "Operator_example")}}, []openapiclient.ResponsePhaseBehaviorRequest{openapiclient.ResponsePhaseBehaviorRequest{BehaviorArgs: openapiclient.NewBehaviorArgs("Type_example", *openapiclient.NewBehaviorArgsAttributes(openapiclient.BehaviorArgsAttributes_value{Int64: new(int64)}))}}) // ResponsePhaseRuleRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.UpdateApplicationResponseRule(context.Background(), applicationId, responseRuleId).ResponsePhaseRuleRequest(responsePhaseRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.UpdateApplicationResponseRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApplicationResponseRule`: ResponsePhaseRuleResponse + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.UpdateApplicationResponseRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | +**responseRuleId** | **int64** | A unique integer value identifying the response rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApplicationResponseRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **responsePhaseRuleRequest** | [**ResponsePhaseRuleRequest**](ResponsePhaseRuleRequest.md) | | + +### Return type + +[**ResponsePhaseRuleResponse**](ResponsePhaseRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateApplicationResponseRulesOrder + +> PaginatedResponsePhaseRuleList UpdateApplicationResponseRulesOrder(ctx, applicationId).ApplicationResponsePhaseRuleEngineOrderRequest(applicationResponsePhaseRuleEngineOrderRequest).Search(search).Execute() + +Ordering Application Response Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + applicationId := int64(789) // int64 | A unique integer value identifying the application. + applicationResponsePhaseRuleEngineOrderRequest := *openapiclient.NewApplicationResponsePhaseRuleEngineOrderRequest([]int64{int64(123)}) // ApplicationResponsePhaseRuleEngineOrderRequest | + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ApplicationsResponseRulesAPI.UpdateApplicationResponseRulesOrder(context.Background(), applicationId).ApplicationResponsePhaseRuleEngineOrderRequest(applicationResponsePhaseRuleEngineOrderRequest).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ApplicationsResponseRulesAPI.UpdateApplicationResponseRulesOrder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateApplicationResponseRulesOrder`: PaginatedResponsePhaseRuleList + fmt.Fprintf(os.Stdout, "Response from `ApplicationsResponseRulesAPI.UpdateApplicationResponseRulesOrder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int64** | A unique integer value identifying the application. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateApplicationResponseRulesOrderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **applicationResponsePhaseRuleEngineOrderRequest** | [**ApplicationResponsePhaseRuleEngineOrderRequest**](ApplicationResponsePhaseRuleEngineOrderRequest.md) | | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedResponsePhaseRuleList**](PaginatedResponsePhaseRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AuthLoginAPI.md b/azion-api/docs/AuthLoginAPI.md new file mode 100644 index 0000000..2743f9f --- /dev/null +++ b/azion-api/docs/AuthLoginAPI.md @@ -0,0 +1,211 @@ +# \AuthLoginAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthUserLogin**](AuthLoginAPI.md#AuthUserLogin) | **Post** /account/auth/login | User Login – Generate JWT Tokens +[**AuthUserLoginMethod**](AuthLoginAPI.md#AuthUserLoginMethod) | **Get** /account/auth/login/method | Check User Authentication Method +[**TotpVerify**](AuthLoginAPI.md#TotpVerify) | **Post** /account/auth/mfa/totp/verify | Retrieve user JWT tokens by MFA auth + + + +## AuthUserLogin + +> ResponseLogin AuthUserLogin(ctx).LoginRequest(loginRequest).Execute() + +User Login – Generate JWT Tokens + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + loginRequest := *openapiclient.NewLoginRequest("Email_example", "Password_example") // LoginRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthLoginAPI.AuthUserLogin(context.Background()).LoginRequest(loginRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthLoginAPI.AuthUserLogin``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthUserLogin`: ResponseLogin + fmt.Fprintf(os.Stdout, "Response from `AuthLoginAPI.AuthUserLogin`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAuthUserLoginRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginRequest** | [**LoginRequest**](LoginRequest.md) | | + +### Return type + +[**ResponseLogin**](ResponseLogin.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## AuthUserLoginMethod + +> UserLoginMethodResponse AuthUserLoginMethod(ctx).Email(email).Fields(fields).Execute() + +Check User Authentication Method + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + email := "email_example" // string | Email address of the user (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthLoginAPI.AuthUserLoginMethod(context.Background()).Email(email).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthLoginAPI.AuthUserLoginMethod``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthUserLoginMethod`: UserLoginMethodResponse + fmt.Fprintf(os.Stdout, "Response from `AuthLoginAPI.AuthUserLoginMethod`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAuthUserLoginMethodRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **email** | **string** | Email address of the user | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**UserLoginMethodResponse**](UserLoginMethodResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## TotpVerify + +> TokenPairResponse TotpVerify(ctx).TOTPVerificationRequest(tOTPVerificationRequest).Execute() + +Retrieve user JWT tokens by MFA auth + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tOTPVerificationRequest := *openapiclient.NewTOTPVerificationRequest("Code_example") // TOTPVerificationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthLoginAPI.TotpVerify(context.Background()).TOTPVerificationRequest(tOTPVerificationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthLoginAPI.TotpVerify``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TotpVerify`: TokenPairResponse + fmt.Fprintf(os.Stdout, "Response from `AuthLoginAPI.TotpVerify`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTotpVerifyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tOTPVerificationRequest** | [**TOTPVerificationRequest**](TOTPVerificationRequest.md) | | + +### Return type + +[**TokenPairResponse**](TokenPairResponse.md) + +### Authorization + +[JwtMfaAuthentication](../README.md#JwtMfaAuthentication) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AuthMFATOTPDeviceAPI.md b/azion-api/docs/AuthMFATOTPDeviceAPI.md new file mode 100644 index 0000000..6d76c31 --- /dev/null +++ b/azion-api/docs/AuthMFATOTPDeviceAPI.md @@ -0,0 +1,229 @@ +# \AuthMFATOTPDeviceAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTotpDevice**](AuthMFATOTPDeviceAPI.md#CreateTotpDevice) | **Post** /account/auth/mfa/totp | Create a TOTP device +[**DeleteTotpDevice**](AuthMFATOTPDeviceAPI.md#DeleteTotpDevice) | **Delete** /auth/mfa/totp/{device_id} | Delete a TOTP device +[**ListTotpDevices**](AuthMFATOTPDeviceAPI.md#ListTotpDevices) | **Get** /account/auth/mfa/totp | List of TOTP devices + + + +## CreateTotpDevice + +> TOTPDeviceResponse CreateTotpDevice(ctx).Body(body).Execute() + +Create a TOTP device + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + body := interface{}(987) // interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthMFATOTPDeviceAPI.CreateTotpDevice(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthMFATOTPDeviceAPI.CreateTotpDevice``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateTotpDevice`: TOTPDeviceResponse + fmt.Fprintf(os.Stdout, "Response from `AuthMFATOTPDeviceAPI.CreateTotpDevice`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateTotpDeviceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **interface{}** | | + +### Return type + +[**TOTPDeviceResponse**](TOTPDeviceResponse.md) + +### Authorization + +[JwtMfaAuthentication](../README.md#JwtMfaAuthentication) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTotpDevice + +> DeleteResponse DeleteTotpDevice(ctx, deviceId).Execute() + +Delete a TOTP device + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + deviceId := int64(789) // int64 | A unique integer value identifying the TOTP device. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthMFATOTPDeviceAPI.DeleteTotpDevice(context.Background(), deviceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthMFATOTPDeviceAPI.DeleteTotpDevice``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteTotpDevice`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `AuthMFATOTPDeviceAPI.DeleteTotpDevice`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**deviceId** | **int64** | A unique integer value identifying the TOTP device. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTotpDeviceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTotpDevices + +> PaginatedTOTPDeviceList ListTotpDevices(ctx).Confirmed(confirmed).Email(email).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of TOTP devices + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + confirmed := true // bool | Filter by confirmed status. (optional) + email := "email_example" // string | Filter by user's email (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := "id_example" // string | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by user's first name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthMFATOTPDeviceAPI.ListTotpDevices(context.Background()).Confirmed(confirmed).Email(email).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthMFATOTPDeviceAPI.ListTotpDevices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTotpDevices`: PaginatedTOTPDeviceList + fmt.Fprintf(os.Stdout, "Response from `AuthMFATOTPDeviceAPI.ListTotpDevices`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTotpDevicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **confirmed** | **bool** | Filter by confirmed status. | + **email** | **string** | Filter by user's email (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **string** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by user's first name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedTOTPDeviceList**](PaginatedTOTPDeviceList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AuthRefreshAccessTokenAPI.md b/azion-api/docs/AuthRefreshAccessTokenAPI.md new file mode 100644 index 0000000..78b2dcf --- /dev/null +++ b/azion-api/docs/AuthRefreshAccessTokenAPI.md @@ -0,0 +1,75 @@ +# \AuthRefreshAccessTokenAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthUserRefreshToken**](AuthRefreshAccessTokenAPI.md#AuthUserRefreshToken) | **Post** /account/auth/token | Refresh user JWT access token + + + +## AuthUserRefreshToken + +> TokenResponse AuthUserRefreshToken(ctx).TokenRequest(tokenRequest).Execute() + +Refresh user JWT access token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tokenRequest := *openapiclient.NewTokenRequest() // TokenRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthRefreshAccessTokenAPI.AuthUserRefreshToken(context.Background()).TokenRequest(tokenRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthRefreshAccessTokenAPI.AuthUserRefreshToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthUserRefreshToken`: TokenResponse + fmt.Fprintf(os.Stdout, "Response from `AuthRefreshAccessTokenAPI.AuthUserRefreshToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAuthUserRefreshTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tokenRequest** | [**TokenRequest**](TokenRequest.md) | | + +### Return type + +[**TokenResponse**](TokenResponse.md) + +### Authorization + +[JwtRefreshAuthentication](../README.md#JwtRefreshAuthentication) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AuthRevokeAPI.md b/azion-api/docs/AuthRevokeAPI.md new file mode 100644 index 0000000..d34b3b1 --- /dev/null +++ b/azion-api/docs/AuthRevokeAPI.md @@ -0,0 +1,75 @@ +# \AuthRevokeAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthUserRevoke**](AuthRevokeAPI.md#AuthUserRevoke) | **Post** /account/auth/revoke | Revoke user JWT refresh token + + + +## AuthUserRevoke + +> StateExecutedResponse AuthUserRevoke(ctx).Body(body).Execute() + +Revoke user JWT refresh token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + body := interface{}(987) // interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.AuthRevokeAPI.AuthUserRevoke(context.Background()).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `AuthRevokeAPI.AuthUserRevoke``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AuthUserRevoke`: StateExecutedResponse + fmt.Fprintf(os.Stdout, "Response from `AuthRevokeAPI.AuthUserRevoke`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAuthUserRevokeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **interface{}** | | + +### Return type + +[**StateExecutedResponse**](StateExecutedResponse.md) + +### Authorization + +[JwtRefreshAuthentication](../README.md#JwtRefreshAuthentication) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/AzureBlobStorageEndpoint.md b/azion-api/docs/AzureBlobStorageEndpoint.md new file mode 100644 index 0000000..71481ba --- /dev/null +++ b/azion-api/docs/AzureBlobStorageEndpoint.md @@ -0,0 +1,114 @@ +# AzureBlobStorageEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StorageAccount** | **string** | | +**ContainerName** | **string** | | +**BlobSasToken** | **string** | | +**Type** | **string** | Type identifier for this endpoint (azure_blob_storage) | + +## Methods + +### NewAzureBlobStorageEndpoint + +`func NewAzureBlobStorageEndpoint(storageAccount string, containerName string, blobSasToken string, type_ string, ) *AzureBlobStorageEndpoint` + +NewAzureBlobStorageEndpoint instantiates a new AzureBlobStorageEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAzureBlobStorageEndpointWithDefaults + +`func NewAzureBlobStorageEndpointWithDefaults() *AzureBlobStorageEndpoint` + +NewAzureBlobStorageEndpointWithDefaults instantiates a new AzureBlobStorageEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStorageAccount + +`func (o *AzureBlobStorageEndpoint) GetStorageAccount() string` + +GetStorageAccount returns the StorageAccount field if non-nil, zero value otherwise. + +### GetStorageAccountOk + +`func (o *AzureBlobStorageEndpoint) GetStorageAccountOk() (*string, bool)` + +GetStorageAccountOk returns a tuple with the StorageAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStorageAccount + +`func (o *AzureBlobStorageEndpoint) SetStorageAccount(v string)` + +SetStorageAccount sets StorageAccount field to given value. + + +### GetContainerName + +`func (o *AzureBlobStorageEndpoint) GetContainerName() string` + +GetContainerName returns the ContainerName field if non-nil, zero value otherwise. + +### GetContainerNameOk + +`func (o *AzureBlobStorageEndpoint) GetContainerNameOk() (*string, bool)` + +GetContainerNameOk returns a tuple with the ContainerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainerName + +`func (o *AzureBlobStorageEndpoint) SetContainerName(v string)` + +SetContainerName sets ContainerName field to given value. + + +### GetBlobSasToken + +`func (o *AzureBlobStorageEndpoint) GetBlobSasToken() string` + +GetBlobSasToken returns the BlobSasToken field if non-nil, zero value otherwise. + +### GetBlobSasTokenOk + +`func (o *AzureBlobStorageEndpoint) GetBlobSasTokenOk() (*string, bool)` + +GetBlobSasTokenOk returns a tuple with the BlobSasToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlobSasToken + +`func (o *AzureBlobStorageEndpoint) SetBlobSasToken(v string)` + +SetBlobSasToken sets BlobSasToken field to given value. + + +### GetType + +`func (o *AzureBlobStorageEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AzureBlobStorageEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AzureBlobStorageEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AzureBlobStorageEndpointRequest.md b/azion-api/docs/AzureBlobStorageEndpointRequest.md new file mode 100644 index 0000000..6a05677 --- /dev/null +++ b/azion-api/docs/AzureBlobStorageEndpointRequest.md @@ -0,0 +1,114 @@ +# AzureBlobStorageEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StorageAccount** | **string** | | +**ContainerName** | **string** | | +**BlobSasToken** | **string** | | +**Type** | **string** | Type identifier for this endpoint (azure_blob_storage) | + +## Methods + +### NewAzureBlobStorageEndpointRequest + +`func NewAzureBlobStorageEndpointRequest(storageAccount string, containerName string, blobSasToken string, type_ string, ) *AzureBlobStorageEndpointRequest` + +NewAzureBlobStorageEndpointRequest instantiates a new AzureBlobStorageEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAzureBlobStorageEndpointRequestWithDefaults + +`func NewAzureBlobStorageEndpointRequestWithDefaults() *AzureBlobStorageEndpointRequest` + +NewAzureBlobStorageEndpointRequestWithDefaults instantiates a new AzureBlobStorageEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStorageAccount + +`func (o *AzureBlobStorageEndpointRequest) GetStorageAccount() string` + +GetStorageAccount returns the StorageAccount field if non-nil, zero value otherwise. + +### GetStorageAccountOk + +`func (o *AzureBlobStorageEndpointRequest) GetStorageAccountOk() (*string, bool)` + +GetStorageAccountOk returns a tuple with the StorageAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStorageAccount + +`func (o *AzureBlobStorageEndpointRequest) SetStorageAccount(v string)` + +SetStorageAccount sets StorageAccount field to given value. + + +### GetContainerName + +`func (o *AzureBlobStorageEndpointRequest) GetContainerName() string` + +GetContainerName returns the ContainerName field if non-nil, zero value otherwise. + +### GetContainerNameOk + +`func (o *AzureBlobStorageEndpointRequest) GetContainerNameOk() (*string, bool)` + +GetContainerNameOk returns a tuple with the ContainerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainerName + +`func (o *AzureBlobStorageEndpointRequest) SetContainerName(v string)` + +SetContainerName sets ContainerName field to given value. + + +### GetBlobSasToken + +`func (o *AzureBlobStorageEndpointRequest) GetBlobSasToken() string` + +GetBlobSasToken returns the BlobSasToken field if non-nil, zero value otherwise. + +### GetBlobSasTokenOk + +`func (o *AzureBlobStorageEndpointRequest) GetBlobSasTokenOk() (*string, bool)` + +GetBlobSasTokenOk returns a tuple with the BlobSasToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlobSasToken + +`func (o *AzureBlobStorageEndpointRequest) SetBlobSasToken(v string)` + +SetBlobSasToken sets BlobSasToken field to given value. + + +### GetType + +`func (o *AzureBlobStorageEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AzureBlobStorageEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AzureBlobStorageEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AzureMonitorEndpoint.md b/azion-api/docs/AzureMonitorEndpoint.md new file mode 100644 index 0000000..a0eb83d --- /dev/null +++ b/azion-api/docs/AzureMonitorEndpoint.md @@ -0,0 +1,150 @@ +# AzureMonitorEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LogType** | **string** | | +**SharedKey** | **string** | | +**TimeGeneratedField** | Pointer to **NullableString** | | [optional] +**WorkspaceId** | **string** | | +**Type** | **string** | Type identifier for this endpoint (azure_monitor) | + +## Methods + +### NewAzureMonitorEndpoint + +`func NewAzureMonitorEndpoint(logType string, sharedKey string, workspaceId string, type_ string, ) *AzureMonitorEndpoint` + +NewAzureMonitorEndpoint instantiates a new AzureMonitorEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAzureMonitorEndpointWithDefaults + +`func NewAzureMonitorEndpointWithDefaults() *AzureMonitorEndpoint` + +NewAzureMonitorEndpointWithDefaults instantiates a new AzureMonitorEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLogType + +`func (o *AzureMonitorEndpoint) GetLogType() string` + +GetLogType returns the LogType field if non-nil, zero value otherwise. + +### GetLogTypeOk + +`func (o *AzureMonitorEndpoint) GetLogTypeOk() (*string, bool)` + +GetLogTypeOk returns a tuple with the LogType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogType + +`func (o *AzureMonitorEndpoint) SetLogType(v string)` + +SetLogType sets LogType field to given value. + + +### GetSharedKey + +`func (o *AzureMonitorEndpoint) GetSharedKey() string` + +GetSharedKey returns the SharedKey field if non-nil, zero value otherwise. + +### GetSharedKeyOk + +`func (o *AzureMonitorEndpoint) GetSharedKeyOk() (*string, bool)` + +GetSharedKeyOk returns a tuple with the SharedKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSharedKey + +`func (o *AzureMonitorEndpoint) SetSharedKey(v string)` + +SetSharedKey sets SharedKey field to given value. + + +### GetTimeGeneratedField + +`func (o *AzureMonitorEndpoint) GetTimeGeneratedField() string` + +GetTimeGeneratedField returns the TimeGeneratedField field if non-nil, zero value otherwise. + +### GetTimeGeneratedFieldOk + +`func (o *AzureMonitorEndpoint) GetTimeGeneratedFieldOk() (*string, bool)` + +GetTimeGeneratedFieldOk returns a tuple with the TimeGeneratedField field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeGeneratedField + +`func (o *AzureMonitorEndpoint) SetTimeGeneratedField(v string)` + +SetTimeGeneratedField sets TimeGeneratedField field to given value. + +### HasTimeGeneratedField + +`func (o *AzureMonitorEndpoint) HasTimeGeneratedField() bool` + +HasTimeGeneratedField returns a boolean if a field has been set. + +### SetTimeGeneratedFieldNil + +`func (o *AzureMonitorEndpoint) SetTimeGeneratedFieldNil(b bool)` + + SetTimeGeneratedFieldNil sets the value for TimeGeneratedField to be an explicit nil + +### UnsetTimeGeneratedField +`func (o *AzureMonitorEndpoint) UnsetTimeGeneratedField()` + +UnsetTimeGeneratedField ensures that no value is present for TimeGeneratedField, not even an explicit nil +### GetWorkspaceId + +`func (o *AzureMonitorEndpoint) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *AzureMonitorEndpoint) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *AzureMonitorEndpoint) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + +### GetType + +`func (o *AzureMonitorEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AzureMonitorEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AzureMonitorEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/AzureMonitorEndpointRequest.md b/azion-api/docs/AzureMonitorEndpointRequest.md new file mode 100644 index 0000000..bdb7c32 --- /dev/null +++ b/azion-api/docs/AzureMonitorEndpointRequest.md @@ -0,0 +1,150 @@ +# AzureMonitorEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LogType** | **string** | | +**SharedKey** | **string** | | +**TimeGeneratedField** | Pointer to **NullableString** | | [optional] +**WorkspaceId** | **string** | | +**Type** | **string** | Type identifier for this endpoint (azure_monitor) | + +## Methods + +### NewAzureMonitorEndpointRequest + +`func NewAzureMonitorEndpointRequest(logType string, sharedKey string, workspaceId string, type_ string, ) *AzureMonitorEndpointRequest` + +NewAzureMonitorEndpointRequest instantiates a new AzureMonitorEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewAzureMonitorEndpointRequestWithDefaults + +`func NewAzureMonitorEndpointRequestWithDefaults() *AzureMonitorEndpointRequest` + +NewAzureMonitorEndpointRequestWithDefaults instantiates a new AzureMonitorEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLogType + +`func (o *AzureMonitorEndpointRequest) GetLogType() string` + +GetLogType returns the LogType field if non-nil, zero value otherwise. + +### GetLogTypeOk + +`func (o *AzureMonitorEndpointRequest) GetLogTypeOk() (*string, bool)` + +GetLogTypeOk returns a tuple with the LogType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogType + +`func (o *AzureMonitorEndpointRequest) SetLogType(v string)` + +SetLogType sets LogType field to given value. + + +### GetSharedKey + +`func (o *AzureMonitorEndpointRequest) GetSharedKey() string` + +GetSharedKey returns the SharedKey field if non-nil, zero value otherwise. + +### GetSharedKeyOk + +`func (o *AzureMonitorEndpointRequest) GetSharedKeyOk() (*string, bool)` + +GetSharedKeyOk returns a tuple with the SharedKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSharedKey + +`func (o *AzureMonitorEndpointRequest) SetSharedKey(v string)` + +SetSharedKey sets SharedKey field to given value. + + +### GetTimeGeneratedField + +`func (o *AzureMonitorEndpointRequest) GetTimeGeneratedField() string` + +GetTimeGeneratedField returns the TimeGeneratedField field if non-nil, zero value otherwise. + +### GetTimeGeneratedFieldOk + +`func (o *AzureMonitorEndpointRequest) GetTimeGeneratedFieldOk() (*string, bool)` + +GetTimeGeneratedFieldOk returns a tuple with the TimeGeneratedField field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeGeneratedField + +`func (o *AzureMonitorEndpointRequest) SetTimeGeneratedField(v string)` + +SetTimeGeneratedField sets TimeGeneratedField field to given value. + +### HasTimeGeneratedField + +`func (o *AzureMonitorEndpointRequest) HasTimeGeneratedField() bool` + +HasTimeGeneratedField returns a boolean if a field has been set. + +### SetTimeGeneratedFieldNil + +`func (o *AzureMonitorEndpointRequest) SetTimeGeneratedFieldNil(b bool)` + + SetTimeGeneratedFieldNil sets the value for TimeGeneratedField to be an explicit nil + +### UnsetTimeGeneratedField +`func (o *AzureMonitorEndpointRequest) UnsetTimeGeneratedField()` + +UnsetTimeGeneratedField ensures that no value is present for TimeGeneratedField, not even an explicit nil +### GetWorkspaceId + +`func (o *AzureMonitorEndpointRequest) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *AzureMonitorEndpointRequest) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *AzureMonitorEndpointRequest) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + +### GetType + +`func (o *AzureMonitorEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *AzureMonitorEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *AzureMonitorEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BaseQuery.md b/azion-api/docs/BaseQuery.md new file mode 100644 index 0000000..4f2007c --- /dev/null +++ b/azion-api/docs/BaseQuery.md @@ -0,0 +1,280 @@ +# BaseQuery + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Dataset** | **string** | | +**Filters** | Pointer to **map[string]interface{}** | | [optional] +**GroupBy** | Pointer to **[]string** | | [optional] +**Limit** | **int64** | | +**AggregatedFields** | Pointer to [**[]AggregatedField**](AggregatedField.md) | | [optional] +**CalculatedFields** | Pointer to **[]string** | | [optional] +**OrderDirection** | **string** | * `asc` - Ascending order, sets the order from smallest to largest. * `desc` - Descending order, sets the order from largest to smallest. | +**TopX** | Pointer to **bool** | | [optional] +**MaxYAxis** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewBaseQuery + +`func NewBaseQuery(id int64, dataset string, limit int64, orderDirection string, ) *BaseQuery` + +NewBaseQuery instantiates a new BaseQuery object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseQueryWithDefaults + +`func NewBaseQueryWithDefaults() *BaseQuery` + +NewBaseQueryWithDefaults instantiates a new BaseQuery object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *BaseQuery) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *BaseQuery) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *BaseQuery) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetDataset + +`func (o *BaseQuery) GetDataset() string` + +GetDataset returns the Dataset field if non-nil, zero value otherwise. + +### GetDatasetOk + +`func (o *BaseQuery) GetDatasetOk() (*string, bool)` + +GetDatasetOk returns a tuple with the Dataset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataset + +`func (o *BaseQuery) SetDataset(v string)` + +SetDataset sets Dataset field to given value. + + +### GetFilters + +`func (o *BaseQuery) GetFilters() map[string]interface{}` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *BaseQuery) GetFiltersOk() (*map[string]interface{}, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *BaseQuery) SetFilters(v map[string]interface{})` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *BaseQuery) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + +### GetGroupBy + +`func (o *BaseQuery) GetGroupBy() []string` + +GetGroupBy returns the GroupBy field if non-nil, zero value otherwise. + +### GetGroupByOk + +`func (o *BaseQuery) GetGroupByOk() (*[]string, bool)` + +GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupBy + +`func (o *BaseQuery) SetGroupBy(v []string)` + +SetGroupBy sets GroupBy field to given value. + +### HasGroupBy + +`func (o *BaseQuery) HasGroupBy() bool` + +HasGroupBy returns a boolean if a field has been set. + +### GetLimit + +`func (o *BaseQuery) GetLimit() int64` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *BaseQuery) GetLimitOk() (*int64, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *BaseQuery) SetLimit(v int64)` + +SetLimit sets Limit field to given value. + + +### GetAggregatedFields + +`func (o *BaseQuery) GetAggregatedFields() []AggregatedField` + +GetAggregatedFields returns the AggregatedFields field if non-nil, zero value otherwise. + +### GetAggregatedFieldsOk + +`func (o *BaseQuery) GetAggregatedFieldsOk() (*[]AggregatedField, bool)` + +GetAggregatedFieldsOk returns a tuple with the AggregatedFields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregatedFields + +`func (o *BaseQuery) SetAggregatedFields(v []AggregatedField)` + +SetAggregatedFields sets AggregatedFields field to given value. + +### HasAggregatedFields + +`func (o *BaseQuery) HasAggregatedFields() bool` + +HasAggregatedFields returns a boolean if a field has been set. + +### GetCalculatedFields + +`func (o *BaseQuery) GetCalculatedFields() []string` + +GetCalculatedFields returns the CalculatedFields field if non-nil, zero value otherwise. + +### GetCalculatedFieldsOk + +`func (o *BaseQuery) GetCalculatedFieldsOk() (*[]string, bool)` + +GetCalculatedFieldsOk returns a tuple with the CalculatedFields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCalculatedFields + +`func (o *BaseQuery) SetCalculatedFields(v []string)` + +SetCalculatedFields sets CalculatedFields field to given value. + +### HasCalculatedFields + +`func (o *BaseQuery) HasCalculatedFields() bool` + +HasCalculatedFields returns a boolean if a field has been set. + +### GetOrderDirection + +`func (o *BaseQuery) GetOrderDirection() string` + +GetOrderDirection returns the OrderDirection field if non-nil, zero value otherwise. + +### GetOrderDirectionOk + +`func (o *BaseQuery) GetOrderDirectionOk() (*string, bool)` + +GetOrderDirectionOk returns a tuple with the OrderDirection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderDirection + +`func (o *BaseQuery) SetOrderDirection(v string)` + +SetOrderDirection sets OrderDirection field to given value. + + +### GetTopX + +`func (o *BaseQuery) GetTopX() bool` + +GetTopX returns the TopX field if non-nil, zero value otherwise. + +### GetTopXOk + +`func (o *BaseQuery) GetTopXOk() (*bool, bool)` + +GetTopXOk returns a tuple with the TopX field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopX + +`func (o *BaseQuery) SetTopX(v bool)` + +SetTopX sets TopX field to given value. + +### HasTopX + +`func (o *BaseQuery) HasTopX() bool` + +HasTopX returns a boolean if a field has been set. + +### GetMaxYAxis + +`func (o *BaseQuery) GetMaxYAxis() int64` + +GetMaxYAxis returns the MaxYAxis field if non-nil, zero value otherwise. + +### GetMaxYAxisOk + +`func (o *BaseQuery) GetMaxYAxisOk() (*int64, bool)` + +GetMaxYAxisOk returns a tuple with the MaxYAxis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxYAxis + +`func (o *BaseQuery) SetMaxYAxis(v int64)` + +SetMaxYAxis sets MaxYAxis field to given value. + +### HasMaxYAxis + +`func (o *BaseQuery) HasMaxYAxis() bool` + +HasMaxYAxis returns a boolean if a field has been set. + +### SetMaxYAxisNil + +`func (o *BaseQuery) SetMaxYAxisNil(b bool)` + + SetMaxYAxisNil sets the value for MaxYAxis to be an explicit nil + +### UnsetMaxYAxis +`func (o *BaseQuery) UnsetMaxYAxis()` + +UnsetMaxYAxis ensures that no value is present for MaxYAxis, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BaseQueryRequest.md b/azion-api/docs/BaseQueryRequest.md new file mode 100644 index 0000000..b021f7b --- /dev/null +++ b/azion-api/docs/BaseQueryRequest.md @@ -0,0 +1,259 @@ +# BaseQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Dataset** | **string** | | +**Filters** | Pointer to **map[string]interface{}** | | [optional] +**GroupBy** | Pointer to **[]string** | | [optional] +**Limit** | **int64** | | +**AggregatedFields** | Pointer to [**[]AggregatedFieldRequest**](AggregatedFieldRequest.md) | | [optional] +**CalculatedFields** | Pointer to **[]string** | | [optional] +**OrderDirection** | **string** | * `asc` - Ascending order, sets the order from smallest to largest. * `desc` - Descending order, sets the order from largest to smallest. | +**TopX** | Pointer to **bool** | | [optional] +**MaxYAxis** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewBaseQueryRequest + +`func NewBaseQueryRequest(dataset string, limit int64, orderDirection string, ) *BaseQueryRequest` + +NewBaseQueryRequest instantiates a new BaseQueryRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBaseQueryRequestWithDefaults + +`func NewBaseQueryRequestWithDefaults() *BaseQueryRequest` + +NewBaseQueryRequestWithDefaults instantiates a new BaseQueryRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDataset + +`func (o *BaseQueryRequest) GetDataset() string` + +GetDataset returns the Dataset field if non-nil, zero value otherwise. + +### GetDatasetOk + +`func (o *BaseQueryRequest) GetDatasetOk() (*string, bool)` + +GetDatasetOk returns a tuple with the Dataset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataset + +`func (o *BaseQueryRequest) SetDataset(v string)` + +SetDataset sets Dataset field to given value. + + +### GetFilters + +`func (o *BaseQueryRequest) GetFilters() map[string]interface{}` + +GetFilters returns the Filters field if non-nil, zero value otherwise. + +### GetFiltersOk + +`func (o *BaseQueryRequest) GetFiltersOk() (*map[string]interface{}, bool)` + +GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFilters + +`func (o *BaseQueryRequest) SetFilters(v map[string]interface{})` + +SetFilters sets Filters field to given value. + +### HasFilters + +`func (o *BaseQueryRequest) HasFilters() bool` + +HasFilters returns a boolean if a field has been set. + +### GetGroupBy + +`func (o *BaseQueryRequest) GetGroupBy() []string` + +GetGroupBy returns the GroupBy field if non-nil, zero value otherwise. + +### GetGroupByOk + +`func (o *BaseQueryRequest) GetGroupByOk() (*[]string, bool)` + +GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGroupBy + +`func (o *BaseQueryRequest) SetGroupBy(v []string)` + +SetGroupBy sets GroupBy field to given value. + +### HasGroupBy + +`func (o *BaseQueryRequest) HasGroupBy() bool` + +HasGroupBy returns a boolean if a field has been set. + +### GetLimit + +`func (o *BaseQueryRequest) GetLimit() int64` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *BaseQueryRequest) GetLimitOk() (*int64, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimit + +`func (o *BaseQueryRequest) SetLimit(v int64)` + +SetLimit sets Limit field to given value. + + +### GetAggregatedFields + +`func (o *BaseQueryRequest) GetAggregatedFields() []AggregatedFieldRequest` + +GetAggregatedFields returns the AggregatedFields field if non-nil, zero value otherwise. + +### GetAggregatedFieldsOk + +`func (o *BaseQueryRequest) GetAggregatedFieldsOk() (*[]AggregatedFieldRequest, bool)` + +GetAggregatedFieldsOk returns a tuple with the AggregatedFields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregatedFields + +`func (o *BaseQueryRequest) SetAggregatedFields(v []AggregatedFieldRequest)` + +SetAggregatedFields sets AggregatedFields field to given value. + +### HasAggregatedFields + +`func (o *BaseQueryRequest) HasAggregatedFields() bool` + +HasAggregatedFields returns a boolean if a field has been set. + +### GetCalculatedFields + +`func (o *BaseQueryRequest) GetCalculatedFields() []string` + +GetCalculatedFields returns the CalculatedFields field if non-nil, zero value otherwise. + +### GetCalculatedFieldsOk + +`func (o *BaseQueryRequest) GetCalculatedFieldsOk() (*[]string, bool)` + +GetCalculatedFieldsOk returns a tuple with the CalculatedFields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCalculatedFields + +`func (o *BaseQueryRequest) SetCalculatedFields(v []string)` + +SetCalculatedFields sets CalculatedFields field to given value. + +### HasCalculatedFields + +`func (o *BaseQueryRequest) HasCalculatedFields() bool` + +HasCalculatedFields returns a boolean if a field has been set. + +### GetOrderDirection + +`func (o *BaseQueryRequest) GetOrderDirection() string` + +GetOrderDirection returns the OrderDirection field if non-nil, zero value otherwise. + +### GetOrderDirectionOk + +`func (o *BaseQueryRequest) GetOrderDirectionOk() (*string, bool)` + +GetOrderDirectionOk returns a tuple with the OrderDirection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrderDirection + +`func (o *BaseQueryRequest) SetOrderDirection(v string)` + +SetOrderDirection sets OrderDirection field to given value. + + +### GetTopX + +`func (o *BaseQueryRequest) GetTopX() bool` + +GetTopX returns the TopX field if non-nil, zero value otherwise. + +### GetTopXOk + +`func (o *BaseQueryRequest) GetTopXOk() (*bool, bool)` + +GetTopXOk returns a tuple with the TopX field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopX + +`func (o *BaseQueryRequest) SetTopX(v bool)` + +SetTopX sets TopX field to given value. + +### HasTopX + +`func (o *BaseQueryRequest) HasTopX() bool` + +HasTopX returns a boolean if a field has been set. + +### GetMaxYAxis + +`func (o *BaseQueryRequest) GetMaxYAxis() int64` + +GetMaxYAxis returns the MaxYAxis field if non-nil, zero value otherwise. + +### GetMaxYAxisOk + +`func (o *BaseQueryRequest) GetMaxYAxisOk() (*int64, bool)` + +GetMaxYAxisOk returns a tuple with the MaxYAxis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxYAxis + +`func (o *BaseQueryRequest) SetMaxYAxis(v int64)` + +SetMaxYAxis sets MaxYAxis field to given value. + +### HasMaxYAxis + +`func (o *BaseQueryRequest) HasMaxYAxis() bool` + +HasMaxYAxis returns a boolean if a field has been set. + +### SetMaxYAxisNil + +`func (o *BaseQueryRequest) SetMaxYAxisNil(b bool)` + + SetMaxYAxisNil sets the value for MaxYAxis to be an explicit nil + +### UnsetMaxYAxis +`func (o *BaseQueryRequest) UnsetMaxYAxis()` + +UnsetMaxYAxis ensures that no value is present for MaxYAxis, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BehaviorArgs.md b/azion-api/docs/BehaviorArgs.md new file mode 100644 index 0000000..c0bdce3 --- /dev/null +++ b/azion-api/docs/BehaviorArgs.md @@ -0,0 +1,72 @@ +# BehaviorArgs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Behavior type | +**Attributes** | [**BehaviorArgsAttributes**](BehaviorArgsAttributes.md) | | + +## Methods + +### NewBehaviorArgs + +`func NewBehaviorArgs(type_ string, attributes BehaviorArgsAttributes, ) *BehaviorArgs` + +NewBehaviorArgs instantiates a new BehaviorArgs object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBehaviorArgsWithDefaults + +`func NewBehaviorArgsWithDefaults() *BehaviorArgs` + +NewBehaviorArgsWithDefaults instantiates a new BehaviorArgs object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *BehaviorArgs) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BehaviorArgs) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BehaviorArgs) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *BehaviorArgs) GetAttributes() BehaviorArgsAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *BehaviorArgs) GetAttributesOk() (*BehaviorArgsAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *BehaviorArgs) SetAttributes(v BehaviorArgsAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BehaviorArgsAttributes.md b/azion-api/docs/BehaviorArgsAttributes.md new file mode 100644 index 0000000..8a8b6d8 --- /dev/null +++ b/azion-api/docs/BehaviorArgsAttributes.md @@ -0,0 +1,51 @@ +# BehaviorArgsAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | [**BehaviorArgsAttributesValue**](BehaviorArgsAttributesValue.md) | | + +## Methods + +### NewBehaviorArgsAttributes + +`func NewBehaviorArgsAttributes(value BehaviorArgsAttributesValue, ) *BehaviorArgsAttributes` + +NewBehaviorArgsAttributes instantiates a new BehaviorArgsAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBehaviorArgsAttributesWithDefaults + +`func NewBehaviorArgsAttributesWithDefaults() *BehaviorArgsAttributes` + +NewBehaviorArgsAttributesWithDefaults instantiates a new BehaviorArgsAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *BehaviorArgsAttributes) GetValue() BehaviorArgsAttributesValue` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *BehaviorArgsAttributes) GetValueOk() (*BehaviorArgsAttributesValue, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *BehaviorArgsAttributes) SetValue(v BehaviorArgsAttributesValue)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BehaviorArgsAttributesValue.md b/azion-api/docs/BehaviorArgsAttributesValue.md new file mode 100644 index 0000000..fc59fe8 --- /dev/null +++ b/azion-api/docs/BehaviorArgsAttributesValue.md @@ -0,0 +1,30 @@ +# BehaviorArgsAttributesValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewBehaviorArgsAttributesValue + +`func NewBehaviorArgsAttributesValue() *BehaviorArgsAttributesValue` + +NewBehaviorArgsAttributesValue instantiates a new BehaviorArgsAttributesValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBehaviorArgsAttributesValueWithDefaults + +`func NewBehaviorArgsAttributesValueWithDefaults() *BehaviorArgsAttributesValue` + +NewBehaviorArgsAttributesValueWithDefaults instantiates a new BehaviorArgsAttributesValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BehaviorCapture.md b/azion-api/docs/BehaviorCapture.md new file mode 100644 index 0000000..3eec606 --- /dev/null +++ b/azion-api/docs/BehaviorCapture.md @@ -0,0 +1,72 @@ +# BehaviorCapture + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**BehaviorCaptureMatchGroupsAttributes**](BehaviorCaptureMatchGroupsAttributes.md) | | + +## Methods + +### NewBehaviorCapture + +`func NewBehaviorCapture(type_ string, attributes BehaviorCaptureMatchGroupsAttributes, ) *BehaviorCapture` + +NewBehaviorCapture instantiates a new BehaviorCapture object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBehaviorCaptureWithDefaults + +`func NewBehaviorCaptureWithDefaults() *BehaviorCapture` + +NewBehaviorCaptureWithDefaults instantiates a new BehaviorCapture object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *BehaviorCapture) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BehaviorCapture) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BehaviorCapture) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *BehaviorCapture) GetAttributes() BehaviorCaptureMatchGroupsAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *BehaviorCapture) GetAttributesOk() (*BehaviorCaptureMatchGroupsAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *BehaviorCapture) SetAttributes(v BehaviorCaptureMatchGroupsAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BehaviorCaptureMatchGroupsAttributes.md b/azion-api/docs/BehaviorCaptureMatchGroupsAttributes.md new file mode 100644 index 0000000..b9df70d --- /dev/null +++ b/azion-api/docs/BehaviorCaptureMatchGroupsAttributes.md @@ -0,0 +1,93 @@ +# BehaviorCaptureMatchGroupsAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | | +**Regex** | **string** | | +**CapturedArray** | **string** | | + +## Methods + +### NewBehaviorCaptureMatchGroupsAttributes + +`func NewBehaviorCaptureMatchGroupsAttributes(subject string, regex string, capturedArray string, ) *BehaviorCaptureMatchGroupsAttributes` + +NewBehaviorCaptureMatchGroupsAttributes instantiates a new BehaviorCaptureMatchGroupsAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBehaviorCaptureMatchGroupsAttributesWithDefaults + +`func NewBehaviorCaptureMatchGroupsAttributesWithDefaults() *BehaviorCaptureMatchGroupsAttributes` + +NewBehaviorCaptureMatchGroupsAttributesWithDefaults instantiates a new BehaviorCaptureMatchGroupsAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSubject + +`func (o *BehaviorCaptureMatchGroupsAttributes) GetSubject() string` + +GetSubject returns the Subject field if non-nil, zero value otherwise. + +### GetSubjectOk + +`func (o *BehaviorCaptureMatchGroupsAttributes) GetSubjectOk() (*string, bool)` + +GetSubjectOk returns a tuple with the Subject field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubject + +`func (o *BehaviorCaptureMatchGroupsAttributes) SetSubject(v string)` + +SetSubject sets Subject field to given value. + + +### GetRegex + +`func (o *BehaviorCaptureMatchGroupsAttributes) GetRegex() string` + +GetRegex returns the Regex field if non-nil, zero value otherwise. + +### GetRegexOk + +`func (o *BehaviorCaptureMatchGroupsAttributes) GetRegexOk() (*string, bool)` + +GetRegexOk returns a tuple with the Regex field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegex + +`func (o *BehaviorCaptureMatchGroupsAttributes) SetRegex(v string)` + +SetRegex sets Regex field to given value. + + +### GetCapturedArray + +`func (o *BehaviorCaptureMatchGroupsAttributes) GetCapturedArray() string` + +GetCapturedArray returns the CapturedArray field if non-nil, zero value otherwise. + +### GetCapturedArrayOk + +`func (o *BehaviorCaptureMatchGroupsAttributes) GetCapturedArrayOk() (*string, bool)` + +GetCapturedArrayOk returns a tuple with the CapturedArray field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCapturedArray + +`func (o *BehaviorCaptureMatchGroupsAttributes) SetCapturedArray(v string)` + +SetCapturedArray sets CapturedArray field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BehaviorNoArgs.md b/azion-api/docs/BehaviorNoArgs.md new file mode 100644 index 0000000..5b4ace4 --- /dev/null +++ b/azion-api/docs/BehaviorNoArgs.md @@ -0,0 +1,51 @@ +# BehaviorNoArgs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `deny` - deny * `no_content` - no_content * `deliver` - deliver * `finish_request_phase` - finish_request_phase * `forward_cookies` - forward_cookies * `optimize_images` - optimize_images * `bypass_cache` - bypass_cache * `enable_gzip` - enable_gzip * `redirect_http_to_https` - redirect_http_to_https | + +## Methods + +### NewBehaviorNoArgs + +`func NewBehaviorNoArgs(type_ string, ) *BehaviorNoArgs` + +NewBehaviorNoArgs instantiates a new BehaviorNoArgs object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBehaviorNoArgsWithDefaults + +`func NewBehaviorNoArgsWithDefaults() *BehaviorNoArgs` + +NewBehaviorNoArgsWithDefaults instantiates a new BehaviorNoArgs object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *BehaviorNoArgs) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BehaviorNoArgs) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BehaviorNoArgs) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BigQueryEndpoint.md b/azion-api/docs/BigQueryEndpoint.md new file mode 100644 index 0000000..418273c --- /dev/null +++ b/azion-api/docs/BigQueryEndpoint.md @@ -0,0 +1,135 @@ +# BigQueryEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DatasetId** | **string** | | +**ProjectId** | **string** | | +**TableId** | **string** | | +**ServiceAccountKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (big_query) | + +## Methods + +### NewBigQueryEndpoint + +`func NewBigQueryEndpoint(datasetId string, projectId string, tableId string, serviceAccountKey string, type_ string, ) *BigQueryEndpoint` + +NewBigQueryEndpoint instantiates a new BigQueryEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBigQueryEndpointWithDefaults + +`func NewBigQueryEndpointWithDefaults() *BigQueryEndpoint` + +NewBigQueryEndpointWithDefaults instantiates a new BigQueryEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDatasetId + +`func (o *BigQueryEndpoint) GetDatasetId() string` + +GetDatasetId returns the DatasetId field if non-nil, zero value otherwise. + +### GetDatasetIdOk + +`func (o *BigQueryEndpoint) GetDatasetIdOk() (*string, bool)` + +GetDatasetIdOk returns a tuple with the DatasetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatasetId + +`func (o *BigQueryEndpoint) SetDatasetId(v string)` + +SetDatasetId sets DatasetId field to given value. + + +### GetProjectId + +`func (o *BigQueryEndpoint) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *BigQueryEndpoint) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *BigQueryEndpoint) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + + +### GetTableId + +`func (o *BigQueryEndpoint) GetTableId() string` + +GetTableId returns the TableId field if non-nil, zero value otherwise. + +### GetTableIdOk + +`func (o *BigQueryEndpoint) GetTableIdOk() (*string, bool)` + +GetTableIdOk returns a tuple with the TableId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTableId + +`func (o *BigQueryEndpoint) SetTableId(v string)` + +SetTableId sets TableId field to given value. + + +### GetServiceAccountKey + +`func (o *BigQueryEndpoint) GetServiceAccountKey() string` + +GetServiceAccountKey returns the ServiceAccountKey field if non-nil, zero value otherwise. + +### GetServiceAccountKeyOk + +`func (o *BigQueryEndpoint) GetServiceAccountKeyOk() (*string, bool)` + +GetServiceAccountKeyOk returns a tuple with the ServiceAccountKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceAccountKey + +`func (o *BigQueryEndpoint) SetServiceAccountKey(v string)` + +SetServiceAccountKey sets ServiceAccountKey field to given value. + + +### GetType + +`func (o *BigQueryEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BigQueryEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BigQueryEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BigQueryEndpointRequest.md b/azion-api/docs/BigQueryEndpointRequest.md new file mode 100644 index 0000000..7f82ee2 --- /dev/null +++ b/azion-api/docs/BigQueryEndpointRequest.md @@ -0,0 +1,135 @@ +# BigQueryEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DatasetId** | **string** | | +**ProjectId** | **string** | | +**TableId** | **string** | | +**ServiceAccountKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (big_query) | + +## Methods + +### NewBigQueryEndpointRequest + +`func NewBigQueryEndpointRequest(datasetId string, projectId string, tableId string, serviceAccountKey string, type_ string, ) *BigQueryEndpointRequest` + +NewBigQueryEndpointRequest instantiates a new BigQueryEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBigQueryEndpointRequestWithDefaults + +`func NewBigQueryEndpointRequestWithDefaults() *BigQueryEndpointRequest` + +NewBigQueryEndpointRequestWithDefaults instantiates a new BigQueryEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDatasetId + +`func (o *BigQueryEndpointRequest) GetDatasetId() string` + +GetDatasetId returns the DatasetId field if non-nil, zero value otherwise. + +### GetDatasetIdOk + +`func (o *BigQueryEndpointRequest) GetDatasetIdOk() (*string, bool)` + +GetDatasetIdOk returns a tuple with the DatasetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatasetId + +`func (o *BigQueryEndpointRequest) SetDatasetId(v string)` + +SetDatasetId sets DatasetId field to given value. + + +### GetProjectId + +`func (o *BigQueryEndpointRequest) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *BigQueryEndpointRequest) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *BigQueryEndpointRequest) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + + +### GetTableId + +`func (o *BigQueryEndpointRequest) GetTableId() string` + +GetTableId returns the TableId field if non-nil, zero value otherwise. + +### GetTableIdOk + +`func (o *BigQueryEndpointRequest) GetTableIdOk() (*string, bool)` + +GetTableIdOk returns a tuple with the TableId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTableId + +`func (o *BigQueryEndpointRequest) SetTableId(v string)` + +SetTableId sets TableId field to given value. + + +### GetServiceAccountKey + +`func (o *BigQueryEndpointRequest) GetServiceAccountKey() string` + +GetServiceAccountKey returns the ServiceAccountKey field if non-nil, zero value otherwise. + +### GetServiceAccountKeyOk + +`func (o *BigQueryEndpointRequest) GetServiceAccountKeyOk() (*string, bool)` + +GetServiceAccountKeyOk returns a tuple with the ServiceAccountKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceAccountKey + +`func (o *BigQueryEndpointRequest) SetServiceAccountKey(v string)` + +SetServiceAccountKey sets ServiceAccountKey field to given value. + + +### GetType + +`func (o *BigQueryEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BigQueryEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BigQueryEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BillingInvoicesAPI.md b/azion-api/docs/BillingInvoicesAPI.md new file mode 100644 index 0000000..8b4ee01 --- /dev/null +++ b/azion-api/docs/BillingInvoicesAPI.md @@ -0,0 +1,79 @@ +# \BillingInvoicesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveInvoice**](BillingInvoicesAPI.md#RetrieveInvoice) | **Get** /billing/invoices/{period} | Retrieve details of an invoice + + + +## RetrieveInvoice + +> RetrieveInvoice(ctx, period).Fields(fields).Execute() + +Retrieve details of an invoice + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + period := "period_example" // string | Invoice period in MM-YYYY format (e.g., 01-2024 for January 2024) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.BillingInvoicesAPI.RetrieveInvoice(context.Background(), period).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingInvoicesAPI.RetrieveInvoice``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**period** | **string** | Invoice period in MM-YYYY format (e.g., 01-2024 for January 2024) | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveInvoiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + + (empty response body) + +### Authorization + +[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/BillingPaymentsAPI.md b/azion-api/docs/BillingPaymentsAPI.md new file mode 100644 index 0000000..a754494 --- /dev/null +++ b/azion-api/docs/BillingPaymentsAPI.md @@ -0,0 +1,509 @@ +# \BillingPaymentsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddCredits**](BillingPaymentsAPI.md#AddCredits) | **Post** /payments/credits | Add credits using the default credit card +[**CreateCreditCard**](BillingPaymentsAPI.md#CreateCreditCard) | **Post** /payments/credit_cards | Create a new credit card +[**DestroyCreditCard**](BillingPaymentsAPI.md#DestroyCreditCard) | **Delete** /payments/credit_cards/{id} | Destroy a credit card +[**ListCreditCards**](BillingPaymentsAPI.md#ListCreditCards) | **Get** /payments/credit_cards | List of the credit cards +[**ListPaymentHistory**](BillingPaymentsAPI.md#ListPaymentHistory) | **Get** /payments/history | List of the payment history +[**PartialUpdateCreditCard**](BillingPaymentsAPI.md#PartialUpdateCreditCard) | **Patch** /payments/credit_cards/{id} | Partially update a credit card +[**RetrieveCreditCard**](BillingPaymentsAPI.md#RetrieveCreditCard) | **Get** /payments/credit_cards/{id} | Retrieve details from a credit card + + + +## AddCredits + +> ResponseCredit AddCredits(ctx).CreditRequest(creditRequest).Execute() + +Add credits using the default credit card + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + creditRequest := *openapiclient.NewCreditRequest("Amount_example") // CreditRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.AddCredits(context.Background()).CreditRequest(creditRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.AddCredits``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `AddCredits`: ResponseCredit + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.AddCredits`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiAddCreditsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **creditRequest** | [**CreditRequest**](CreditRequest.md) | | + +### Return type + +[**ResponseCredit**](ResponseCredit.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateCreditCard + +> ResponsePaymentMethod CreateCreditCard(ctx).PaymentMethodRequest(paymentMethodRequest).Execute() + +Create a new credit card + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + paymentMethodRequest := *openapiclient.NewPaymentMethodRequest("CardHolder_example", "CardBrand_example", int64(123), int64(123), "CardLast4Digits_example", "CardAddressZip_example", "CardCountry_example", "StripeToken_example", "CardId_example") // PaymentMethodRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.CreateCreditCard(context.Background()).PaymentMethodRequest(paymentMethodRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.CreateCreditCard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCreditCard`: ResponsePaymentMethod + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.CreateCreditCard`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCreditCardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paymentMethodRequest** | [**PaymentMethodRequest**](PaymentMethodRequest.md) | | + +### Return type + +[**ResponsePaymentMethod**](ResponsePaymentMethod.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyCreditCard + +> ResponseDeletePaymentMethod DestroyCreditCard(ctx, id).Execute() + +Destroy a credit card + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := "id_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.DestroyCreditCard(context.Background(), id).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.DestroyCreditCard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyCreditCard`: ResponseDeletePaymentMethod + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.DestroyCreditCard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyCreditCardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeletePaymentMethod**](ResponseDeletePaymentMethod.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCreditCards + +> PaginatedResponsePaymentMethodList ListCreditCards(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the credit cards + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.ListCreditCards(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.ListCreditCards``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCreditCards`: PaginatedResponsePaymentMethodList + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.ListCreditCards`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListCreditCardsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedResponsePaymentMethodList**](PaginatedResponsePaymentMethodList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPaymentHistory + +> PaginatedPaymentHistoryList ListPaymentHistory(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the payment history + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.ListPaymentHistory(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.ListPaymentHistory``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListPaymentHistory`: PaginatedPaymentHistoryList + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.ListPaymentHistory`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListPaymentHistoryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedPaymentHistoryList**](PaginatedPaymentHistoryList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateCreditCard + +> ResponsePaymentMethod PartialUpdateCreditCard(ctx, id).PatchedPartialUpdateRequest(patchedPartialUpdateRequest).Execute() + +Partially update a credit card + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := "id_example" // string | + patchedPartialUpdateRequest := *openapiclient.NewPatchedPartialUpdateRequest() // PatchedPartialUpdateRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.PartialUpdateCreditCard(context.Background(), id).PatchedPartialUpdateRequest(patchedPartialUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.PartialUpdateCreditCard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateCreditCard`: ResponsePaymentMethod + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.PartialUpdateCreditCard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateCreditCardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedPartialUpdateRequest** | [**PatchedPartialUpdateRequest**](PatchedPartialUpdateRequest.md) | | + +### Return type + +[**ResponsePaymentMethod**](ResponsePaymentMethod.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveCreditCard + +> ResponsePaymentMethod RetrieveCreditCard(ctx, id).Fields(fields).Execute() + +Retrieve details from a credit card + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := "id_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BillingPaymentsAPI.RetrieveCreditCard(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BillingPaymentsAPI.RetrieveCreditCard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveCreditCard`: ResponsePaymentMethod + fmt.Fprintf(os.Stdout, "Response from `BillingPaymentsAPI.RetrieveCreditCard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveCreditCardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponsePaymentMethod**](ResponsePaymentMethod.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Brand.md b/azion-api/docs/Brand.md new file mode 100644 index 0000000..11e62d6 --- /dev/null +++ b/azion-api/docs/Brand.md @@ -0,0 +1,219 @@ +# Brand + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ParentId** | **int64** | | +**Created** | **time.Time** | | +**Info** | **map[string]interface{}** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewBrand + +`func NewBrand(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, type_ string, ) *Brand` + +NewBrand instantiates a new Brand object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBrandWithDefaults + +`func NewBrandWithDefaults() *Brand` + +NewBrandWithDefaults instantiates a new Brand object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Brand) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Brand) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Brand) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Brand) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Brand) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Brand) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *Brand) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Brand) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Brand) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *Brand) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Brand) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Brand) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Brand) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Brand) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Brand) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetParentId + +`func (o *Brand) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *Brand) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *Brand) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCreated + +`func (o *Brand) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Brand) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Brand) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetInfo + +`func (o *Brand) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *Brand) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *Brand) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetType + +`func (o *Brand) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Brand) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Brand) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BrandRequest.md b/azion-api/docs/BrandRequest.md new file mode 100644 index 0000000..2b5b436 --- /dev/null +++ b/azion-api/docs/BrandRequest.md @@ -0,0 +1,72 @@ +# BrandRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewBrandRequest + +`func NewBrandRequest(name string, type_ string, ) *BrandRequest` + +NewBrandRequest instantiates a new BrandRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBrandRequestWithDefaults + +`func NewBrandRequestWithDefaults() *BrandRequest` + +NewBrandRequestWithDefaults instantiates a new BrandRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *BrandRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BrandRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *BrandRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *BrandRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *BrandRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *BrandRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BrowserCacheModule.md b/azion-api/docs/BrowserCacheModule.md new file mode 100644 index 0000000..b588812 --- /dev/null +++ b/azion-api/docs/BrowserCacheModule.md @@ -0,0 +1,82 @@ +# BrowserCacheModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `override` - override * `honor` - honor * `no-cache` - no-cache | [optional] +**MaxAge** | Pointer to **int64** | | [optional] + +## Methods + +### NewBrowserCacheModule + +`func NewBrowserCacheModule() *BrowserCacheModule` + +NewBrowserCacheModule instantiates a new BrowserCacheModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBrowserCacheModuleWithDefaults + +`func NewBrowserCacheModuleWithDefaults() *BrowserCacheModule` + +NewBrowserCacheModuleWithDefaults instantiates a new BrowserCacheModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *BrowserCacheModule) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *BrowserCacheModule) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *BrowserCacheModule) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *BrowserCacheModule) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetMaxAge + +`func (o *BrowserCacheModule) GetMaxAge() int64` + +GetMaxAge returns the MaxAge field if non-nil, zero value otherwise. + +### GetMaxAgeOk + +`func (o *BrowserCacheModule) GetMaxAgeOk() (*int64, bool)` + +GetMaxAgeOk returns a tuple with the MaxAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAge + +`func (o *BrowserCacheModule) SetMaxAge(v int64)` + +SetMaxAge sets MaxAge field to given value. + +### HasMaxAge + +`func (o *BrowserCacheModule) HasMaxAge() bool` + +HasMaxAge returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BrowserCacheModuleRequest.md b/azion-api/docs/BrowserCacheModuleRequest.md new file mode 100644 index 0000000..f9ca458 --- /dev/null +++ b/azion-api/docs/BrowserCacheModuleRequest.md @@ -0,0 +1,82 @@ +# BrowserCacheModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `override` - override * `honor` - honor * `no-cache` - no-cache | [optional] +**MaxAge** | Pointer to **int64** | | [optional] + +## Methods + +### NewBrowserCacheModuleRequest + +`func NewBrowserCacheModuleRequest() *BrowserCacheModuleRequest` + +NewBrowserCacheModuleRequest instantiates a new BrowserCacheModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBrowserCacheModuleRequestWithDefaults + +`func NewBrowserCacheModuleRequestWithDefaults() *BrowserCacheModuleRequest` + +NewBrowserCacheModuleRequestWithDefaults instantiates a new BrowserCacheModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *BrowserCacheModuleRequest) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *BrowserCacheModuleRequest) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *BrowserCacheModuleRequest) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *BrowserCacheModuleRequest) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetMaxAge + +`func (o *BrowserCacheModuleRequest) GetMaxAge() int64` + +GetMaxAge returns the MaxAge field if non-nil, zero value otherwise. + +### GetMaxAgeOk + +`func (o *BrowserCacheModuleRequest) GetMaxAgeOk() (*int64, bool)` + +GetMaxAgeOk returns a tuple with the MaxAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAge + +`func (o *BrowserCacheModuleRequest) SetMaxAge(v int64)` + +SetMaxAge sets MaxAge field to given value. + +### HasMaxAge + +`func (o *BrowserCacheModuleRequest) HasMaxAge() bool` + +HasMaxAge returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Bucket.md b/azion-api/docs/Bucket.md new file mode 100644 index 0000000..751cd5c --- /dev/null +++ b/azion-api/docs/Bucket.md @@ -0,0 +1,135 @@ +# Bucket + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**WorkloadsAccess** | **string** | * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ProductVersion** | **string** | | + +## Methods + +### NewBucket + +`func NewBucket(name string, workloadsAccess string, lastEditor string, lastModified time.Time, productVersion string, ) *Bucket` + +NewBucket instantiates a new Bucket object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBucketWithDefaults + +`func NewBucketWithDefaults() *Bucket` + +NewBucketWithDefaults instantiates a new Bucket object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Bucket) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Bucket) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Bucket) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWorkloadsAccess + +`func (o *Bucket) GetWorkloadsAccess() string` + +GetWorkloadsAccess returns the WorkloadsAccess field if non-nil, zero value otherwise. + +### GetWorkloadsAccessOk + +`func (o *Bucket) GetWorkloadsAccessOk() (*string, bool)` + +GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadsAccess + +`func (o *Bucket) SetWorkloadsAccess(v string)` + +SetWorkloadsAccess sets WorkloadsAccess field to given value. + + +### GetLastEditor + +`func (o *Bucket) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Bucket) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Bucket) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Bucket) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Bucket) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Bucket) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *Bucket) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Bucket) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Bucket) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BucketCreate.md b/azion-api/docs/BucketCreate.md new file mode 100644 index 0000000..57a6b6c --- /dev/null +++ b/azion-api/docs/BucketCreate.md @@ -0,0 +1,135 @@ +# BucketCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**WorkloadsAccess** | **string** | * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ProductVersion** | **string** | | + +## Methods + +### NewBucketCreate + +`func NewBucketCreate(name string, workloadsAccess string, lastEditor string, lastModified time.Time, productVersion string, ) *BucketCreate` + +NewBucketCreate instantiates a new BucketCreate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBucketCreateWithDefaults + +`func NewBucketCreateWithDefaults() *BucketCreate` + +NewBucketCreateWithDefaults instantiates a new BucketCreate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *BucketCreate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BucketCreate) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *BucketCreate) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWorkloadsAccess + +`func (o *BucketCreate) GetWorkloadsAccess() string` + +GetWorkloadsAccess returns the WorkloadsAccess field if non-nil, zero value otherwise. + +### GetWorkloadsAccessOk + +`func (o *BucketCreate) GetWorkloadsAccessOk() (*string, bool)` + +GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadsAccess + +`func (o *BucketCreate) SetWorkloadsAccess(v string)` + +SetWorkloadsAccess sets WorkloadsAccess field to given value. + + +### GetLastEditor + +`func (o *BucketCreate) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *BucketCreate) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *BucketCreate) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *BucketCreate) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *BucketCreate) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *BucketCreate) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *BucketCreate) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *BucketCreate) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *BucketCreate) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BucketCreateRequest.md b/azion-api/docs/BucketCreateRequest.md new file mode 100644 index 0000000..d54c1af --- /dev/null +++ b/azion-api/docs/BucketCreateRequest.md @@ -0,0 +1,72 @@ +# BucketCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**WorkloadsAccess** | **string** | * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted | + +## Methods + +### NewBucketCreateRequest + +`func NewBucketCreateRequest(name string, workloadsAccess string, ) *BucketCreateRequest` + +NewBucketCreateRequest instantiates a new BucketCreateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBucketCreateRequestWithDefaults + +`func NewBucketCreateRequestWithDefaults() *BucketCreateRequest` + +NewBucketCreateRequestWithDefaults instantiates a new BucketCreateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *BucketCreateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *BucketCreateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *BucketCreateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetWorkloadsAccess + +`func (o *BucketCreateRequest) GetWorkloadsAccess() string` + +GetWorkloadsAccess returns the WorkloadsAccess field if non-nil, zero value otherwise. + +### GetWorkloadsAccessOk + +`func (o *BucketCreateRequest) GetWorkloadsAccessOk() (*string, bool)` + +GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadsAccess + +`func (o *BucketCreateRequest) SetWorkloadsAccess(v string)` + +SetWorkloadsAccess sets WorkloadsAccess field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BucketCreateResponse.md b/azion-api/docs/BucketCreateResponse.md new file mode 100644 index 0000000..185e006 --- /dev/null +++ b/azion-api/docs/BucketCreateResponse.md @@ -0,0 +1,77 @@ +# BucketCreateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**BucketCreate**](BucketCreate.md) | | + +## Methods + +### NewBucketCreateResponse + +`func NewBucketCreateResponse(data BucketCreate, ) *BucketCreateResponse` + +NewBucketCreateResponse instantiates a new BucketCreateResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBucketCreateResponseWithDefaults + +`func NewBucketCreateResponseWithDefaults() *BucketCreateResponse` + +NewBucketCreateResponseWithDefaults instantiates a new BucketCreateResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *BucketCreateResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *BucketCreateResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *BucketCreateResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *BucketCreateResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *BucketCreateResponse) GetData() BucketCreate` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *BucketCreateResponse) GetDataOk() (*BucketCreate, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *BucketCreateResponse) SetData(v BucketCreate)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BucketObject.md b/azion-api/docs/BucketObject.md new file mode 100644 index 0000000..8318544 --- /dev/null +++ b/azion-api/docs/BucketObject.md @@ -0,0 +1,114 @@ +# BucketObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Key** | **string** | | +**LastModified** | **time.Time** | | +**Size** | **int64** | Size of the object in bytes | +**IsFolder** | **bool** | Whether this entry represents a folder | + +## Methods + +### NewBucketObject + +`func NewBucketObject(key string, lastModified time.Time, size int64, isFolder bool, ) *BucketObject` + +NewBucketObject instantiates a new BucketObject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBucketObjectWithDefaults + +`func NewBucketObjectWithDefaults() *BucketObject` + +NewBucketObjectWithDefaults instantiates a new BucketObject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKey + +`func (o *BucketObject) GetKey() string` + +GetKey returns the Key field if non-nil, zero value otherwise. + +### GetKeyOk + +`func (o *BucketObject) GetKeyOk() (*string, bool)` + +GetKeyOk returns a tuple with the Key field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKey + +`func (o *BucketObject) SetKey(v string)` + +SetKey sets Key field to given value. + + +### GetLastModified + +`func (o *BucketObject) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *BucketObject) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *BucketObject) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetSize + +`func (o *BucketObject) GetSize() int64` + +GetSize returns the Size field if non-nil, zero value otherwise. + +### GetSizeOk + +`func (o *BucketObject) GetSizeOk() (*int64, bool)` + +GetSizeOk returns a tuple with the Size field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSize + +`func (o *BucketObject) SetSize(v int64)` + +SetSize sets Size field to given value. + + +### GetIsFolder + +`func (o *BucketObject) GetIsFolder() bool` + +GetIsFolder returns the IsFolder field if non-nil, zero value otherwise. + +### GetIsFolderOk + +`func (o *BucketObject) GetIsFolderOk() (*bool, bool)` + +GetIsFolderOk returns a tuple with the IsFolder field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsFolder + +`func (o *BucketObject) SetIsFolder(v bool)` + +SetIsFolder sets IsFolder field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BuildContextField.md b/azion-api/docs/BuildContextField.md new file mode 100644 index 0000000..15d0307 --- /dev/null +++ b/azion-api/docs/BuildContextField.md @@ -0,0 +1,98 @@ +# BuildContextField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | | +**Value** | **string** | | +**InstantiationDataPath** | Pointer to **string** | | [optional] + +## Methods + +### NewBuildContextField + +`func NewBuildContextField(field string, value string, ) *BuildContextField` + +NewBuildContextField instantiates a new BuildContextField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBuildContextFieldWithDefaults + +`func NewBuildContextFieldWithDefaults() *BuildContextField` + +NewBuildContextFieldWithDefaults instantiates a new BuildContextField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetField + +`func (o *BuildContextField) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *BuildContextField) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *BuildContextField) SetField(v string)` + +SetField sets Field field to given value. + + +### GetValue + +`func (o *BuildContextField) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *BuildContextField) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *BuildContextField) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetInstantiationDataPath + +`func (o *BuildContextField) GetInstantiationDataPath() string` + +GetInstantiationDataPath returns the InstantiationDataPath field if non-nil, zero value otherwise. + +### GetInstantiationDataPathOk + +`func (o *BuildContextField) GetInstantiationDataPathOk() (*string, bool)` + +GetInstantiationDataPathOk returns a tuple with the InstantiationDataPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstantiationDataPath + +`func (o *BuildContextField) SetInstantiationDataPath(v string)` + +SetInstantiationDataPath sets InstantiationDataPath field to given value. + +### HasInstantiationDataPath + +`func (o *BuildContextField) HasInstantiationDataPath() bool` + +HasInstantiationDataPath returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/BuildContextFieldRequest.md b/azion-api/docs/BuildContextFieldRequest.md new file mode 100644 index 0000000..6839a74 --- /dev/null +++ b/azion-api/docs/BuildContextFieldRequest.md @@ -0,0 +1,98 @@ +# BuildContextFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | | +**Value** | **string** | | +**InstantiationDataPath** | Pointer to **string** | | [optional] + +## Methods + +### NewBuildContextFieldRequest + +`func NewBuildContextFieldRequest(field string, value string, ) *BuildContextFieldRequest` + +NewBuildContextFieldRequest instantiates a new BuildContextFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewBuildContextFieldRequestWithDefaults + +`func NewBuildContextFieldRequestWithDefaults() *BuildContextFieldRequest` + +NewBuildContextFieldRequestWithDefaults instantiates a new BuildContextFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetField + +`func (o *BuildContextFieldRequest) GetField() string` + +GetField returns the Field field if non-nil, zero value otherwise. + +### GetFieldOk + +`func (o *BuildContextFieldRequest) GetFieldOk() (*string, bool)` + +GetFieldOk returns a tuple with the Field field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetField + +`func (o *BuildContextFieldRequest) SetField(v string)` + +SetField sets Field field to given value. + + +### GetValue + +`func (o *BuildContextFieldRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *BuildContextFieldRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *BuildContextFieldRequest) SetValue(v string)` + +SetValue sets Value field to given value. + + +### GetInstantiationDataPath + +`func (o *BuildContextFieldRequest) GetInstantiationDataPath() string` + +GetInstantiationDataPath returns the InstantiationDataPath field if non-nil, zero value otherwise. + +### GetInstantiationDataPathOk + +`func (o *BuildContextFieldRequest) GetInstantiationDataPathOk() (*string, bool)` + +GetInstantiationDataPathOk returns a tuple with the InstantiationDataPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstantiationDataPath + +`func (o *BuildContextFieldRequest) SetInstantiationDataPath(v string)` + +SetInstantiationDataPath sets InstantiationDataPath field to given value. + +### HasInstantiationDataPath + +`func (o *BuildContextFieldRequest) HasInstantiationDataPath() bool` + +HasInstantiationDataPath returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheModule.md b/azion-api/docs/CacheModule.md new file mode 100644 index 0000000..8512e31 --- /dev/null +++ b/azion-api/docs/CacheModule.md @@ -0,0 +1,56 @@ +# CacheModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewCacheModule + +`func NewCacheModule() *CacheModule` + +NewCacheModule instantiates a new CacheModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheModuleWithDefaults + +`func NewCacheModuleWithDefaults() *CacheModule` + +NewCacheModuleWithDefaults instantiates a new CacheModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *CacheModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *CacheModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *CacheModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *CacheModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheModuleRequest.md b/azion-api/docs/CacheModuleRequest.md new file mode 100644 index 0000000..b638645 --- /dev/null +++ b/azion-api/docs/CacheModuleRequest.md @@ -0,0 +1,56 @@ +# CacheModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewCacheModuleRequest + +`func NewCacheModuleRequest() *CacheModuleRequest` + +NewCacheModuleRequest instantiates a new CacheModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheModuleRequestWithDefaults + +`func NewCacheModuleRequestWithDefaults() *CacheModuleRequest` + +NewCacheModuleRequestWithDefaults instantiates a new CacheModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *CacheModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *CacheModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *CacheModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *CacheModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSetting.md b/azion-api/docs/CacheSetting.md new file mode 100644 index 0000000..c67067e --- /dev/null +++ b/azion-api/docs/CacheSetting.md @@ -0,0 +1,124 @@ +# CacheSetting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**BrowserCache** | Pointer to [**BrowserCacheModule**](BrowserCacheModule.md) | | [optional] +**Modules** | Pointer to [**CacheSettingsModules**](CacheSettingsModules.md) | | [optional] + +## Methods + +### NewCacheSetting + +`func NewCacheSetting(id int64, name string, ) *CacheSetting` + +NewCacheSetting instantiates a new CacheSetting object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingWithDefaults + +`func NewCacheSettingWithDefaults() *CacheSetting` + +NewCacheSettingWithDefaults instantiates a new CacheSetting object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CacheSetting) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CacheSetting) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CacheSetting) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *CacheSetting) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CacheSetting) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CacheSetting) SetName(v string)` + +SetName sets Name field to given value. + + +### GetBrowserCache + +`func (o *CacheSetting) GetBrowserCache() BrowserCacheModule` + +GetBrowserCache returns the BrowserCache field if non-nil, zero value otherwise. + +### GetBrowserCacheOk + +`func (o *CacheSetting) GetBrowserCacheOk() (*BrowserCacheModule, bool)` + +GetBrowserCacheOk returns a tuple with the BrowserCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBrowserCache + +`func (o *CacheSetting) SetBrowserCache(v BrowserCacheModule)` + +SetBrowserCache sets BrowserCache field to given value. + +### HasBrowserCache + +`func (o *CacheSetting) HasBrowserCache() bool` + +HasBrowserCache returns a boolean if a field has been set. + +### GetModules + +`func (o *CacheSetting) GetModules() CacheSettingsModules` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *CacheSetting) GetModulesOk() (*CacheSettingsModules, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *CacheSetting) SetModules(v CacheSettingsModules)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *CacheSetting) HasModules() bool` + +HasModules returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingRequest.md b/azion-api/docs/CacheSettingRequest.md new file mode 100644 index 0000000..fb6dc51 --- /dev/null +++ b/azion-api/docs/CacheSettingRequest.md @@ -0,0 +1,103 @@ +# CacheSettingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**BrowserCache** | Pointer to [**BrowserCacheModuleRequest**](BrowserCacheModuleRequest.md) | | [optional] +**Modules** | Pointer to [**CacheSettingsModulesRequest**](CacheSettingsModulesRequest.md) | | [optional] + +## Methods + +### NewCacheSettingRequest + +`func NewCacheSettingRequest(name string, ) *CacheSettingRequest` + +NewCacheSettingRequest instantiates a new CacheSettingRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingRequestWithDefaults + +`func NewCacheSettingRequestWithDefaults() *CacheSettingRequest` + +NewCacheSettingRequestWithDefaults instantiates a new CacheSettingRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CacheSettingRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CacheSettingRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CacheSettingRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetBrowserCache + +`func (o *CacheSettingRequest) GetBrowserCache() BrowserCacheModuleRequest` + +GetBrowserCache returns the BrowserCache field if non-nil, zero value otherwise. + +### GetBrowserCacheOk + +`func (o *CacheSettingRequest) GetBrowserCacheOk() (*BrowserCacheModuleRequest, bool)` + +GetBrowserCacheOk returns a tuple with the BrowserCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBrowserCache + +`func (o *CacheSettingRequest) SetBrowserCache(v BrowserCacheModuleRequest)` + +SetBrowserCache sets BrowserCache field to given value. + +### HasBrowserCache + +`func (o *CacheSettingRequest) HasBrowserCache() bool` + +HasBrowserCache returns a boolean if a field has been set. + +### GetModules + +`func (o *CacheSettingRequest) GetModules() CacheSettingsModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *CacheSettingRequest) GetModulesOk() (*CacheSettingsModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *CacheSettingRequest) SetModules(v CacheSettingsModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *CacheSettingRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingResponse.md b/azion-api/docs/CacheSettingResponse.md new file mode 100644 index 0000000..db9c5f2 --- /dev/null +++ b/azion-api/docs/CacheSettingResponse.md @@ -0,0 +1,77 @@ +# CacheSettingResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**CacheSetting**](CacheSetting.md) | | + +## Methods + +### NewCacheSettingResponse + +`func NewCacheSettingResponse(data CacheSetting, ) *CacheSettingResponse` + +NewCacheSettingResponse instantiates a new CacheSettingResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingResponseWithDefaults + +`func NewCacheSettingResponseWithDefaults() *CacheSettingResponse` + +NewCacheSettingResponseWithDefaults instantiates a new CacheSettingResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *CacheSettingResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *CacheSettingResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *CacheSettingResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *CacheSettingResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *CacheSettingResponse) GetData() CacheSetting` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CacheSettingResponse) GetDataOk() (*CacheSetting, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CacheSettingResponse) SetData(v CacheSetting)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsApplicationAcceleratorModule.md b/azion-api/docs/CacheSettingsApplicationAcceleratorModule.md new file mode 100644 index 0000000..cfd7fe8 --- /dev/null +++ b/azion-api/docs/CacheSettingsApplicationAcceleratorModule.md @@ -0,0 +1,134 @@ +# CacheSettingsApplicationAcceleratorModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CacheVaryByMethod** | Pointer to **[]string** | | [optional] +**CacheVaryByQuerystring** | Pointer to [**CacheVaryByQuerystringModule**](CacheVaryByQuerystringModule.md) | | [optional] +**CacheVaryByCookies** | Pointer to [**CacheVaryByCookiesModule**](CacheVaryByCookiesModule.md) | | [optional] +**CacheVaryByDevices** | Pointer to [**CacheVaryByDevicesModule**](CacheVaryByDevicesModule.md) | | [optional] + +## Methods + +### NewCacheSettingsApplicationAcceleratorModule + +`func NewCacheSettingsApplicationAcceleratorModule() *CacheSettingsApplicationAcceleratorModule` + +NewCacheSettingsApplicationAcceleratorModule instantiates a new CacheSettingsApplicationAcceleratorModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsApplicationAcceleratorModuleWithDefaults + +`func NewCacheSettingsApplicationAcceleratorModuleWithDefaults() *CacheSettingsApplicationAcceleratorModule` + +NewCacheSettingsApplicationAcceleratorModuleWithDefaults instantiates a new CacheSettingsApplicationAcceleratorModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCacheVaryByMethod + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByMethod() []string` + +GetCacheVaryByMethod returns the CacheVaryByMethod field if non-nil, zero value otherwise. + +### GetCacheVaryByMethodOk + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByMethodOk() (*[]string, bool)` + +GetCacheVaryByMethodOk returns a tuple with the CacheVaryByMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByMethod + +`func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByMethod(v []string)` + +SetCacheVaryByMethod sets CacheVaryByMethod field to given value. + +### HasCacheVaryByMethod + +`func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByMethod() bool` + +HasCacheVaryByMethod returns a boolean if a field has been set. + +### GetCacheVaryByQuerystring + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByQuerystring() CacheVaryByQuerystringModule` + +GetCacheVaryByQuerystring returns the CacheVaryByQuerystring field if non-nil, zero value otherwise. + +### GetCacheVaryByQuerystringOk + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByQuerystringOk() (*CacheVaryByQuerystringModule, bool)` + +GetCacheVaryByQuerystringOk returns a tuple with the CacheVaryByQuerystring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByQuerystring + +`func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByQuerystring(v CacheVaryByQuerystringModule)` + +SetCacheVaryByQuerystring sets CacheVaryByQuerystring field to given value. + +### HasCacheVaryByQuerystring + +`func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByQuerystring() bool` + +HasCacheVaryByQuerystring returns a boolean if a field has been set. + +### GetCacheVaryByCookies + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByCookies() CacheVaryByCookiesModule` + +GetCacheVaryByCookies returns the CacheVaryByCookies field if non-nil, zero value otherwise. + +### GetCacheVaryByCookiesOk + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByCookiesOk() (*CacheVaryByCookiesModule, bool)` + +GetCacheVaryByCookiesOk returns a tuple with the CacheVaryByCookies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByCookies + +`func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByCookies(v CacheVaryByCookiesModule)` + +SetCacheVaryByCookies sets CacheVaryByCookies field to given value. + +### HasCacheVaryByCookies + +`func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByCookies() bool` + +HasCacheVaryByCookies returns a boolean if a field has been set. + +### GetCacheVaryByDevices + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByDevices() CacheVaryByDevicesModule` + +GetCacheVaryByDevices returns the CacheVaryByDevices field if non-nil, zero value otherwise. + +### GetCacheVaryByDevicesOk + +`func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByDevicesOk() (*CacheVaryByDevicesModule, bool)` + +GetCacheVaryByDevicesOk returns a tuple with the CacheVaryByDevices field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByDevices + +`func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByDevices(v CacheVaryByDevicesModule)` + +SetCacheVaryByDevices sets CacheVaryByDevices field to given value. + +### HasCacheVaryByDevices + +`func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByDevices() bool` + +HasCacheVaryByDevices returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsApplicationAcceleratorModuleRequest.md b/azion-api/docs/CacheSettingsApplicationAcceleratorModuleRequest.md new file mode 100644 index 0000000..b1e22ba --- /dev/null +++ b/azion-api/docs/CacheSettingsApplicationAcceleratorModuleRequest.md @@ -0,0 +1,134 @@ +# CacheSettingsApplicationAcceleratorModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CacheVaryByMethod** | Pointer to **[]string** | | [optional] +**CacheVaryByQuerystring** | Pointer to [**CacheVaryByQuerystringModuleRequest**](CacheVaryByQuerystringModuleRequest.md) | | [optional] +**CacheVaryByCookies** | Pointer to [**CacheVaryByCookiesModuleRequest**](CacheVaryByCookiesModuleRequest.md) | | [optional] +**CacheVaryByDevices** | Pointer to [**CacheVaryByDevicesModuleRequest**](CacheVaryByDevicesModuleRequest.md) | | [optional] + +## Methods + +### NewCacheSettingsApplicationAcceleratorModuleRequest + +`func NewCacheSettingsApplicationAcceleratorModuleRequest() *CacheSettingsApplicationAcceleratorModuleRequest` + +NewCacheSettingsApplicationAcceleratorModuleRequest instantiates a new CacheSettingsApplicationAcceleratorModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsApplicationAcceleratorModuleRequestWithDefaults + +`func NewCacheSettingsApplicationAcceleratorModuleRequestWithDefaults() *CacheSettingsApplicationAcceleratorModuleRequest` + +NewCacheSettingsApplicationAcceleratorModuleRequestWithDefaults instantiates a new CacheSettingsApplicationAcceleratorModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCacheVaryByMethod + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByMethod() []string` + +GetCacheVaryByMethod returns the CacheVaryByMethod field if non-nil, zero value otherwise. + +### GetCacheVaryByMethodOk + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByMethodOk() (*[]string, bool)` + +GetCacheVaryByMethodOk returns a tuple with the CacheVaryByMethod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByMethod + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByMethod(v []string)` + +SetCacheVaryByMethod sets CacheVaryByMethod field to given value. + +### HasCacheVaryByMethod + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByMethod() bool` + +HasCacheVaryByMethod returns a boolean if a field has been set. + +### GetCacheVaryByQuerystring + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByQuerystring() CacheVaryByQuerystringModuleRequest` + +GetCacheVaryByQuerystring returns the CacheVaryByQuerystring field if non-nil, zero value otherwise. + +### GetCacheVaryByQuerystringOk + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByQuerystringOk() (*CacheVaryByQuerystringModuleRequest, bool)` + +GetCacheVaryByQuerystringOk returns a tuple with the CacheVaryByQuerystring field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByQuerystring + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByQuerystring(v CacheVaryByQuerystringModuleRequest)` + +SetCacheVaryByQuerystring sets CacheVaryByQuerystring field to given value. + +### HasCacheVaryByQuerystring + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByQuerystring() bool` + +HasCacheVaryByQuerystring returns a boolean if a field has been set. + +### GetCacheVaryByCookies + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByCookies() CacheVaryByCookiesModuleRequest` + +GetCacheVaryByCookies returns the CacheVaryByCookies field if non-nil, zero value otherwise. + +### GetCacheVaryByCookiesOk + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByCookiesOk() (*CacheVaryByCookiesModuleRequest, bool)` + +GetCacheVaryByCookiesOk returns a tuple with the CacheVaryByCookies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByCookies + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByCookies(v CacheVaryByCookiesModuleRequest)` + +SetCacheVaryByCookies sets CacheVaryByCookies field to given value. + +### HasCacheVaryByCookies + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByCookies() bool` + +HasCacheVaryByCookies returns a boolean if a field has been set. + +### GetCacheVaryByDevices + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByDevices() CacheVaryByDevicesModuleRequest` + +GetCacheVaryByDevices returns the CacheVaryByDevices field if non-nil, zero value otherwise. + +### GetCacheVaryByDevicesOk + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByDevicesOk() (*CacheVaryByDevicesModuleRequest, bool)` + +GetCacheVaryByDevicesOk returns a tuple with the CacheVaryByDevices field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCacheVaryByDevices + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByDevices(v CacheVaryByDevicesModuleRequest)` + +SetCacheVaryByDevices sets CacheVaryByDevices field to given value. + +### HasCacheVaryByDevices + +`func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByDevices() bool` + +HasCacheVaryByDevices returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsCacheModule.md b/azion-api/docs/CacheSettingsCacheModule.md new file mode 100644 index 0000000..c9572c5 --- /dev/null +++ b/azion-api/docs/CacheSettingsCacheModule.md @@ -0,0 +1,170 @@ +# CacheSettingsCacheModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `honor` - Honor Origin Cache Settings * `override` - Override Cache Settings | [optional] +**MaxAge** | Pointer to **int64** | To use a value lower than 60s, the Application Acceleration module must be enabled on the Application. | [optional] +**StaleCache** | Pointer to [**StateCacheModule**](StateCacheModule.md) | | [optional] +**LargeFileCache** | Pointer to [**LargeFileCacheModule**](LargeFileCacheModule.md) | | [optional] +**TieredCache** | Pointer to [**NullableCacheSettingsTieredCacheModule**](CacheSettingsTieredCacheModule.md) | | [optional] + +## Methods + +### NewCacheSettingsCacheModule + +`func NewCacheSettingsCacheModule() *CacheSettingsCacheModule` + +NewCacheSettingsCacheModule instantiates a new CacheSettingsCacheModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsCacheModuleWithDefaults + +`func NewCacheSettingsCacheModuleWithDefaults() *CacheSettingsCacheModule` + +NewCacheSettingsCacheModuleWithDefaults instantiates a new CacheSettingsCacheModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheSettingsCacheModule) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheSettingsCacheModule) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheSettingsCacheModule) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheSettingsCacheModule) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetMaxAge + +`func (o *CacheSettingsCacheModule) GetMaxAge() int64` + +GetMaxAge returns the MaxAge field if non-nil, zero value otherwise. + +### GetMaxAgeOk + +`func (o *CacheSettingsCacheModule) GetMaxAgeOk() (*int64, bool)` + +GetMaxAgeOk returns a tuple with the MaxAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAge + +`func (o *CacheSettingsCacheModule) SetMaxAge(v int64)` + +SetMaxAge sets MaxAge field to given value. + +### HasMaxAge + +`func (o *CacheSettingsCacheModule) HasMaxAge() bool` + +HasMaxAge returns a boolean if a field has been set. + +### GetStaleCache + +`func (o *CacheSettingsCacheModule) GetStaleCache() StateCacheModule` + +GetStaleCache returns the StaleCache field if non-nil, zero value otherwise. + +### GetStaleCacheOk + +`func (o *CacheSettingsCacheModule) GetStaleCacheOk() (*StateCacheModule, bool)` + +GetStaleCacheOk returns a tuple with the StaleCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStaleCache + +`func (o *CacheSettingsCacheModule) SetStaleCache(v StateCacheModule)` + +SetStaleCache sets StaleCache field to given value. + +### HasStaleCache + +`func (o *CacheSettingsCacheModule) HasStaleCache() bool` + +HasStaleCache returns a boolean if a field has been set. + +### GetLargeFileCache + +`func (o *CacheSettingsCacheModule) GetLargeFileCache() LargeFileCacheModule` + +GetLargeFileCache returns the LargeFileCache field if non-nil, zero value otherwise. + +### GetLargeFileCacheOk + +`func (o *CacheSettingsCacheModule) GetLargeFileCacheOk() (*LargeFileCacheModule, bool)` + +GetLargeFileCacheOk returns a tuple with the LargeFileCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLargeFileCache + +`func (o *CacheSettingsCacheModule) SetLargeFileCache(v LargeFileCacheModule)` + +SetLargeFileCache sets LargeFileCache field to given value. + +### HasLargeFileCache + +`func (o *CacheSettingsCacheModule) HasLargeFileCache() bool` + +HasLargeFileCache returns a boolean if a field has been set. + +### GetTieredCache + +`func (o *CacheSettingsCacheModule) GetTieredCache() CacheSettingsTieredCacheModule` + +GetTieredCache returns the TieredCache field if non-nil, zero value otherwise. + +### GetTieredCacheOk + +`func (o *CacheSettingsCacheModule) GetTieredCacheOk() (*CacheSettingsTieredCacheModule, bool)` + +GetTieredCacheOk returns a tuple with the TieredCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTieredCache + +`func (o *CacheSettingsCacheModule) SetTieredCache(v CacheSettingsTieredCacheModule)` + +SetTieredCache sets TieredCache field to given value. + +### HasTieredCache + +`func (o *CacheSettingsCacheModule) HasTieredCache() bool` + +HasTieredCache returns a boolean if a field has been set. + +### SetTieredCacheNil + +`func (o *CacheSettingsCacheModule) SetTieredCacheNil(b bool)` + + SetTieredCacheNil sets the value for TieredCache to be an explicit nil + +### UnsetTieredCache +`func (o *CacheSettingsCacheModule) UnsetTieredCache()` + +UnsetTieredCache ensures that no value is present for TieredCache, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsCacheModuleRequest.md b/azion-api/docs/CacheSettingsCacheModuleRequest.md new file mode 100644 index 0000000..f22105b --- /dev/null +++ b/azion-api/docs/CacheSettingsCacheModuleRequest.md @@ -0,0 +1,170 @@ +# CacheSettingsCacheModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `honor` - Honor Origin Cache Settings * `override` - Override Cache Settings | [optional] +**MaxAge** | Pointer to **int64** | To use a value lower than 60s, the Application Acceleration module must be enabled on the Application. | [optional] +**StaleCache** | Pointer to [**StateCacheModuleRequest**](StateCacheModuleRequest.md) | | [optional] +**LargeFileCache** | Pointer to [**LargeFileCacheModuleRequest**](LargeFileCacheModuleRequest.md) | | [optional] +**TieredCache** | Pointer to [**NullableCacheSettingsTieredCacheModuleRequest**](CacheSettingsTieredCacheModuleRequest.md) | | [optional] + +## Methods + +### NewCacheSettingsCacheModuleRequest + +`func NewCacheSettingsCacheModuleRequest() *CacheSettingsCacheModuleRequest` + +NewCacheSettingsCacheModuleRequest instantiates a new CacheSettingsCacheModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsCacheModuleRequestWithDefaults + +`func NewCacheSettingsCacheModuleRequestWithDefaults() *CacheSettingsCacheModuleRequest` + +NewCacheSettingsCacheModuleRequestWithDefaults instantiates a new CacheSettingsCacheModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheSettingsCacheModuleRequest) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheSettingsCacheModuleRequest) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheSettingsCacheModuleRequest) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheSettingsCacheModuleRequest) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetMaxAge + +`func (o *CacheSettingsCacheModuleRequest) GetMaxAge() int64` + +GetMaxAge returns the MaxAge field if non-nil, zero value otherwise. + +### GetMaxAgeOk + +`func (o *CacheSettingsCacheModuleRequest) GetMaxAgeOk() (*int64, bool)` + +GetMaxAgeOk returns a tuple with the MaxAge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAge + +`func (o *CacheSettingsCacheModuleRequest) SetMaxAge(v int64)` + +SetMaxAge sets MaxAge field to given value. + +### HasMaxAge + +`func (o *CacheSettingsCacheModuleRequest) HasMaxAge() bool` + +HasMaxAge returns a boolean if a field has been set. + +### GetStaleCache + +`func (o *CacheSettingsCacheModuleRequest) GetStaleCache() StateCacheModuleRequest` + +GetStaleCache returns the StaleCache field if non-nil, zero value otherwise. + +### GetStaleCacheOk + +`func (o *CacheSettingsCacheModuleRequest) GetStaleCacheOk() (*StateCacheModuleRequest, bool)` + +GetStaleCacheOk returns a tuple with the StaleCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStaleCache + +`func (o *CacheSettingsCacheModuleRequest) SetStaleCache(v StateCacheModuleRequest)` + +SetStaleCache sets StaleCache field to given value. + +### HasStaleCache + +`func (o *CacheSettingsCacheModuleRequest) HasStaleCache() bool` + +HasStaleCache returns a boolean if a field has been set. + +### GetLargeFileCache + +`func (o *CacheSettingsCacheModuleRequest) GetLargeFileCache() LargeFileCacheModuleRequest` + +GetLargeFileCache returns the LargeFileCache field if non-nil, zero value otherwise. + +### GetLargeFileCacheOk + +`func (o *CacheSettingsCacheModuleRequest) GetLargeFileCacheOk() (*LargeFileCacheModuleRequest, bool)` + +GetLargeFileCacheOk returns a tuple with the LargeFileCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLargeFileCache + +`func (o *CacheSettingsCacheModuleRequest) SetLargeFileCache(v LargeFileCacheModuleRequest)` + +SetLargeFileCache sets LargeFileCache field to given value. + +### HasLargeFileCache + +`func (o *CacheSettingsCacheModuleRequest) HasLargeFileCache() bool` + +HasLargeFileCache returns a boolean if a field has been set. + +### GetTieredCache + +`func (o *CacheSettingsCacheModuleRequest) GetTieredCache() CacheSettingsTieredCacheModuleRequest` + +GetTieredCache returns the TieredCache field if non-nil, zero value otherwise. + +### GetTieredCacheOk + +`func (o *CacheSettingsCacheModuleRequest) GetTieredCacheOk() (*CacheSettingsTieredCacheModuleRequest, bool)` + +GetTieredCacheOk returns a tuple with the TieredCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTieredCache + +`func (o *CacheSettingsCacheModuleRequest) SetTieredCache(v CacheSettingsTieredCacheModuleRequest)` + +SetTieredCache sets TieredCache field to given value. + +### HasTieredCache + +`func (o *CacheSettingsCacheModuleRequest) HasTieredCache() bool` + +HasTieredCache returns a boolean if a field has been set. + +### SetTieredCacheNil + +`func (o *CacheSettingsCacheModuleRequest) SetTieredCacheNil(b bool)` + + SetTieredCacheNil sets the value for TieredCache to be an explicit nil + +### UnsetTieredCache +`func (o *CacheSettingsCacheModuleRequest) UnsetTieredCache()` + +UnsetTieredCache ensures that no value is present for TieredCache, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsModules.md b/azion-api/docs/CacheSettingsModules.md new file mode 100644 index 0000000..b43117a --- /dev/null +++ b/azion-api/docs/CacheSettingsModules.md @@ -0,0 +1,82 @@ +# CacheSettingsModules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cache** | Pointer to [**CacheSettingsCacheModule**](CacheSettingsCacheModule.md) | | [optional] +**ApplicationAccelerator** | Pointer to [**CacheSettingsApplicationAcceleratorModule**](CacheSettingsApplicationAcceleratorModule.md) | | [optional] + +## Methods + +### NewCacheSettingsModules + +`func NewCacheSettingsModules() *CacheSettingsModules` + +NewCacheSettingsModules instantiates a new CacheSettingsModules object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsModulesWithDefaults + +`func NewCacheSettingsModulesWithDefaults() *CacheSettingsModules` + +NewCacheSettingsModulesWithDefaults instantiates a new CacheSettingsModules object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCache + +`func (o *CacheSettingsModules) GetCache() CacheSettingsCacheModule` + +GetCache returns the Cache field if non-nil, zero value otherwise. + +### GetCacheOk + +`func (o *CacheSettingsModules) GetCacheOk() (*CacheSettingsCacheModule, bool)` + +GetCacheOk returns a tuple with the Cache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache + +`func (o *CacheSettingsModules) SetCache(v CacheSettingsCacheModule)` + +SetCache sets Cache field to given value. + +### HasCache + +`func (o *CacheSettingsModules) HasCache() bool` + +HasCache returns a boolean if a field has been set. + +### GetApplicationAccelerator + +`func (o *CacheSettingsModules) GetApplicationAccelerator() CacheSettingsApplicationAcceleratorModule` + +GetApplicationAccelerator returns the ApplicationAccelerator field if non-nil, zero value otherwise. + +### GetApplicationAcceleratorOk + +`func (o *CacheSettingsModules) GetApplicationAcceleratorOk() (*CacheSettingsApplicationAcceleratorModule, bool)` + +GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationAccelerator + +`func (o *CacheSettingsModules) SetApplicationAccelerator(v CacheSettingsApplicationAcceleratorModule)` + +SetApplicationAccelerator sets ApplicationAccelerator field to given value. + +### HasApplicationAccelerator + +`func (o *CacheSettingsModules) HasApplicationAccelerator() bool` + +HasApplicationAccelerator returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsModulesRequest.md b/azion-api/docs/CacheSettingsModulesRequest.md new file mode 100644 index 0000000..e12320e --- /dev/null +++ b/azion-api/docs/CacheSettingsModulesRequest.md @@ -0,0 +1,82 @@ +# CacheSettingsModulesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cache** | Pointer to [**CacheSettingsCacheModuleRequest**](CacheSettingsCacheModuleRequest.md) | | [optional] +**ApplicationAccelerator** | Pointer to [**CacheSettingsApplicationAcceleratorModuleRequest**](CacheSettingsApplicationAcceleratorModuleRequest.md) | | [optional] + +## Methods + +### NewCacheSettingsModulesRequest + +`func NewCacheSettingsModulesRequest() *CacheSettingsModulesRequest` + +NewCacheSettingsModulesRequest instantiates a new CacheSettingsModulesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsModulesRequestWithDefaults + +`func NewCacheSettingsModulesRequestWithDefaults() *CacheSettingsModulesRequest` + +NewCacheSettingsModulesRequestWithDefaults instantiates a new CacheSettingsModulesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCache + +`func (o *CacheSettingsModulesRequest) GetCache() CacheSettingsCacheModuleRequest` + +GetCache returns the Cache field if non-nil, zero value otherwise. + +### GetCacheOk + +`func (o *CacheSettingsModulesRequest) GetCacheOk() (*CacheSettingsCacheModuleRequest, bool)` + +GetCacheOk returns a tuple with the Cache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCache + +`func (o *CacheSettingsModulesRequest) SetCache(v CacheSettingsCacheModuleRequest)` + +SetCache sets Cache field to given value. + +### HasCache + +`func (o *CacheSettingsModulesRequest) HasCache() bool` + +HasCache returns a boolean if a field has been set. + +### GetApplicationAccelerator + +`func (o *CacheSettingsModulesRequest) GetApplicationAccelerator() CacheSettingsApplicationAcceleratorModuleRequest` + +GetApplicationAccelerator returns the ApplicationAccelerator field if non-nil, zero value otherwise. + +### GetApplicationAcceleratorOk + +`func (o *CacheSettingsModulesRequest) GetApplicationAcceleratorOk() (*CacheSettingsApplicationAcceleratorModuleRequest, bool)` + +GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplicationAccelerator + +`func (o *CacheSettingsModulesRequest) SetApplicationAccelerator(v CacheSettingsApplicationAcceleratorModuleRequest)` + +SetApplicationAccelerator sets ApplicationAccelerator field to given value. + +### HasApplicationAccelerator + +`func (o *CacheSettingsModulesRequest) HasApplicationAccelerator() bool` + +HasApplicationAccelerator returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsTieredCacheModule.md b/azion-api/docs/CacheSettingsTieredCacheModule.md new file mode 100644 index 0000000..03b7192 --- /dev/null +++ b/azion-api/docs/CacheSettingsTieredCacheModule.md @@ -0,0 +1,82 @@ +# CacheSettingsTieredCacheModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Topology** | Pointer to **string** | * `nearest-region` - nearest-region * `br-east-1` - br-east-1 * `us-east-1` - us-east-1 | [optional] +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewCacheSettingsTieredCacheModule + +`func NewCacheSettingsTieredCacheModule() *CacheSettingsTieredCacheModule` + +NewCacheSettingsTieredCacheModule instantiates a new CacheSettingsTieredCacheModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsTieredCacheModuleWithDefaults + +`func NewCacheSettingsTieredCacheModuleWithDefaults() *CacheSettingsTieredCacheModule` + +NewCacheSettingsTieredCacheModuleWithDefaults instantiates a new CacheSettingsTieredCacheModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTopology + +`func (o *CacheSettingsTieredCacheModule) GetTopology() string` + +GetTopology returns the Topology field if non-nil, zero value otherwise. + +### GetTopologyOk + +`func (o *CacheSettingsTieredCacheModule) GetTopologyOk() (*string, bool)` + +GetTopologyOk returns a tuple with the Topology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopology + +`func (o *CacheSettingsTieredCacheModule) SetTopology(v string)` + +SetTopology sets Topology field to given value. + +### HasTopology + +`func (o *CacheSettingsTieredCacheModule) HasTopology() bool` + +HasTopology returns a boolean if a field has been set. + +### GetEnabled + +`func (o *CacheSettingsTieredCacheModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *CacheSettingsTieredCacheModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *CacheSettingsTieredCacheModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *CacheSettingsTieredCacheModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheSettingsTieredCacheModuleRequest.md b/azion-api/docs/CacheSettingsTieredCacheModuleRequest.md new file mode 100644 index 0000000..aaa0f6d --- /dev/null +++ b/azion-api/docs/CacheSettingsTieredCacheModuleRequest.md @@ -0,0 +1,82 @@ +# CacheSettingsTieredCacheModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Topology** | Pointer to **string** | * `nearest-region` - nearest-region * `br-east-1` - br-east-1 * `us-east-1` - us-east-1 | [optional] +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewCacheSettingsTieredCacheModuleRequest + +`func NewCacheSettingsTieredCacheModuleRequest() *CacheSettingsTieredCacheModuleRequest` + +NewCacheSettingsTieredCacheModuleRequest instantiates a new CacheSettingsTieredCacheModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheSettingsTieredCacheModuleRequestWithDefaults + +`func NewCacheSettingsTieredCacheModuleRequestWithDefaults() *CacheSettingsTieredCacheModuleRequest` + +NewCacheSettingsTieredCacheModuleRequestWithDefaults instantiates a new CacheSettingsTieredCacheModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTopology + +`func (o *CacheSettingsTieredCacheModuleRequest) GetTopology() string` + +GetTopology returns the Topology field if non-nil, zero value otherwise. + +### GetTopologyOk + +`func (o *CacheSettingsTieredCacheModuleRequest) GetTopologyOk() (*string, bool)` + +GetTopologyOk returns a tuple with the Topology field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopology + +`func (o *CacheSettingsTieredCacheModuleRequest) SetTopology(v string)` + +SetTopology sets Topology field to given value. + +### HasTopology + +`func (o *CacheSettingsTieredCacheModuleRequest) HasTopology() bool` + +HasTopology returns a boolean if a field has been set. + +### GetEnabled + +`func (o *CacheSettingsTieredCacheModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *CacheSettingsTieredCacheModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *CacheSettingsTieredCacheModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *CacheSettingsTieredCacheModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheVaryByCookiesModule.md b/azion-api/docs/CacheVaryByCookiesModule.md new file mode 100644 index 0000000..c85ce15 --- /dev/null +++ b/azion-api/docs/CacheVaryByCookiesModule.md @@ -0,0 +1,82 @@ +# CacheVaryByCookiesModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist | [optional] +**CookieNames** | Pointer to **[]string** | | [optional] + +## Methods + +### NewCacheVaryByCookiesModule + +`func NewCacheVaryByCookiesModule() *CacheVaryByCookiesModule` + +NewCacheVaryByCookiesModule instantiates a new CacheVaryByCookiesModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheVaryByCookiesModuleWithDefaults + +`func NewCacheVaryByCookiesModuleWithDefaults() *CacheVaryByCookiesModule` + +NewCacheVaryByCookiesModuleWithDefaults instantiates a new CacheVaryByCookiesModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheVaryByCookiesModule) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheVaryByCookiesModule) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheVaryByCookiesModule) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheVaryByCookiesModule) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetCookieNames + +`func (o *CacheVaryByCookiesModule) GetCookieNames() []string` + +GetCookieNames returns the CookieNames field if non-nil, zero value otherwise. + +### GetCookieNamesOk + +`func (o *CacheVaryByCookiesModule) GetCookieNamesOk() (*[]string, bool)` + +GetCookieNamesOk returns a tuple with the CookieNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCookieNames + +`func (o *CacheVaryByCookiesModule) SetCookieNames(v []string)` + +SetCookieNames sets CookieNames field to given value. + +### HasCookieNames + +`func (o *CacheVaryByCookiesModule) HasCookieNames() bool` + +HasCookieNames returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheVaryByCookiesModuleRequest.md b/azion-api/docs/CacheVaryByCookiesModuleRequest.md new file mode 100644 index 0000000..9fa8b2a --- /dev/null +++ b/azion-api/docs/CacheVaryByCookiesModuleRequest.md @@ -0,0 +1,82 @@ +# CacheVaryByCookiesModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist | [optional] +**CookieNames** | Pointer to **[]string** | | [optional] + +## Methods + +### NewCacheVaryByCookiesModuleRequest + +`func NewCacheVaryByCookiesModuleRequest() *CacheVaryByCookiesModuleRequest` + +NewCacheVaryByCookiesModuleRequest instantiates a new CacheVaryByCookiesModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheVaryByCookiesModuleRequestWithDefaults + +`func NewCacheVaryByCookiesModuleRequestWithDefaults() *CacheVaryByCookiesModuleRequest` + +NewCacheVaryByCookiesModuleRequestWithDefaults instantiates a new CacheVaryByCookiesModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheVaryByCookiesModuleRequest) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheVaryByCookiesModuleRequest) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheVaryByCookiesModuleRequest) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheVaryByCookiesModuleRequest) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetCookieNames + +`func (o *CacheVaryByCookiesModuleRequest) GetCookieNames() []string` + +GetCookieNames returns the CookieNames field if non-nil, zero value otherwise. + +### GetCookieNamesOk + +`func (o *CacheVaryByCookiesModuleRequest) GetCookieNamesOk() (*[]string, bool)` + +GetCookieNamesOk returns a tuple with the CookieNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCookieNames + +`func (o *CacheVaryByCookiesModuleRequest) SetCookieNames(v []string)` + +SetCookieNames sets CookieNames field to given value. + +### HasCookieNames + +`func (o *CacheVaryByCookiesModuleRequest) HasCookieNames() bool` + +HasCookieNames returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheVaryByDevicesModule.md b/azion-api/docs/CacheVaryByDevicesModule.md new file mode 100644 index 0000000..b7ccce4 --- /dev/null +++ b/azion-api/docs/CacheVaryByDevicesModule.md @@ -0,0 +1,82 @@ +# CacheVaryByDevicesModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `ignore` - ignore * `allowlist` - allowlist | [optional] +**DeviceGroup** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewCacheVaryByDevicesModule + +`func NewCacheVaryByDevicesModule() *CacheVaryByDevicesModule` + +NewCacheVaryByDevicesModule instantiates a new CacheVaryByDevicesModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheVaryByDevicesModuleWithDefaults + +`func NewCacheVaryByDevicesModuleWithDefaults() *CacheVaryByDevicesModule` + +NewCacheVaryByDevicesModuleWithDefaults instantiates a new CacheVaryByDevicesModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheVaryByDevicesModule) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheVaryByDevicesModule) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheVaryByDevicesModule) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheVaryByDevicesModule) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetDeviceGroup + +`func (o *CacheVaryByDevicesModule) GetDeviceGroup() []int64` + +GetDeviceGroup returns the DeviceGroup field if non-nil, zero value otherwise. + +### GetDeviceGroupOk + +`func (o *CacheVaryByDevicesModule) GetDeviceGroupOk() (*[]int64, bool)` + +GetDeviceGroupOk returns a tuple with the DeviceGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceGroup + +`func (o *CacheVaryByDevicesModule) SetDeviceGroup(v []int64)` + +SetDeviceGroup sets DeviceGroup field to given value. + +### HasDeviceGroup + +`func (o *CacheVaryByDevicesModule) HasDeviceGroup() bool` + +HasDeviceGroup returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheVaryByDevicesModuleRequest.md b/azion-api/docs/CacheVaryByDevicesModuleRequest.md new file mode 100644 index 0000000..d053bb2 --- /dev/null +++ b/azion-api/docs/CacheVaryByDevicesModuleRequest.md @@ -0,0 +1,82 @@ +# CacheVaryByDevicesModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `ignore` - ignore * `allowlist` - allowlist | [optional] +**DeviceGroup** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewCacheVaryByDevicesModuleRequest + +`func NewCacheVaryByDevicesModuleRequest() *CacheVaryByDevicesModuleRequest` + +NewCacheVaryByDevicesModuleRequest instantiates a new CacheVaryByDevicesModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheVaryByDevicesModuleRequestWithDefaults + +`func NewCacheVaryByDevicesModuleRequestWithDefaults() *CacheVaryByDevicesModuleRequest` + +NewCacheVaryByDevicesModuleRequestWithDefaults instantiates a new CacheVaryByDevicesModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheVaryByDevicesModuleRequest) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheVaryByDevicesModuleRequest) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheVaryByDevicesModuleRequest) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheVaryByDevicesModuleRequest) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetDeviceGroup + +`func (o *CacheVaryByDevicesModuleRequest) GetDeviceGroup() []int64` + +GetDeviceGroup returns the DeviceGroup field if non-nil, zero value otherwise. + +### GetDeviceGroupOk + +`func (o *CacheVaryByDevicesModuleRequest) GetDeviceGroupOk() (*[]int64, bool)` + +GetDeviceGroupOk returns a tuple with the DeviceGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeviceGroup + +`func (o *CacheVaryByDevicesModuleRequest) SetDeviceGroup(v []int64)` + +SetDeviceGroup sets DeviceGroup field to given value. + +### HasDeviceGroup + +`func (o *CacheVaryByDevicesModuleRequest) HasDeviceGroup() bool` + +HasDeviceGroup returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheVaryByQuerystringModule.md b/azion-api/docs/CacheVaryByQuerystringModule.md new file mode 100644 index 0000000..668ed85 --- /dev/null +++ b/azion-api/docs/CacheVaryByQuerystringModule.md @@ -0,0 +1,108 @@ +# CacheVaryByQuerystringModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist | [optional] +**Fields** | Pointer to **[]string** | | [optional] +**SortEnabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewCacheVaryByQuerystringModule + +`func NewCacheVaryByQuerystringModule() *CacheVaryByQuerystringModule` + +NewCacheVaryByQuerystringModule instantiates a new CacheVaryByQuerystringModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheVaryByQuerystringModuleWithDefaults + +`func NewCacheVaryByQuerystringModuleWithDefaults() *CacheVaryByQuerystringModule` + +NewCacheVaryByQuerystringModuleWithDefaults instantiates a new CacheVaryByQuerystringModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheVaryByQuerystringModule) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheVaryByQuerystringModule) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheVaryByQuerystringModule) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheVaryByQuerystringModule) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetFields + +`func (o *CacheVaryByQuerystringModule) GetFields() []string` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *CacheVaryByQuerystringModule) GetFieldsOk() (*[]string, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *CacheVaryByQuerystringModule) SetFields(v []string)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *CacheVaryByQuerystringModule) HasFields() bool` + +HasFields returns a boolean if a field has been set. + +### GetSortEnabled + +`func (o *CacheVaryByQuerystringModule) GetSortEnabled() bool` + +GetSortEnabled returns the SortEnabled field if non-nil, zero value otherwise. + +### GetSortEnabledOk + +`func (o *CacheVaryByQuerystringModule) GetSortEnabledOk() (*bool, bool)` + +GetSortEnabledOk returns a tuple with the SortEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSortEnabled + +`func (o *CacheVaryByQuerystringModule) SetSortEnabled(v bool)` + +SetSortEnabled sets SortEnabled field to given value. + +### HasSortEnabled + +`func (o *CacheVaryByQuerystringModule) HasSortEnabled() bool` + +HasSortEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CacheVaryByQuerystringModuleRequest.md b/azion-api/docs/CacheVaryByQuerystringModuleRequest.md new file mode 100644 index 0000000..9719f0a --- /dev/null +++ b/azion-api/docs/CacheVaryByQuerystringModuleRequest.md @@ -0,0 +1,108 @@ +# CacheVaryByQuerystringModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Behavior** | Pointer to **string** | * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist | [optional] +**Fields** | Pointer to **[]string** | | [optional] +**SortEnabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewCacheVaryByQuerystringModuleRequest + +`func NewCacheVaryByQuerystringModuleRequest() *CacheVaryByQuerystringModuleRequest` + +NewCacheVaryByQuerystringModuleRequest instantiates a new CacheVaryByQuerystringModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCacheVaryByQuerystringModuleRequestWithDefaults + +`func NewCacheVaryByQuerystringModuleRequestWithDefaults() *CacheVaryByQuerystringModuleRequest` + +NewCacheVaryByQuerystringModuleRequestWithDefaults instantiates a new CacheVaryByQuerystringModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBehavior + +`func (o *CacheVaryByQuerystringModuleRequest) GetBehavior() string` + +GetBehavior returns the Behavior field if non-nil, zero value otherwise. + +### GetBehaviorOk + +`func (o *CacheVaryByQuerystringModuleRequest) GetBehaviorOk() (*string, bool)` + +GetBehaviorOk returns a tuple with the Behavior field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehavior + +`func (o *CacheVaryByQuerystringModuleRequest) SetBehavior(v string)` + +SetBehavior sets Behavior field to given value. + +### HasBehavior + +`func (o *CacheVaryByQuerystringModuleRequest) HasBehavior() bool` + +HasBehavior returns a boolean if a field has been set. + +### GetFields + +`func (o *CacheVaryByQuerystringModuleRequest) GetFields() []string` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *CacheVaryByQuerystringModuleRequest) GetFieldsOk() (*[]string, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *CacheVaryByQuerystringModuleRequest) SetFields(v []string)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *CacheVaryByQuerystringModuleRequest) HasFields() bool` + +HasFields returns a boolean if a field has been set. + +### GetSortEnabled + +`func (o *CacheVaryByQuerystringModuleRequest) GetSortEnabled() bool` + +GetSortEnabled returns the SortEnabled field if non-nil, zero value otherwise. + +### GetSortEnabledOk + +`func (o *CacheVaryByQuerystringModuleRequest) GetSortEnabledOk() (*bool, bool)` + +GetSortEnabledOk returns a tuple with the SortEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSortEnabled + +`func (o *CacheVaryByQuerystringModuleRequest) SetSortEnabled(v bool)` + +SetSortEnabled sets SortEnabled field to given value. + +### HasSortEnabled + +`func (o *CacheVaryByQuerystringModuleRequest) HasSortEnabled() bool` + +HasSortEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Certificate.md b/azion-api/docs/Certificate.md new file mode 100644 index 0000000..e94cc68 --- /dev/null +++ b/azion-api/docs/Certificate.md @@ -0,0 +1,530 @@ +# Certificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Certificate** | Pointer to **NullableString** | | [optional] +**PrivateKey** | Pointer to **NullableString** | | [optional] +**Issuer** | **NullableString** | | +**SubjectName** | **[]string** | | +**Validity** | **NullableString** | | +**Type** | Pointer to **string** | The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate | [optional] +**Managed** | **bool** | | +**Status** | **string** | * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed | +**StatusDetail** | **string** | | +**Csr** | **NullableString** | | +**Challenge** | **string** | * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. | +**Authority** | **string** | * `lets_encrypt` - lets_encrypt | +**KeyAlgorithm** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | Timestamp of the last modification made to the certificate content on the platform. | +**RenewedAt** | **NullableTime** | Timestamp indicating when the managed certificate was renewed on our platform. | + +## Methods + +### NewCertificate + +`func NewCertificate(id int64, name string, issuer NullableString, subjectName []string, validity NullableString, managed bool, status string, statusDetail string, csr NullableString, challenge string, authority string, keyAlgorithm string, productVersion string, lastEditor string, lastModified time.Time, renewedAt NullableTime, ) *Certificate` + +NewCertificate instantiates a new Certificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateWithDefaults + +`func NewCertificateWithDefaults() *Certificate` + +NewCertificateWithDefaults instantiates a new Certificate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Certificate) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Certificate) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Certificate) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Certificate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Certificate) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Certificate) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCertificate + +`func (o *Certificate) GetCertificate() string` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *Certificate) GetCertificateOk() (*string, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *Certificate) SetCertificate(v string)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *Certificate) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *Certificate) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *Certificate) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetPrivateKey + +`func (o *Certificate) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *Certificate) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *Certificate) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *Certificate) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### SetPrivateKeyNil + +`func (o *Certificate) SetPrivateKeyNil(b bool)` + + SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil + +### UnsetPrivateKey +`func (o *Certificate) UnsetPrivateKey()` + +UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +### GetIssuer + +`func (o *Certificate) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *Certificate) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *Certificate) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + + +### SetIssuerNil + +`func (o *Certificate) SetIssuerNil(b bool)` + + SetIssuerNil sets the value for Issuer to be an explicit nil + +### UnsetIssuer +`func (o *Certificate) UnsetIssuer()` + +UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +### GetSubjectName + +`func (o *Certificate) GetSubjectName() []string` + +GetSubjectName returns the SubjectName field if non-nil, zero value otherwise. + +### GetSubjectNameOk + +`func (o *Certificate) GetSubjectNameOk() (*[]string, bool)` + +GetSubjectNameOk returns a tuple with the SubjectName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubjectName + +`func (o *Certificate) SetSubjectName(v []string)` + +SetSubjectName sets SubjectName field to given value. + + +### GetValidity + +`func (o *Certificate) GetValidity() string` + +GetValidity returns the Validity field if non-nil, zero value otherwise. + +### GetValidityOk + +`func (o *Certificate) GetValidityOk() (*string, bool)` + +GetValidityOk returns a tuple with the Validity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidity + +`func (o *Certificate) SetValidity(v string)` + +SetValidity sets Validity field to given value. + + +### SetValidityNil + +`func (o *Certificate) SetValidityNil(b bool)` + + SetValidityNil sets the value for Validity to be an explicit nil + +### UnsetValidity +`func (o *Certificate) UnsetValidity()` + +UnsetValidity ensures that no value is present for Validity, not even an explicit nil +### GetType + +`func (o *Certificate) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Certificate) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Certificate) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Certificate) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetManaged + +`func (o *Certificate) GetManaged() bool` + +GetManaged returns the Managed field if non-nil, zero value otherwise. + +### GetManagedOk + +`func (o *Certificate) GetManagedOk() (*bool, bool)` + +GetManagedOk returns a tuple with the Managed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManaged + +`func (o *Certificate) SetManaged(v bool)` + +SetManaged sets Managed field to given value. + + +### GetStatus + +`func (o *Certificate) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Certificate) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Certificate) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetStatusDetail + +`func (o *Certificate) GetStatusDetail() string` + +GetStatusDetail returns the StatusDetail field if non-nil, zero value otherwise. + +### GetStatusDetailOk + +`func (o *Certificate) GetStatusDetailOk() (*string, bool)` + +GetStatusDetailOk returns a tuple with the StatusDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusDetail + +`func (o *Certificate) SetStatusDetail(v string)` + +SetStatusDetail sets StatusDetail field to given value. + + +### GetCsr + +`func (o *Certificate) GetCsr() string` + +GetCsr returns the Csr field if non-nil, zero value otherwise. + +### GetCsrOk + +`func (o *Certificate) GetCsrOk() (*string, bool)` + +GetCsrOk returns a tuple with the Csr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCsr + +`func (o *Certificate) SetCsr(v string)` + +SetCsr sets Csr field to given value. + + +### SetCsrNil + +`func (o *Certificate) SetCsrNil(b bool)` + + SetCsrNil sets the value for Csr to be an explicit nil + +### UnsetCsr +`func (o *Certificate) UnsetCsr()` + +UnsetCsr ensures that no value is present for Csr, not even an explicit nil +### GetChallenge + +`func (o *Certificate) GetChallenge() string` + +GetChallenge returns the Challenge field if non-nil, zero value otherwise. + +### GetChallengeOk + +`func (o *Certificate) GetChallengeOk() (*string, bool)` + +GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChallenge + +`func (o *Certificate) SetChallenge(v string)` + +SetChallenge sets Challenge field to given value. + + +### GetAuthority + +`func (o *Certificate) GetAuthority() string` + +GetAuthority returns the Authority field if non-nil, zero value otherwise. + +### GetAuthorityOk + +`func (o *Certificate) GetAuthorityOk() (*string, bool)` + +GetAuthorityOk returns a tuple with the Authority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthority + +`func (o *Certificate) SetAuthority(v string)` + +SetAuthority sets Authority field to given value. + + +### GetKeyAlgorithm + +`func (o *Certificate) GetKeyAlgorithm() string` + +GetKeyAlgorithm returns the KeyAlgorithm field if non-nil, zero value otherwise. + +### GetKeyAlgorithmOk + +`func (o *Certificate) GetKeyAlgorithmOk() (*string, bool)` + +GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyAlgorithm + +`func (o *Certificate) SetKeyAlgorithm(v string)` + +SetKeyAlgorithm sets KeyAlgorithm field to given value. + + +### GetActive + +`func (o *Certificate) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Certificate) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Certificate) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Certificate) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *Certificate) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Certificate) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Certificate) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetLastEditor + +`func (o *Certificate) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Certificate) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Certificate) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Certificate) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Certificate) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Certificate) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetRenewedAt + +`func (o *Certificate) GetRenewedAt() time.Time` + +GetRenewedAt returns the RenewedAt field if non-nil, zero value otherwise. + +### GetRenewedAtOk + +`func (o *Certificate) GetRenewedAtOk() (*time.Time, bool)` + +GetRenewedAtOk returns a tuple with the RenewedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRenewedAt + +`func (o *Certificate) SetRenewedAt(v time.Time)` + +SetRenewedAt sets RenewedAt field to given value. + + +### SetRenewedAtNil + +`func (o *Certificate) SetRenewedAtNil(b bool)` + + SetRenewedAtNil sets the value for RenewedAt to be an explicit nil + +### UnsetRenewedAt +`func (o *Certificate) UnsetRenewedAt()` + +UnsetRenewedAt ensures that no value is present for RenewedAt, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CertificateRequest.md b/azion-api/docs/CertificateRequest.md new file mode 100644 index 0000000..ab30f4b --- /dev/null +++ b/azion-api/docs/CertificateRequest.md @@ -0,0 +1,618 @@ +# CertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Certificate** | Pointer to **NullableString** | | [optional] +**PrivateKey** | Pointer to **NullableString** | | [optional] +**Issuer** | **NullableString** | | +**SubjectName** | **[]string** | | +**Validity** | **NullableString** | | +**Type** | Pointer to **string** | The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate | [optional] +**Managed** | **bool** | | +**Status** | **string** | * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed | +**StatusDetail** | **string** | | +**Csr** | **NullableString** | | +**Challenge** | **string** | * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. | +**Authority** | **string** | * `lets_encrypt` - lets_encrypt | +**KeyAlgorithm** | Pointer to **string** | * `rsa_2048` - 2048-bit RSA * `rsa_4096` - 4096-bit RSA * `ecc_384` - 384-bit Prime Field Curve | [optional] +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | Timestamp of the last modification made to the certificate content on the platform. | +**RenewedAt** | **NullableTime** | Timestamp indicating when the managed certificate was renewed on our platform. | +**CommonName** | **string** | | +**AlternativeNames** | Pointer to **[]string** | | [optional] +**SourceCertificate** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewCertificateRequest + +`func NewCertificateRequest(id int64, name string, issuer NullableString, subjectName []string, validity NullableString, managed bool, status string, statusDetail string, csr NullableString, challenge string, authority string, productVersion string, lastEditor string, lastModified time.Time, renewedAt NullableTime, commonName string, ) *CertificateRequest` + +NewCertificateRequest instantiates a new CertificateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateRequestWithDefaults + +`func NewCertificateRequestWithDefaults() *CertificateRequest` + +NewCertificateRequestWithDefaults instantiates a new CertificateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CertificateRequest) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CertificateRequest) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CertificateRequest) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *CertificateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CertificateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CertificateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCertificate + +`func (o *CertificateRequest) GetCertificate() string` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *CertificateRequest) GetCertificateOk() (*string, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *CertificateRequest) SetCertificate(v string)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *CertificateRequest) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *CertificateRequest) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *CertificateRequest) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetPrivateKey + +`func (o *CertificateRequest) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *CertificateRequest) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *CertificateRequest) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *CertificateRequest) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### SetPrivateKeyNil + +`func (o *CertificateRequest) SetPrivateKeyNil(b bool)` + + SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil + +### UnsetPrivateKey +`func (o *CertificateRequest) UnsetPrivateKey()` + +UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +### GetIssuer + +`func (o *CertificateRequest) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *CertificateRequest) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *CertificateRequest) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + + +### SetIssuerNil + +`func (o *CertificateRequest) SetIssuerNil(b bool)` + + SetIssuerNil sets the value for Issuer to be an explicit nil + +### UnsetIssuer +`func (o *CertificateRequest) UnsetIssuer()` + +UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +### GetSubjectName + +`func (o *CertificateRequest) GetSubjectName() []string` + +GetSubjectName returns the SubjectName field if non-nil, zero value otherwise. + +### GetSubjectNameOk + +`func (o *CertificateRequest) GetSubjectNameOk() (*[]string, bool)` + +GetSubjectNameOk returns a tuple with the SubjectName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubjectName + +`func (o *CertificateRequest) SetSubjectName(v []string)` + +SetSubjectName sets SubjectName field to given value. + + +### GetValidity + +`func (o *CertificateRequest) GetValidity() string` + +GetValidity returns the Validity field if non-nil, zero value otherwise. + +### GetValidityOk + +`func (o *CertificateRequest) GetValidityOk() (*string, bool)` + +GetValidityOk returns a tuple with the Validity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidity + +`func (o *CertificateRequest) SetValidity(v string)` + +SetValidity sets Validity field to given value. + + +### SetValidityNil + +`func (o *CertificateRequest) SetValidityNil(b bool)` + + SetValidityNil sets the value for Validity to be an explicit nil + +### UnsetValidity +`func (o *CertificateRequest) UnsetValidity()` + +UnsetValidity ensures that no value is present for Validity, not even an explicit nil +### GetType + +`func (o *CertificateRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CertificateRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CertificateRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CertificateRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetManaged + +`func (o *CertificateRequest) GetManaged() bool` + +GetManaged returns the Managed field if non-nil, zero value otherwise. + +### GetManagedOk + +`func (o *CertificateRequest) GetManagedOk() (*bool, bool)` + +GetManagedOk returns a tuple with the Managed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManaged + +`func (o *CertificateRequest) SetManaged(v bool)` + +SetManaged sets Managed field to given value. + + +### GetStatus + +`func (o *CertificateRequest) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CertificateRequest) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CertificateRequest) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetStatusDetail + +`func (o *CertificateRequest) GetStatusDetail() string` + +GetStatusDetail returns the StatusDetail field if non-nil, zero value otherwise. + +### GetStatusDetailOk + +`func (o *CertificateRequest) GetStatusDetailOk() (*string, bool)` + +GetStatusDetailOk returns a tuple with the StatusDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusDetail + +`func (o *CertificateRequest) SetStatusDetail(v string)` + +SetStatusDetail sets StatusDetail field to given value. + + +### GetCsr + +`func (o *CertificateRequest) GetCsr() string` + +GetCsr returns the Csr field if non-nil, zero value otherwise. + +### GetCsrOk + +`func (o *CertificateRequest) GetCsrOk() (*string, bool)` + +GetCsrOk returns a tuple with the Csr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCsr + +`func (o *CertificateRequest) SetCsr(v string)` + +SetCsr sets Csr field to given value. + + +### SetCsrNil + +`func (o *CertificateRequest) SetCsrNil(b bool)` + + SetCsrNil sets the value for Csr to be an explicit nil + +### UnsetCsr +`func (o *CertificateRequest) UnsetCsr()` + +UnsetCsr ensures that no value is present for Csr, not even an explicit nil +### GetChallenge + +`func (o *CertificateRequest) GetChallenge() string` + +GetChallenge returns the Challenge field if non-nil, zero value otherwise. + +### GetChallengeOk + +`func (o *CertificateRequest) GetChallengeOk() (*string, bool)` + +GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChallenge + +`func (o *CertificateRequest) SetChallenge(v string)` + +SetChallenge sets Challenge field to given value. + + +### GetAuthority + +`func (o *CertificateRequest) GetAuthority() string` + +GetAuthority returns the Authority field if non-nil, zero value otherwise. + +### GetAuthorityOk + +`func (o *CertificateRequest) GetAuthorityOk() (*string, bool)` + +GetAuthorityOk returns a tuple with the Authority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthority + +`func (o *CertificateRequest) SetAuthority(v string)` + +SetAuthority sets Authority field to given value. + + +### GetKeyAlgorithm + +`func (o *CertificateRequest) GetKeyAlgorithm() string` + +GetKeyAlgorithm returns the KeyAlgorithm field if non-nil, zero value otherwise. + +### GetKeyAlgorithmOk + +`func (o *CertificateRequest) GetKeyAlgorithmOk() (*string, bool)` + +GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyAlgorithm + +`func (o *CertificateRequest) SetKeyAlgorithm(v string)` + +SetKeyAlgorithm sets KeyAlgorithm field to given value. + +### HasKeyAlgorithm + +`func (o *CertificateRequest) HasKeyAlgorithm() bool` + +HasKeyAlgorithm returns a boolean if a field has been set. + +### GetActive + +`func (o *CertificateRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *CertificateRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *CertificateRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *CertificateRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *CertificateRequest) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *CertificateRequest) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *CertificateRequest) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetLastEditor + +`func (o *CertificateRequest) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *CertificateRequest) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *CertificateRequest) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *CertificateRequest) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *CertificateRequest) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *CertificateRequest) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetRenewedAt + +`func (o *CertificateRequest) GetRenewedAt() time.Time` + +GetRenewedAt returns the RenewedAt field if non-nil, zero value otherwise. + +### GetRenewedAtOk + +`func (o *CertificateRequest) GetRenewedAtOk() (*time.Time, bool)` + +GetRenewedAtOk returns a tuple with the RenewedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRenewedAt + +`func (o *CertificateRequest) SetRenewedAt(v time.Time)` + +SetRenewedAt sets RenewedAt field to given value. + + +### SetRenewedAtNil + +`func (o *CertificateRequest) SetRenewedAtNil(b bool)` + + SetRenewedAtNil sets the value for RenewedAt to be an explicit nil + +### UnsetRenewedAt +`func (o *CertificateRequest) UnsetRenewedAt()` + +UnsetRenewedAt ensures that no value is present for RenewedAt, not even an explicit nil +### GetCommonName + +`func (o *CertificateRequest) GetCommonName() string` + +GetCommonName returns the CommonName field if non-nil, zero value otherwise. + +### GetCommonNameOk + +`func (o *CertificateRequest) GetCommonNameOk() (*string, bool)` + +GetCommonNameOk returns a tuple with the CommonName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommonName + +`func (o *CertificateRequest) SetCommonName(v string)` + +SetCommonName sets CommonName field to given value. + + +### GetAlternativeNames + +`func (o *CertificateRequest) GetAlternativeNames() []string` + +GetAlternativeNames returns the AlternativeNames field if non-nil, zero value otherwise. + +### GetAlternativeNamesOk + +`func (o *CertificateRequest) GetAlternativeNamesOk() (*[]string, bool)` + +GetAlternativeNamesOk returns a tuple with the AlternativeNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlternativeNames + +`func (o *CertificateRequest) SetAlternativeNames(v []string)` + +SetAlternativeNames sets AlternativeNames field to given value. + +### HasAlternativeNames + +`func (o *CertificateRequest) HasAlternativeNames() bool` + +HasAlternativeNames returns a boolean if a field has been set. + +### GetSourceCertificate + +`func (o *CertificateRequest) GetSourceCertificate() int64` + +GetSourceCertificate returns the SourceCertificate field if non-nil, zero value otherwise. + +### GetSourceCertificateOk + +`func (o *CertificateRequest) GetSourceCertificateOk() (*int64, bool)` + +GetSourceCertificateOk returns a tuple with the SourceCertificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceCertificate + +`func (o *CertificateRequest) SetSourceCertificate(v int64)` + +SetSourceCertificate sets SourceCertificate field to given value. + +### HasSourceCertificate + +`func (o *CertificateRequest) HasSourceCertificate() bool` + +HasSourceCertificate returns a boolean if a field has been set. + +### SetSourceCertificateNil + +`func (o *CertificateRequest) SetSourceCertificateNil(b bool)` + + SetSourceCertificateNil sets the value for SourceCertificate to be an explicit nil + +### UnsetSourceCertificate +`func (o *CertificateRequest) UnsetSourceCertificate()` + +UnsetSourceCertificate ensures that no value is present for SourceCertificate, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CertificateResponse.md b/azion-api/docs/CertificateResponse.md new file mode 100644 index 0000000..ff1e789 --- /dev/null +++ b/azion-api/docs/CertificateResponse.md @@ -0,0 +1,77 @@ +# CertificateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Certificate**](Certificate.md) | | + +## Methods + +### NewCertificateResponse + +`func NewCertificateResponse(data Certificate, ) *CertificateResponse` + +NewCertificateResponse instantiates a new CertificateResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateResponseWithDefaults + +`func NewCertificateResponseWithDefaults() *CertificateResponse` + +NewCertificateResponseWithDefaults instantiates a new CertificateResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *CertificateResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *CertificateResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *CertificateResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *CertificateResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *CertificateResponse) GetData() Certificate` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CertificateResponse) GetDataOk() (*Certificate, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CertificateResponse) SetData(v Certificate)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CertificateRevocationList.md b/azion-api/docs/CertificateRevocationList.md new file mode 100644 index 0000000..bf59668 --- /dev/null +++ b/azion-api/docs/CertificateRevocationList.md @@ -0,0 +1,245 @@ +# CertificateRevocationList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | Pointer to **bool** | Indicates if the certificate revocation list is active. This field cannot be set to false. | [optional] +**LastEditor** | **string** | | +**LastModified** | **time.Time** | Timestamp of the last modification made to the certificate content on the platform. | +**ProductVersion** | **string** | | +**Issuer** | **string** | | +**LastUpdate** | **time.Time** | Timestamp of the last update issued by the certification revocation list issuer. | +**NextUpdate** | **time.Time** | Timestamp of the next scheduled update from the certification revocation list issuer. | +**Crl** | **string** | | + +## Methods + +### NewCertificateRevocationList + +`func NewCertificateRevocationList(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, issuer string, lastUpdate time.Time, nextUpdate time.Time, crl string, ) *CertificateRevocationList` + +NewCertificateRevocationList instantiates a new CertificateRevocationList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateRevocationListWithDefaults + +`func NewCertificateRevocationListWithDefaults() *CertificateRevocationList` + +NewCertificateRevocationListWithDefaults instantiates a new CertificateRevocationList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CertificateRevocationList) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CertificateRevocationList) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CertificateRevocationList) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *CertificateRevocationList) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CertificateRevocationList) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CertificateRevocationList) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *CertificateRevocationList) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *CertificateRevocationList) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *CertificateRevocationList) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *CertificateRevocationList) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *CertificateRevocationList) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *CertificateRevocationList) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *CertificateRevocationList) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *CertificateRevocationList) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *CertificateRevocationList) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *CertificateRevocationList) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *CertificateRevocationList) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *CertificateRevocationList) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *CertificateRevocationList) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetIssuer + +`func (o *CertificateRevocationList) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *CertificateRevocationList) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *CertificateRevocationList) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + + +### GetLastUpdate + +`func (o *CertificateRevocationList) GetLastUpdate() time.Time` + +GetLastUpdate returns the LastUpdate field if non-nil, zero value otherwise. + +### GetLastUpdateOk + +`func (o *CertificateRevocationList) GetLastUpdateOk() (*time.Time, bool)` + +GetLastUpdateOk returns a tuple with the LastUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdate + +`func (o *CertificateRevocationList) SetLastUpdate(v time.Time)` + +SetLastUpdate sets LastUpdate field to given value. + + +### GetNextUpdate + +`func (o *CertificateRevocationList) GetNextUpdate() time.Time` + +GetNextUpdate returns the NextUpdate field if non-nil, zero value otherwise. + +### GetNextUpdateOk + +`func (o *CertificateRevocationList) GetNextUpdateOk() (*time.Time, bool)` + +GetNextUpdateOk returns a tuple with the NextUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextUpdate + +`func (o *CertificateRevocationList) SetNextUpdate(v time.Time)` + +SetNextUpdate sets NextUpdate field to given value. + + +### GetCrl + +`func (o *CertificateRevocationList) GetCrl() string` + +GetCrl returns the Crl field if non-nil, zero value otherwise. + +### GetCrlOk + +`func (o *CertificateRevocationList) GetCrlOk() (*string, bool)` + +GetCrlOk returns a tuple with the Crl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrl + +`func (o *CertificateRevocationList) SetCrl(v string)` + +SetCrl sets Crl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CertificateRevocationListResponse.md b/azion-api/docs/CertificateRevocationListResponse.md new file mode 100644 index 0000000..d7b46db --- /dev/null +++ b/azion-api/docs/CertificateRevocationListResponse.md @@ -0,0 +1,77 @@ +# CertificateRevocationListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**CertificateRevocationList**](CertificateRevocationList.md) | | + +## Methods + +### NewCertificateRevocationListResponse + +`func NewCertificateRevocationListResponse(data CertificateRevocationList, ) *CertificateRevocationListResponse` + +NewCertificateRevocationListResponse instantiates a new CertificateRevocationListResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateRevocationListResponseWithDefaults + +`func NewCertificateRevocationListResponseWithDefaults() *CertificateRevocationListResponse` + +NewCertificateRevocationListResponseWithDefaults instantiates a new CertificateRevocationListResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *CertificateRevocationListResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *CertificateRevocationListResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *CertificateRevocationListResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *CertificateRevocationListResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *CertificateRevocationListResponse) GetData() CertificateRevocationList` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CertificateRevocationListResponse) GetDataOk() (*CertificateRevocationList, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CertificateRevocationListResponse) SetData(v CertificateRevocationList)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CertificateSigningRequest.md b/azion-api/docs/CertificateSigningRequest.md new file mode 100644 index 0000000..bdc28fd --- /dev/null +++ b/azion-api/docs/CertificateSigningRequest.md @@ -0,0 +1,708 @@ +# CertificateSigningRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Certificate** | Pointer to **NullableString** | | [optional] +**PrivateKey** | Pointer to **NullableString** | | [optional] +**Issuer** | **NullableString** | | +**SubjectName** | **[]string** | | +**Validity** | **NullableString** | | +**Type** | Pointer to **string** | The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate | [optional] +**Managed** | **bool** | | +**Status** | **string** | * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed | +**StatusDetail** | **string** | | +**Csr** | **NullableString** | | +**Challenge** | **string** | * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. | +**Authority** | **string** | * `lets_encrypt` - lets_encrypt | +**KeyAlgorithm** | Pointer to **string** | * `rsa_2048` - 2048-bit RSA * `rsa_4096` - 4096-bit RSA * `ecc_384` - 384-bit Prime Field Curve | [optional] +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | Timestamp of the last modification made to the certificate content on the platform. | +**RenewedAt** | **NullableTime** | Timestamp indicating when the managed certificate was renewed on our platform. | +**CommonName** | **string** | | +**AlternativeNames** | Pointer to **[]string** | | [optional] +**Country** | **string** | | +**State** | **string** | | +**Locality** | **string** | | +**Organization** | **string** | | +**OrganizationUnity** | **string** | | +**Email** | **string** | | + +## Methods + +### NewCertificateSigningRequest + +`func NewCertificateSigningRequest(id int64, name string, issuer NullableString, subjectName []string, validity NullableString, managed bool, status string, statusDetail string, csr NullableString, challenge string, authority string, productVersion string, lastEditor string, lastModified time.Time, renewedAt NullableTime, commonName string, country string, state string, locality string, organization string, organizationUnity string, email string, ) *CertificateSigningRequest` + +NewCertificateSigningRequest instantiates a new CertificateSigningRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCertificateSigningRequestWithDefaults + +`func NewCertificateSigningRequestWithDefaults() *CertificateSigningRequest` + +NewCertificateSigningRequestWithDefaults instantiates a new CertificateSigningRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CertificateSigningRequest) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CertificateSigningRequest) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CertificateSigningRequest) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *CertificateSigningRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CertificateSigningRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CertificateSigningRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCertificate + +`func (o *CertificateSigningRequest) GetCertificate() string` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *CertificateSigningRequest) GetCertificateOk() (*string, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *CertificateSigningRequest) SetCertificate(v string)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *CertificateSigningRequest) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *CertificateSigningRequest) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *CertificateSigningRequest) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetPrivateKey + +`func (o *CertificateSigningRequest) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *CertificateSigningRequest) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *CertificateSigningRequest) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *CertificateSigningRequest) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### SetPrivateKeyNil + +`func (o *CertificateSigningRequest) SetPrivateKeyNil(b bool)` + + SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil + +### UnsetPrivateKey +`func (o *CertificateSigningRequest) UnsetPrivateKey()` + +UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +### GetIssuer + +`func (o *CertificateSigningRequest) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *CertificateSigningRequest) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *CertificateSigningRequest) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + + +### SetIssuerNil + +`func (o *CertificateSigningRequest) SetIssuerNil(b bool)` + + SetIssuerNil sets the value for Issuer to be an explicit nil + +### UnsetIssuer +`func (o *CertificateSigningRequest) UnsetIssuer()` + +UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +### GetSubjectName + +`func (o *CertificateSigningRequest) GetSubjectName() []string` + +GetSubjectName returns the SubjectName field if non-nil, zero value otherwise. + +### GetSubjectNameOk + +`func (o *CertificateSigningRequest) GetSubjectNameOk() (*[]string, bool)` + +GetSubjectNameOk returns a tuple with the SubjectName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubjectName + +`func (o *CertificateSigningRequest) SetSubjectName(v []string)` + +SetSubjectName sets SubjectName field to given value. + + +### GetValidity + +`func (o *CertificateSigningRequest) GetValidity() string` + +GetValidity returns the Validity field if non-nil, zero value otherwise. + +### GetValidityOk + +`func (o *CertificateSigningRequest) GetValidityOk() (*string, bool)` + +GetValidityOk returns a tuple with the Validity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidity + +`func (o *CertificateSigningRequest) SetValidity(v string)` + +SetValidity sets Validity field to given value. + + +### SetValidityNil + +`func (o *CertificateSigningRequest) SetValidityNil(b bool)` + + SetValidityNil sets the value for Validity to be an explicit nil + +### UnsetValidity +`func (o *CertificateSigningRequest) UnsetValidity()` + +UnsetValidity ensures that no value is present for Validity, not even an explicit nil +### GetType + +`func (o *CertificateSigningRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CertificateSigningRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CertificateSigningRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *CertificateSigningRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetManaged + +`func (o *CertificateSigningRequest) GetManaged() bool` + +GetManaged returns the Managed field if non-nil, zero value otherwise. + +### GetManagedOk + +`func (o *CertificateSigningRequest) GetManagedOk() (*bool, bool)` + +GetManagedOk returns a tuple with the Managed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManaged + +`func (o *CertificateSigningRequest) SetManaged(v bool)` + +SetManaged sets Managed field to given value. + + +### GetStatus + +`func (o *CertificateSigningRequest) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *CertificateSigningRequest) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *CertificateSigningRequest) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetStatusDetail + +`func (o *CertificateSigningRequest) GetStatusDetail() string` + +GetStatusDetail returns the StatusDetail field if non-nil, zero value otherwise. + +### GetStatusDetailOk + +`func (o *CertificateSigningRequest) GetStatusDetailOk() (*string, bool)` + +GetStatusDetailOk returns a tuple with the StatusDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusDetail + +`func (o *CertificateSigningRequest) SetStatusDetail(v string)` + +SetStatusDetail sets StatusDetail field to given value. + + +### GetCsr + +`func (o *CertificateSigningRequest) GetCsr() string` + +GetCsr returns the Csr field if non-nil, zero value otherwise. + +### GetCsrOk + +`func (o *CertificateSigningRequest) GetCsrOk() (*string, bool)` + +GetCsrOk returns a tuple with the Csr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCsr + +`func (o *CertificateSigningRequest) SetCsr(v string)` + +SetCsr sets Csr field to given value. + + +### SetCsrNil + +`func (o *CertificateSigningRequest) SetCsrNil(b bool)` + + SetCsrNil sets the value for Csr to be an explicit nil + +### UnsetCsr +`func (o *CertificateSigningRequest) UnsetCsr()` + +UnsetCsr ensures that no value is present for Csr, not even an explicit nil +### GetChallenge + +`func (o *CertificateSigningRequest) GetChallenge() string` + +GetChallenge returns the Challenge field if non-nil, zero value otherwise. + +### GetChallengeOk + +`func (o *CertificateSigningRequest) GetChallengeOk() (*string, bool)` + +GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChallenge + +`func (o *CertificateSigningRequest) SetChallenge(v string)` + +SetChallenge sets Challenge field to given value. + + +### GetAuthority + +`func (o *CertificateSigningRequest) GetAuthority() string` + +GetAuthority returns the Authority field if non-nil, zero value otherwise. + +### GetAuthorityOk + +`func (o *CertificateSigningRequest) GetAuthorityOk() (*string, bool)` + +GetAuthorityOk returns a tuple with the Authority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthority + +`func (o *CertificateSigningRequest) SetAuthority(v string)` + +SetAuthority sets Authority field to given value. + + +### GetKeyAlgorithm + +`func (o *CertificateSigningRequest) GetKeyAlgorithm() string` + +GetKeyAlgorithm returns the KeyAlgorithm field if non-nil, zero value otherwise. + +### GetKeyAlgorithmOk + +`func (o *CertificateSigningRequest) GetKeyAlgorithmOk() (*string, bool)` + +GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyAlgorithm + +`func (o *CertificateSigningRequest) SetKeyAlgorithm(v string)` + +SetKeyAlgorithm sets KeyAlgorithm field to given value. + +### HasKeyAlgorithm + +`func (o *CertificateSigningRequest) HasKeyAlgorithm() bool` + +HasKeyAlgorithm returns a boolean if a field has been set. + +### GetActive + +`func (o *CertificateSigningRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *CertificateSigningRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *CertificateSigningRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *CertificateSigningRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *CertificateSigningRequest) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *CertificateSigningRequest) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *CertificateSigningRequest) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetLastEditor + +`func (o *CertificateSigningRequest) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *CertificateSigningRequest) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *CertificateSigningRequest) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *CertificateSigningRequest) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *CertificateSigningRequest) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *CertificateSigningRequest) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetRenewedAt + +`func (o *CertificateSigningRequest) GetRenewedAt() time.Time` + +GetRenewedAt returns the RenewedAt field if non-nil, zero value otherwise. + +### GetRenewedAtOk + +`func (o *CertificateSigningRequest) GetRenewedAtOk() (*time.Time, bool)` + +GetRenewedAtOk returns a tuple with the RenewedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRenewedAt + +`func (o *CertificateSigningRequest) SetRenewedAt(v time.Time)` + +SetRenewedAt sets RenewedAt field to given value. + + +### SetRenewedAtNil + +`func (o *CertificateSigningRequest) SetRenewedAtNil(b bool)` + + SetRenewedAtNil sets the value for RenewedAt to be an explicit nil + +### UnsetRenewedAt +`func (o *CertificateSigningRequest) UnsetRenewedAt()` + +UnsetRenewedAt ensures that no value is present for RenewedAt, not even an explicit nil +### GetCommonName + +`func (o *CertificateSigningRequest) GetCommonName() string` + +GetCommonName returns the CommonName field if non-nil, zero value otherwise. + +### GetCommonNameOk + +`func (o *CertificateSigningRequest) GetCommonNameOk() (*string, bool)` + +GetCommonNameOk returns a tuple with the CommonName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCommonName + +`func (o *CertificateSigningRequest) SetCommonName(v string)` + +SetCommonName sets CommonName field to given value. + + +### GetAlternativeNames + +`func (o *CertificateSigningRequest) GetAlternativeNames() []string` + +GetAlternativeNames returns the AlternativeNames field if non-nil, zero value otherwise. + +### GetAlternativeNamesOk + +`func (o *CertificateSigningRequest) GetAlternativeNamesOk() (*[]string, bool)` + +GetAlternativeNamesOk returns a tuple with the AlternativeNames field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlternativeNames + +`func (o *CertificateSigningRequest) SetAlternativeNames(v []string)` + +SetAlternativeNames sets AlternativeNames field to given value. + +### HasAlternativeNames + +`func (o *CertificateSigningRequest) HasAlternativeNames() bool` + +HasAlternativeNames returns a boolean if a field has been set. + +### GetCountry + +`func (o *CertificateSigningRequest) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *CertificateSigningRequest) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *CertificateSigningRequest) SetCountry(v string)` + +SetCountry sets Country field to given value. + + +### GetState + +`func (o *CertificateSigningRequest) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *CertificateSigningRequest) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *CertificateSigningRequest) SetState(v string)` + +SetState sets State field to given value. + + +### GetLocality + +`func (o *CertificateSigningRequest) GetLocality() string` + +GetLocality returns the Locality field if non-nil, zero value otherwise. + +### GetLocalityOk + +`func (o *CertificateSigningRequest) GetLocalityOk() (*string, bool)` + +GetLocalityOk returns a tuple with the Locality field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocality + +`func (o *CertificateSigningRequest) SetLocality(v string)` + +SetLocality sets Locality field to given value. + + +### GetOrganization + +`func (o *CertificateSigningRequest) GetOrganization() string` + +GetOrganization returns the Organization field if non-nil, zero value otherwise. + +### GetOrganizationOk + +`func (o *CertificateSigningRequest) GetOrganizationOk() (*string, bool)` + +GetOrganizationOk returns a tuple with the Organization field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganization + +`func (o *CertificateSigningRequest) SetOrganization(v string)` + +SetOrganization sets Organization field to given value. + + +### GetOrganizationUnity + +`func (o *CertificateSigningRequest) GetOrganizationUnity() string` + +GetOrganizationUnity returns the OrganizationUnity field if non-nil, zero value otherwise. + +### GetOrganizationUnityOk + +`func (o *CertificateSigningRequest) GetOrganizationUnityOk() (*string, bool)` + +GetOrganizationUnityOk returns a tuple with the OrganizationUnity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationUnity + +`func (o *CertificateSigningRequest) SetOrganizationUnity(v string)` + +SetOrganizationUnity sets OrganizationUnity field to given value. + + +### GetEmail + +`func (o *CertificateSigningRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *CertificateSigningRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *CertificateSigningRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ChatThread.md b/azion-api/docs/ChatThread.md new file mode 100644 index 0000000..a5be6df --- /dev/null +++ b/azion-api/docs/ChatThread.md @@ -0,0 +1,176 @@ +# ChatThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ThreadId** | **int64** | | +**AccountId** | **NullableInt64** | | +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**LastModified** | **time.Time** | | +**LastEditor** | **string** | | + +## Methods + +### NewChatThread + +`func NewChatThread(threadId int64, accountId NullableInt64, lastModified time.Time, lastEditor string, ) *ChatThread` + +NewChatThread instantiates a new ChatThread object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChatThreadWithDefaults + +`func NewChatThreadWithDefaults() *ChatThread` + +NewChatThreadWithDefaults instantiates a new ChatThread object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetThreadId + +`func (o *ChatThread) GetThreadId() int64` + +GetThreadId returns the ThreadId field if non-nil, zero value otherwise. + +### GetThreadIdOk + +`func (o *ChatThread) GetThreadIdOk() (*int64, bool)` + +GetThreadIdOk returns a tuple with the ThreadId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreadId + +`func (o *ChatThread) SetThreadId(v int64)` + +SetThreadId sets ThreadId field to given value. + + +### GetAccountId + +`func (o *ChatThread) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ChatThread) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ChatThread) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### SetAccountIdNil + +`func (o *ChatThread) SetAccountIdNil(b bool)` + + SetAccountIdNil sets the value for AccountId to be an explicit nil + +### UnsetAccountId +`func (o *ChatThread) UnsetAccountId()` + +UnsetAccountId ensures that no value is present for AccountId, not even an explicit nil +### GetName + +`func (o *ChatThread) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ChatThread) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ChatThread) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ChatThread) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *ChatThread) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ChatThread) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ChatThread) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ChatThread) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetLastModified + +`func (o *ChatThread) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ChatThread) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ChatThread) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetLastEditor + +`func (o *ChatThread) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ChatThread) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ChatThread) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ChatThreadRequest.md b/azion-api/docs/ChatThreadRequest.md new file mode 100644 index 0000000..6cc6544 --- /dev/null +++ b/azion-api/docs/ChatThreadRequest.md @@ -0,0 +1,82 @@ +# ChatThreadRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewChatThreadRequest + +`func NewChatThreadRequest() *ChatThreadRequest` + +NewChatThreadRequest instantiates a new ChatThreadRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChatThreadRequestWithDefaults + +`func NewChatThreadRequestWithDefaults() *ChatThreadRequest` + +NewChatThreadRequestWithDefaults instantiates a new ChatThreadRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ChatThreadRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ChatThreadRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ChatThreadRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ChatThreadRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *ChatThreadRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ChatThreadRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ChatThreadRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ChatThreadRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Chunk.md b/azion-api/docs/Chunk.md new file mode 100644 index 0000000..1924272 --- /dev/null +++ b/azion-api/docs/Chunk.md @@ -0,0 +1,197 @@ +# Chunk + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChunkId** | **int64** | | +**DocumentId** | **int64** | | +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Embedding** | Pointer to **map[string]interface{}** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | | [optional] +**Content** | **string** | | + +## Methods + +### NewChunk + +`func NewChunk(chunkId int64, documentId int64, content string, ) *Chunk` + +NewChunk instantiates a new Chunk object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChunkWithDefaults + +`func NewChunkWithDefaults() *Chunk` + +NewChunkWithDefaults instantiates a new Chunk object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChunkId + +`func (o *Chunk) GetChunkId() int64` + +GetChunkId returns the ChunkId field if non-nil, zero value otherwise. + +### GetChunkIdOk + +`func (o *Chunk) GetChunkIdOk() (*int64, bool)` + +GetChunkIdOk returns a tuple with the ChunkId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChunkId + +`func (o *Chunk) SetChunkId(v int64)` + +SetChunkId sets ChunkId field to given value. + + +### GetDocumentId + +`func (o *Chunk) GetDocumentId() int64` + +GetDocumentId returns the DocumentId field if non-nil, zero value otherwise. + +### GetDocumentIdOk + +`func (o *Chunk) GetDocumentIdOk() (*int64, bool)` + +GetDocumentIdOk returns a tuple with the DocumentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentId + +`func (o *Chunk) SetDocumentId(v int64)` + +SetDocumentId sets DocumentId field to given value. + + +### GetName + +`func (o *Chunk) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Chunk) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Chunk) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Chunk) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *Chunk) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Chunk) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Chunk) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Chunk) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetEmbedding + +`func (o *Chunk) GetEmbedding() map[string]interface{}` + +GetEmbedding returns the Embedding field if non-nil, zero value otherwise. + +### GetEmbeddingOk + +`func (o *Chunk) GetEmbeddingOk() (*map[string]interface{}, bool)` + +GetEmbeddingOk returns a tuple with the Embedding field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmbedding + +`func (o *Chunk) SetEmbedding(v map[string]interface{})` + +SetEmbedding sets Embedding field to given value. + +### HasEmbedding + +`func (o *Chunk) HasEmbedding() bool` + +HasEmbedding returns a boolean if a field has been set. + +### GetMetadata + +`func (o *Chunk) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *Chunk) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *Chunk) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *Chunk) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetContent + +`func (o *Chunk) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *Chunk) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *Chunk) SetContent(v string)` + +SetContent sets Content field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CloneApplicationRequest.md b/azion-api/docs/CloneApplicationRequest.md new file mode 100644 index 0000000..e4ebb37 --- /dev/null +++ b/azion-api/docs/CloneApplicationRequest.md @@ -0,0 +1,51 @@ +# CloneApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +## Methods + +### NewCloneApplicationRequest + +`func NewCloneApplicationRequest(name string, ) *CloneApplicationRequest` + +NewCloneApplicationRequest instantiates a new CloneApplicationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCloneApplicationRequestWithDefaults + +`func NewCloneApplicationRequestWithDefaults() *CloneApplicationRequest` + +NewCloneApplicationRequestWithDefaults instantiates a new CloneApplicationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CloneApplicationRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CloneApplicationRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CloneApplicationRequest) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CloneFirewallRequest.md b/azion-api/docs/CloneFirewallRequest.md new file mode 100644 index 0000000..cff5ba0 --- /dev/null +++ b/azion-api/docs/CloneFirewallRequest.md @@ -0,0 +1,51 @@ +# CloneFirewallRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +## Methods + +### NewCloneFirewallRequest + +`func NewCloneFirewallRequest(name string, ) *CloneFirewallRequest` + +NewCloneFirewallRequest instantiates a new CloneFirewallRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCloneFirewallRequestWithDefaults + +`func NewCloneFirewallRequestWithDefaults() *CloneFirewallRequest` + +NewCloneFirewallRequestWithDefaults instantiates a new CloneFirewallRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CloneFirewallRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CloneFirewallRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CloneFirewallRequest) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CloneWAFRequest.md b/azion-api/docs/CloneWAFRequest.md new file mode 100644 index 0000000..ee53d49 --- /dev/null +++ b/azion-api/docs/CloneWAFRequest.md @@ -0,0 +1,51 @@ +# CloneWAFRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +## Methods + +### NewCloneWAFRequest + +`func NewCloneWAFRequest(name string, ) *CloneWAFRequest` + +NewCloneWAFRequest instantiates a new CloneWAFRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCloneWAFRequestWithDefaults + +`func NewCloneWAFRequestWithDefaults() *CloneWAFRequest` + +NewCloneWAFRequestWithDefaults instantiates a new CloneWAFRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CloneWAFRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CloneWAFRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CloneWAFRequest) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Connector.md b/azion-api/docs/Connector.md new file mode 100644 index 0000000..1dc1cba --- /dev/null +++ b/azion-api/docs/Connector.md @@ -0,0 +1,203 @@ +# Connector + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | [**ConnectorStorageAttributes**](ConnectorStorageAttributes.md) | | + +## Methods + +### NewConnector + +`func NewConnector(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, type_ string, attributes ConnectorStorageAttributes, ) *Connector` + +NewConnector instantiates a new Connector object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorWithDefaults + +`func NewConnectorWithDefaults() *Connector` + +NewConnectorWithDefaults instantiates a new Connector object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Connector) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Connector) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Connector) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Connector) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Connector) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Connector) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *Connector) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Connector) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Connector) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Connector) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Connector) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Connector) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *Connector) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Connector) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Connector) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Connector) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *Connector) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Connector) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Connector) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetType + +`func (o *Connector) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Connector) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Connector) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *Connector) GetAttributes() ConnectorStorageAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *Connector) GetAttributesOk() (*ConnectorStorageAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *Connector) SetAttributes(v ConnectorStorageAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Connector2.md b/azion-api/docs/Connector2.md new file mode 100644 index 0000000..fcd70f1 --- /dev/null +++ b/azion-api/docs/Connector2.md @@ -0,0 +1,203 @@ +# Connector2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | [**ConnectorStorageAttributes**](ConnectorStorageAttributes.md) | | + +## Methods + +### NewConnector2 + +`func NewConnector2(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, type_ string, attributes ConnectorStorageAttributes, ) *Connector2` + +NewConnector2 instantiates a new Connector2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnector2WithDefaults + +`func NewConnector2WithDefaults() *Connector2` + +NewConnector2WithDefaults instantiates a new Connector2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Connector2) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Connector2) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Connector2) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Connector2) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Connector2) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Connector2) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *Connector2) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Connector2) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Connector2) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Connector2) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Connector2) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Connector2) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *Connector2) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Connector2) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Connector2) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Connector2) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *Connector2) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Connector2) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Connector2) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetType + +`func (o *Connector2) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Connector2) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Connector2) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *Connector2) GetAttributes() ConnectorStorageAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *Connector2) GetAttributesOk() (*ConnectorStorageAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *Connector2) SetAttributes(v ConnectorStorageAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorHTTP.md b/azion-api/docs/ConnectorHTTP.md new file mode 100644 index 0000000..600f61a --- /dev/null +++ b/azion-api/docs/ConnectorHTTP.md @@ -0,0 +1,203 @@ +# ConnectorHTTP + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | [**ConnectorHTTPAttributes**](ConnectorHTTPAttributes.md) | | + +## Methods + +### NewConnectorHTTP + +`func NewConnectorHTTP(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, type_ string, attributes ConnectorHTTPAttributes, ) *ConnectorHTTP` + +NewConnectorHTTP instantiates a new ConnectorHTTP object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorHTTPWithDefaults + +`func NewConnectorHTTPWithDefaults() *ConnectorHTTP` + +NewConnectorHTTPWithDefaults instantiates a new ConnectorHTTP object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ConnectorHTTP) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ConnectorHTTP) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ConnectorHTTP) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ConnectorHTTP) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorHTTP) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorHTTP) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *ConnectorHTTP) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ConnectorHTTP) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ConnectorHTTP) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ConnectorHTTP) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ConnectorHTTP) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ConnectorHTTP) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ConnectorHTTP) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ConnectorHTTP) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ConnectorHTTP) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ConnectorHTTP) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *ConnectorHTTP) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *ConnectorHTTP) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *ConnectorHTTP) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetType + +`func (o *ConnectorHTTP) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ConnectorHTTP) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ConnectorHTTP) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *ConnectorHTTP) GetAttributes() ConnectorHTTPAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *ConnectorHTTP) GetAttributesOk() (*ConnectorHTTPAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *ConnectorHTTP) SetAttributes(v ConnectorHTTPAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorHTTPAttributes.md b/azion-api/docs/ConnectorHTTPAttributes.md new file mode 100644 index 0000000..6816d2f --- /dev/null +++ b/azion-api/docs/ConnectorHTTPAttributes.md @@ -0,0 +1,103 @@ +# ConnectorHTTPAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Addresses** | [**[]Address**](Address.md) | | +**ConnectionOptions** | Pointer to [**HTTPConnectionOptions**](HTTPConnectionOptions.md) | | [optional] +**Modules** | Pointer to [**HTTPModules**](HTTPModules.md) | | [optional] + +## Methods + +### NewConnectorHTTPAttributes + +`func NewConnectorHTTPAttributes(addresses []Address, ) *ConnectorHTTPAttributes` + +NewConnectorHTTPAttributes instantiates a new ConnectorHTTPAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorHTTPAttributesWithDefaults + +`func NewConnectorHTTPAttributesWithDefaults() *ConnectorHTTPAttributes` + +NewConnectorHTTPAttributesWithDefaults instantiates a new ConnectorHTTPAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddresses + +`func (o *ConnectorHTTPAttributes) GetAddresses() []Address` + +GetAddresses returns the Addresses field if non-nil, zero value otherwise. + +### GetAddressesOk + +`func (o *ConnectorHTTPAttributes) GetAddressesOk() (*[]Address, bool)` + +GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddresses + +`func (o *ConnectorHTTPAttributes) SetAddresses(v []Address)` + +SetAddresses sets Addresses field to given value. + + +### GetConnectionOptions + +`func (o *ConnectorHTTPAttributes) GetConnectionOptions() HTTPConnectionOptions` + +GetConnectionOptions returns the ConnectionOptions field if non-nil, zero value otherwise. + +### GetConnectionOptionsOk + +`func (o *ConnectorHTTPAttributes) GetConnectionOptionsOk() (*HTTPConnectionOptions, bool)` + +GetConnectionOptionsOk returns a tuple with the ConnectionOptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionOptions + +`func (o *ConnectorHTTPAttributes) SetConnectionOptions(v HTTPConnectionOptions)` + +SetConnectionOptions sets ConnectionOptions field to given value. + +### HasConnectionOptions + +`func (o *ConnectorHTTPAttributes) HasConnectionOptions() bool` + +HasConnectionOptions returns a boolean if a field has been set. + +### GetModules + +`func (o *ConnectorHTTPAttributes) GetModules() HTTPModules` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *ConnectorHTTPAttributes) GetModulesOk() (*HTTPModules, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *ConnectorHTTPAttributes) SetModules(v HTTPModules)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *ConnectorHTTPAttributes) HasModules() bool` + +HasModules returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorHTTPAttributesRequest.md b/azion-api/docs/ConnectorHTTPAttributesRequest.md new file mode 100644 index 0000000..8c4989a --- /dev/null +++ b/azion-api/docs/ConnectorHTTPAttributesRequest.md @@ -0,0 +1,103 @@ +# ConnectorHTTPAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Addresses** | [**[]AddressRequest**](AddressRequest.md) | | +**ConnectionOptions** | Pointer to [**HTTPConnectionOptionsRequest**](HTTPConnectionOptionsRequest.md) | | [optional] +**Modules** | Pointer to [**HTTPModulesRequest**](HTTPModulesRequest.md) | | [optional] + +## Methods + +### NewConnectorHTTPAttributesRequest + +`func NewConnectorHTTPAttributesRequest(addresses []AddressRequest, ) *ConnectorHTTPAttributesRequest` + +NewConnectorHTTPAttributesRequest instantiates a new ConnectorHTTPAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorHTTPAttributesRequestWithDefaults + +`func NewConnectorHTTPAttributesRequestWithDefaults() *ConnectorHTTPAttributesRequest` + +NewConnectorHTTPAttributesRequestWithDefaults instantiates a new ConnectorHTTPAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddresses + +`func (o *ConnectorHTTPAttributesRequest) GetAddresses() []AddressRequest` + +GetAddresses returns the Addresses field if non-nil, zero value otherwise. + +### GetAddressesOk + +`func (o *ConnectorHTTPAttributesRequest) GetAddressesOk() (*[]AddressRequest, bool)` + +GetAddressesOk returns a tuple with the Addresses field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddresses + +`func (o *ConnectorHTTPAttributesRequest) SetAddresses(v []AddressRequest)` + +SetAddresses sets Addresses field to given value. + + +### GetConnectionOptions + +`func (o *ConnectorHTTPAttributesRequest) GetConnectionOptions() HTTPConnectionOptionsRequest` + +GetConnectionOptions returns the ConnectionOptions field if non-nil, zero value otherwise. + +### GetConnectionOptionsOk + +`func (o *ConnectorHTTPAttributesRequest) GetConnectionOptionsOk() (*HTTPConnectionOptionsRequest, bool)` + +GetConnectionOptionsOk returns a tuple with the ConnectionOptions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionOptions + +`func (o *ConnectorHTTPAttributesRequest) SetConnectionOptions(v HTTPConnectionOptionsRequest)` + +SetConnectionOptions sets ConnectionOptions field to given value. + +### HasConnectionOptions + +`func (o *ConnectorHTTPAttributesRequest) HasConnectionOptions() bool` + +HasConnectionOptions returns a boolean if a field has been set. + +### GetModules + +`func (o *ConnectorHTTPAttributesRequest) GetModules() HTTPModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *ConnectorHTTPAttributesRequest) GetModulesOk() (*HTTPModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *ConnectorHTTPAttributesRequest) SetModules(v HTTPModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *ConnectorHTTPAttributesRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorHTTPRequest.md b/azion-api/docs/ConnectorHTTPRequest.md new file mode 100644 index 0000000..10c45f9 --- /dev/null +++ b/azion-api/docs/ConnectorHTTPRequest.md @@ -0,0 +1,119 @@ +# ConnectorHTTPRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | [**ConnectorHTTPAttributesRequest**](ConnectorHTTPAttributesRequest.md) | | + +## Methods + +### NewConnectorHTTPRequest + +`func NewConnectorHTTPRequest(name string, type_ string, attributes ConnectorHTTPAttributesRequest, ) *ConnectorHTTPRequest` + +NewConnectorHTTPRequest instantiates a new ConnectorHTTPRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorHTTPRequestWithDefaults + +`func NewConnectorHTTPRequestWithDefaults() *ConnectorHTTPRequest` + +NewConnectorHTTPRequestWithDefaults instantiates a new ConnectorHTTPRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ConnectorHTTPRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorHTTPRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorHTTPRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ConnectorHTTPRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ConnectorHTTPRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ConnectorHTTPRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ConnectorHTTPRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetType + +`func (o *ConnectorHTTPRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ConnectorHTTPRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ConnectorHTTPRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *ConnectorHTTPRequest) GetAttributes() ConnectorHTTPAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *ConnectorHTTPRequest) GetAttributesOk() (*ConnectorHTTPAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *ConnectorHTTPRequest) SetAttributes(v ConnectorHTTPAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorRequest.md b/azion-api/docs/ConnectorRequest.md new file mode 100644 index 0000000..b4ba342 --- /dev/null +++ b/azion-api/docs/ConnectorRequest.md @@ -0,0 +1,119 @@ +# ConnectorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | [**ConnectorStorageAttributesRequest**](ConnectorStorageAttributesRequest.md) | | + +## Methods + +### NewConnectorRequest + +`func NewConnectorRequest(name string, type_ string, attributes ConnectorStorageAttributesRequest, ) *ConnectorRequest` + +NewConnectorRequest instantiates a new ConnectorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorRequestWithDefaults + +`func NewConnectorRequestWithDefaults() *ConnectorRequest` + +NewConnectorRequestWithDefaults instantiates a new ConnectorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ConnectorRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ConnectorRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ConnectorRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ConnectorRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ConnectorRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetType + +`func (o *ConnectorRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ConnectorRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ConnectorRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *ConnectorRequest) GetAttributes() ConnectorStorageAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *ConnectorRequest) GetAttributesOk() (*ConnectorStorageAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *ConnectorRequest) SetAttributes(v ConnectorStorageAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorRequest2.md b/azion-api/docs/ConnectorRequest2.md new file mode 100644 index 0000000..12dff8e --- /dev/null +++ b/azion-api/docs/ConnectorRequest2.md @@ -0,0 +1,119 @@ +# ConnectorRequest2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | [**ConnectorStorageAttributesRequest**](ConnectorStorageAttributesRequest.md) | | + +## Methods + +### NewConnectorRequest2 + +`func NewConnectorRequest2(name string, type_ string, attributes ConnectorStorageAttributesRequest, ) *ConnectorRequest2` + +NewConnectorRequest2 instantiates a new ConnectorRequest2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorRequest2WithDefaults + +`func NewConnectorRequest2WithDefaults() *ConnectorRequest2` + +NewConnectorRequest2WithDefaults instantiates a new ConnectorRequest2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ConnectorRequest2) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ConnectorRequest2) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ConnectorRequest2) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ConnectorRequest2) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ConnectorRequest2) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ConnectorRequest2) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ConnectorRequest2) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetType + +`func (o *ConnectorRequest2) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ConnectorRequest2) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ConnectorRequest2) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *ConnectorRequest2) GetAttributes() ConnectorStorageAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *ConnectorRequest2) GetAttributesOk() (*ConnectorStorageAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *ConnectorRequest2) SetAttributes(v ConnectorStorageAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorResponse.md b/azion-api/docs/ConnectorResponse.md new file mode 100644 index 0000000..4c6ed2a --- /dev/null +++ b/azion-api/docs/ConnectorResponse.md @@ -0,0 +1,77 @@ +# ConnectorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Connector2**](Connector2.md) | | + +## Methods + +### NewConnectorResponse + +`func NewConnectorResponse(data Connector2, ) *ConnectorResponse` + +NewConnectorResponse instantiates a new ConnectorResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorResponseWithDefaults + +`func NewConnectorResponseWithDefaults() *ConnectorResponse` + +NewConnectorResponseWithDefaults instantiates a new ConnectorResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ConnectorResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ConnectorResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ConnectorResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ConnectorResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ConnectorResponse) GetData() Connector2` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ConnectorResponse) GetDataOk() (*Connector2, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ConnectorResponse) SetData(v Connector2)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorStorageAttributes.md b/azion-api/docs/ConnectorStorageAttributes.md new file mode 100644 index 0000000..9d25a7a --- /dev/null +++ b/azion-api/docs/ConnectorStorageAttributes.md @@ -0,0 +1,77 @@ +# ConnectorStorageAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bucket** | **string** | | +**Prefix** | Pointer to **string** | | [optional] + +## Methods + +### NewConnectorStorageAttributes + +`func NewConnectorStorageAttributes(bucket string, ) *ConnectorStorageAttributes` + +NewConnectorStorageAttributes instantiates a new ConnectorStorageAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorStorageAttributesWithDefaults + +`func NewConnectorStorageAttributesWithDefaults() *ConnectorStorageAttributes` + +NewConnectorStorageAttributesWithDefaults instantiates a new ConnectorStorageAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBucket + +`func (o *ConnectorStorageAttributes) GetBucket() string` + +GetBucket returns the Bucket field if non-nil, zero value otherwise. + +### GetBucketOk + +`func (o *ConnectorStorageAttributes) GetBucketOk() (*string, bool)` + +GetBucketOk returns a tuple with the Bucket field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucket + +`func (o *ConnectorStorageAttributes) SetBucket(v string)` + +SetBucket sets Bucket field to given value. + + +### GetPrefix + +`func (o *ConnectorStorageAttributes) GetPrefix() string` + +GetPrefix returns the Prefix field if non-nil, zero value otherwise. + +### GetPrefixOk + +`func (o *ConnectorStorageAttributes) GetPrefixOk() (*string, bool)` + +GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrefix + +`func (o *ConnectorStorageAttributes) SetPrefix(v string)` + +SetPrefix sets Prefix field to given value. + +### HasPrefix + +`func (o *ConnectorStorageAttributes) HasPrefix() bool` + +HasPrefix returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorStorageAttributesRequest.md b/azion-api/docs/ConnectorStorageAttributesRequest.md new file mode 100644 index 0000000..1dfc547 --- /dev/null +++ b/azion-api/docs/ConnectorStorageAttributesRequest.md @@ -0,0 +1,77 @@ +# ConnectorStorageAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Bucket** | **string** | | +**Prefix** | Pointer to **string** | | [optional] + +## Methods + +### NewConnectorStorageAttributesRequest + +`func NewConnectorStorageAttributesRequest(bucket string, ) *ConnectorStorageAttributesRequest` + +NewConnectorStorageAttributesRequest instantiates a new ConnectorStorageAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewConnectorStorageAttributesRequestWithDefaults + +`func NewConnectorStorageAttributesRequestWithDefaults() *ConnectorStorageAttributesRequest` + +NewConnectorStorageAttributesRequestWithDefaults instantiates a new ConnectorStorageAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBucket + +`func (o *ConnectorStorageAttributesRequest) GetBucket() string` + +GetBucket returns the Bucket field if non-nil, zero value otherwise. + +### GetBucketOk + +`func (o *ConnectorStorageAttributesRequest) GetBucketOk() (*string, bool)` + +GetBucketOk returns a tuple with the Bucket field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucket + +`func (o *ConnectorStorageAttributesRequest) SetBucket(v string)` + +SetBucket sets Bucket field to given value. + + +### GetPrefix + +`func (o *ConnectorStorageAttributesRequest) GetPrefix() string` + +GetPrefix returns the Prefix field if non-nil, zero value otherwise. + +### GetPrefixOk + +`func (o *ConnectorStorageAttributesRequest) GetPrefixOk() (*string, bool)` + +GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrefix + +`func (o *ConnectorStorageAttributesRequest) SetPrefix(v string)` + +SetPrefix sets Prefix field to given value. + +### HasPrefix + +`func (o *ConnectorStorageAttributesRequest) HasPrefix() bool` + +HasPrefix returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ConnectorsAPI.md b/azion-api/docs/ConnectorsAPI.md new file mode 100644 index 0000000..027ab0e --- /dev/null +++ b/azion-api/docs/ConnectorsAPI.md @@ -0,0 +1,455 @@ +# \ConnectorsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateConnector**](ConnectorsAPI.md#CreateConnector) | **Post** /workspace/connectors | Create an Connector +[**DeleteConnector**](ConnectorsAPI.md#DeleteConnector) | **Delete** /workspace/connectors/{connector_id} | Delete an Connector +[**ListConnectors**](ConnectorsAPI.md#ListConnectors) | **Get** /workspace/connectors | List Connectors +[**PartialUpdateConnector**](ConnectorsAPI.md#PartialUpdateConnector) | **Patch** /workspace/connectors/{connector_id} | Partially update an Connector +[**RetrieveConnector**](ConnectorsAPI.md#RetrieveConnector) | **Get** /workspace/connectors/{connector_id} | Retrieve details of an Connector +[**UpdateConnector**](ConnectorsAPI.md#UpdateConnector) | **Put** /workspace/connectors/{connector_id} | Update an Connector + + + +## CreateConnector + +> ConnectorResponse CreateConnector(ctx).ConnectorRequest2(connectorRequest2).Execute() + +Create an Connector + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + connectorRequest2 := openapiclient.ConnectorRequest2{ConnectorHTTPRequest: openapiclient.NewConnectorHTTPRequest("Name_example", "Type_example", *openapiclient.NewConnectorHTTPAttributesRequest([]openapiclient.AddressRequest{*openapiclient.NewAddressRequest("Address_example")}))} // ConnectorRequest2 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsAPI.CreateConnector(context.Background()).ConnectorRequest2(connectorRequest2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.CreateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateConnector`: ConnectorResponse + fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.CreateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connectorRequest2** | [**ConnectorRequest2**](ConnectorRequest2.md) | | + +### Return type + +[**ConnectorResponse**](ConnectorResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteConnector + +> DeleteResponse DeleteConnector(ctx, connectorId).Execute() + +Delete an Connector + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + connectorId := int64(789) // int64 | A unique integer value identifying the connector. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsAPI.DeleteConnector(context.Background(), connectorId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.DeleteConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteConnector`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.DeleteConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **int64** | A unique integer value identifying the connector. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListConnectors + +> PaginatedConnectorList ListConnectors(ctx).Active(active).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).TypeIn(typeIn).Execute() + +List Connectors + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + typeIn := "typeIn_example" // string | Filter by type (accepts comma-separated values). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsAPI.ListConnectors(context.Background()).Active(active).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).TypeIn(typeIn).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.ListConnectors``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListConnectors`: PaginatedConnectorList + fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.ListConnectors`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListConnectorsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **typeIn** | **string** | Filter by type (accepts comma-separated values). | + +### Return type + +[**PaginatedConnectorList**](PaginatedConnectorList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateConnector + +> ConnectorResponse PartialUpdateConnector(ctx, connectorId).PatchedConnectorRequest2(patchedConnectorRequest2).Execute() + +Partially update an Connector + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + connectorId := int64(789) // int64 | A unique integer value identifying the connector. + patchedConnectorRequest2 := openapiclient.PatchedConnectorRequest2{PatchedConnectorHTTPRequest: openapiclient.NewPatchedConnectorHTTPRequest("Type_example")} // PatchedConnectorRequest2 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsAPI.PartialUpdateConnector(context.Background(), connectorId).PatchedConnectorRequest2(patchedConnectorRequest2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.PartialUpdateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateConnector`: ConnectorResponse + fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.PartialUpdateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **int64** | A unique integer value identifying the connector. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedConnectorRequest2** | [**PatchedConnectorRequest2**](PatchedConnectorRequest2.md) | | + +### Return type + +[**ConnectorResponse**](ConnectorResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveConnector + +> ConnectorResponse RetrieveConnector(ctx, connectorId).Fields(fields).Execute() + +Retrieve details of an Connector + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + connectorId := int64(789) // int64 | A unique integer value identifying the connector. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsAPI.RetrieveConnector(context.Background(), connectorId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.RetrieveConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveConnector`: ConnectorResponse + fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.RetrieveConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **int64** | A unique integer value identifying the connector. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ConnectorResponse**](ConnectorResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateConnector + +> ConnectorResponse UpdateConnector(ctx, connectorId).ConnectorRequest2(connectorRequest2).Execute() + +Update an Connector + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + connectorId := int64(789) // int64 | A unique integer value identifying the connector. + connectorRequest2 := openapiclient.ConnectorRequest2{ConnectorHTTPRequest: openapiclient.NewConnectorHTTPRequest("Name_example", "Type_example", *openapiclient.NewConnectorHTTPAttributesRequest([]openapiclient.AddressRequest{*openapiclient.NewAddressRequest("Address_example")}))} // ConnectorRequest2 | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ConnectorsAPI.UpdateConnector(context.Background(), connectorId).ConnectorRequest2(connectorRequest2).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.UpdateConnector``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateConnector`: ConnectorResponse + fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.UpdateConnector`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**connectorId** | **int64** | A unique integer value identifying the connector. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateConnectorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **connectorRequest2** | [**ConnectorRequest2**](ConnectorRequest2.md) | | + +### Return type + +[**ConnectorResponse**](ConnectorResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Content.md b/azion-api/docs/Content.md new file mode 100644 index 0000000..d9e4d98 --- /dev/null +++ b/azion-api/docs/Content.md @@ -0,0 +1,156 @@ +# Content + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**ContentType** | **string** | | +**ContentHash** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **string** | | + +## Methods + +### NewContent + +`func NewContent(id int64, name string, contentType string, contentHash string, lastEditor string, lastModified string, ) *Content` + +NewContent instantiates a new Content object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContentWithDefaults + +`func NewContentWithDefaults() *Content` + +NewContentWithDefaults instantiates a new Content object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Content) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Content) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Content) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Content) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Content) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Content) SetName(v string)` + +SetName sets Name field to given value. + + +### GetContentType + +`func (o *Content) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *Content) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *Content) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetContentHash + +`func (o *Content) GetContentHash() string` + +GetContentHash returns the ContentHash field if non-nil, zero value otherwise. + +### GetContentHashOk + +`func (o *Content) GetContentHashOk() (*string, bool)` + +GetContentHashOk returns a tuple with the ContentHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentHash + +`func (o *Content) SetContentHash(v string)` + +SetContentHash sets ContentHash field to given value. + + +### GetLastEditor + +`func (o *Content) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Content) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Content) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Content) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Content) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Content) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ContentRequest.md b/azion-api/docs/ContentRequest.md new file mode 100644 index 0000000..d0981a2 --- /dev/null +++ b/azion-api/docs/ContentRequest.md @@ -0,0 +1,93 @@ +# ContentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ContentType** | **string** | | +**ContentHash** | **string** | | + +## Methods + +### NewContentRequest + +`func NewContentRequest(name string, contentType string, contentHash string, ) *ContentRequest` + +NewContentRequest instantiates a new ContentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContentRequestWithDefaults + +`func NewContentRequestWithDefaults() *ContentRequest` + +NewContentRequestWithDefaults instantiates a new ContentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ContentRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ContentRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ContentRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetContentType + +`func (o *ContentRequest) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *ContentRequest) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *ContentRequest) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetContentHash + +`func (o *ContentRequest) GetContentHash() string` + +GetContentHash returns the ContentHash field if non-nil, zero value otherwise. + +### GetContentHashOk + +`func (o *ContentRequest) GetContentHashOk() (*string, bool)` + +GetContentHashOk returns a tuple with the ContentHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentHash + +`func (o *ContentRequest) SetContentHash(v string)` + +SetContentHash sets ContentHash field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ContinuousDeployment.md b/azion-api/docs/ContinuousDeployment.md new file mode 100644 index 0000000..2b82b83 --- /dev/null +++ b/azion-api/docs/ContinuousDeployment.md @@ -0,0 +1,296 @@ +# ContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Repository** | **string** | | +**Branch** | **string** | | +**BuildContext** | [**[]BuildContextField**](BuildContextField.md) | | +**DeployContext** | Pointer to **map[string]interface{}** | | [optional] +**Integration** | [**Integration**](Integration.md) | | +**ExecutionScript** | [**ExecutionScript**](ExecutionScript.md) | | +**Created** | **NullableTime** | Created date of the continuous deployment. | +**LastEditor** | **NullableString** | Last editor of the continuous deployment. | +**LastModified** | **NullableTime** | Last modified date of the continuous deployment. | + +## Methods + +### NewContinuousDeployment + +`func NewContinuousDeployment(id int64, name string, repository string, branch string, buildContext []BuildContextField, integration Integration, executionScript ExecutionScript, created NullableTime, lastEditor NullableString, lastModified NullableTime, ) *ContinuousDeployment` + +NewContinuousDeployment instantiates a new ContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContinuousDeploymentWithDefaults + +`func NewContinuousDeploymentWithDefaults() *ContinuousDeployment` + +NewContinuousDeploymentWithDefaults instantiates a new ContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ContinuousDeployment) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ContinuousDeployment) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ContinuousDeployment) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ContinuousDeployment) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ContinuousDeployment) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ContinuousDeployment) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRepository + +`func (o *ContinuousDeployment) GetRepository() string` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *ContinuousDeployment) GetRepositoryOk() (*string, bool)` + +GetRepositoryOk returns a tuple with the Repository field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepository + +`func (o *ContinuousDeployment) SetRepository(v string)` + +SetRepository sets Repository field to given value. + + +### GetBranch + +`func (o *ContinuousDeployment) GetBranch() string` + +GetBranch returns the Branch field if non-nil, zero value otherwise. + +### GetBranchOk + +`func (o *ContinuousDeployment) GetBranchOk() (*string, bool)` + +GetBranchOk returns a tuple with the Branch field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranch + +`func (o *ContinuousDeployment) SetBranch(v string)` + +SetBranch sets Branch field to given value. + + +### GetBuildContext + +`func (o *ContinuousDeployment) GetBuildContext() []BuildContextField` + +GetBuildContext returns the BuildContext field if non-nil, zero value otherwise. + +### GetBuildContextOk + +`func (o *ContinuousDeployment) GetBuildContextOk() (*[]BuildContextField, bool)` + +GetBuildContextOk returns a tuple with the BuildContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuildContext + +`func (o *ContinuousDeployment) SetBuildContext(v []BuildContextField)` + +SetBuildContext sets BuildContext field to given value. + + +### GetDeployContext + +`func (o *ContinuousDeployment) GetDeployContext() map[string]interface{}` + +GetDeployContext returns the DeployContext field if non-nil, zero value otherwise. + +### GetDeployContextOk + +`func (o *ContinuousDeployment) GetDeployContextOk() (*map[string]interface{}, bool)` + +GetDeployContextOk returns a tuple with the DeployContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployContext + +`func (o *ContinuousDeployment) SetDeployContext(v map[string]interface{})` + +SetDeployContext sets DeployContext field to given value. + +### HasDeployContext + +`func (o *ContinuousDeployment) HasDeployContext() bool` + +HasDeployContext returns a boolean if a field has been set. + +### GetIntegration + +`func (o *ContinuousDeployment) GetIntegration() Integration` + +GetIntegration returns the Integration field if non-nil, zero value otherwise. + +### GetIntegrationOk + +`func (o *ContinuousDeployment) GetIntegrationOk() (*Integration, bool)` + +GetIntegrationOk returns a tuple with the Integration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegration + +`func (o *ContinuousDeployment) SetIntegration(v Integration)` + +SetIntegration sets Integration field to given value. + + +### GetExecutionScript + +`func (o *ContinuousDeployment) GetExecutionScript() ExecutionScript` + +GetExecutionScript returns the ExecutionScript field if non-nil, zero value otherwise. + +### GetExecutionScriptOk + +`func (o *ContinuousDeployment) GetExecutionScriptOk() (*ExecutionScript, bool)` + +GetExecutionScriptOk returns a tuple with the ExecutionScript field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionScript + +`func (o *ContinuousDeployment) SetExecutionScript(v ExecutionScript)` + +SetExecutionScript sets ExecutionScript field to given value. + + +### GetCreated + +`func (o *ContinuousDeployment) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ContinuousDeployment) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ContinuousDeployment) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### SetCreatedNil + +`func (o *ContinuousDeployment) SetCreatedNil(b bool)` + + SetCreatedNil sets the value for Created to be an explicit nil + +### UnsetCreated +`func (o *ContinuousDeployment) UnsetCreated()` + +UnsetCreated ensures that no value is present for Created, not even an explicit nil +### GetLastEditor + +`func (o *ContinuousDeployment) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ContinuousDeployment) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ContinuousDeployment) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### SetLastEditorNil + +`func (o *ContinuousDeployment) SetLastEditorNil(b bool)` + + SetLastEditorNil sets the value for LastEditor to be an explicit nil + +### UnsetLastEditor +`func (o *ContinuousDeployment) UnsetLastEditor()` + +UnsetLastEditor ensures that no value is present for LastEditor, not even an explicit nil +### GetLastModified + +`func (o *ContinuousDeployment) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ContinuousDeployment) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ContinuousDeployment) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### SetLastModifiedNil + +`func (o *ContinuousDeployment) SetLastModifiedNil(b bool)` + + SetLastModifiedNil sets the value for LastModified to be an explicit nil + +### UnsetLastModified +`func (o *ContinuousDeployment) UnsetLastModified()` + +UnsetLastModified ensures that no value is present for LastModified, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ContinuousDeploymentRequest.md b/azion-api/docs/ContinuousDeploymentRequest.md new file mode 100644 index 0000000..79a2d71 --- /dev/null +++ b/azion-api/docs/ContinuousDeploymentRequest.md @@ -0,0 +1,182 @@ +# ContinuousDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Repository** | **string** | | +**Branch** | **string** | | +**BuildContext** | [**[]BuildContextFieldRequest**](BuildContextFieldRequest.md) | | +**DeployContext** | Pointer to **map[string]interface{}** | | [optional] +**IntegrationId** | **int64** | | +**ExecutionScriptId** | **int64** | | + +## Methods + +### NewContinuousDeploymentRequest + +`func NewContinuousDeploymentRequest(name string, repository string, branch string, buildContext []BuildContextFieldRequest, integrationId int64, executionScriptId int64, ) *ContinuousDeploymentRequest` + +NewContinuousDeploymentRequest instantiates a new ContinuousDeploymentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewContinuousDeploymentRequestWithDefaults + +`func NewContinuousDeploymentRequestWithDefaults() *ContinuousDeploymentRequest` + +NewContinuousDeploymentRequestWithDefaults instantiates a new ContinuousDeploymentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ContinuousDeploymentRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ContinuousDeploymentRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ContinuousDeploymentRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRepository + +`func (o *ContinuousDeploymentRequest) GetRepository() string` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *ContinuousDeploymentRequest) GetRepositoryOk() (*string, bool)` + +GetRepositoryOk returns a tuple with the Repository field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepository + +`func (o *ContinuousDeploymentRequest) SetRepository(v string)` + +SetRepository sets Repository field to given value. + + +### GetBranch + +`func (o *ContinuousDeploymentRequest) GetBranch() string` + +GetBranch returns the Branch field if non-nil, zero value otherwise. + +### GetBranchOk + +`func (o *ContinuousDeploymentRequest) GetBranchOk() (*string, bool)` + +GetBranchOk returns a tuple with the Branch field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranch + +`func (o *ContinuousDeploymentRequest) SetBranch(v string)` + +SetBranch sets Branch field to given value. + + +### GetBuildContext + +`func (o *ContinuousDeploymentRequest) GetBuildContext() []BuildContextFieldRequest` + +GetBuildContext returns the BuildContext field if non-nil, zero value otherwise. + +### GetBuildContextOk + +`func (o *ContinuousDeploymentRequest) GetBuildContextOk() (*[]BuildContextFieldRequest, bool)` + +GetBuildContextOk returns a tuple with the BuildContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuildContext + +`func (o *ContinuousDeploymentRequest) SetBuildContext(v []BuildContextFieldRequest)` + +SetBuildContext sets BuildContext field to given value. + + +### GetDeployContext + +`func (o *ContinuousDeploymentRequest) GetDeployContext() map[string]interface{}` + +GetDeployContext returns the DeployContext field if non-nil, zero value otherwise. + +### GetDeployContextOk + +`func (o *ContinuousDeploymentRequest) GetDeployContextOk() (*map[string]interface{}, bool)` + +GetDeployContextOk returns a tuple with the DeployContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployContext + +`func (o *ContinuousDeploymentRequest) SetDeployContext(v map[string]interface{})` + +SetDeployContext sets DeployContext field to given value. + +### HasDeployContext + +`func (o *ContinuousDeploymentRequest) HasDeployContext() bool` + +HasDeployContext returns a boolean if a field has been set. + +### GetIntegrationId + +`func (o *ContinuousDeploymentRequest) GetIntegrationId() int64` + +GetIntegrationId returns the IntegrationId field if non-nil, zero value otherwise. + +### GetIntegrationIdOk + +`func (o *ContinuousDeploymentRequest) GetIntegrationIdOk() (*int64, bool)` + +GetIntegrationIdOk returns a tuple with the IntegrationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegrationId + +`func (o *ContinuousDeploymentRequest) SetIntegrationId(v int64)` + +SetIntegrationId sets IntegrationId field to given value. + + +### GetExecutionScriptId + +`func (o *ContinuousDeploymentRequest) GetExecutionScriptId() int64` + +GetExecutionScriptId returns the ExecutionScriptId field if non-nil, zero value otherwise. + +### GetExecutionScriptIdOk + +`func (o *ContinuousDeploymentRequest) GetExecutionScriptIdOk() (*int64, bool)` + +GetExecutionScriptIdOk returns a tuple with the ExecutionScriptId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionScriptId + +`func (o *ContinuousDeploymentRequest) SetExecutionScriptId(v int64)` + +SetExecutionScriptId sets ExecutionScriptId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CreateAccountRequest.md b/azion-api/docs/CreateAccountRequest.md new file mode 100644 index 0000000..18754e1 --- /dev/null +++ b/azion-api/docs/CreateAccountRequest.md @@ -0,0 +1,140 @@ +# CreateAccountRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ParentId** | **int64** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] + +## Methods + +### NewCreateAccountRequest + +`func NewCreateAccountRequest(name string, parentId int64, type_ string, currencyIsoCode string, ) *CreateAccountRequest` + +NewCreateAccountRequest instantiates a new CreateAccountRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateAccountRequestWithDefaults + +`func NewCreateAccountRequestWithDefaults() *CreateAccountRequest` + +NewCreateAccountRequestWithDefaults instantiates a new CreateAccountRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateAccountRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateAccountRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateAccountRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetParentId + +`func (o *CreateAccountRequest) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *CreateAccountRequest) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *CreateAccountRequest) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetType + +`func (o *CreateAccountRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateAccountRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CreateAccountRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCurrencyIsoCode + +`func (o *CreateAccountRequest) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *CreateAccountRequest) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *CreateAccountRequest) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *CreateAccountRequest) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *CreateAccountRequest) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *CreateAccountRequest) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *CreateAccountRequest) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CreateBrandRequest.md b/azion-api/docs/CreateBrandRequest.md new file mode 100644 index 0000000..7ed7eb3 --- /dev/null +++ b/azion-api/docs/CreateBrandRequest.md @@ -0,0 +1,93 @@ +# CreateBrandRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ParentId** | **int64** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewCreateBrandRequest + +`func NewCreateBrandRequest(name string, parentId int64, type_ string, ) *CreateBrandRequest` + +NewCreateBrandRequest instantiates a new CreateBrandRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateBrandRequestWithDefaults + +`func NewCreateBrandRequestWithDefaults() *CreateBrandRequest` + +NewCreateBrandRequestWithDefaults instantiates a new CreateBrandRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateBrandRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateBrandRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateBrandRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetParentId + +`func (o *CreateBrandRequest) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *CreateBrandRequest) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *CreateBrandRequest) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetType + +`func (o *CreateBrandRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateBrandRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CreateBrandRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CreateOrganizationRequest.md b/azion-api/docs/CreateOrganizationRequest.md new file mode 100644 index 0000000..19b2980 --- /dev/null +++ b/azion-api/docs/CreateOrganizationRequest.md @@ -0,0 +1,93 @@ +# CreateOrganizationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ParentId** | **int64** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewCreateOrganizationRequest + +`func NewCreateOrganizationRequest(name string, parentId int64, type_ string, ) *CreateOrganizationRequest` + +NewCreateOrganizationRequest instantiates a new CreateOrganizationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateOrganizationRequestWithDefaults + +`func NewCreateOrganizationRequestWithDefaults() *CreateOrganizationRequest` + +NewCreateOrganizationRequestWithDefaults instantiates a new CreateOrganizationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateOrganizationRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateOrganizationRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateOrganizationRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetParentId + +`func (o *CreateOrganizationRequest) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *CreateOrganizationRequest) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *CreateOrganizationRequest) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetType + +`func (o *CreateOrganizationRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateOrganizationRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CreateOrganizationRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CreateResellerRequest.md b/azion-api/docs/CreateResellerRequest.md new file mode 100644 index 0000000..c1c9ab4 --- /dev/null +++ b/azion-api/docs/CreateResellerRequest.md @@ -0,0 +1,140 @@ +# CreateResellerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ParentId** | **int64** | | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewCreateResellerRequest + +`func NewCreateResellerRequest(name string, parentId int64, currencyIsoCode string, type_ string, ) *CreateResellerRequest` + +NewCreateResellerRequest instantiates a new CreateResellerRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateResellerRequestWithDefaults + +`func NewCreateResellerRequestWithDefaults() *CreateResellerRequest` + +NewCreateResellerRequestWithDefaults instantiates a new CreateResellerRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateResellerRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateResellerRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateResellerRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetParentId + +`func (o *CreateResellerRequest) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *CreateResellerRequest) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *CreateResellerRequest) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCurrencyIsoCode + +`func (o *CreateResellerRequest) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *CreateResellerRequest) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *CreateResellerRequest) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *CreateResellerRequest) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *CreateResellerRequest) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *CreateResellerRequest) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *CreateResellerRequest) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + +### GetType + +`func (o *CreateResellerRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateResellerRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CreateResellerRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CreateWorkspaceRequest.md b/azion-api/docs/CreateWorkspaceRequest.md new file mode 100644 index 0000000..33b5ec2 --- /dev/null +++ b/azion-api/docs/CreateWorkspaceRequest.md @@ -0,0 +1,93 @@ +# CreateWorkspaceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ParentId** | **int64** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewCreateWorkspaceRequest + +`func NewCreateWorkspaceRequest(name string, parentId int64, type_ string, ) *CreateWorkspaceRequest` + +NewCreateWorkspaceRequest instantiates a new CreateWorkspaceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreateWorkspaceRequestWithDefaults + +`func NewCreateWorkspaceRequestWithDefaults() *CreateWorkspaceRequest` + +NewCreateWorkspaceRequestWithDefaults instantiates a new CreateWorkspaceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CreateWorkspaceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateWorkspaceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CreateWorkspaceRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetParentId + +`func (o *CreateWorkspaceRequest) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *CreateWorkspaceRequest) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *CreateWorkspaceRequest) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetType + +`func (o *CreateWorkspaceRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateWorkspaceRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *CreateWorkspaceRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Credential.md b/azion-api/docs/Credential.md new file mode 100644 index 0000000..57d18b3 --- /dev/null +++ b/azion-api/docs/Credential.md @@ -0,0 +1,213 @@ +# Credential + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Capabilities** | **[]string** | | +**Buckets** | **[]string** | | +**ExpirationDate** | Pointer to **time.Time** | | [optional] +**LastEditor** | **NullableString** | | +**LastModified** | **time.Time** | | + +## Methods + +### NewCredential + +`func NewCredential(name string, accessKey string, secretKey string, capabilities []string, buckets []string, lastEditor NullableString, lastModified time.Time, ) *Credential` + +NewCredential instantiates a new Credential object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCredentialWithDefaults + +`func NewCredentialWithDefaults() *Credential` + +NewCredentialWithDefaults instantiates a new Credential object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Credential) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Credential) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Credential) SetName(v string)` + +SetName sets Name field to given value. + + +### GetAccessKey + +`func (o *Credential) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *Credential) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *Credential) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *Credential) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *Credential) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *Credential) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetCapabilities + +`func (o *Credential) GetCapabilities() []string` + +GetCapabilities returns the Capabilities field if non-nil, zero value otherwise. + +### GetCapabilitiesOk + +`func (o *Credential) GetCapabilitiesOk() (*[]string, bool)` + +GetCapabilitiesOk returns a tuple with the Capabilities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCapabilities + +`func (o *Credential) SetCapabilities(v []string)` + +SetCapabilities sets Capabilities field to given value. + + +### GetBuckets + +`func (o *Credential) GetBuckets() []string` + +GetBuckets returns the Buckets field if non-nil, zero value otherwise. + +### GetBucketsOk + +`func (o *Credential) GetBucketsOk() (*[]string, bool)` + +GetBucketsOk returns a tuple with the Buckets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuckets + +`func (o *Credential) SetBuckets(v []string)` + +SetBuckets sets Buckets field to given value. + + +### GetExpirationDate + +`func (o *Credential) GetExpirationDate() time.Time` + +GetExpirationDate returns the ExpirationDate field if non-nil, zero value otherwise. + +### GetExpirationDateOk + +`func (o *Credential) GetExpirationDateOk() (*time.Time, bool)` + +GetExpirationDateOk returns a tuple with the ExpirationDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationDate + +`func (o *Credential) SetExpirationDate(v time.Time)` + +SetExpirationDate sets ExpirationDate field to given value. + +### HasExpirationDate + +`func (o *Credential) HasExpirationDate() bool` + +HasExpirationDate returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *Credential) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Credential) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Credential) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### SetLastEditorNil + +`func (o *Credential) SetLastEditorNil(b bool)` + + SetLastEditorNil sets the value for LastEditor to be an explicit nil + +### UnsetLastEditor +`func (o *Credential) UnsetLastEditor()` + +UnsetLastEditor ensures that no value is present for LastEditor, not even an explicit nil +### GetLastModified + +`func (o *Credential) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Credential) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Credential) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CredentialCreateRequest.md b/azion-api/docs/CredentialCreateRequest.md new file mode 100644 index 0000000..42482ab --- /dev/null +++ b/azion-api/docs/CredentialCreateRequest.md @@ -0,0 +1,124 @@ +# CredentialCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Capabilities** | **[]string** | | +**Buckets** | Pointer to **[]string** | List of bucket names to associate with this credential. | [optional] +**ExpirationDate** | Pointer to **time.Time** | | [optional] + +## Methods + +### NewCredentialCreateRequest + +`func NewCredentialCreateRequest(name string, capabilities []string, ) *CredentialCreateRequest` + +NewCredentialCreateRequest instantiates a new CredentialCreateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCredentialCreateRequestWithDefaults + +`func NewCredentialCreateRequestWithDefaults() *CredentialCreateRequest` + +NewCredentialCreateRequestWithDefaults instantiates a new CredentialCreateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CredentialCreateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CredentialCreateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CredentialCreateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCapabilities + +`func (o *CredentialCreateRequest) GetCapabilities() []string` + +GetCapabilities returns the Capabilities field if non-nil, zero value otherwise. + +### GetCapabilitiesOk + +`func (o *CredentialCreateRequest) GetCapabilitiesOk() (*[]string, bool)` + +GetCapabilitiesOk returns a tuple with the Capabilities field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCapabilities + +`func (o *CredentialCreateRequest) SetCapabilities(v []string)` + +SetCapabilities sets Capabilities field to given value. + + +### GetBuckets + +`func (o *CredentialCreateRequest) GetBuckets() []string` + +GetBuckets returns the Buckets field if non-nil, zero value otherwise. + +### GetBucketsOk + +`func (o *CredentialCreateRequest) GetBucketsOk() (*[]string, bool)` + +GetBucketsOk returns a tuple with the Buckets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuckets + +`func (o *CredentialCreateRequest) SetBuckets(v []string)` + +SetBuckets sets Buckets field to given value. + +### HasBuckets + +`func (o *CredentialCreateRequest) HasBuckets() bool` + +HasBuckets returns a boolean if a field has been set. + +### GetExpirationDate + +`func (o *CredentialCreateRequest) GetExpirationDate() time.Time` + +GetExpirationDate returns the ExpirationDate field if non-nil, zero value otherwise. + +### GetExpirationDateOk + +`func (o *CredentialCreateRequest) GetExpirationDateOk() (*time.Time, bool)` + +GetExpirationDateOk returns a tuple with the ExpirationDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationDate + +`func (o *CredentialCreateRequest) SetExpirationDate(v time.Time)` + +SetExpirationDate sets ExpirationDate field to given value. + +### HasExpirationDate + +`func (o *CredentialCreateRequest) HasExpirationDate() bool` + +HasExpirationDate returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CredentialResponse.md b/azion-api/docs/CredentialResponse.md new file mode 100644 index 0000000..071e961 --- /dev/null +++ b/azion-api/docs/CredentialResponse.md @@ -0,0 +1,77 @@ +# CredentialResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Credential**](Credential.md) | | + +## Methods + +### NewCredentialResponse + +`func NewCredentialResponse(data Credential, ) *CredentialResponse` + +NewCredentialResponse instantiates a new CredentialResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCredentialResponseWithDefaults + +`func NewCredentialResponseWithDefaults() *CredentialResponse` + +NewCredentialResponseWithDefaults instantiates a new CredentialResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *CredentialResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *CredentialResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *CredentialResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *CredentialResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *CredentialResponse) GetData() Credential` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CredentialResponse) GetDataOk() (*Credential, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CredentialResponse) SetData(v Credential)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Credit.md b/azion-api/docs/Credit.md new file mode 100644 index 0000000..3aa5b9e --- /dev/null +++ b/azion-api/docs/Credit.md @@ -0,0 +1,198 @@ +# Credit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **float64** | | +**ClientId** | **string** | | +**Currency** | **string** | | +**EntryType** | **string** | | +**ExpirationDate** | **string** | | +**Created** | **string** | | +**CustomerStripeId** | **string** | | +**Description** | **string** | | + +## Methods + +### NewCredit + +`func NewCredit(amount float64, clientId string, currency string, entryType string, expirationDate string, created string, customerStripeId string, description string, ) *Credit` + +NewCredit instantiates a new Credit object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreditWithDefaults + +`func NewCreditWithDefaults() *Credit` + +NewCreditWithDefaults instantiates a new Credit object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAmount + +`func (o *Credit) GetAmount() float64` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *Credit) GetAmountOk() (*float64, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *Credit) SetAmount(v float64)` + +SetAmount sets Amount field to given value. + + +### GetClientId + +`func (o *Credit) GetClientId() string` + +GetClientId returns the ClientId field if non-nil, zero value otherwise. + +### GetClientIdOk + +`func (o *Credit) GetClientIdOk() (*string, bool)` + +GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetClientId + +`func (o *Credit) SetClientId(v string)` + +SetClientId sets ClientId field to given value. + + +### GetCurrency + +`func (o *Credit) GetCurrency() string` + +GetCurrency returns the Currency field if non-nil, zero value otherwise. + +### GetCurrencyOk + +`func (o *Credit) GetCurrencyOk() (*string, bool)` + +GetCurrencyOk returns a tuple with the Currency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrency + +`func (o *Credit) SetCurrency(v string)` + +SetCurrency sets Currency field to given value. + + +### GetEntryType + +`func (o *Credit) GetEntryType() string` + +GetEntryType returns the EntryType field if non-nil, zero value otherwise. + +### GetEntryTypeOk + +`func (o *Credit) GetEntryTypeOk() (*string, bool)` + +GetEntryTypeOk returns a tuple with the EntryType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEntryType + +`func (o *Credit) SetEntryType(v string)` + +SetEntryType sets EntryType field to given value. + + +### GetExpirationDate + +`func (o *Credit) GetExpirationDate() string` + +GetExpirationDate returns the ExpirationDate field if non-nil, zero value otherwise. + +### GetExpirationDateOk + +`func (o *Credit) GetExpirationDateOk() (*string, bool)` + +GetExpirationDateOk returns a tuple with the ExpirationDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpirationDate + +`func (o *Credit) SetExpirationDate(v string)` + +SetExpirationDate sets ExpirationDate field to given value. + + +### GetCreated + +`func (o *Credit) GetCreated() string` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Credit) GetCreatedOk() (*string, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Credit) SetCreated(v string)` + +SetCreated sets Created field to given value. + + +### GetCustomerStripeId + +`func (o *Credit) GetCustomerStripeId() string` + +GetCustomerStripeId returns the CustomerStripeId field if non-nil, zero value otherwise. + +### GetCustomerStripeIdOk + +`func (o *Credit) GetCustomerStripeIdOk() (*string, bool)` + +GetCustomerStripeIdOk returns a tuple with the CustomerStripeId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerStripeId + +`func (o *Credit) SetCustomerStripeId(v string)` + +SetCustomerStripeId sets CustomerStripeId field to given value. + + +### GetDescription + +`func (o *Credit) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Credit) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Credit) SetDescription(v string)` + +SetDescription sets Description field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CreditRequest.md b/azion-api/docs/CreditRequest.md new file mode 100644 index 0000000..e061f71 --- /dev/null +++ b/azion-api/docs/CreditRequest.md @@ -0,0 +1,51 @@ +# CreditRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **float64** | | + +## Methods + +### NewCreditRequest + +`func NewCreditRequest(amount float64, ) *CreditRequest` + +NewCreditRequest instantiates a new CreditRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCreditRequestWithDefaults + +`func NewCreditRequestWithDefaults() *CreditRequest` + +NewCreditRequestWithDefaults instantiates a new CreditRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAmount + +`func (o *CreditRequest) GetAmount() float64` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *CreditRequest) GetAmountOk() (*float64, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmount + +`func (o *CreditRequest) SetAmount(v float64)` + +SetAmount sets Amount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CustomPage.md b/azion-api/docs/CustomPage.md new file mode 100644 index 0000000..231a704 --- /dev/null +++ b/azion-api/docs/CustomPage.md @@ -0,0 +1,182 @@ +# CustomPage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | **string** | | +**Pages** | [**[]Page**](Page.md) | | + +## Methods + +### NewCustomPage + +`func NewCustomPage(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, pages []Page, ) *CustomPage` + +NewCustomPage instantiates a new CustomPage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomPageWithDefaults + +`func NewCustomPageWithDefaults() *CustomPage` + +NewCustomPageWithDefaults instantiates a new CustomPage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *CustomPage) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *CustomPage) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *CustomPage) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *CustomPage) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CustomPage) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CustomPage) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *CustomPage) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *CustomPage) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *CustomPage) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *CustomPage) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *CustomPage) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *CustomPage) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *CustomPage) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *CustomPage) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *CustomPage) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *CustomPage) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *CustomPage) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *CustomPage) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *CustomPage) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetPages + +`func (o *CustomPage) GetPages() []Page` + +GetPages returns the Pages field if non-nil, zero value otherwise. + +### GetPagesOk + +`func (o *CustomPage) GetPagesOk() (*[]Page, bool)` + +GetPagesOk returns a tuple with the Pages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPages + +`func (o *CustomPage) SetPages(v []Page)` + +SetPages sets Pages field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CustomPageRequest.md b/azion-api/docs/CustomPageRequest.md new file mode 100644 index 0000000..54c2614 --- /dev/null +++ b/azion-api/docs/CustomPageRequest.md @@ -0,0 +1,98 @@ +# CustomPageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Pages** | [**[]PageRequest**](PageRequest.md) | | + +## Methods + +### NewCustomPageRequest + +`func NewCustomPageRequest(name string, pages []PageRequest, ) *CustomPageRequest` + +NewCustomPageRequest instantiates a new CustomPageRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomPageRequestWithDefaults + +`func NewCustomPageRequestWithDefaults() *CustomPageRequest` + +NewCustomPageRequestWithDefaults instantiates a new CustomPageRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *CustomPageRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CustomPageRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *CustomPageRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *CustomPageRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *CustomPageRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *CustomPageRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *CustomPageRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetPages + +`func (o *CustomPageRequest) GetPages() []PageRequest` + +GetPages returns the Pages field if non-nil, zero value otherwise. + +### GetPagesOk + +`func (o *CustomPageRequest) GetPagesOk() (*[]PageRequest, bool)` + +GetPagesOk returns a tuple with the Pages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPages + +`func (o *CustomPageRequest) SetPages(v []PageRequest)` + +SetPages sets Pages field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CustomPageResponse.md b/azion-api/docs/CustomPageResponse.md new file mode 100644 index 0000000..a33d0fb --- /dev/null +++ b/azion-api/docs/CustomPageResponse.md @@ -0,0 +1,77 @@ +# CustomPageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**CustomPage**](CustomPage.md) | | + +## Methods + +### NewCustomPageResponse + +`func NewCustomPageResponse(data CustomPage, ) *CustomPageResponse` + +NewCustomPageResponse instantiates a new CustomPageResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewCustomPageResponseWithDefaults + +`func NewCustomPageResponseWithDefaults() *CustomPageResponse` + +NewCustomPageResponseWithDefaults instantiates a new CustomPageResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *CustomPageResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *CustomPageResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *CustomPageResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *CustomPageResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *CustomPageResponse) GetData() CustomPage` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *CustomPageResponse) GetDataOk() (*CustomPage, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *CustomPageResponse) SetData(v CustomPage)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/CustomPagesAPI.md b/azion-api/docs/CustomPagesAPI.md new file mode 100644 index 0000000..333c27d --- /dev/null +++ b/azion-api/docs/CustomPagesAPI.md @@ -0,0 +1,453 @@ +# \CustomPagesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCustomPage**](CustomPagesAPI.md#CreateCustomPage) | **Post** /workspace/custom_pages | Create a Custom Page +[**DeleteCustomPage**](CustomPagesAPI.md#DeleteCustomPage) | **Delete** /workspace/custom_pages/{custom_page_id} | Delete a Custom Page +[**ListCustomPages**](CustomPagesAPI.md#ListCustomPages) | **Get** /workspace/custom_pages | List Custom Pages +[**PartialUpdateCustomPage**](CustomPagesAPI.md#PartialUpdateCustomPage) | **Patch** /workspace/custom_pages/{custom_page_id} | Partially update a Custom Page +[**RetrieveCustomPage**](CustomPagesAPI.md#RetrieveCustomPage) | **Get** /workspace/custom_pages/{custom_page_id} | Retrieve details of a Custom Page +[**UpdateCustomPage**](CustomPagesAPI.md#UpdateCustomPage) | **Put** /workspace/custom_pages/{custom_page_id} | Update a Custom Page + + + +## CreateCustomPage + +> CustomPageResponse CreateCustomPage(ctx).CustomPageRequest(customPageRequest).Execute() + +Create a Custom Page + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customPageRequest := *openapiclient.NewCustomPageRequest("Name_example", []openapiclient.PageRequest{*openapiclient.NewPageRequest("Code_example", *openapiclient.NewPageConnectorRequest("Type_example", *openapiclient.NewPageConnectorAttributesRequest(int64(123))))}) // CustomPageRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesAPI.CreateCustomPage(context.Background()).CustomPageRequest(customPageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesAPI.CreateCustomPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCustomPage`: CustomPageResponse + fmt.Fprintf(os.Stdout, "Response from `CustomPagesAPI.CreateCustomPage`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCustomPageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customPageRequest** | [**CustomPageRequest**](CustomPageRequest.md) | | + +### Return type + +[**CustomPageResponse**](CustomPageResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCustomPage + +> DeleteResponse DeleteCustomPage(ctx, customPageId).Execute() + +Delete a Custom Page + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customPageId := int64(789) // int64 | A unique integer value identifying the custom page. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesAPI.DeleteCustomPage(context.Background(), customPageId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesAPI.DeleteCustomPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteCustomPage`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `CustomPagesAPI.DeleteCustomPage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customPageId** | **int64** | A unique integer value identifying the custom page. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteCustomPageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCustomPages + +> PaginatedCustomPageList ListCustomPages(ctx).Active(active).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Custom Pages + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesAPI.ListCustomPages(context.Background()).Active(active).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesAPI.ListCustomPages``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCustomPages`: PaginatedCustomPageList + fmt.Fprintf(os.Stdout, "Response from `CustomPagesAPI.ListCustomPages`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListCustomPagesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedCustomPageList**](PaginatedCustomPageList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateCustomPage + +> CustomPageResponse PartialUpdateCustomPage(ctx, customPageId).PatchedCustomPageRequest(patchedCustomPageRequest).Execute() + +Partially update a Custom Page + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customPageId := int64(789) // int64 | A unique integer value identifying the custom page. + patchedCustomPageRequest := *openapiclient.NewPatchedCustomPageRequest() // PatchedCustomPageRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesAPI.PartialUpdateCustomPage(context.Background(), customPageId).PatchedCustomPageRequest(patchedCustomPageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesAPI.PartialUpdateCustomPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateCustomPage`: CustomPageResponse + fmt.Fprintf(os.Stdout, "Response from `CustomPagesAPI.PartialUpdateCustomPage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customPageId** | **int64** | A unique integer value identifying the custom page. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateCustomPageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedCustomPageRequest** | [**PatchedCustomPageRequest**](PatchedCustomPageRequest.md) | | + +### Return type + +[**CustomPageResponse**](CustomPageResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveCustomPage + +> CustomPageResponse RetrieveCustomPage(ctx, customPageId).Fields(fields).Execute() + +Retrieve details of a Custom Page + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customPageId := int64(789) // int64 | A unique integer value identifying the custom page. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesAPI.RetrieveCustomPage(context.Background(), customPageId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesAPI.RetrieveCustomPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveCustomPage`: CustomPageResponse + fmt.Fprintf(os.Stdout, "Response from `CustomPagesAPI.RetrieveCustomPage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customPageId** | **int64** | A unique integer value identifying the custom page. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveCustomPageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**CustomPageResponse**](CustomPageResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCustomPage + +> CustomPageResponse UpdateCustomPage(ctx, customPageId).CustomPageRequest(customPageRequest).Execute() + +Update a Custom Page + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + customPageId := int64(789) // int64 | A unique integer value identifying the custom page. + customPageRequest := *openapiclient.NewCustomPageRequest("Name_example", []openapiclient.PageRequest{*openapiclient.NewPageRequest("Code_example", *openapiclient.NewPageConnectorRequest("Type_example", *openapiclient.NewPageConnectorAttributesRequest(int64(123))))}) // CustomPageRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.CustomPagesAPI.UpdateCustomPage(context.Background(), customPageId).CustomPageRequest(customPageRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `CustomPagesAPI.UpdateCustomPage``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCustomPage`: CustomPageResponse + fmt.Fprintf(os.Stdout, "Response from `CustomPagesAPI.UpdateCustomPage`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**customPageId** | **int64** | A unique integer value identifying the custom page. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateCustomPageRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **customPageRequest** | [**CustomPageRequest**](CustomPageRequest.md) | | + +### Return type + +[**CustomPageResponse**](CustomPageResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DNSDNSSECAPI.md b/azion-api/docs/DNSDNSSECAPI.md new file mode 100644 index 0000000..3af6a31 --- /dev/null +++ b/azion-api/docs/DNSDNSSECAPI.md @@ -0,0 +1,227 @@ +# \DNSDNSSECAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**PartialUpdateDnssec**](DNSDNSSECAPI.md#PartialUpdateDnssec) | **Patch** /workspace/dns/zones/{zone_id}/dnssec | Partially update a DNSSEC +[**RetrieveDnssec**](DNSDNSSECAPI.md#RetrieveDnssec) | **Get** /workspace/dns/zones/{zone_id}/dnssec | Retrieve details of a DNSSEC +[**UpdateDnssec**](DNSDNSSECAPI.md#UpdateDnssec) | **Put** /workspace/dns/zones/{zone_id}/dnssec | Update a DNSSEC + + + +## PartialUpdateDnssec + +> DNSSECResponse PartialUpdateDnssec(ctx, zoneId).PatchedDNSSECRequest(patchedDNSSECRequest).Execute() + +Partially update a DNSSEC + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + patchedDNSSECRequest := *openapiclient.NewPatchedDNSSECRequest() // PatchedDNSSECRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSDNSSECAPI.PartialUpdateDnssec(context.Background(), zoneId).PatchedDNSSECRequest(patchedDNSSECRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSDNSSECAPI.PartialUpdateDnssec``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDnssec`: DNSSECResponse + fmt.Fprintf(os.Stdout, "Response from `DNSDNSSECAPI.PartialUpdateDnssec`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDnssecRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedDNSSECRequest** | [**PatchedDNSSECRequest**](PatchedDNSSECRequest.md) | | + +### Return type + +[**DNSSECResponse**](DNSSECResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDnssec + +> DNSSECResponse RetrieveDnssec(ctx, zoneId).Fields(fields).Execute() + +Retrieve details of a DNSSEC + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSDNSSECAPI.RetrieveDnssec(context.Background(), zoneId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSDNSSECAPI.RetrieveDnssec``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDnssec`: DNSSECResponse + fmt.Fprintf(os.Stdout, "Response from `DNSDNSSECAPI.RetrieveDnssec`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDnssecRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**DNSSECResponse**](DNSSECResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDnssec + +> DNSSECResponse UpdateDnssec(ctx, zoneId).DNSSECRequest(dNSSECRequest).Execute() + +Update a DNSSEC + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + dNSSECRequest := *openapiclient.NewDNSSECRequest(false) // DNSSECRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSDNSSECAPI.UpdateDnssec(context.Background(), zoneId).DNSSECRequest(dNSSECRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSDNSSECAPI.UpdateDnssec``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDnssec`: DNSSECResponse + fmt.Fprintf(os.Stdout, "Response from `DNSDNSSECAPI.UpdateDnssec`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDnssecRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dNSSECRequest** | [**DNSSECRequest**](DNSSECRequest.md) | | + +### Return type + +[**DNSSECResponse**](DNSSECResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DNSRecordsAPI.md b/azion-api/docs/DNSRecordsAPI.md new file mode 100644 index 0000000..ba84be2 --- /dev/null +++ b/azion-api/docs/DNSRecordsAPI.md @@ -0,0 +1,464 @@ +# \DNSRecordsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDnsRecord**](DNSRecordsAPI.md#CreateDnsRecord) | **Post** /workspace/dns/zones/{zone_id}/records | Create a DNS Record +[**DeleteDnsRecord**](DNSRecordsAPI.md#DeleteDnsRecord) | **Delete** /workspace/dns/zones/{zone_id}/records/{record_id} | Delete a DNS Record +[**ListDnsRecords**](DNSRecordsAPI.md#ListDnsRecords) | **Get** /workspace/dns/zones/{zone_id}/records | List DNS Records +[**PartialUpdateDnsRecord**](DNSRecordsAPI.md#PartialUpdateDnsRecord) | **Patch** /workspace/dns/zones/{zone_id}/records/{record_id} | Partially update a DNS Record +[**RetrieveDnsRecord**](DNSRecordsAPI.md#RetrieveDnsRecord) | **Get** /workspace/dns/zones/{zone_id}/records/{record_id} | Retrieve details of a DNS Record +[**UpdateDnsRecord**](DNSRecordsAPI.md#UpdateDnsRecord) | **Put** /workspace/dns/zones/{zone_id}/records/{record_id} | Update a DNS Record + + + +## CreateDnsRecord + +> RecordResponse CreateDnsRecord(ctx, zoneId).RecordRequest(recordRequest).Execute() + +Create a DNS Record + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + recordRequest := *openapiclient.NewRecordRequest("Name_example", "Type_example", []string{"Rdata_example"}) // RecordRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSRecordsAPI.CreateDnsRecord(context.Background(), zoneId).RecordRequest(recordRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSRecordsAPI.CreateDnsRecord``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDnsRecord`: RecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSRecordsAPI.CreateDnsRecord`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDnsRecordRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **recordRequest** | [**RecordRequest**](RecordRequest.md) | | + +### Return type + +[**RecordResponse**](RecordResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDnsRecord + +> DeleteResponse DeleteDnsRecord(ctx, recordId, zoneId).Execute() + +Delete a DNS Record + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + recordId := int64(789) // int64 | A unique integer value identifying the DNS Record. + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSRecordsAPI.DeleteDnsRecord(context.Background(), recordId, zoneId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSRecordsAPI.DeleteDnsRecord``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteDnsRecord`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `DNSRecordsAPI.DeleteDnsRecord`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**recordId** | **int64** | A unique integer value identifying the DNS Record. | +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDnsRecordRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDnsRecords + +> PaginatedRecordList ListDnsRecords(ctx, zoneId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List DNS Records + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSRecordsAPI.ListDnsRecords(context.Background(), zoneId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSRecordsAPI.ListDnsRecords``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDnsRecords`: PaginatedRecordList + fmt.Fprintf(os.Stdout, "Response from `DNSRecordsAPI.ListDnsRecords`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDnsRecordsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedRecordList**](PaginatedRecordList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateDnsRecord + +> RecordResponse PartialUpdateDnsRecord(ctx, recordId, zoneId).PatchedRecordRequest(patchedRecordRequest).Execute() + +Partially update a DNS Record + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + recordId := int64(789) // int64 | A unique integer value identifying the DNS Record. + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + patchedRecordRequest := *openapiclient.NewPatchedRecordRequest() // PatchedRecordRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSRecordsAPI.PartialUpdateDnsRecord(context.Background(), recordId, zoneId).PatchedRecordRequest(patchedRecordRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSRecordsAPI.PartialUpdateDnsRecord``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDnsRecord`: RecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSRecordsAPI.PartialUpdateDnsRecord`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**recordId** | **int64** | A unique integer value identifying the DNS Record. | +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDnsRecordRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedRecordRequest** | [**PatchedRecordRequest**](PatchedRecordRequest.md) | | + +### Return type + +[**RecordResponse**](RecordResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDnsRecord + +> RecordResponse RetrieveDnsRecord(ctx, recordId, zoneId).Fields(fields).Execute() + +Retrieve details of a DNS Record + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + recordId := int64(789) // int64 | A unique integer value identifying the DNS Record. + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSRecordsAPI.RetrieveDnsRecord(context.Background(), recordId, zoneId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSRecordsAPI.RetrieveDnsRecord``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDnsRecord`: RecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSRecordsAPI.RetrieveDnsRecord`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**recordId** | **int64** | A unique integer value identifying the DNS Record. | +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDnsRecordRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**RecordResponse**](RecordResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDnsRecord + +> RecordResponse UpdateDnsRecord(ctx, recordId, zoneId).RecordRequest(recordRequest).Execute() + +Update a DNS Record + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + recordId := int64(789) // int64 | A unique integer value identifying the DNS Record. + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + recordRequest := *openapiclient.NewRecordRequest("Name_example", "Type_example", []string{"Rdata_example"}) // RecordRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSRecordsAPI.UpdateDnsRecord(context.Background(), recordId, zoneId).RecordRequest(recordRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSRecordsAPI.UpdateDnsRecord``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDnsRecord`: RecordResponse + fmt.Fprintf(os.Stdout, "Response from `DNSRecordsAPI.UpdateDnsRecord`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**recordId** | **int64** | A unique integer value identifying the DNS Record. | +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDnsRecordRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **recordRequest** | [**RecordRequest**](RecordRequest.md) | | + +### Return type + +[**RecordResponse**](RecordResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DNSSEC.md b/azion-api/docs/DNSSEC.md new file mode 100644 index 0000000..5f65c50 --- /dev/null +++ b/azion-api/docs/DNSSEC.md @@ -0,0 +1,103 @@ +# DNSSEC + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | +**Status** | **string** | * `unconfigured` - unconfigured * `waiting` - waiting * `ready` - ready | +**DelegationSigner** | [**NullableDelegationSigner**](DelegationSigner.md) | | + +## Methods + +### NewDNSSEC + +`func NewDNSSEC(enabled bool, status string, delegationSigner NullableDelegationSigner, ) *DNSSEC` + +NewDNSSEC instantiates a new DNSSEC object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDNSSECWithDefaults + +`func NewDNSSECWithDefaults() *DNSSEC` + +NewDNSSECWithDefaults instantiates a new DNSSEC object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *DNSSEC) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *DNSSEC) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *DNSSEC) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetStatus + +`func (o *DNSSEC) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *DNSSEC) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *DNSSEC) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetDelegationSigner + +`func (o *DNSSEC) GetDelegationSigner() DelegationSigner` + +GetDelegationSigner returns the DelegationSigner field if non-nil, zero value otherwise. + +### GetDelegationSignerOk + +`func (o *DNSSEC) GetDelegationSignerOk() (*DelegationSigner, bool)` + +GetDelegationSignerOk returns a tuple with the DelegationSigner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDelegationSigner + +`func (o *DNSSEC) SetDelegationSigner(v DelegationSigner)` + +SetDelegationSigner sets DelegationSigner field to given value. + + +### SetDelegationSignerNil + +`func (o *DNSSEC) SetDelegationSignerNil(b bool)` + + SetDelegationSignerNil sets the value for DelegationSigner to be an explicit nil + +### UnsetDelegationSigner +`func (o *DNSSEC) UnsetDelegationSigner()` + +UnsetDelegationSigner ensures that no value is present for DelegationSigner, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DNSSECRequest.md b/azion-api/docs/DNSSECRequest.md new file mode 100644 index 0000000..02dfbf3 --- /dev/null +++ b/azion-api/docs/DNSSECRequest.md @@ -0,0 +1,51 @@ +# DNSSECRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | + +## Methods + +### NewDNSSECRequest + +`func NewDNSSECRequest(enabled bool, ) *DNSSECRequest` + +NewDNSSECRequest instantiates a new DNSSECRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDNSSECRequestWithDefaults + +`func NewDNSSECRequestWithDefaults() *DNSSECRequest` + +NewDNSSECRequestWithDefaults instantiates a new DNSSECRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *DNSSECRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *DNSSECRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *DNSSECRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DNSSECResponse.md b/azion-api/docs/DNSSECResponse.md new file mode 100644 index 0000000..89badc6 --- /dev/null +++ b/azion-api/docs/DNSSECResponse.md @@ -0,0 +1,51 @@ +# DNSSECResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**DNSSEC**](DNSSEC.md) | | + +## Methods + +### NewDNSSECResponse + +`func NewDNSSECResponse(data DNSSEC, ) *DNSSECResponse` + +NewDNSSECResponse instantiates a new DNSSECResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDNSSECResponseWithDefaults + +`func NewDNSSECResponseWithDefaults() *DNSSECResponse` + +NewDNSSECResponseWithDefaults instantiates a new DNSSECResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *DNSSECResponse) GetData() DNSSEC` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DNSSECResponse) GetDataOk() (*DNSSEC, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *DNSSECResponse) SetData(v DNSSEC)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DNSZonesAPI.md b/azion-api/docs/DNSZonesAPI.md new file mode 100644 index 0000000..ba9430e --- /dev/null +++ b/azion-api/docs/DNSZonesAPI.md @@ -0,0 +1,446 @@ +# \DNSZonesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDnsZone**](DNSZonesAPI.md#CreateDnsZone) | **Post** /workspace/dns/zones | Create a DNS Zone +[**DeleteDnsZone**](DNSZonesAPI.md#DeleteDnsZone) | **Delete** /workspace/dns/zones/{zone_id} | Delete a DNS Zone +[**ListDnsZones**](DNSZonesAPI.md#ListDnsZones) | **Get** /workspace/dns/zones | List DNS Zones +[**PartialUpdateDnsZone**](DNSZonesAPI.md#PartialUpdateDnsZone) | **Patch** /workspace/dns/zones/{zone_id} | Partially update a DNS Zone +[**RetrieveDnsZone**](DNSZonesAPI.md#RetrieveDnsZone) | **Get** /workspace/dns/zones/{zone_id} | Retrieve details of a DNS Zone +[**UpdateDnsZone**](DNSZonesAPI.md#UpdateDnsZone) | **Put** /workspace/dns/zones/{zone_id} | Update a DNS Zone + + + +## CreateDnsZone + +> ZoneResponse CreateDnsZone(ctx).ZoneRequest(zoneRequest).Execute() + +Create a DNS Zone + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneRequest := *openapiclient.NewZoneRequest("Name_example", "Domain_example", false) // ZoneRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSZonesAPI.CreateDnsZone(context.Background()).ZoneRequest(zoneRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSZonesAPI.CreateDnsZone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDnsZone`: ZoneResponse + fmt.Fprintf(os.Stdout, "Response from `DNSZonesAPI.CreateDnsZone`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDnsZoneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **zoneRequest** | [**ZoneRequest**](ZoneRequest.md) | | + +### Return type + +[**ZoneResponse**](ZoneResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDnsZone + +> DeleteResponse DeleteDnsZone(ctx, zoneId).Execute() + +Delete a DNS Zone + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSZonesAPI.DeleteDnsZone(context.Background(), zoneId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSZonesAPI.DeleteDnsZone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteDnsZone`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `DNSZonesAPI.DeleteDnsZone`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDnsZoneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDnsZones + +> PaginatedZoneList ListDnsZones(ctx).Active(active).Domain(domain).Fields(fields).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List DNS Zones + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + domain := "domain_example" // string | Filter by domain (exact match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + name := "name_example" // string | Filter by name (exact match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSZonesAPI.ListDnsZones(context.Background()).Active(active).Domain(domain).Fields(fields).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSZonesAPI.ListDnsZones``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDnsZones`: PaginatedZoneList + fmt.Fprintf(os.Stdout, "Response from `DNSZonesAPI.ListDnsZones`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDnsZonesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **domain** | **string** | Filter by domain (exact match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **name** | **string** | Filter by name (exact match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedZoneList**](PaginatedZoneList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateDnsZone + +> ZoneResponse PartialUpdateDnsZone(ctx, zoneId).PatchedUpdateZoneRequest(patchedUpdateZoneRequest).Execute() + +Partially update a DNS Zone + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + patchedUpdateZoneRequest := *openapiclient.NewPatchedUpdateZoneRequest() // PatchedUpdateZoneRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSZonesAPI.PartialUpdateDnsZone(context.Background(), zoneId).PatchedUpdateZoneRequest(patchedUpdateZoneRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSZonesAPI.PartialUpdateDnsZone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDnsZone`: ZoneResponse + fmt.Fprintf(os.Stdout, "Response from `DNSZonesAPI.PartialUpdateDnsZone`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDnsZoneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedUpdateZoneRequest** | [**PatchedUpdateZoneRequest**](PatchedUpdateZoneRequest.md) | | + +### Return type + +[**ZoneResponse**](ZoneResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDnsZone + +> ZoneResponse RetrieveDnsZone(ctx, zoneId).Fields(fields).Execute() + +Retrieve details of a DNS Zone + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSZonesAPI.RetrieveDnsZone(context.Background(), zoneId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSZonesAPI.RetrieveDnsZone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDnsZone`: ZoneResponse + fmt.Fprintf(os.Stdout, "Response from `DNSZonesAPI.RetrieveDnsZone`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDnsZoneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ZoneResponse**](ZoneResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDnsZone + +> ZoneResponse UpdateDnsZone(ctx, zoneId).UpdateZoneRequest(updateZoneRequest).Execute() + +Update a DNS Zone + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + zoneId := int64(789) // int64 | A unique integer value identifying the DNS Zone. + updateZoneRequest := *openapiclient.NewUpdateZoneRequest("Name_example", false) // UpdateZoneRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DNSZonesAPI.UpdateDnsZone(context.Background(), zoneId).UpdateZoneRequest(updateZoneRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DNSZonesAPI.UpdateDnsZone``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDnsZone`: ZoneResponse + fmt.Fprintf(os.Stdout, "Response from `DNSZonesAPI.UpdateDnsZone`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**zoneId** | **int64** | A unique integer value identifying the DNS Zone. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDnsZoneRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateZoneRequest** | [**UpdateZoneRequest**](UpdateZoneRequest.md) | | + +### Return type + +[**ZoneResponse**](ZoneResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Dashboard.md b/azion-api/docs/Dashboard.md new file mode 100644 index 0000000..2090658 --- /dev/null +++ b/azion-api/docs/Dashboard.md @@ -0,0 +1,114 @@ +# Dashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | +**FolderId** | **int64** | | + +## Methods + +### NewDashboard + +`func NewDashboard(id int64, name string, scope string, folderId int64, ) *Dashboard` + +NewDashboard instantiates a new Dashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardWithDefaults + +`func NewDashboardWithDefaults() *Dashboard` + +NewDashboardWithDefaults instantiates a new Dashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Dashboard) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Dashboard) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Dashboard) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Dashboard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Dashboard) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Dashboard) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *Dashboard) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *Dashboard) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *Dashboard) SetScope(v string)` + +SetScope sets Scope field to given value. + + +### GetFolderId + +`func (o *Dashboard) GetFolderId() int64` + +GetFolderId returns the FolderId field if non-nil, zero value otherwise. + +### GetFolderIdOk + +`func (o *Dashboard) GetFolderIdOk() (*int64, bool)` + +GetFolderIdOk returns a tuple with the FolderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFolderId + +`func (o *Dashboard) SetFolderId(v int64)` + +SetFolderId sets FolderId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DashboardRequest.md b/azion-api/docs/DashboardRequest.md new file mode 100644 index 0000000..7eee8ac --- /dev/null +++ b/azion-api/docs/DashboardRequest.md @@ -0,0 +1,72 @@ +# DashboardRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | + +## Methods + +### NewDashboardRequest + +`func NewDashboardRequest(name string, scope string, ) *DashboardRequest` + +NewDashboardRequest instantiates a new DashboardRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDashboardRequestWithDefaults + +`func NewDashboardRequestWithDefaults() *DashboardRequest` + +NewDashboardRequestWithDefaults instantiates a new DashboardRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DashboardRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DashboardRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DashboardRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *DashboardRequest) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *DashboardRequest) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *DashboardRequest) SetScope(v string)` + +SetScope sets Scope field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DataSource.md b/azion-api/docs/DataSource.md new file mode 100644 index 0000000..87590f9 --- /dev/null +++ b/azion-api/docs/DataSource.md @@ -0,0 +1,93 @@ +# DataSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Slug** | **string** | | +**Name** | **string** | | +**Active** | **bool** | | + +## Methods + +### NewDataSource + +`func NewDataSource(slug string, name string, active bool, ) *DataSource` + +NewDataSource instantiates a new DataSource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDataSourceWithDefaults + +`func NewDataSourceWithDefaults() *DataSource` + +NewDataSourceWithDefaults instantiates a new DataSource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetSlug + +`func (o *DataSource) GetSlug() string` + +GetSlug returns the Slug field if non-nil, zero value otherwise. + +### GetSlugOk + +`func (o *DataSource) GetSlugOk() (*string, bool)` + +GetSlugOk returns a tuple with the Slug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSlug + +`func (o *DataSource) SetSlug(v string)` + +SetSlug sets Slug field to given value. + + +### GetName + +`func (o *DataSource) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DataSource) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DataSource) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *DataSource) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *DataSource) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *DataSource) SetActive(v bool)` + +SetActive sets Active field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DataStream.md b/azion-api/docs/DataStream.md new file mode 100644 index 0000000..cfe3c1b --- /dev/null +++ b/azion-api/docs/DataStream.md @@ -0,0 +1,224 @@ +# DataStream + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ProductVersion** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Inputs** | [**[]InputInputDataSourceAttributes**](InputInputDataSourceAttributes.md) | | +**Transform** | [**[]Transform**](Transform.md) | | +**Outputs** | [**[]Output**](Output.md) | | + +## Methods + +### NewDataStream + +`func NewDataStream(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, inputs []InputInputDataSourceAttributes, transform []Transform, outputs []Output, ) *DataStream` + +NewDataStream instantiates a new DataStream object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDataStreamWithDefaults + +`func NewDataStreamWithDefaults() *DataStream` + +NewDataStreamWithDefaults instantiates a new DataStream object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DataStream) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DataStream) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DataStream) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DataStream) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DataStream) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DataStream) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *DataStream) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *DataStream) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *DataStream) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *DataStream) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *DataStream) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *DataStream) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *DataStream) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *DataStream) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *DataStream) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetActive + +`func (o *DataStream) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *DataStream) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *DataStream) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *DataStream) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetInputs + +`func (o *DataStream) GetInputs() []InputInputDataSourceAttributes` + +GetInputs returns the Inputs field if non-nil, zero value otherwise. + +### GetInputsOk + +`func (o *DataStream) GetInputsOk() (*[]InputInputDataSourceAttributes, bool)` + +GetInputsOk returns a tuple with the Inputs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInputs + +`func (o *DataStream) SetInputs(v []InputInputDataSourceAttributes)` + +SetInputs sets Inputs field to given value. + + +### GetTransform + +`func (o *DataStream) GetTransform() []Transform` + +GetTransform returns the Transform field if non-nil, zero value otherwise. + +### GetTransformOk + +`func (o *DataStream) GetTransformOk() (*[]Transform, bool)` + +GetTransformOk returns a tuple with the Transform field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransform + +`func (o *DataStream) SetTransform(v []Transform)` + +SetTransform sets Transform field to given value. + + +### GetOutputs + +`func (o *DataStream) GetOutputs() []Output` + +GetOutputs returns the Outputs field if non-nil, zero value otherwise. + +### GetOutputsOk + +`func (o *DataStream) GetOutputsOk() (*[]Output, bool)` + +GetOutputsOk returns a tuple with the Outputs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOutputs + +`func (o *DataStream) SetOutputs(v []Output)` + +SetOutputs sets Outputs field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DataStreamDataSourcesAPI.md b/azion-api/docs/DataStreamDataSourcesAPI.md new file mode 100644 index 0000000..b41a0fb --- /dev/null +++ b/azion-api/docs/DataStreamDataSourcesAPI.md @@ -0,0 +1,89 @@ +# \DataStreamDataSourcesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDataSources**](DataStreamDataSourcesAPI.md#ListDataSources) | **Get** /workspace/stream/data_sources | List of Data Sources + + + +## ListDataSources + +> PaginatedDataSourceList ListDataSources(ctx).Active(active).Fields(fields).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Slug(slug).Execute() + +List of Data Sources + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + slug := "slug_example" // string | Filter by slug (case-insensitive, exact match). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamDataSourcesAPI.ListDataSources(context.Background()).Active(active).Fields(fields).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Slug(slug).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamDataSourcesAPI.ListDataSources``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDataSources`: PaginatedDataSourceList + fmt.Fprintf(os.Stdout, "Response from `DataStreamDataSourcesAPI.ListDataSources`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDataSourcesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **slug** | **string** | Filter by slug (case-insensitive, exact match). | + +### Return type + +[**PaginatedDataSourceList**](PaginatedDataSourceList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DataStreamRequest.md b/azion-api/docs/DataStreamRequest.md new file mode 100644 index 0000000..a3ac030 --- /dev/null +++ b/azion-api/docs/DataStreamRequest.md @@ -0,0 +1,140 @@ +# DataStreamRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Inputs** | [**[]InputInputDataSourceAttributesRequest**](InputInputDataSourceAttributesRequest.md) | | +**Transform** | [**[]TransformRequest**](TransformRequest.md) | | +**Outputs** | [**[]OutputRequest**](OutputRequest.md) | | + +## Methods + +### NewDataStreamRequest + +`func NewDataStreamRequest(name string, inputs []InputInputDataSourceAttributesRequest, transform []TransformRequest, outputs []OutputRequest, ) *DataStreamRequest` + +NewDataStreamRequest instantiates a new DataStreamRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDataStreamRequestWithDefaults + +`func NewDataStreamRequestWithDefaults() *DataStreamRequest` + +NewDataStreamRequestWithDefaults instantiates a new DataStreamRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DataStreamRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DataStreamRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DataStreamRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *DataStreamRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *DataStreamRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *DataStreamRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *DataStreamRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetInputs + +`func (o *DataStreamRequest) GetInputs() []InputInputDataSourceAttributesRequest` + +GetInputs returns the Inputs field if non-nil, zero value otherwise. + +### GetInputsOk + +`func (o *DataStreamRequest) GetInputsOk() (*[]InputInputDataSourceAttributesRequest, bool)` + +GetInputsOk returns a tuple with the Inputs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInputs + +`func (o *DataStreamRequest) SetInputs(v []InputInputDataSourceAttributesRequest)` + +SetInputs sets Inputs field to given value. + + +### GetTransform + +`func (o *DataStreamRequest) GetTransform() []TransformRequest` + +GetTransform returns the Transform field if non-nil, zero value otherwise. + +### GetTransformOk + +`func (o *DataStreamRequest) GetTransformOk() (*[]TransformRequest, bool)` + +GetTransformOk returns a tuple with the Transform field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransform + +`func (o *DataStreamRequest) SetTransform(v []TransformRequest)` + +SetTransform sets Transform field to given value. + + +### GetOutputs + +`func (o *DataStreamRequest) GetOutputs() []OutputRequest` + +GetOutputs returns the Outputs field if non-nil, zero value otherwise. + +### GetOutputsOk + +`func (o *DataStreamRequest) GetOutputsOk() (*[]OutputRequest, bool)` + +GetOutputsOk returns a tuple with the Outputs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOutputs + +`func (o *DataStreamRequest) SetOutputs(v []OutputRequest)` + +SetOutputs sets Outputs field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DataStreamResponse.md b/azion-api/docs/DataStreamResponse.md new file mode 100644 index 0000000..f167c82 --- /dev/null +++ b/azion-api/docs/DataStreamResponse.md @@ -0,0 +1,77 @@ +# DataStreamResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**DataStream**](DataStream.md) | | + +## Methods + +### NewDataStreamResponse + +`func NewDataStreamResponse(data DataStream, ) *DataStreamResponse` + +NewDataStreamResponse instantiates a new DataStreamResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDataStreamResponseWithDefaults + +`func NewDataStreamResponseWithDefaults() *DataStreamResponse` + +NewDataStreamResponseWithDefaults instantiates a new DataStreamResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *DataStreamResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *DataStreamResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *DataStreamResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *DataStreamResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *DataStreamResponse) GetData() DataStream` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DataStreamResponse) GetDataOk() (*DataStream, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *DataStreamResponse) SetData(v DataStream)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DataStreamStreamsAPI.md b/azion-api/docs/DataStreamStreamsAPI.md new file mode 100644 index 0000000..ae6dcee --- /dev/null +++ b/azion-api/docs/DataStreamStreamsAPI.md @@ -0,0 +1,457 @@ +# \DataStreamStreamsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDataStream**](DataStreamStreamsAPI.md#CreateDataStream) | **Post** /workspace/stream/streams | Create a Data Stream +[**DeleteDataStream**](DataStreamStreamsAPI.md#DeleteDataStream) | **Delete** /workspace/stream/streams/{stream_id} | Delete a Data Stream +[**ListDataStreams**](DataStreamStreamsAPI.md#ListDataStreams) | **Get** /workspace/stream/streams | List Data Streams +[**PartialUpdateDataStream**](DataStreamStreamsAPI.md#PartialUpdateDataStream) | **Patch** /workspace/stream/streams/{stream_id} | Partially update a Data Stream +[**RetrieveDataStream**](DataStreamStreamsAPI.md#RetrieveDataStream) | **Get** /workspace/stream/streams/{stream_id} | Retrieve details of a Data Stream +[**UpdateDataStream**](DataStreamStreamsAPI.md#UpdateDataStream) | **Put** /workspace/stream/streams/{stream_id} | Update a Data Stream + + + +## CreateDataStream + +> DataStreamResponse CreateDataStream(ctx).DataStreamRequest(dataStreamRequest).Execute() + +Create a Data Stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dataStreamRequest := *openapiclient.NewDataStreamRequest("Name_example", []openapiclient.InputInputDataSourceAttributesRequest{*openapiclient.NewInputInputDataSourceAttributesRequest("Type_example", *openapiclient.NewInputDataSourceRequest("DataSource_example"))}, []openapiclient.TransformRequest{openapiclient.TransformRequest{TransformTransformFilterWorkloadsAttributesRequest: openapiclient.NewTransformTransformFilterWorkloadsAttributesRequest("Type_example", *openapiclient.NewTransformFilterWorkloadsRequest([]int64{int64(123)}))}}, []openapiclient.OutputRequest{*openapiclient.NewOutputRequest("Type_example", openapiclient.OutputRequest2{AWSKinesisFirehoseEndpointRequest: openapiclient.NewAWSKinesisFirehoseEndpointRequest("AccessKey_example", "StreamName_example", "Region_example", "SecretKey_example", "Type_example")})}) // DataStreamRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamStreamsAPI.CreateDataStream(context.Background()).DataStreamRequest(dataStreamRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamStreamsAPI.CreateDataStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDataStream`: DataStreamResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamStreamsAPI.CreateDataStream`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDataStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataStreamRequest** | [**DataStreamRequest**](DataStreamRequest.md) | | + +### Return type + +[**DataStreamResponse**](DataStreamResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDataStream + +> DeleteResponse DeleteDataStream(ctx, streamId).Execute() + +Delete a Data Stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + streamId := int64(789) // int64 | A unique integer value identifying the data stream. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamStreamsAPI.DeleteDataStream(context.Background(), streamId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamStreamsAPI.DeleteDataStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteDataStream`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamStreamsAPI.DeleteDataStream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**streamId** | **int64** | A unique integer value identifying the data stream. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDataStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDataStreams + +> PaginatedDataStreamList ListDataStreams(ctx).Active(active).DataSetId(dataSetId).DataSource(dataSource).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Data Streams + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + dataSetId := int64(789) // int64 | Filter by data set id (accepts comma-separated values). (optional) + dataSource := "dataSource_example" // string | Filter by data source (accepts comma-separated values). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamStreamsAPI.ListDataStreams(context.Background()).Active(active).DataSetId(dataSetId).DataSource(dataSource).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamStreamsAPI.ListDataStreams``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDataStreams`: PaginatedDataStreamList + fmt.Fprintf(os.Stdout, "Response from `DataStreamStreamsAPI.ListDataStreams`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDataStreamsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **dataSetId** | **int64** | Filter by data set id (accepts comma-separated values). | + **dataSource** | **string** | Filter by data source (accepts comma-separated values). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedDataStreamList**](PaginatedDataStreamList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateDataStream + +> DataStreamResponse PartialUpdateDataStream(ctx, streamId).PatchedDataStreamRequest(patchedDataStreamRequest).Execute() + +Partially update a Data Stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + streamId := int64(789) // int64 | A unique integer value identifying the data stream. + patchedDataStreamRequest := *openapiclient.NewPatchedDataStreamRequest() // PatchedDataStreamRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamStreamsAPI.PartialUpdateDataStream(context.Background(), streamId).PatchedDataStreamRequest(patchedDataStreamRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamStreamsAPI.PartialUpdateDataStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDataStream`: DataStreamResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamStreamsAPI.PartialUpdateDataStream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**streamId** | **int64** | A unique integer value identifying the data stream. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDataStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedDataStreamRequest** | [**PatchedDataStreamRequest**](PatchedDataStreamRequest.md) | | + +### Return type + +[**DataStreamResponse**](DataStreamResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDataStream + +> DataStreamResponse RetrieveDataStream(ctx, streamId).Fields(fields).Execute() + +Retrieve details of a Data Stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + streamId := int64(789) // int64 | A unique integer value identifying the data stream. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamStreamsAPI.RetrieveDataStream(context.Background(), streamId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamStreamsAPI.RetrieveDataStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDataStream`: DataStreamResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamStreamsAPI.RetrieveDataStream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**streamId** | **int64** | A unique integer value identifying the data stream. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDataStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**DataStreamResponse**](DataStreamResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDataStream + +> DataStreamResponse UpdateDataStream(ctx, streamId).DataStreamRequest(dataStreamRequest).Execute() + +Update a Data Stream + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + streamId := int64(789) // int64 | A unique integer value identifying the data stream. + dataStreamRequest := *openapiclient.NewDataStreamRequest("Name_example", []openapiclient.InputInputDataSourceAttributesRequest{*openapiclient.NewInputInputDataSourceAttributesRequest("Type_example", *openapiclient.NewInputDataSourceRequest("DataSource_example"))}, []openapiclient.TransformRequest{openapiclient.TransformRequest{TransformTransformFilterWorkloadsAttributesRequest: openapiclient.NewTransformTransformFilterWorkloadsAttributesRequest("Type_example", *openapiclient.NewTransformFilterWorkloadsRequest([]int64{int64(123)}))}}, []openapiclient.OutputRequest{*openapiclient.NewOutputRequest("Type_example", openapiclient.OutputRequest2{AWSKinesisFirehoseEndpointRequest: openapiclient.NewAWSKinesisFirehoseEndpointRequest("AccessKey_example", "StreamName_example", "Region_example", "SecretKey_example", "Type_example")})}) // DataStreamRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamStreamsAPI.UpdateDataStream(context.Background(), streamId).DataStreamRequest(dataStreamRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamStreamsAPI.UpdateDataStream``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDataStream`: DataStreamResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamStreamsAPI.UpdateDataStream`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**streamId** | **int64** | A unique integer value identifying the data stream. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDataStreamRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dataStreamRequest** | [**DataStreamRequest**](DataStreamRequest.md) | | + +### Return type + +[**DataStreamResponse**](DataStreamResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DataStreamTemplatesAPI.md b/azion-api/docs/DataStreamTemplatesAPI.md new file mode 100644 index 0000000..da86d30 --- /dev/null +++ b/azion-api/docs/DataStreamTemplatesAPI.md @@ -0,0 +1,457 @@ +# \DataStreamTemplatesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTemplate**](DataStreamTemplatesAPI.md#CreateTemplate) | **Post** /workspace/stream/templates | Create a Template +[**DeleteTemplate**](DataStreamTemplatesAPI.md#DeleteTemplate) | **Delete** /workspace/stream/templates/{template_id} | Delete a Template +[**ListTemplates**](DataStreamTemplatesAPI.md#ListTemplates) | **Get** /workspace/stream/templates | List Templates +[**PartialUpdateTemplate**](DataStreamTemplatesAPI.md#PartialUpdateTemplate) | **Patch** /workspace/stream/templates/{template_id} | Partially update a Template +[**RetrieveTemplate**](DataStreamTemplatesAPI.md#RetrieveTemplate) | **Get** /workspace/stream/templates/{template_id} | Retrieve details of a Template +[**UpdateTemplate**](DataStreamTemplatesAPI.md#UpdateTemplate) | **Put** /workspace/stream/templates/{template_id} | Update a Template + + + +## CreateTemplate + +> TemplateResponse CreateTemplate(ctx).TemplateRequest(templateRequest).Execute() + +Create a Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + templateRequest := *openapiclient.NewTemplateRequest("Name_example", "DataSet_example") // TemplateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamTemplatesAPI.CreateTemplate(context.Background()).TemplateRequest(templateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamTemplatesAPI.CreateTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateTemplate`: TemplateResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamTemplatesAPI.CreateTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateRequest**](TemplateRequest.md) | | + +### Return type + +[**TemplateResponse**](TemplateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteTemplate + +> DeleteResponse DeleteTemplate(ctx, templateId).Execute() + +Delete a Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + templateId := int64(789) // int64 | A unique integer value identifying the template. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamTemplatesAPI.DeleteTemplate(context.Background(), templateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamTemplatesAPI.DeleteTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteTemplate`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamTemplatesAPI.DeleteTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **int64** | A unique integer value identifying the template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListTemplates + +> PaginatedTemplateList ListTemplates(ctx).Active(active).Custom(custom).DataSet(dataSet).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Templates + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + custom := true // bool | Filter by custom status (true for custom templates, false for default templates). (optional) + dataSet := "dataSet_example" // string | Filter by data set (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamTemplatesAPI.ListTemplates(context.Background()).Active(active).Custom(custom).DataSet(dataSet).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamTemplatesAPI.ListTemplates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListTemplates`: PaginatedTemplateList + fmt.Fprintf(os.Stdout, "Response from `DataStreamTemplatesAPI.ListTemplates`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListTemplatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **custom** | **bool** | Filter by custom status (true for custom templates, false for default templates). | + **dataSet** | **string** | Filter by data set (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedTemplateList**](PaginatedTemplateList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateTemplate + +> TemplateResponse PartialUpdateTemplate(ctx, templateId).PatchedTemplateRequest(patchedTemplateRequest).Execute() + +Partially update a Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + templateId := int64(789) // int64 | A unique integer value identifying the template. + patchedTemplateRequest := *openapiclient.NewPatchedTemplateRequest() // PatchedTemplateRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamTemplatesAPI.PartialUpdateTemplate(context.Background(), templateId).PatchedTemplateRequest(patchedTemplateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamTemplatesAPI.PartialUpdateTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateTemplate`: TemplateResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamTemplatesAPI.PartialUpdateTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **int64** | A unique integer value identifying the template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedTemplateRequest** | [**PatchedTemplateRequest**](PatchedTemplateRequest.md) | | + +### Return type + +[**TemplateResponse**](TemplateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveTemplate + +> TemplateResponse RetrieveTemplate(ctx, templateId).Fields(fields).Execute() + +Retrieve details of a Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + templateId := int64(789) // int64 | A unique integer value identifying the template. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamTemplatesAPI.RetrieveTemplate(context.Background(), templateId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamTemplatesAPI.RetrieveTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveTemplate`: TemplateResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamTemplatesAPI.RetrieveTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **int64** | A unique integer value identifying the template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**TemplateResponse**](TemplateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateTemplate + +> TemplateResponse UpdateTemplate(ctx, templateId).TemplateRequest(templateRequest).Execute() + +Update a Template + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + templateId := int64(789) // int64 | A unique integer value identifying the template. + templateRequest := *openapiclient.NewTemplateRequest("Name_example", "DataSet_example") // TemplateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DataStreamTemplatesAPI.UpdateTemplate(context.Background(), templateId).TemplateRequest(templateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DataStreamTemplatesAPI.UpdateTemplate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateTemplate`: TemplateResponse + fmt.Fprintf(os.Stdout, "Response from `DataStreamTemplatesAPI.UpdateTemplate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**templateId** | **int64** | A unique integer value identifying the template. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateTemplateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **templateRequest** | [**TemplateRequest**](TemplateRequest.md) | | + +### Return type + +[**TemplateResponse**](TemplateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DatabaseDetail.md b/azion-api/docs/DatabaseDetail.md new file mode 100644 index 0000000..4e999f0 --- /dev/null +++ b/azion-api/docs/DatabaseDetail.md @@ -0,0 +1,192 @@ +# DatabaseDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | Unique identifier for the database | +**Name** | **string** | Name of the database | +**Status** | **string** | Current status of the database * `creating` - creating * `created` - created * `deleting` - deleting | +**Active** | Pointer to **bool** | Whether the database is active | [optional] +**LastModified** | **time.Time** | Last modification timestamp | +**LastEditor** | **NullableString** | Last editor of the schema. | +**ProductVersion** | **string** | Product version | + +## Methods + +### NewDatabaseDetail + +`func NewDatabaseDetail(id int64, name string, status string, lastModified time.Time, lastEditor NullableString, productVersion string, ) *DatabaseDetail` + +NewDatabaseDetail instantiates a new DatabaseDetail object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDatabaseDetailWithDefaults + +`func NewDatabaseDetailWithDefaults() *DatabaseDetail` + +NewDatabaseDetailWithDefaults instantiates a new DatabaseDetail object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DatabaseDetail) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DatabaseDetail) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DatabaseDetail) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DatabaseDetail) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DatabaseDetail) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DatabaseDetail) SetName(v string)` + +SetName sets Name field to given value. + + +### GetStatus + +`func (o *DatabaseDetail) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *DatabaseDetail) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *DatabaseDetail) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetActive + +`func (o *DatabaseDetail) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *DatabaseDetail) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *DatabaseDetail) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *DatabaseDetail) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastModified + +`func (o *DatabaseDetail) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *DatabaseDetail) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *DatabaseDetail) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetLastEditor + +`func (o *DatabaseDetail) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *DatabaseDetail) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *DatabaseDetail) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### SetLastEditorNil + +`func (o *DatabaseDetail) SetLastEditorNil(b bool)` + + SetLastEditorNil sets the value for LastEditor to be an explicit nil + +### UnsetLastEditor +`func (o *DatabaseDetail) UnsetLastEditor()` + +UnsetLastEditor ensures that no value is present for LastEditor, not even an explicit nil +### GetProductVersion + +`func (o *DatabaseDetail) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *DatabaseDetail) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *DatabaseDetail) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DatabaseDetailResponse.md b/azion-api/docs/DatabaseDetailResponse.md new file mode 100644 index 0000000..3b2a710 --- /dev/null +++ b/azion-api/docs/DatabaseDetailResponse.md @@ -0,0 +1,77 @@ +# DatabaseDetailResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**DatabaseDetail**](DatabaseDetail.md) | | + +## Methods + +### NewDatabaseDetailResponse + +`func NewDatabaseDetailResponse(data DatabaseDetail, ) *DatabaseDetailResponse` + +NewDatabaseDetailResponse instantiates a new DatabaseDetailResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDatabaseDetailResponseWithDefaults + +`func NewDatabaseDetailResponseWithDefaults() *DatabaseDetailResponse` + +NewDatabaseDetailResponseWithDefaults instantiates a new DatabaseDetailResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *DatabaseDetailResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *DatabaseDetailResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *DatabaseDetailResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *DatabaseDetailResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *DatabaseDetailResponse) GetData() DatabaseDetail` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DatabaseDetailResponse) GetDataOk() (*DatabaseDetail, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *DatabaseDetailResponse) SetData(v DatabaseDetail)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DatabaseRequest.md b/azion-api/docs/DatabaseRequest.md new file mode 100644 index 0000000..93edc61 --- /dev/null +++ b/azion-api/docs/DatabaseRequest.md @@ -0,0 +1,77 @@ +# DatabaseRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the database | +**Active** | Pointer to **bool** | Whether the database is active | [optional] + +## Methods + +### NewDatabaseRequest + +`func NewDatabaseRequest(name string, ) *DatabaseRequest` + +NewDatabaseRequest instantiates a new DatabaseRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDatabaseRequestWithDefaults + +`func NewDatabaseRequestWithDefaults() *DatabaseRequest` + +NewDatabaseRequestWithDefaults instantiates a new DatabaseRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DatabaseRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DatabaseRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DatabaseRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *DatabaseRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *DatabaseRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *DatabaseRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *DatabaseRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DatadogEndpoint.md b/azion-api/docs/DatadogEndpoint.md new file mode 100644 index 0000000..b44d769 --- /dev/null +++ b/azion-api/docs/DatadogEndpoint.md @@ -0,0 +1,93 @@ +# DatadogEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**ApiKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (datadog) | + +## Methods + +### NewDatadogEndpoint + +`func NewDatadogEndpoint(url string, apiKey string, type_ string, ) *DatadogEndpoint` + +NewDatadogEndpoint instantiates a new DatadogEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDatadogEndpointWithDefaults + +`func NewDatadogEndpointWithDefaults() *DatadogEndpoint` + +NewDatadogEndpointWithDefaults instantiates a new DatadogEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *DatadogEndpoint) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *DatadogEndpoint) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *DatadogEndpoint) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetApiKey + +`func (o *DatadogEndpoint) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *DatadogEndpoint) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *DatadogEndpoint) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetType + +`func (o *DatadogEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DatadogEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DatadogEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DatadogEndpointRequest.md b/azion-api/docs/DatadogEndpointRequest.md new file mode 100644 index 0000000..56c932d --- /dev/null +++ b/azion-api/docs/DatadogEndpointRequest.md @@ -0,0 +1,93 @@ +# DatadogEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**ApiKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (datadog) | + +## Methods + +### NewDatadogEndpointRequest + +`func NewDatadogEndpointRequest(url string, apiKey string, type_ string, ) *DatadogEndpointRequest` + +NewDatadogEndpointRequest instantiates a new DatadogEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDatadogEndpointRequestWithDefaults + +`func NewDatadogEndpointRequestWithDefaults() *DatadogEndpointRequest` + +NewDatadogEndpointRequestWithDefaults instantiates a new DatadogEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *DatadogEndpointRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *DatadogEndpointRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *DatadogEndpointRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetApiKey + +`func (o *DatadogEndpointRequest) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *DatadogEndpointRequest) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *DatadogEndpointRequest) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetType + +`func (o *DatadogEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DatadogEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DatadogEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DefaultDeploymentStrategy.md b/azion-api/docs/DefaultDeploymentStrategy.md new file mode 100644 index 0000000..517c059 --- /dev/null +++ b/azion-api/docs/DefaultDeploymentStrategy.md @@ -0,0 +1,51 @@ +# DefaultDeploymentStrategy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**DefaultDeploymentStrategyAttrs**](DefaultDeploymentStrategyAttrs.md) | | + +## Methods + +### NewDefaultDeploymentStrategy + +`func NewDefaultDeploymentStrategy(attributes DefaultDeploymentStrategyAttrs, ) *DefaultDeploymentStrategy` + +NewDefaultDeploymentStrategy instantiates a new DefaultDeploymentStrategy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDefaultDeploymentStrategyWithDefaults + +`func NewDefaultDeploymentStrategyWithDefaults() *DefaultDeploymentStrategy` + +NewDefaultDeploymentStrategyWithDefaults instantiates a new DefaultDeploymentStrategy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttributes + +`func (o *DefaultDeploymentStrategy) GetAttributes() DefaultDeploymentStrategyAttrs` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *DefaultDeploymentStrategy) GetAttributesOk() (*DefaultDeploymentStrategyAttrs, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *DefaultDeploymentStrategy) SetAttributes(v DefaultDeploymentStrategyAttrs)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DefaultDeploymentStrategyAttrs.md b/azion-api/docs/DefaultDeploymentStrategyAttrs.md new file mode 100644 index 0000000..981f5bc --- /dev/null +++ b/azion-api/docs/DefaultDeploymentStrategyAttrs.md @@ -0,0 +1,123 @@ +# DefaultDeploymentStrategyAttrs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Application** | **int64** | | +**Firewall** | Pointer to **NullableInt64** | | [optional] +**CustomPage** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewDefaultDeploymentStrategyAttrs + +`func NewDefaultDeploymentStrategyAttrs(application int64, ) *DefaultDeploymentStrategyAttrs` + +NewDefaultDeploymentStrategyAttrs instantiates a new DefaultDeploymentStrategyAttrs object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDefaultDeploymentStrategyAttrsWithDefaults + +`func NewDefaultDeploymentStrategyAttrsWithDefaults() *DefaultDeploymentStrategyAttrs` + +NewDefaultDeploymentStrategyAttrsWithDefaults instantiates a new DefaultDeploymentStrategyAttrs object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApplication + +`func (o *DefaultDeploymentStrategyAttrs) GetApplication() int64` + +GetApplication returns the Application field if non-nil, zero value otherwise. + +### GetApplicationOk + +`func (o *DefaultDeploymentStrategyAttrs) GetApplicationOk() (*int64, bool)` + +GetApplicationOk returns a tuple with the Application field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplication + +`func (o *DefaultDeploymentStrategyAttrs) SetApplication(v int64)` + +SetApplication sets Application field to given value. + + +### GetFirewall + +`func (o *DefaultDeploymentStrategyAttrs) GetFirewall() int64` + +GetFirewall returns the Firewall field if non-nil, zero value otherwise. + +### GetFirewallOk + +`func (o *DefaultDeploymentStrategyAttrs) GetFirewallOk() (*int64, bool)` + +GetFirewallOk returns a tuple with the Firewall field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewall + +`func (o *DefaultDeploymentStrategyAttrs) SetFirewall(v int64)` + +SetFirewall sets Firewall field to given value. + +### HasFirewall + +`func (o *DefaultDeploymentStrategyAttrs) HasFirewall() bool` + +HasFirewall returns a boolean if a field has been set. + +### SetFirewallNil + +`func (o *DefaultDeploymentStrategyAttrs) SetFirewallNil(b bool)` + + SetFirewallNil sets the value for Firewall to be an explicit nil + +### UnsetFirewall +`func (o *DefaultDeploymentStrategyAttrs) UnsetFirewall()` + +UnsetFirewall ensures that no value is present for Firewall, not even an explicit nil +### GetCustomPage + +`func (o *DefaultDeploymentStrategyAttrs) GetCustomPage() int64` + +GetCustomPage returns the CustomPage field if non-nil, zero value otherwise. + +### GetCustomPageOk + +`func (o *DefaultDeploymentStrategyAttrs) GetCustomPageOk() (*int64, bool)` + +GetCustomPageOk returns a tuple with the CustomPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomPage + +`func (o *DefaultDeploymentStrategyAttrs) SetCustomPage(v int64)` + +SetCustomPage sets CustomPage field to given value. + +### HasCustomPage + +`func (o *DefaultDeploymentStrategyAttrs) HasCustomPage() bool` + +HasCustomPage returns a boolean if a field has been set. + +### SetCustomPageNil + +`func (o *DefaultDeploymentStrategyAttrs) SetCustomPageNil(b bool)` + + SetCustomPageNil sets the value for CustomPage to be an explicit nil + +### UnsetCustomPage +`func (o *DefaultDeploymentStrategyAttrs) UnsetCustomPage()` + +UnsetCustomPage ensures that no value is present for CustomPage, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DefaultDeploymentStrategyAttrsRequest.md b/azion-api/docs/DefaultDeploymentStrategyAttrsRequest.md new file mode 100644 index 0000000..c775c4b --- /dev/null +++ b/azion-api/docs/DefaultDeploymentStrategyAttrsRequest.md @@ -0,0 +1,123 @@ +# DefaultDeploymentStrategyAttrsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Application** | **int64** | | +**Firewall** | Pointer to **NullableInt64** | | [optional] +**CustomPage** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewDefaultDeploymentStrategyAttrsRequest + +`func NewDefaultDeploymentStrategyAttrsRequest(application int64, ) *DefaultDeploymentStrategyAttrsRequest` + +NewDefaultDeploymentStrategyAttrsRequest instantiates a new DefaultDeploymentStrategyAttrsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDefaultDeploymentStrategyAttrsRequestWithDefaults + +`func NewDefaultDeploymentStrategyAttrsRequestWithDefaults() *DefaultDeploymentStrategyAttrsRequest` + +NewDefaultDeploymentStrategyAttrsRequestWithDefaults instantiates a new DefaultDeploymentStrategyAttrsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetApplication + +`func (o *DefaultDeploymentStrategyAttrsRequest) GetApplication() int64` + +GetApplication returns the Application field if non-nil, zero value otherwise. + +### GetApplicationOk + +`func (o *DefaultDeploymentStrategyAttrsRequest) GetApplicationOk() (*int64, bool)` + +GetApplicationOk returns a tuple with the Application field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApplication + +`func (o *DefaultDeploymentStrategyAttrsRequest) SetApplication(v int64)` + +SetApplication sets Application field to given value. + + +### GetFirewall + +`func (o *DefaultDeploymentStrategyAttrsRequest) GetFirewall() int64` + +GetFirewall returns the Firewall field if non-nil, zero value otherwise. + +### GetFirewallOk + +`func (o *DefaultDeploymentStrategyAttrsRequest) GetFirewallOk() (*int64, bool)` + +GetFirewallOk returns a tuple with the Firewall field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFirewall + +`func (o *DefaultDeploymentStrategyAttrsRequest) SetFirewall(v int64)` + +SetFirewall sets Firewall field to given value. + +### HasFirewall + +`func (o *DefaultDeploymentStrategyAttrsRequest) HasFirewall() bool` + +HasFirewall returns a boolean if a field has been set. + +### SetFirewallNil + +`func (o *DefaultDeploymentStrategyAttrsRequest) SetFirewallNil(b bool)` + + SetFirewallNil sets the value for Firewall to be an explicit nil + +### UnsetFirewall +`func (o *DefaultDeploymentStrategyAttrsRequest) UnsetFirewall()` + +UnsetFirewall ensures that no value is present for Firewall, not even an explicit nil +### GetCustomPage + +`func (o *DefaultDeploymentStrategyAttrsRequest) GetCustomPage() int64` + +GetCustomPage returns the CustomPage field if non-nil, zero value otherwise. + +### GetCustomPageOk + +`func (o *DefaultDeploymentStrategyAttrsRequest) GetCustomPageOk() (*int64, bool)` + +GetCustomPageOk returns a tuple with the CustomPage field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomPage + +`func (o *DefaultDeploymentStrategyAttrsRequest) SetCustomPage(v int64)` + +SetCustomPage sets CustomPage field to given value. + +### HasCustomPage + +`func (o *DefaultDeploymentStrategyAttrsRequest) HasCustomPage() bool` + +HasCustomPage returns a boolean if a field has been set. + +### SetCustomPageNil + +`func (o *DefaultDeploymentStrategyAttrsRequest) SetCustomPageNil(b bool)` + + SetCustomPageNil sets the value for CustomPage to be an explicit nil + +### UnsetCustomPage +`func (o *DefaultDeploymentStrategyAttrsRequest) UnsetCustomPage()` + +UnsetCustomPage ensures that no value is present for CustomPage, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DefaultDeploymentStrategyRequest.md b/azion-api/docs/DefaultDeploymentStrategyRequest.md new file mode 100644 index 0000000..c61ec6c --- /dev/null +++ b/azion-api/docs/DefaultDeploymentStrategyRequest.md @@ -0,0 +1,51 @@ +# DefaultDeploymentStrategyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [**DefaultDeploymentStrategyAttrsRequest**](DefaultDeploymentStrategyAttrsRequest.md) | | + +## Methods + +### NewDefaultDeploymentStrategyRequest + +`func NewDefaultDeploymentStrategyRequest(attributes DefaultDeploymentStrategyAttrsRequest, ) *DefaultDeploymentStrategyRequest` + +NewDefaultDeploymentStrategyRequest instantiates a new DefaultDeploymentStrategyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDefaultDeploymentStrategyRequestWithDefaults + +`func NewDefaultDeploymentStrategyRequestWithDefaults() *DefaultDeploymentStrategyRequest` + +NewDefaultDeploymentStrategyRequestWithDefaults instantiates a new DefaultDeploymentStrategyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAttributes + +`func (o *DefaultDeploymentStrategyRequest) GetAttributes() DefaultDeploymentStrategyAttrsRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *DefaultDeploymentStrategyRequest) GetAttributesOk() (*DefaultDeploymentStrategyAttrsRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *DefaultDeploymentStrategyRequest) SetAttributes(v DefaultDeploymentStrategyAttrsRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DelegationSigner.md b/azion-api/docs/DelegationSigner.md new file mode 100644 index 0000000..3992f7b --- /dev/null +++ b/azion-api/docs/DelegationSigner.md @@ -0,0 +1,114 @@ +# DelegationSigner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AlgorithmType** | [**AlgType**](AlgType.md) | | +**Digest** | **string** | | +**DigestType** | [**AlgType**](AlgType.md) | | +**KeyTag** | **int64** | | + +## Methods + +### NewDelegationSigner + +`func NewDelegationSigner(algorithmType AlgType, digest string, digestType AlgType, keyTag int64, ) *DelegationSigner` + +NewDelegationSigner instantiates a new DelegationSigner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDelegationSignerWithDefaults + +`func NewDelegationSignerWithDefaults() *DelegationSigner` + +NewDelegationSignerWithDefaults instantiates a new DelegationSigner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAlgorithmType + +`func (o *DelegationSigner) GetAlgorithmType() AlgType` + +GetAlgorithmType returns the AlgorithmType field if non-nil, zero value otherwise. + +### GetAlgorithmTypeOk + +`func (o *DelegationSigner) GetAlgorithmTypeOk() (*AlgType, bool)` + +GetAlgorithmTypeOk returns a tuple with the AlgorithmType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAlgorithmType + +`func (o *DelegationSigner) SetAlgorithmType(v AlgType)` + +SetAlgorithmType sets AlgorithmType field to given value. + + +### GetDigest + +`func (o *DelegationSigner) GetDigest() string` + +GetDigest returns the Digest field if non-nil, zero value otherwise. + +### GetDigestOk + +`func (o *DelegationSigner) GetDigestOk() (*string, bool)` + +GetDigestOk returns a tuple with the Digest field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDigest + +`func (o *DelegationSigner) SetDigest(v string)` + +SetDigest sets Digest field to given value. + + +### GetDigestType + +`func (o *DelegationSigner) GetDigestType() AlgType` + +GetDigestType returns the DigestType field if non-nil, zero value otherwise. + +### GetDigestTypeOk + +`func (o *DelegationSigner) GetDigestTypeOk() (*AlgType, bool)` + +GetDigestTypeOk returns a tuple with the DigestType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDigestType + +`func (o *DelegationSigner) SetDigestType(v AlgType)` + +SetDigestType sets DigestType field to given value. + + +### GetKeyTag + +`func (o *DelegationSigner) GetKeyTag() int64` + +GetKeyTag returns the KeyTag field if non-nil, zero value otherwise. + +### GetKeyTagOk + +`func (o *DelegationSigner) GetKeyTagOk() (*int64, bool)` + +GetKeyTagOk returns a tuple with the KeyTag field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyTag + +`func (o *DelegationSigner) SetKeyTag(v int64)` + +SetKeyTag sets KeyTag field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeleteResponse.md b/azion-api/docs/DeleteResponse.md new file mode 100644 index 0000000..10e89c4 --- /dev/null +++ b/azion-api/docs/DeleteResponse.md @@ -0,0 +1,56 @@ +# DeleteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewDeleteResponse + +`func NewDeleteResponse() *DeleteResponse` + +NewDeleteResponse instantiates a new DeleteResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeleteResponseWithDefaults + +`func NewDeleteResponseWithDefaults() *DeleteResponse` + +NewDeleteResponseWithDefaults instantiates a new DeleteResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *DeleteResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *DeleteResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *DeleteResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *DeleteResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeploymentStrategyDefaultDeploymentStrategy.md b/azion-api/docs/DeploymentStrategyDefaultDeploymentStrategy.md new file mode 100644 index 0000000..dce2553 --- /dev/null +++ b/azion-api/docs/DeploymentStrategyDefaultDeploymentStrategy.md @@ -0,0 +1,72 @@ +# DeploymentStrategyDefaultDeploymentStrategy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Discriminator field for DeploymentStrategy | +**Attributes** | [**DefaultDeploymentStrategyAttrs**](DefaultDeploymentStrategyAttrs.md) | | + +## Methods + +### NewDeploymentStrategyDefaultDeploymentStrategy + +`func NewDeploymentStrategyDefaultDeploymentStrategy(type_ string, attributes DefaultDeploymentStrategyAttrs, ) *DeploymentStrategyDefaultDeploymentStrategy` + +NewDeploymentStrategyDefaultDeploymentStrategy instantiates a new DeploymentStrategyDefaultDeploymentStrategy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeploymentStrategyDefaultDeploymentStrategyWithDefaults + +`func NewDeploymentStrategyDefaultDeploymentStrategyWithDefaults() *DeploymentStrategyDefaultDeploymentStrategy` + +NewDeploymentStrategyDefaultDeploymentStrategyWithDefaults instantiates a new DeploymentStrategyDefaultDeploymentStrategy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DeploymentStrategyDefaultDeploymentStrategy) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DeploymentStrategyDefaultDeploymentStrategy) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DeploymentStrategyDefaultDeploymentStrategy) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *DeploymentStrategyDefaultDeploymentStrategy) GetAttributes() DefaultDeploymentStrategyAttrs` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *DeploymentStrategyDefaultDeploymentStrategy) GetAttributesOk() (*DefaultDeploymentStrategyAttrs, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *DeploymentStrategyDefaultDeploymentStrategy) SetAttributes(v DefaultDeploymentStrategyAttrs)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeploymentStrategyDefaultDeploymentStrategyRequest.md b/azion-api/docs/DeploymentStrategyDefaultDeploymentStrategyRequest.md new file mode 100644 index 0000000..b57da07 --- /dev/null +++ b/azion-api/docs/DeploymentStrategyDefaultDeploymentStrategyRequest.md @@ -0,0 +1,72 @@ +# DeploymentStrategyDefaultDeploymentStrategyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Discriminator field for DeploymentStrategyRequest | +**Attributes** | [**DefaultDeploymentStrategyAttrsRequest**](DefaultDeploymentStrategyAttrsRequest.md) | | + +## Methods + +### NewDeploymentStrategyDefaultDeploymentStrategyRequest + +`func NewDeploymentStrategyDefaultDeploymentStrategyRequest(type_ string, attributes DefaultDeploymentStrategyAttrsRequest, ) *DeploymentStrategyDefaultDeploymentStrategyRequest` + +NewDeploymentStrategyDefaultDeploymentStrategyRequest instantiates a new DeploymentStrategyDefaultDeploymentStrategyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeploymentStrategyDefaultDeploymentStrategyRequestWithDefaults + +`func NewDeploymentStrategyDefaultDeploymentStrategyRequestWithDefaults() *DeploymentStrategyDefaultDeploymentStrategyRequest` + +NewDeploymentStrategyDefaultDeploymentStrategyRequestWithDefaults instantiates a new DeploymentStrategyDefaultDeploymentStrategyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetAttributes() DefaultDeploymentStrategyAttrsRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetAttributesOk() (*DefaultDeploymentStrategyAttrsRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) SetAttributes(v DefaultDeploymentStrategyAttrsRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeploymentStrategyShared.md b/azion-api/docs/DeploymentStrategyShared.md new file mode 100644 index 0000000..c0db905 --- /dev/null +++ b/azion-api/docs/DeploymentStrategyShared.md @@ -0,0 +1,51 @@ +# DeploymentStrategyShared + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | + +## Methods + +### NewDeploymentStrategyShared + +`func NewDeploymentStrategyShared(type_ string, ) *DeploymentStrategyShared` + +NewDeploymentStrategyShared instantiates a new DeploymentStrategyShared object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeploymentStrategySharedWithDefaults + +`func NewDeploymentStrategySharedWithDefaults() *DeploymentStrategyShared` + +NewDeploymentStrategySharedWithDefaults instantiates a new DeploymentStrategyShared object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *DeploymentStrategyShared) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DeploymentStrategyShared) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DeploymentStrategyShared) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeviceGroup.md b/azion-api/docs/DeviceGroup.md new file mode 100644 index 0000000..4116eaf --- /dev/null +++ b/azion-api/docs/DeviceGroup.md @@ -0,0 +1,93 @@ +# DeviceGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**UserAgent** | **string** | Enter a valid regular expression pattern to identify user agents. | + +## Methods + +### NewDeviceGroup + +`func NewDeviceGroup(id int64, name string, userAgent string, ) *DeviceGroup` + +NewDeviceGroup instantiates a new DeviceGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeviceGroupWithDefaults + +`func NewDeviceGroupWithDefaults() *DeviceGroup` + +NewDeviceGroupWithDefaults instantiates a new DeviceGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *DeviceGroup) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *DeviceGroup) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *DeviceGroup) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *DeviceGroup) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DeviceGroup) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DeviceGroup) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUserAgent + +`func (o *DeviceGroup) GetUserAgent() string` + +GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. + +### GetUserAgentOk + +`func (o *DeviceGroup) GetUserAgentOk() (*string, bool)` + +GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAgent + +`func (o *DeviceGroup) SetUserAgent(v string)` + +SetUserAgent sets UserAgent field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeviceGroupRequest.md b/azion-api/docs/DeviceGroupRequest.md new file mode 100644 index 0000000..9d36cd8 --- /dev/null +++ b/azion-api/docs/DeviceGroupRequest.md @@ -0,0 +1,72 @@ +# DeviceGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**UserAgent** | **string** | Enter a valid regular expression pattern to identify user agents. | + +## Methods + +### NewDeviceGroupRequest + +`func NewDeviceGroupRequest(name string, userAgent string, ) *DeviceGroupRequest` + +NewDeviceGroupRequest instantiates a new DeviceGroupRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeviceGroupRequestWithDefaults + +`func NewDeviceGroupRequestWithDefaults() *DeviceGroupRequest` + +NewDeviceGroupRequestWithDefaults instantiates a new DeviceGroupRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DeviceGroupRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DeviceGroupRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DeviceGroupRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetUserAgent + +`func (o *DeviceGroupRequest) GetUserAgent() string` + +GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. + +### GetUserAgentOk + +`func (o *DeviceGroupRequest) GetUserAgentOk() (*string, bool)` + +GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAgent + +`func (o *DeviceGroupRequest) SetUserAgent(v string)` + +SetUserAgent sets UserAgent field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DeviceGroupResponse.md b/azion-api/docs/DeviceGroupResponse.md new file mode 100644 index 0000000..eb70f23 --- /dev/null +++ b/azion-api/docs/DeviceGroupResponse.md @@ -0,0 +1,77 @@ +# DeviceGroupResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**DeviceGroup**](DeviceGroup.md) | | + +## Methods + +### NewDeviceGroupResponse + +`func NewDeviceGroupResponse(data DeviceGroup, ) *DeviceGroupResponse` + +NewDeviceGroupResponse instantiates a new DeviceGroupResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDeviceGroupResponseWithDefaults + +`func NewDeviceGroupResponseWithDefaults() *DeviceGroupResponse` + +NewDeviceGroupResponseWithDefaults instantiates a new DeviceGroupResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *DeviceGroupResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *DeviceGroupResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *DeviceGroupResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *DeviceGroupResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *DeviceGroupResponse) GetData() DeviceGroup` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *DeviceGroupResponse) GetDataOk() (*DeviceGroup, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *DeviceGroupResponse) SetData(v DeviceGroup)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DigitalCertificatesCertificateRevocationListsAPI.md b/azion-api/docs/DigitalCertificatesCertificateRevocationListsAPI.md new file mode 100644 index 0000000..384d963 --- /dev/null +++ b/azion-api/docs/DigitalCertificatesCertificateRevocationListsAPI.md @@ -0,0 +1,467 @@ +# \DigitalCertificatesCertificateRevocationListsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCertificateRevocationList**](DigitalCertificatesCertificateRevocationListsAPI.md#CreateCertificateRevocationList) | **Post** /workspace/tls/crls | Create a certificate revocation lists (CRL) +[**DeleteCertificateRevocationList**](DigitalCertificatesCertificateRevocationListsAPI.md#DeleteCertificateRevocationList) | **Delete** /workspace/tls/crls/{crl_id} | Delete a certificate revocation list +[**ListCertificateRevocationLists**](DigitalCertificatesCertificateRevocationListsAPI.md#ListCertificateRevocationLists) | **Get** /workspace/tls/crls | List certificate revocation lists (CRL) +[**PartialUpdateCertificateRevocationList**](DigitalCertificatesCertificateRevocationListsAPI.md#PartialUpdateCertificateRevocationList) | **Patch** /workspace/tls/crls/{crl_id} | Update a certificate revocation lists (CRL) +[**RetrieveCertificateRevocationList**](DigitalCertificatesCertificateRevocationListsAPI.md#RetrieveCertificateRevocationList) | **Get** /workspace/tls/crls/{crl_id} | Retrieve details from a certificate revocation lists (CRL) +[**UpdateCertificateRevocationList**](DigitalCertificatesCertificateRevocationListsAPI.md#UpdateCertificateRevocationList) | **Put** /workspace/tls/crls/{crl_id} | Update a certificate revocation lists (CRL) + + + +## CreateCertificateRevocationList + +> CertificateRevocationListResponse CreateCertificateRevocationList(ctx).CertificateRevocationList(certificateRevocationList).Execute() + +Create a certificate revocation lists (CRL) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateRevocationList := *openapiclient.NewCertificateRevocationList(int64(123), "Name_example", "LastEditor_example", time.Now(), "ProductVersion_example", "Issuer_example", time.Now(), time.Now(), "Crl_example") // CertificateRevocationList | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.CreateCertificateRevocationList(context.Background()).CertificateRevocationList(certificateRevocationList).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateRevocationListsAPI.CreateCertificateRevocationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCertificateRevocationList`: CertificateRevocationListResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateRevocationListsAPI.CreateCertificateRevocationList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCertificateRevocationListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateRevocationList** | [**CertificateRevocationList**](CertificateRevocationList.md) | | + +### Return type + +[**CertificateRevocationListResponse**](CertificateRevocationListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCertificateRevocationList + +> DeleteResponse DeleteCertificateRevocationList(ctx, crlId).Execute() + +Delete a certificate revocation list + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + crlId := int64(789) // int64 | The unique identifier of the certificate revocation list + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.DeleteCertificateRevocationList(context.Background(), crlId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateRevocationListsAPI.DeleteCertificateRevocationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteCertificateRevocationList`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateRevocationListsAPI.DeleteCertificateRevocationList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**crlId** | **int64** | The unique identifier of the certificate revocation list | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteCertificateRevocationListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCertificateRevocationLists + +> PaginatedCertificateRevocationList ListCertificateRevocationLists(ctx).Fields(fields).Id(id).Issuer(issuer).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).LastUpdate(lastUpdate).LastUpdateGte(lastUpdateGte).LastUpdateLte(lastUpdateLte).Name(name).NextUpdate(nextUpdate).NextUpdateGte(nextUpdateGte).NextUpdateLte(nextUpdateLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List certificate revocation lists (CRL) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by CRL ID (accepts comma-separated values). (optional) + issuer := "issuer_example" // string | Filter by issuer (case-insensitive, partial match). (optional) + lastModified := time.Now() // time.Time | Filter by exact last modified date and time. (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + lastUpdate := time.Now() // time.Time | Filter by exact last update date and time. (optional) + lastUpdateGte := time.Now() // time.Time | Filter by last update date (greater than or equal). (optional) + lastUpdateLte := time.Now() // time.Time | Filter by last update date (less than or equal). (optional) + name := "name_example" // string | Filter by CRL name (case-insensitive, partial match). (optional) + nextUpdate := time.Now() // time.Time | Filter by exact next update date and time. (optional) + nextUpdateGte := time.Now() // time.Time | Filter by next update date (greater than or equal). (optional) + nextUpdateLte := time.Now() // time.Time | Filter by next update date (less than or equal). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.ListCertificateRevocationLists(context.Background()).Fields(fields).Id(id).Issuer(issuer).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).LastUpdate(lastUpdate).LastUpdateGte(lastUpdateGte).LastUpdateLte(lastUpdateLte).Name(name).NextUpdate(nextUpdate).NextUpdateGte(nextUpdateGte).NextUpdateLte(nextUpdateLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateRevocationListsAPI.ListCertificateRevocationLists``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCertificateRevocationLists`: PaginatedCertificateRevocationList + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateRevocationListsAPI.ListCertificateRevocationLists`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListCertificateRevocationListsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by CRL ID (accepts comma-separated values). | + **issuer** | **string** | Filter by issuer (case-insensitive, partial match). | + **lastModified** | **time.Time** | Filter by exact last modified date and time. | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **lastUpdate** | **time.Time** | Filter by exact last update date and time. | + **lastUpdateGte** | **time.Time** | Filter by last update date (greater than or equal). | + **lastUpdateLte** | **time.Time** | Filter by last update date (less than or equal). | + **name** | **string** | Filter by CRL name (case-insensitive, partial match). | + **nextUpdate** | **time.Time** | Filter by exact next update date and time. | + **nextUpdateGte** | **time.Time** | Filter by next update date (greater than or equal). | + **nextUpdateLte** | **time.Time** | Filter by next update date (less than or equal). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedCertificateRevocationList**](PaginatedCertificateRevocationList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateCertificateRevocationList + +> CertificateRevocationListResponse PartialUpdateCertificateRevocationList(ctx, crlId).PatchedCertificateRevocationList(patchedCertificateRevocationList).Execute() + +Update a certificate revocation lists (CRL) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + crlId := int64(789) // int64 | The unique identifier of the certificate revocation list + patchedCertificateRevocationList := *openapiclient.NewPatchedCertificateRevocationList() // PatchedCertificateRevocationList | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.PartialUpdateCertificateRevocationList(context.Background(), crlId).PatchedCertificateRevocationList(patchedCertificateRevocationList).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateRevocationListsAPI.PartialUpdateCertificateRevocationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateCertificateRevocationList`: CertificateRevocationListResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateRevocationListsAPI.PartialUpdateCertificateRevocationList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**crlId** | **int64** | The unique identifier of the certificate revocation list | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateCertificateRevocationListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedCertificateRevocationList** | [**PatchedCertificateRevocationList**](PatchedCertificateRevocationList.md) | | + +### Return type + +[**CertificateRevocationListResponse**](CertificateRevocationListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveCertificateRevocationList + +> CertificateRevocationListResponse RetrieveCertificateRevocationList(ctx, crlId).Fields(fields).Execute() + +Retrieve details from a certificate revocation lists (CRL) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + crlId := int64(789) // int64 | The unique identifier of the certificate revocation list + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.RetrieveCertificateRevocationList(context.Background(), crlId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateRevocationListsAPI.RetrieveCertificateRevocationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveCertificateRevocationList`: CertificateRevocationListResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateRevocationListsAPI.RetrieveCertificateRevocationList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**crlId** | **int64** | The unique identifier of the certificate revocation list | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveCertificateRevocationListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**CertificateRevocationListResponse**](CertificateRevocationListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCertificateRevocationList + +> CertificateRevocationListResponse UpdateCertificateRevocationList(ctx, crlId).CertificateRevocationList(certificateRevocationList).Execute() + +Update a certificate revocation lists (CRL) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + crlId := int64(789) // int64 | The unique identifier of the certificate revocation list + certificateRevocationList := *openapiclient.NewCertificateRevocationList(int64(123), "Name_example", "LastEditor_example", time.Now(), "ProductVersion_example", "Issuer_example", time.Now(), time.Now(), "Crl_example") // CertificateRevocationList | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.UpdateCertificateRevocationList(context.Background(), crlId).CertificateRevocationList(certificateRevocationList).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateRevocationListsAPI.UpdateCertificateRevocationList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCertificateRevocationList`: CertificateRevocationListResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateRevocationListsAPI.UpdateCertificateRevocationList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**crlId** | **int64** | The unique identifier of the certificate revocation list | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateCertificateRevocationListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **certificateRevocationList** | [**CertificateRevocationList**](CertificateRevocationList.md) | | + +### Return type + +[**CertificateRevocationListResponse**](CertificateRevocationListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DigitalCertificatesCertificateSigningRequestsAPI.md b/azion-api/docs/DigitalCertificatesCertificateSigningRequestsAPI.md new file mode 100644 index 0000000..ff47df8 --- /dev/null +++ b/azion-api/docs/DigitalCertificatesCertificateSigningRequestsAPI.md @@ -0,0 +1,76 @@ +# \DigitalCertificatesCertificateSigningRequestsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCertificateSigningRequest**](DigitalCertificatesCertificateSigningRequestsAPI.md#CreateCertificateSigningRequest) | **Post** /workspace/tls/csr | Create a certificate signing request (CSR) + + + +## CreateCertificateSigningRequest + +> CertificateResponse CreateCertificateSigningRequest(ctx).CertificateSigningRequest(certificateSigningRequest).Execute() + +Create a certificate signing request (CSR) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateSigningRequest := *openapiclient.NewCertificateSigningRequest(int64(123), "Name_example", "Issuer_example", []string{"SubjectName_example"}, "Validity_example", false, "Status_example", "StatusDetail_example", "Csr_example", "Challenge_example", "Authority_example", "ProductVersion_example", "LastEditor_example", time.Now(), time.Now(), "CommonName_example", "Country_example", "State_example", "Locality_example", "Organization_example", "OrganizationUnity_example", "Email_example") // CertificateSigningRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificateSigningRequestsAPI.CreateCertificateSigningRequest(context.Background()).CertificateSigningRequest(certificateSigningRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificateSigningRequestsAPI.CreateCertificateSigningRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCertificateSigningRequest`: CertificateResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificateSigningRequestsAPI.CreateCertificateSigningRequest`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCertificateSigningRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateSigningRequest** | [**CertificateSigningRequest**](CertificateSigningRequest.md) | | + +### Return type + +[**CertificateResponse**](CertificateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DigitalCertificatesCertificatesAPI.md b/azion-api/docs/DigitalCertificatesCertificatesAPI.md new file mode 100644 index 0000000..28af30b --- /dev/null +++ b/azion-api/docs/DigitalCertificatesCertificatesAPI.md @@ -0,0 +1,465 @@ +# \DigitalCertificatesCertificatesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCertificate**](DigitalCertificatesCertificatesAPI.md#CreateCertificate) | **Post** /workspace/tls/certificates | Create a certificate +[**DeleteCertificate**](DigitalCertificatesCertificatesAPI.md#DeleteCertificate) | **Delete** /workspace/tls/certificates/{certificate_id} | Delete a certificate +[**ListCertificates**](DigitalCertificatesCertificatesAPI.md#ListCertificates) | **Get** /workspace/tls/certificates | List certificates +[**PartialUpdateCertificate**](DigitalCertificatesCertificatesAPI.md#PartialUpdateCertificate) | **Patch** /workspace/tls/certificates/{certificate_id} | Partially update a certificate +[**RetrieveCertificate**](DigitalCertificatesCertificatesAPI.md#RetrieveCertificate) | **Get** /workspace/tls/certificates/{certificate_id} | Retrieve details from a certificate +[**UpdateCertificate**](DigitalCertificatesCertificatesAPI.md#UpdateCertificate) | **Put** /workspace/tls/certificates/{certificate_id} | Update a certificate + + + +## CreateCertificate + +> CertificateResponse CreateCertificate(ctx).Certificate(certificate).Execute() + +Create a certificate + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificate := *openapiclient.NewCertificate(int64(123), "Name_example", "Issuer_example", []string{"SubjectName_example"}, "Validity_example", false, "Status_example", "StatusDetail_example", "Csr_example", "Challenge_example", "Authority_example", "KeyAlgorithm_example", "ProductVersion_example", "LastEditor_example", time.Now(), time.Now()) // Certificate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificatesAPI.CreateCertificate(context.Background()).Certificate(certificate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificatesAPI.CreateCertificate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCertificate`: CertificateResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificatesAPI.CreateCertificate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCertificateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificate** | [**Certificate**](Certificate.md) | | + +### Return type + +[**CertificateResponse**](CertificateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCertificate + +> DeleteResponse DeleteCertificate(ctx, certificateId).Execute() + +Delete a certificate + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateId := int64(789) // int64 | The unique identifier of the certificate + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificatesAPI.DeleteCertificate(context.Background(), certificateId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificatesAPI.DeleteCertificate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteCertificate`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificatesAPI.DeleteCertificate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**certificateId** | **int64** | The unique identifier of the certificate | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteCertificateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCertificates + +> PaginatedCertificateList ListCertificates(ctx).CertificateType(certificateType).Fields(fields).Id(id).Issuer(issuer).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Managed(managed).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).RenewedAt(renewedAt).RenewedAtGte(renewedAtGte).RenewedAtLte(renewedAtLte).Search(search).Execute() + +List certificates + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateType := "certificateType_example" // string | Filter by certificate type (accepts comma-separated values). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by certificate ID (accepts comma-separated values). (optional) + issuer := "issuer_example" // string | Filter by issuer (case-insensitive, partial match). (optional) + lastModified := time.Now() // time.Time | Filter by exact last modified date and time. (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + managed := true // bool | Filter by managed status. (optional) + name := "name_example" // string | Filter by certificate name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + renewedAt := time.Now() // time.Time | Filter by exact renewed date and time. (optional) + renewedAtGte := time.Now() // time.Time | Filter by renewed date (greater than or equal). (optional) + renewedAtLte := time.Now() // time.Time | Filter by renewed date (less than or equal). (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificatesAPI.ListCertificates(context.Background()).CertificateType(certificateType).Fields(fields).Id(id).Issuer(issuer).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Managed(managed).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).RenewedAt(renewedAt).RenewedAtGte(renewedAtGte).RenewedAtLte(renewedAtLte).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificatesAPI.ListCertificates``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCertificates`: PaginatedCertificateList + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificatesAPI.ListCertificates`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListCertificatesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateType** | **string** | Filter by certificate type (accepts comma-separated values). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by certificate ID (accepts comma-separated values). | + **issuer** | **string** | Filter by issuer (case-insensitive, partial match). | + **lastModified** | **time.Time** | Filter by exact last modified date and time. | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **managed** | **bool** | Filter by managed status. | + **name** | **string** | Filter by certificate name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **renewedAt** | **time.Time** | Filter by exact renewed date and time. | + **renewedAtGte** | **time.Time** | Filter by renewed date (greater than or equal). | + **renewedAtLte** | **time.Time** | Filter by renewed date (less than or equal). | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedCertificateList**](PaginatedCertificateList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateCertificate + +> CertificateResponse PartialUpdateCertificate(ctx, certificateId).PatchedCertificate(patchedCertificate).Execute() + +Partially update a certificate + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateId := int64(789) // int64 | The unique identifier of the certificate + patchedCertificate := *openapiclient.NewPatchedCertificate() // PatchedCertificate | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificatesAPI.PartialUpdateCertificate(context.Background(), certificateId).PatchedCertificate(patchedCertificate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificatesAPI.PartialUpdateCertificate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateCertificate`: CertificateResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificatesAPI.PartialUpdateCertificate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**certificateId** | **int64** | The unique identifier of the certificate | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateCertificateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedCertificate** | [**PatchedCertificate**](PatchedCertificate.md) | | + +### Return type + +[**CertificateResponse**](CertificateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveCertificate + +> CertificateResponse RetrieveCertificate(ctx, certificateId).Fields(fields).Execute() + +Retrieve details from a certificate + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateId := int64(789) // int64 | The unique identifier of the certificate + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificatesAPI.RetrieveCertificate(context.Background(), certificateId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificatesAPI.RetrieveCertificate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveCertificate`: CertificateResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificatesAPI.RetrieveCertificate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**certificateId** | **int64** | The unique identifier of the certificate | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveCertificateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**CertificateResponse**](CertificateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateCertificate + +> CertificateResponse UpdateCertificate(ctx, certificateId).Certificate(certificate).Execute() + +Update a certificate + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateId := int64(789) // int64 | The unique identifier of the certificate + certificate := *openapiclient.NewCertificate(int64(123), "Name_example", "Issuer_example", []string{"SubjectName_example"}, "Validity_example", false, "Status_example", "StatusDetail_example", "Csr_example", "Challenge_example", "Authority_example", "KeyAlgorithm_example", "ProductVersion_example", "LastEditor_example", time.Now(), time.Now()) // Certificate | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesCertificatesAPI.UpdateCertificate(context.Background(), certificateId).Certificate(certificate).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesCertificatesAPI.UpdateCertificate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCertificate`: CertificateResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesCertificatesAPI.UpdateCertificate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**certificateId** | **int64** | The unique identifier of the certificate | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateCertificateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **certificate** | [**Certificate**](Certificate.md) | | + +### Return type + +[**CertificateResponse**](CertificateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/DigitalCertificatesRequestACertificateAPI.md b/azion-api/docs/DigitalCertificatesRequestACertificateAPI.md new file mode 100644 index 0000000..ed4d32f --- /dev/null +++ b/azion-api/docs/DigitalCertificatesRequestACertificateAPI.md @@ -0,0 +1,76 @@ +# \DigitalCertificatesRequestACertificateAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RequestCertificate**](DigitalCertificatesRequestACertificateAPI.md#RequestCertificate) | **Post** /workspace/tls/certificates/request | Request a certificate + + + +## RequestCertificate + +> CertificateResponse RequestCertificate(ctx).CertificateRequest(certificateRequest).Execute() + +Request a certificate + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + certificateRequest := *openapiclient.NewCertificateRequest(int64(123), "Name_example", "Issuer_example", []string{"SubjectName_example"}, "Validity_example", false, "Status_example", "StatusDetail_example", "Csr_example", "Challenge_example", "Authority_example", "ProductVersion_example", "LastEditor_example", time.Now(), time.Now(), "CommonName_example") // CertificateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DigitalCertificatesRequestACertificateAPI.RequestCertificate(context.Background()).CertificateRequest(certificateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DigitalCertificatesRequestACertificateAPI.RequestCertificate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RequestCertificate`: CertificateResponse + fmt.Fprintf(os.Stdout, "Response from `DigitalCertificatesRequestACertificateAPI.RequestCertificate`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRequestCertificateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **certificateRequest** | [**CertificateRequest**](CertificateRequest.md) | | + +### Return type + +[**CertificateResponse**](CertificateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Document.md b/azion-api/docs/Document.md new file mode 100644 index 0000000..d44cc9f --- /dev/null +++ b/azion-api/docs/Document.md @@ -0,0 +1,265 @@ +# Document + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DocumentId** | **int64** | | +**KbId** | **int64** | | +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**SourceUri** | Pointer to **string** | | [optional] +**ChunkStrategy** | Pointer to **map[string]interface{}** | | [optional] +**Status** | **string** | * `waiting_authorization` - waiting_authorization * `authorized` - authorized | +**LastModified** | **time.Time** | | +**LastEditor** | **string** | | + +## Methods + +### NewDocument + +`func NewDocument(documentId int64, kbId int64, status string, lastModified time.Time, lastEditor string, ) *Document` + +NewDocument instantiates a new Document object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDocumentWithDefaults + +`func NewDocumentWithDefaults() *Document` + +NewDocumentWithDefaults instantiates a new Document object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDocumentId + +`func (o *Document) GetDocumentId() int64` + +GetDocumentId returns the DocumentId field if non-nil, zero value otherwise. + +### GetDocumentIdOk + +`func (o *Document) GetDocumentIdOk() (*int64, bool)` + +GetDocumentIdOk returns a tuple with the DocumentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDocumentId + +`func (o *Document) SetDocumentId(v int64)` + +SetDocumentId sets DocumentId field to given value. + + +### GetKbId + +`func (o *Document) GetKbId() int64` + +GetKbId returns the KbId field if non-nil, zero value otherwise. + +### GetKbIdOk + +`func (o *Document) GetKbIdOk() (*int64, bool)` + +GetKbIdOk returns a tuple with the KbId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKbId + +`func (o *Document) SetKbId(v int64)` + +SetKbId sets KbId field to given value. + + +### GetName + +`func (o *Document) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Document) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Document) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Document) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *Document) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Document) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Document) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Document) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *Document) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Document) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Document) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *Document) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSourceUri + +`func (o *Document) GetSourceUri() string` + +GetSourceUri returns the SourceUri field if non-nil, zero value otherwise. + +### GetSourceUriOk + +`func (o *Document) GetSourceUriOk() (*string, bool)` + +GetSourceUriOk returns a tuple with the SourceUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceUri + +`func (o *Document) SetSourceUri(v string)` + +SetSourceUri sets SourceUri field to given value. + +### HasSourceUri + +`func (o *Document) HasSourceUri() bool` + +HasSourceUri returns a boolean if a field has been set. + +### GetChunkStrategy + +`func (o *Document) GetChunkStrategy() map[string]interface{}` + +GetChunkStrategy returns the ChunkStrategy field if non-nil, zero value otherwise. + +### GetChunkStrategyOk + +`func (o *Document) GetChunkStrategyOk() (*map[string]interface{}, bool)` + +GetChunkStrategyOk returns a tuple with the ChunkStrategy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChunkStrategy + +`func (o *Document) SetChunkStrategy(v map[string]interface{})` + +SetChunkStrategy sets ChunkStrategy field to given value. + +### HasChunkStrategy + +`func (o *Document) HasChunkStrategy() bool` + +HasChunkStrategy returns a boolean if a field has been set. + +### GetStatus + +`func (o *Document) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Document) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Document) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetLastModified + +`func (o *Document) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Document) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Document) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetLastEditor + +`func (o *Document) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Document) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Document) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/DocumentRequest.md b/azion-api/docs/DocumentRequest.md new file mode 100644 index 0000000..e94a232 --- /dev/null +++ b/azion-api/docs/DocumentRequest.md @@ -0,0 +1,160 @@ +# DocumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**SourceUri** | Pointer to **string** | | [optional] +**ChunkStrategy** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewDocumentRequest + +`func NewDocumentRequest() *DocumentRequest` + +NewDocumentRequest instantiates a new DocumentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDocumentRequestWithDefaults + +`func NewDocumentRequestWithDefaults() *DocumentRequest` + +NewDocumentRequestWithDefaults instantiates a new DocumentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *DocumentRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DocumentRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DocumentRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DocumentRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *DocumentRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *DocumentRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *DocumentRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *DocumentRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *DocumentRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *DocumentRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *DocumentRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *DocumentRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetSourceUri + +`func (o *DocumentRequest) GetSourceUri() string` + +GetSourceUri returns the SourceUri field if non-nil, zero value otherwise. + +### GetSourceUriOk + +`func (o *DocumentRequest) GetSourceUriOk() (*string, bool)` + +GetSourceUriOk returns a tuple with the SourceUri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSourceUri + +`func (o *DocumentRequest) SetSourceUri(v string)` + +SetSourceUri sets SourceUri field to given value. + +### HasSourceUri + +`func (o *DocumentRequest) HasSourceUri() bool` + +HasSourceUri returns a boolean if a field has been set. + +### GetChunkStrategy + +`func (o *DocumentRequest) GetChunkStrategy() map[string]interface{}` + +GetChunkStrategy returns the ChunkStrategy field if non-nil, zero value otherwise. + +### GetChunkStrategyOk + +`func (o *DocumentRequest) GetChunkStrategyOk() (*map[string]interface{}, bool)` + +GetChunkStrategyOk returns a tuple with the ChunkStrategy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChunkStrategy + +`func (o *DocumentRequest) SetChunkStrategy(v map[string]interface{})` + +SetChunkStrategy sets ChunkStrategy field to given value. + +### HasChunkStrategy + +`func (o *DocumentRequest) HasChunkStrategy() bool` + +HasChunkStrategy returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ElasticsearchEndpoint.md b/azion-api/docs/ElasticsearchEndpoint.md new file mode 100644 index 0000000..1818ccf --- /dev/null +++ b/azion-api/docs/ElasticsearchEndpoint.md @@ -0,0 +1,93 @@ +# ElasticsearchEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**ApiKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (elasticsearch) | + +## Methods + +### NewElasticsearchEndpoint + +`func NewElasticsearchEndpoint(url string, apiKey string, type_ string, ) *ElasticsearchEndpoint` + +NewElasticsearchEndpoint instantiates a new ElasticsearchEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewElasticsearchEndpointWithDefaults + +`func NewElasticsearchEndpointWithDefaults() *ElasticsearchEndpoint` + +NewElasticsearchEndpointWithDefaults instantiates a new ElasticsearchEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *ElasticsearchEndpoint) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *ElasticsearchEndpoint) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *ElasticsearchEndpoint) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetApiKey + +`func (o *ElasticsearchEndpoint) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *ElasticsearchEndpoint) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *ElasticsearchEndpoint) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetType + +`func (o *ElasticsearchEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ElasticsearchEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ElasticsearchEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ElasticsearchEndpointRequest.md b/azion-api/docs/ElasticsearchEndpointRequest.md new file mode 100644 index 0000000..84b1194 --- /dev/null +++ b/azion-api/docs/ElasticsearchEndpointRequest.md @@ -0,0 +1,93 @@ +# ElasticsearchEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**ApiKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (elasticsearch) | + +## Methods + +### NewElasticsearchEndpointRequest + +`func NewElasticsearchEndpointRequest(url string, apiKey string, type_ string, ) *ElasticsearchEndpointRequest` + +NewElasticsearchEndpointRequest instantiates a new ElasticsearchEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewElasticsearchEndpointRequestWithDefaults + +`func NewElasticsearchEndpointRequestWithDefaults() *ElasticsearchEndpointRequest` + +NewElasticsearchEndpointRequestWithDefaults instantiates a new ElasticsearchEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *ElasticsearchEndpointRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *ElasticsearchEndpointRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *ElasticsearchEndpointRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetApiKey + +`func (o *ElasticsearchEndpointRequest) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *ElasticsearchEndpointRequest) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *ElasticsearchEndpointRequest) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetType + +`func (o *ElasticsearchEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ElasticsearchEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ElasticsearchEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ErrorResponse.md b/azion-api/docs/ErrorResponse.md new file mode 100644 index 0000000..76f9c54 --- /dev/null +++ b/azion-api/docs/ErrorResponse.md @@ -0,0 +1,51 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]JSONAPIErrorObject**](JSONAPIErrorObject.md) | Array of error objects | + +## Methods + +### NewErrorResponse + +`func NewErrorResponse(errors []JSONAPIErrorObject, ) *ErrorResponse` + +NewErrorResponse instantiates a new ErrorResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewErrorResponseWithDefaults + +`func NewErrorResponseWithDefaults() *ErrorResponse` + +NewErrorResponseWithDefaults instantiates a new ErrorResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetErrors + +`func (o *ErrorResponse) GetErrors() []JSONAPIErrorObject` + +GetErrors returns the Errors field if non-nil, zero value otherwise. + +### GetErrorsOk + +`func (o *ErrorResponse) GetErrorsOk() (*[]JSONAPIErrorObject, bool)` + +GetErrorsOk returns a tuple with the Errors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetErrors + +`func (o *ErrorResponse) SetErrors(v []JSONAPIErrorObject)` + +SetErrors sets Errors field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Execution.md b/azion-api/docs/Execution.md new file mode 100644 index 0000000..2e01ac0 --- /dev/null +++ b/azion-api/docs/Execution.md @@ -0,0 +1,114 @@ +# Execution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Status** | **string** | | +**CreatedAt** | **time.Time** | | +**UpdatedAt** | **time.Time** | | + +## Methods + +### NewExecution + +`func NewExecution(id int64, status string, createdAt time.Time, updatedAt time.Time, ) *Execution` + +NewExecution instantiates a new Execution object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExecutionWithDefaults + +`func NewExecutionWithDefaults() *Execution` + +NewExecutionWithDefaults instantiates a new Execution object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Execution) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Execution) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Execution) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetStatus + +`func (o *Execution) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Execution) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Execution) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetCreatedAt + +`func (o *Execution) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Execution) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Execution) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetUpdatedAt + +`func (o *Execution) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *Execution) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *Execution) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ExecutionScript.md b/azion-api/docs/ExecutionScript.md new file mode 100644 index 0000000..e341c07 --- /dev/null +++ b/azion-api/docs/ExecutionScript.md @@ -0,0 +1,93 @@ +# ExecutionScript + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**TemplateUuid** | **string** | | + +## Methods + +### NewExecutionScript + +`func NewExecutionScript(id int64, name string, templateUuid string, ) *ExecutionScript` + +NewExecutionScript instantiates a new ExecutionScript object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExecutionScriptWithDefaults + +`func NewExecutionScriptWithDefaults() *ExecutionScript` + +NewExecutionScriptWithDefaults instantiates a new ExecutionScript object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ExecutionScript) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ExecutionScript) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ExecutionScript) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ExecutionScript) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ExecutionScript) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ExecutionScript) SetName(v string)` + +SetName sets Name field to given value. + + +### GetTemplateUuid + +`func (o *ExecutionScript) GetTemplateUuid() string` + +GetTemplateUuid returns the TemplateUuid field if non-nil, zero value otherwise. + +### GetTemplateUuidOk + +`func (o *ExecutionScript) GetTemplateUuidOk() (*string, bool)` + +GetTemplateUuidOk returns a tuple with the TemplateUuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateUuid + +`func (o *ExecutionScript) SetTemplateUuid(v string)` + +SetTemplateUuid sets TemplateUuid field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Executor.md b/azion-api/docs/Executor.md new file mode 100644 index 0000000..40d46d4 --- /dev/null +++ b/azion-api/docs/Executor.md @@ -0,0 +1,114 @@ +# Executor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**IsActive** | **bool** | | + +## Methods + +### NewExecutor + +`func NewExecutor(id int64, name string, email string, isActive bool, ) *Executor` + +NewExecutor instantiates a new Executor object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewExecutorWithDefaults + +`func NewExecutorWithDefaults() *Executor` + +NewExecutorWithDefaults instantiates a new Executor object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Executor) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Executor) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Executor) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Executor) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Executor) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Executor) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *Executor) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *Executor) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *Executor) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetIsActive + +`func (o *Executor) GetIsActive() bool` + +GetIsActive returns the IsActive field if non-nil, zero value otherwise. + +### GetIsActiveOk + +`func (o *Executor) GetIsActiveOk() (*bool, bool)` + +GetIsActiveOk returns a tuple with the IsActive field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsActive + +`func (o *Executor) SetIsActive(v bool)` + +SetIsActive sets IsActive field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Favorite.md b/azion-api/docs/Favorite.md new file mode 100644 index 0000000..171fd47 --- /dev/null +++ b/azion-api/docs/Favorite.md @@ -0,0 +1,114 @@ +# Favorite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Uri** | **string** | | +**Type** | **string** | Favorite type | +**Name** | **string** | | + +## Methods + +### NewFavorite + +`func NewFavorite(id int64, uri string, type_ string, name string, ) *Favorite` + +NewFavorite instantiates a new Favorite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFavoriteWithDefaults + +`func NewFavoriteWithDefaults() *Favorite` + +NewFavoriteWithDefaults instantiates a new Favorite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Favorite) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Favorite) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Favorite) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetUri + +`func (o *Favorite) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *Favorite) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *Favorite) SetUri(v string)` + +SetUri sets Uri field to given value. + + +### GetType + +`func (o *Favorite) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Favorite) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Favorite) SetType(v string)` + +SetType sets Type field to given value. + + +### GetName + +`func (o *Favorite) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Favorite) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Favorite) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FavoriteRequest.md b/azion-api/docs/FavoriteRequest.md new file mode 100644 index 0000000..6814834 --- /dev/null +++ b/azion-api/docs/FavoriteRequest.md @@ -0,0 +1,51 @@ +# FavoriteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Uri** | **string** | | + +## Methods + +### NewFavoriteRequest + +`func NewFavoriteRequest(uri string, ) *FavoriteRequest` + +NewFavoriteRequest instantiates a new FavoriteRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFavoriteRequestWithDefaults + +`func NewFavoriteRequestWithDefaults() *FavoriteRequest` + +NewFavoriteRequestWithDefaults instantiates a new FavoriteRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUri + +`func (o *FavoriteRequest) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *FavoriteRequest) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *FavoriteRequest) SetUri(v string)` + +SetUri sets Uri field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FavoritesAPI.md b/azion-api/docs/FavoritesAPI.md new file mode 100644 index 0000000..1d6518a --- /dev/null +++ b/azion-api/docs/FavoritesAPI.md @@ -0,0 +1,227 @@ +# \FavoritesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFavorite**](FavoritesAPI.md#CreateFavorite) | **Post** /identity/user/favorites | Create a new favorite +[**DeleteFavorite**](FavoritesAPI.md#DeleteFavorite) | **Delete** /identity/user/favorites/{favorite_id} | Delete a favorite +[**ListFavorites**](FavoritesAPI.md#ListFavorites) | **Get** /identity/user/favorites | List of the favorites + + + +## CreateFavorite + +> ResponseFavorite CreateFavorite(ctx).FavoriteRequest(favoriteRequest).Execute() + +Create a new favorite + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + favoriteRequest := *openapiclient.NewFavoriteRequest("Uri_example") // FavoriteRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FavoritesAPI.CreateFavorite(context.Background()).FavoriteRequest(favoriteRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FavoritesAPI.CreateFavorite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFavorite`: ResponseFavorite + fmt.Fprintf(os.Stdout, "Response from `FavoritesAPI.CreateFavorite`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFavoriteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **favoriteRequest** | [**FavoriteRequest**](FavoriteRequest.md) | | + +### Return type + +[**ResponseFavorite**](ResponseFavorite.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFavorite + +> ResponseDeleteFavorite DeleteFavorite(ctx, favoriteId).Execute() + +Delete a favorite + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + favoriteId := int64(789) // int64 | A unique integer value identifying this Favorite. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FavoritesAPI.DeleteFavorite(context.Background(), favoriteId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FavoritesAPI.DeleteFavorite``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteFavorite`: ResponseDeleteFavorite + fmt.Fprintf(os.Stdout, "Response from `FavoritesAPI.DeleteFavorite`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**favoriteId** | **int64** | A unique integer value identifying this Favorite. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFavoriteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteFavorite**](ResponseDeleteFavorite.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFavorites + +> PaginatedFavoriteList ListFavorites(ctx).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Type_(type_).Uri(uri).Execute() + +List of the favorites + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + type_ := "type__example" // string | (optional) + uri := "uri_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FavoritesAPI.ListFavorites(context.Background()).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Type_(type_).Uri(uri).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FavoritesAPI.ListFavorites``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFavorites`: PaginatedFavoriteList + fmt.Fprintf(os.Stdout, "Response from `FavoritesAPI.ListFavorites`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFavoritesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **type_** | **string** | | + **uri** | **string** | | + +### Return type + +[**PaginatedFavoriteList**](PaginatedFavoriteList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Firewall.md b/azion-api/docs/Firewall.md new file mode 100644 index 0000000..d45edcc --- /dev/null +++ b/azion-api/docs/Firewall.md @@ -0,0 +1,213 @@ +# Firewall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Modules** | Pointer to [**FirewallModules**](FirewallModules.md) | | [optional] +**Debug** | Pointer to **bool** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ProductVersion** | **string** | | + +## Methods + +### NewFirewall + +`func NewFirewall(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, ) *Firewall` + +NewFirewall instantiates a new Firewall object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallWithDefaults + +`func NewFirewallWithDefaults() *Firewall` + +NewFirewallWithDefaults instantiates a new Firewall object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Firewall) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Firewall) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Firewall) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Firewall) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Firewall) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Firewall) SetName(v string)` + +SetName sets Name field to given value. + + +### GetModules + +`func (o *Firewall) GetModules() FirewallModules` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *Firewall) GetModulesOk() (*FirewallModules, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *Firewall) SetModules(v FirewallModules)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *Firewall) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### GetDebug + +`func (o *Firewall) GetDebug() bool` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *Firewall) GetDebugOk() (*bool, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *Firewall) SetDebug(v bool)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *Firewall) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + +### GetActive + +`func (o *Firewall) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Firewall) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Firewall) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Firewall) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *Firewall) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Firewall) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Firewall) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Firewall) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Firewall) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Firewall) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *Firewall) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Firewall) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Firewall) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehavior.md b/azion-api/docs/FirewallBehavior.md new file mode 100644 index 0000000..494dc5b --- /dev/null +++ b/azion-api/docs/FirewallBehavior.md @@ -0,0 +1,72 @@ +# FirewallBehavior + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `run_function` - run_function | +**Attributes** | [**FirewallBehaviorRunFunctionAttributes**](FirewallBehaviorRunFunctionAttributes.md) | | + +## Methods + +### NewFirewallBehavior + +`func NewFirewallBehavior(type_ string, attributes FirewallBehaviorRunFunctionAttributes, ) *FirewallBehavior` + +NewFirewallBehavior instantiates a new FirewallBehavior object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorWithDefaults + +`func NewFirewallBehaviorWithDefaults() *FirewallBehavior` + +NewFirewallBehaviorWithDefaults instantiates a new FirewallBehavior object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehavior) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehavior) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehavior) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehavior) GetAttributes() FirewallBehaviorRunFunctionAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehavior) GetAttributesOk() (*FirewallBehaviorRunFunctionAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehavior) SetAttributes(v FirewallBehaviorRunFunctionAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorNoArgs.md b/azion-api/docs/FirewallBehaviorNoArgs.md new file mode 100644 index 0000000..50cc4c9 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorNoArgs.md @@ -0,0 +1,51 @@ +# FirewallBehaviorNoArgs + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `deny` - deny * `drop` - drop | + +## Methods + +### NewFirewallBehaviorNoArgs + +`func NewFirewallBehaviorNoArgs(type_ string, ) *FirewallBehaviorNoArgs` + +NewFirewallBehaviorNoArgs instantiates a new FirewallBehaviorNoArgs object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorNoArgsWithDefaults + +`func NewFirewallBehaviorNoArgsWithDefaults() *FirewallBehaviorNoArgs` + +NewFirewallBehaviorNoArgsWithDefaults instantiates a new FirewallBehaviorNoArgs object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorNoArgs) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorNoArgs) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorNoArgs) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorNoArgsRequest.md b/azion-api/docs/FirewallBehaviorNoArgsRequest.md new file mode 100644 index 0000000..6de4b18 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorNoArgsRequest.md @@ -0,0 +1,51 @@ +# FirewallBehaviorNoArgsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `deny` - deny * `drop` - drop | + +## Methods + +### NewFirewallBehaviorNoArgsRequest + +`func NewFirewallBehaviorNoArgsRequest(type_ string, ) *FirewallBehaviorNoArgsRequest` + +NewFirewallBehaviorNoArgsRequest instantiates a new FirewallBehaviorNoArgsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorNoArgsRequestWithDefaults + +`func NewFirewallBehaviorNoArgsRequestWithDefaults() *FirewallBehaviorNoArgsRequest` + +NewFirewallBehaviorNoArgsRequestWithDefaults instantiates a new FirewallBehaviorNoArgsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorNoArgsRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorNoArgsRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorNoArgsRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorRequest.md b/azion-api/docs/FirewallBehaviorRequest.md new file mode 100644 index 0000000..1dc8d89 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorRequest.md @@ -0,0 +1,72 @@ +# FirewallBehaviorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `run_function` - run_function | +**Attributes** | [**FirewallBehaviorRunFunctionAttributesRequest**](FirewallBehaviorRunFunctionAttributesRequest.md) | | + +## Methods + +### NewFirewallBehaviorRequest + +`func NewFirewallBehaviorRequest(type_ string, attributes FirewallBehaviorRunFunctionAttributesRequest, ) *FirewallBehaviorRequest` + +NewFirewallBehaviorRequest instantiates a new FirewallBehaviorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorRequestWithDefaults + +`func NewFirewallBehaviorRequestWithDefaults() *FirewallBehaviorRequest` + +NewFirewallBehaviorRequestWithDefaults instantiates a new FirewallBehaviorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorRequest) GetAttributes() FirewallBehaviorRunFunctionAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorRequest) GetAttributesOk() (*FirewallBehaviorRunFunctionAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorRequest) SetAttributes(v FirewallBehaviorRunFunctionAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorRunFunction.md b/azion-api/docs/FirewallBehaviorRunFunction.md new file mode 100644 index 0000000..09f4140 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorRunFunction.md @@ -0,0 +1,72 @@ +# FirewallBehaviorRunFunction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `run_function` - run_function | +**Attributes** | [**FirewallBehaviorRunFunctionAttributes**](FirewallBehaviorRunFunctionAttributes.md) | | + +## Methods + +### NewFirewallBehaviorRunFunction + +`func NewFirewallBehaviorRunFunction(type_ string, attributes FirewallBehaviorRunFunctionAttributes, ) *FirewallBehaviorRunFunction` + +NewFirewallBehaviorRunFunction instantiates a new FirewallBehaviorRunFunction object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorRunFunctionWithDefaults + +`func NewFirewallBehaviorRunFunctionWithDefaults() *FirewallBehaviorRunFunction` + +NewFirewallBehaviorRunFunctionWithDefaults instantiates a new FirewallBehaviorRunFunction object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorRunFunction) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorRunFunction) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorRunFunction) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorRunFunction) GetAttributes() FirewallBehaviorRunFunctionAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorRunFunction) GetAttributesOk() (*FirewallBehaviorRunFunctionAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorRunFunction) SetAttributes(v FirewallBehaviorRunFunctionAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorRunFunctionAttributes.md b/azion-api/docs/FirewallBehaviorRunFunctionAttributes.md new file mode 100644 index 0000000..20778a1 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorRunFunctionAttributes.md @@ -0,0 +1,51 @@ +# FirewallBehaviorRunFunctionAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **int64** | | + +## Methods + +### NewFirewallBehaviorRunFunctionAttributes + +`func NewFirewallBehaviorRunFunctionAttributes(value int64, ) *FirewallBehaviorRunFunctionAttributes` + +NewFirewallBehaviorRunFunctionAttributes instantiates a new FirewallBehaviorRunFunctionAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorRunFunctionAttributesWithDefaults + +`func NewFirewallBehaviorRunFunctionAttributesWithDefaults() *FirewallBehaviorRunFunctionAttributes` + +NewFirewallBehaviorRunFunctionAttributesWithDefaults instantiates a new FirewallBehaviorRunFunctionAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *FirewallBehaviorRunFunctionAttributes) GetValue() int64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FirewallBehaviorRunFunctionAttributes) GetValueOk() (*int64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FirewallBehaviorRunFunctionAttributes) SetValue(v int64)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorRunFunctionAttributesRequest.md b/azion-api/docs/FirewallBehaviorRunFunctionAttributesRequest.md new file mode 100644 index 0000000..fd01816 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorRunFunctionAttributesRequest.md @@ -0,0 +1,51 @@ +# FirewallBehaviorRunFunctionAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **int64** | | + +## Methods + +### NewFirewallBehaviorRunFunctionAttributesRequest + +`func NewFirewallBehaviorRunFunctionAttributesRequest(value int64, ) *FirewallBehaviorRunFunctionAttributesRequest` + +NewFirewallBehaviorRunFunctionAttributesRequest instantiates a new FirewallBehaviorRunFunctionAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorRunFunctionAttributesRequestWithDefaults + +`func NewFirewallBehaviorRunFunctionAttributesRequestWithDefaults() *FirewallBehaviorRunFunctionAttributesRequest` + +NewFirewallBehaviorRunFunctionAttributesRequestWithDefaults instantiates a new FirewallBehaviorRunFunctionAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetValue + +`func (o *FirewallBehaviorRunFunctionAttributesRequest) GetValue() int64` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *FirewallBehaviorRunFunctionAttributesRequest) GetValueOk() (*int64, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *FirewallBehaviorRunFunctionAttributesRequest) SetValue(v int64)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorRunFunctionRequest.md b/azion-api/docs/FirewallBehaviorRunFunctionRequest.md new file mode 100644 index 0000000..4735ce8 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorRunFunctionRequest.md @@ -0,0 +1,72 @@ +# FirewallBehaviorRunFunctionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `run_function` - run_function | +**Attributes** | [**FirewallBehaviorRunFunctionAttributesRequest**](FirewallBehaviorRunFunctionAttributesRequest.md) | | + +## Methods + +### NewFirewallBehaviorRunFunctionRequest + +`func NewFirewallBehaviorRunFunctionRequest(type_ string, attributes FirewallBehaviorRunFunctionAttributesRequest, ) *FirewallBehaviorRunFunctionRequest` + +NewFirewallBehaviorRunFunctionRequest instantiates a new FirewallBehaviorRunFunctionRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorRunFunctionRequestWithDefaults + +`func NewFirewallBehaviorRunFunctionRequestWithDefaults() *FirewallBehaviorRunFunctionRequest` + +NewFirewallBehaviorRunFunctionRequestWithDefaults instantiates a new FirewallBehaviorRunFunctionRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorRunFunctionRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorRunFunctionRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorRunFunctionRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorRunFunctionRequest) GetAttributes() FirewallBehaviorRunFunctionAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorRunFunctionRequest) GetAttributesOk() (*FirewallBehaviorRunFunctionAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorRunFunctionRequest) SetAttributes(v FirewallBehaviorRunFunctionAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetCustomResponse.md b/azion-api/docs/FirewallBehaviorSetCustomResponse.md new file mode 100644 index 0000000..af0d719 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetCustomResponse.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetCustomResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `set_custom_response` - set_custom_response | +**Attributes** | [**FirewallBehaviorSetCustomResponseAttributes**](FirewallBehaviorSetCustomResponseAttributes.md) | | + +## Methods + +### NewFirewallBehaviorSetCustomResponse + +`func NewFirewallBehaviorSetCustomResponse(type_ string, attributes FirewallBehaviorSetCustomResponseAttributes, ) *FirewallBehaviorSetCustomResponse` + +NewFirewallBehaviorSetCustomResponse instantiates a new FirewallBehaviorSetCustomResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetCustomResponseWithDefaults + +`func NewFirewallBehaviorSetCustomResponseWithDefaults() *FirewallBehaviorSetCustomResponse` + +NewFirewallBehaviorSetCustomResponseWithDefaults instantiates a new FirewallBehaviorSetCustomResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetCustomResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetCustomResponse) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetCustomResponse) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorSetCustomResponse) GetAttributes() FirewallBehaviorSetCustomResponseAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorSetCustomResponse) GetAttributesOk() (*FirewallBehaviorSetCustomResponseAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorSetCustomResponse) SetAttributes(v FirewallBehaviorSetCustomResponseAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetCustomResponseAttributes.md b/azion-api/docs/FirewallBehaviorSetCustomResponseAttributes.md new file mode 100644 index 0000000..503d6d3 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetCustomResponseAttributes.md @@ -0,0 +1,103 @@ +# FirewallBehaviorSetCustomResponseAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | **int64** | | +**ContentType** | Pointer to **string** | | [optional] +**ContentBody** | Pointer to **string** | | [optional] + +## Methods + +### NewFirewallBehaviorSetCustomResponseAttributes + +`func NewFirewallBehaviorSetCustomResponseAttributes(statusCode int64, ) *FirewallBehaviorSetCustomResponseAttributes` + +NewFirewallBehaviorSetCustomResponseAttributes instantiates a new FirewallBehaviorSetCustomResponseAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetCustomResponseAttributesWithDefaults + +`func NewFirewallBehaviorSetCustomResponseAttributesWithDefaults() *FirewallBehaviorSetCustomResponseAttributes` + +NewFirewallBehaviorSetCustomResponseAttributesWithDefaults instantiates a new FirewallBehaviorSetCustomResponseAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *FirewallBehaviorSetCustomResponseAttributes) GetStatusCode() int64` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *FirewallBehaviorSetCustomResponseAttributes) GetStatusCodeOk() (*int64, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *FirewallBehaviorSetCustomResponseAttributes) SetStatusCode(v int64)` + +SetStatusCode sets StatusCode field to given value. + + +### GetContentType + +`func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *FirewallBehaviorSetCustomResponseAttributes) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + +### HasContentType + +`func (o *FirewallBehaviorSetCustomResponseAttributes) HasContentType() bool` + +HasContentType returns a boolean if a field has been set. + +### GetContentBody + +`func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentBody() string` + +GetContentBody returns the ContentBody field if non-nil, zero value otherwise. + +### GetContentBodyOk + +`func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentBodyOk() (*string, bool)` + +GetContentBodyOk returns a tuple with the ContentBody field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentBody + +`func (o *FirewallBehaviorSetCustomResponseAttributes) SetContentBody(v string)` + +SetContentBody sets ContentBody field to given value. + +### HasContentBody + +`func (o *FirewallBehaviorSetCustomResponseAttributes) HasContentBody() bool` + +HasContentBody returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetCustomResponseAttributesRequest.md b/azion-api/docs/FirewallBehaviorSetCustomResponseAttributesRequest.md new file mode 100644 index 0000000..9c028a0 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetCustomResponseAttributesRequest.md @@ -0,0 +1,103 @@ +# FirewallBehaviorSetCustomResponseAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StatusCode** | **int64** | | +**ContentType** | Pointer to **string** | | [optional] +**ContentBody** | Pointer to **string** | | [optional] + +## Methods + +### NewFirewallBehaviorSetCustomResponseAttributesRequest + +`func NewFirewallBehaviorSetCustomResponseAttributesRequest(statusCode int64, ) *FirewallBehaviorSetCustomResponseAttributesRequest` + +NewFirewallBehaviorSetCustomResponseAttributesRequest instantiates a new FirewallBehaviorSetCustomResponseAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetCustomResponseAttributesRequestWithDefaults + +`func NewFirewallBehaviorSetCustomResponseAttributesRequestWithDefaults() *FirewallBehaviorSetCustomResponseAttributesRequest` + +NewFirewallBehaviorSetCustomResponseAttributesRequestWithDefaults instantiates a new FirewallBehaviorSetCustomResponseAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatusCode + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetStatusCode() int64` + +GetStatusCode returns the StatusCode field if non-nil, zero value otherwise. + +### GetStatusCodeOk + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetStatusCodeOk() (*int64, bool)` + +GetStatusCodeOk returns a tuple with the StatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusCode + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) SetStatusCode(v int64)` + +SetStatusCode sets StatusCode field to given value. + + +### GetContentType + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + +### HasContentType + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) HasContentType() bool` + +HasContentType returns a boolean if a field has been set. + +### GetContentBody + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentBody() string` + +GetContentBody returns the ContentBody field if non-nil, zero value otherwise. + +### GetContentBodyOk + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentBodyOk() (*string, bool)` + +GetContentBodyOk returns a tuple with the ContentBody field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentBody + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) SetContentBody(v string)` + +SetContentBody sets ContentBody field to given value. + +### HasContentBody + +`func (o *FirewallBehaviorSetCustomResponseAttributesRequest) HasContentBody() bool` + +HasContentBody returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetCustomResponseRequest.md b/azion-api/docs/FirewallBehaviorSetCustomResponseRequest.md new file mode 100644 index 0000000..6657339 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetCustomResponseRequest.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetCustomResponseRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `set_custom_response` - set_custom_response | +**Attributes** | [**FirewallBehaviorSetCustomResponseAttributesRequest**](FirewallBehaviorSetCustomResponseAttributesRequest.md) | | + +## Methods + +### NewFirewallBehaviorSetCustomResponseRequest + +`func NewFirewallBehaviorSetCustomResponseRequest(type_ string, attributes FirewallBehaviorSetCustomResponseAttributesRequest, ) *FirewallBehaviorSetCustomResponseRequest` + +NewFirewallBehaviorSetCustomResponseRequest instantiates a new FirewallBehaviorSetCustomResponseRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetCustomResponseRequestWithDefaults + +`func NewFirewallBehaviorSetCustomResponseRequestWithDefaults() *FirewallBehaviorSetCustomResponseRequest` + +NewFirewallBehaviorSetCustomResponseRequestWithDefaults instantiates a new FirewallBehaviorSetCustomResponseRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetCustomResponseRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetCustomResponseRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetCustomResponseRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorSetCustomResponseRequest) GetAttributes() FirewallBehaviorSetCustomResponseAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorSetCustomResponseRequest) GetAttributesOk() (*FirewallBehaviorSetCustomResponseAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorSetCustomResponseRequest) SetAttributes(v FirewallBehaviorSetCustomResponseAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetRateLimit.md b/azion-api/docs/FirewallBehaviorSetRateLimit.md new file mode 100644 index 0000000..8f6872a --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetRateLimit.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetRateLimit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `set_rate_limit` - set_rate_limit | +**Attributes** | [**FirewallBehaviorSetRateLimitAttributes**](FirewallBehaviorSetRateLimitAttributes.md) | | + +## Methods + +### NewFirewallBehaviorSetRateLimit + +`func NewFirewallBehaviorSetRateLimit(type_ string, attributes FirewallBehaviorSetRateLimitAttributes, ) *FirewallBehaviorSetRateLimit` + +NewFirewallBehaviorSetRateLimit instantiates a new FirewallBehaviorSetRateLimit object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetRateLimitWithDefaults + +`func NewFirewallBehaviorSetRateLimitWithDefaults() *FirewallBehaviorSetRateLimit` + +NewFirewallBehaviorSetRateLimitWithDefaults instantiates a new FirewallBehaviorSetRateLimit object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetRateLimit) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetRateLimit) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetRateLimit) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorSetRateLimit) GetAttributes() FirewallBehaviorSetRateLimitAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorSetRateLimit) GetAttributesOk() (*FirewallBehaviorSetRateLimitAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorSetRateLimit) SetAttributes(v FirewallBehaviorSetRateLimitAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetRateLimitAttributes.md b/azion-api/docs/FirewallBehaviorSetRateLimitAttributes.md new file mode 100644 index 0000000..977fa6e --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetRateLimitAttributes.md @@ -0,0 +1,134 @@ +# FirewallBehaviorSetRateLimitAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | * `second` - second * `minute` - minute | [optional] +**LimitBy** | **string** | * `client_ip` - client_ip * `global` - global | +**AverageRateLimit** | **int64** | | +**MaximumBurstSize** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewFirewallBehaviorSetRateLimitAttributes + +`func NewFirewallBehaviorSetRateLimitAttributes(limitBy string, averageRateLimit int64, ) *FirewallBehaviorSetRateLimitAttributes` + +NewFirewallBehaviorSetRateLimitAttributes instantiates a new FirewallBehaviorSetRateLimitAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetRateLimitAttributesWithDefaults + +`func NewFirewallBehaviorSetRateLimitAttributesWithDefaults() *FirewallBehaviorSetRateLimitAttributes` + +NewFirewallBehaviorSetRateLimitAttributesWithDefaults instantiates a new FirewallBehaviorSetRateLimitAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetRateLimitAttributes) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *FirewallBehaviorSetRateLimitAttributes) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetLimitBy + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetLimitBy() string` + +GetLimitBy returns the LimitBy field if non-nil, zero value otherwise. + +### GetLimitByOk + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetLimitByOk() (*string, bool)` + +GetLimitByOk returns a tuple with the LimitBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimitBy + +`func (o *FirewallBehaviorSetRateLimitAttributes) SetLimitBy(v string)` + +SetLimitBy sets LimitBy field to given value. + + +### GetAverageRateLimit + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetAverageRateLimit() int64` + +GetAverageRateLimit returns the AverageRateLimit field if non-nil, zero value otherwise. + +### GetAverageRateLimitOk + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetAverageRateLimitOk() (*int64, bool)` + +GetAverageRateLimitOk returns a tuple with the AverageRateLimit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAverageRateLimit + +`func (o *FirewallBehaviorSetRateLimitAttributes) SetAverageRateLimit(v int64)` + +SetAverageRateLimit sets AverageRateLimit field to given value. + + +### GetMaximumBurstSize + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetMaximumBurstSize() int64` + +GetMaximumBurstSize returns the MaximumBurstSize field if non-nil, zero value otherwise. + +### GetMaximumBurstSizeOk + +`func (o *FirewallBehaviorSetRateLimitAttributes) GetMaximumBurstSizeOk() (*int64, bool)` + +GetMaximumBurstSizeOk returns a tuple with the MaximumBurstSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaximumBurstSize + +`func (o *FirewallBehaviorSetRateLimitAttributes) SetMaximumBurstSize(v int64)` + +SetMaximumBurstSize sets MaximumBurstSize field to given value. + +### HasMaximumBurstSize + +`func (o *FirewallBehaviorSetRateLimitAttributes) HasMaximumBurstSize() bool` + +HasMaximumBurstSize returns a boolean if a field has been set. + +### SetMaximumBurstSizeNil + +`func (o *FirewallBehaviorSetRateLimitAttributes) SetMaximumBurstSizeNil(b bool)` + + SetMaximumBurstSizeNil sets the value for MaximumBurstSize to be an explicit nil + +### UnsetMaximumBurstSize +`func (o *FirewallBehaviorSetRateLimitAttributes) UnsetMaximumBurstSize()` + +UnsetMaximumBurstSize ensures that no value is present for MaximumBurstSize, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetRateLimitAttributesRequest.md b/azion-api/docs/FirewallBehaviorSetRateLimitAttributesRequest.md new file mode 100644 index 0000000..9cc07ce --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetRateLimitAttributesRequest.md @@ -0,0 +1,134 @@ +# FirewallBehaviorSetRateLimitAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | * `second` - second * `minute` - minute | [optional] +**LimitBy** | **string** | * `client_ip` - client_ip * `global` - global | +**AverageRateLimit** | **int64** | | +**MaximumBurstSize** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewFirewallBehaviorSetRateLimitAttributesRequest + +`func NewFirewallBehaviorSetRateLimitAttributesRequest(limitBy string, averageRateLimit int64, ) *FirewallBehaviorSetRateLimitAttributesRequest` + +NewFirewallBehaviorSetRateLimitAttributesRequest instantiates a new FirewallBehaviorSetRateLimitAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetRateLimitAttributesRequestWithDefaults + +`func NewFirewallBehaviorSetRateLimitAttributesRequestWithDefaults() *FirewallBehaviorSetRateLimitAttributesRequest` + +NewFirewallBehaviorSetRateLimitAttributesRequestWithDefaults instantiates a new FirewallBehaviorSetRateLimitAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetLimitBy + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetLimitBy() string` + +GetLimitBy returns the LimitBy field if non-nil, zero value otherwise. + +### GetLimitByOk + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetLimitByOk() (*string, bool)` + +GetLimitByOk returns a tuple with the LimitBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLimitBy + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetLimitBy(v string)` + +SetLimitBy sets LimitBy field to given value. + + +### GetAverageRateLimit + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetAverageRateLimit() int64` + +GetAverageRateLimit returns the AverageRateLimit field if non-nil, zero value otherwise. + +### GetAverageRateLimitOk + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetAverageRateLimitOk() (*int64, bool)` + +GetAverageRateLimitOk returns a tuple with the AverageRateLimit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAverageRateLimit + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetAverageRateLimit(v int64)` + +SetAverageRateLimit sets AverageRateLimit field to given value. + + +### GetMaximumBurstSize + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetMaximumBurstSize() int64` + +GetMaximumBurstSize returns the MaximumBurstSize field if non-nil, zero value otherwise. + +### GetMaximumBurstSizeOk + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetMaximumBurstSizeOk() (*int64, bool)` + +GetMaximumBurstSizeOk returns a tuple with the MaximumBurstSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaximumBurstSize + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetMaximumBurstSize(v int64)` + +SetMaximumBurstSize sets MaximumBurstSize field to given value. + +### HasMaximumBurstSize + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) HasMaximumBurstSize() bool` + +HasMaximumBurstSize returns a boolean if a field has been set. + +### SetMaximumBurstSizeNil + +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetMaximumBurstSizeNil(b bool)` + + SetMaximumBurstSizeNil sets the value for MaximumBurstSize to be an explicit nil + +### UnsetMaximumBurstSize +`func (o *FirewallBehaviorSetRateLimitAttributesRequest) UnsetMaximumBurstSize()` + +UnsetMaximumBurstSize ensures that no value is present for MaximumBurstSize, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetRateLimitRequest.md b/azion-api/docs/FirewallBehaviorSetRateLimitRequest.md new file mode 100644 index 0000000..cd390d2 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetRateLimitRequest.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetRateLimitRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `set_rate_limit` - set_rate_limit | +**Attributes** | [**FirewallBehaviorSetRateLimitAttributesRequest**](FirewallBehaviorSetRateLimitAttributesRequest.md) | | + +## Methods + +### NewFirewallBehaviorSetRateLimitRequest + +`func NewFirewallBehaviorSetRateLimitRequest(type_ string, attributes FirewallBehaviorSetRateLimitAttributesRequest, ) *FirewallBehaviorSetRateLimitRequest` + +NewFirewallBehaviorSetRateLimitRequest instantiates a new FirewallBehaviorSetRateLimitRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetRateLimitRequestWithDefaults + +`func NewFirewallBehaviorSetRateLimitRequestWithDefaults() *FirewallBehaviorSetRateLimitRequest` + +NewFirewallBehaviorSetRateLimitRequestWithDefaults instantiates a new FirewallBehaviorSetRateLimitRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetRateLimitRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetRateLimitRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetRateLimitRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorSetRateLimitRequest) GetAttributes() FirewallBehaviorSetRateLimitAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorSetRateLimitRequest) GetAttributesOk() (*FirewallBehaviorSetRateLimitAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorSetRateLimitRequest) SetAttributes(v FirewallBehaviorSetRateLimitAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetWaf.md b/azion-api/docs/FirewallBehaviorSetWaf.md new file mode 100644 index 0000000..9cce983 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetWaf.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetWaf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `set_waf` - set_waf | +**Attributes** | [**FirewallBehaviorSetWafAttributes**](FirewallBehaviorSetWafAttributes.md) | | + +## Methods + +### NewFirewallBehaviorSetWaf + +`func NewFirewallBehaviorSetWaf(type_ string, attributes FirewallBehaviorSetWafAttributes, ) *FirewallBehaviorSetWaf` + +NewFirewallBehaviorSetWaf instantiates a new FirewallBehaviorSetWaf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetWafWithDefaults + +`func NewFirewallBehaviorSetWafWithDefaults() *FirewallBehaviorSetWaf` + +NewFirewallBehaviorSetWafWithDefaults instantiates a new FirewallBehaviorSetWaf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetWaf) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetWaf) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetWaf) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorSetWaf) GetAttributes() FirewallBehaviorSetWafAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorSetWaf) GetAttributesOk() (*FirewallBehaviorSetWafAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorSetWaf) SetAttributes(v FirewallBehaviorSetWafAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetWafAttributes.md b/azion-api/docs/FirewallBehaviorSetWafAttributes.md new file mode 100644 index 0000000..0a02349 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetWafAttributes.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetWafAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WafId** | **int64** | | +**Mode** | **string** | * `logging` - logging * `blocking` - blocking | + +## Methods + +### NewFirewallBehaviorSetWafAttributes + +`func NewFirewallBehaviorSetWafAttributes(wafId int64, mode string, ) *FirewallBehaviorSetWafAttributes` + +NewFirewallBehaviorSetWafAttributes instantiates a new FirewallBehaviorSetWafAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetWafAttributesWithDefaults + +`func NewFirewallBehaviorSetWafAttributesWithDefaults() *FirewallBehaviorSetWafAttributes` + +NewFirewallBehaviorSetWafAttributesWithDefaults instantiates a new FirewallBehaviorSetWafAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWafId + +`func (o *FirewallBehaviorSetWafAttributes) GetWafId() int64` + +GetWafId returns the WafId field if non-nil, zero value otherwise. + +### GetWafIdOk + +`func (o *FirewallBehaviorSetWafAttributes) GetWafIdOk() (*int64, bool)` + +GetWafIdOk returns a tuple with the WafId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWafId + +`func (o *FirewallBehaviorSetWafAttributes) SetWafId(v int64)` + +SetWafId sets WafId field to given value. + + +### GetMode + +`func (o *FirewallBehaviorSetWafAttributes) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *FirewallBehaviorSetWafAttributes) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *FirewallBehaviorSetWafAttributes) SetMode(v string)` + +SetMode sets Mode field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetWafAttributesRequest.md b/azion-api/docs/FirewallBehaviorSetWafAttributesRequest.md new file mode 100644 index 0000000..d872000 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetWafAttributesRequest.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetWafAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WafId** | **int64** | | +**Mode** | **string** | * `logging` - logging * `blocking` - blocking | + +## Methods + +### NewFirewallBehaviorSetWafAttributesRequest + +`func NewFirewallBehaviorSetWafAttributesRequest(wafId int64, mode string, ) *FirewallBehaviorSetWafAttributesRequest` + +NewFirewallBehaviorSetWafAttributesRequest instantiates a new FirewallBehaviorSetWafAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetWafAttributesRequestWithDefaults + +`func NewFirewallBehaviorSetWafAttributesRequestWithDefaults() *FirewallBehaviorSetWafAttributesRequest` + +NewFirewallBehaviorSetWafAttributesRequestWithDefaults instantiates a new FirewallBehaviorSetWafAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWafId + +`func (o *FirewallBehaviorSetWafAttributesRequest) GetWafId() int64` + +GetWafId returns the WafId field if non-nil, zero value otherwise. + +### GetWafIdOk + +`func (o *FirewallBehaviorSetWafAttributesRequest) GetWafIdOk() (*int64, bool)` + +GetWafIdOk returns a tuple with the WafId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWafId + +`func (o *FirewallBehaviorSetWafAttributesRequest) SetWafId(v int64)` + +SetWafId sets WafId field to given value. + + +### GetMode + +`func (o *FirewallBehaviorSetWafAttributesRequest) GetMode() string` + +GetMode returns the Mode field if non-nil, zero value otherwise. + +### GetModeOk + +`func (o *FirewallBehaviorSetWafAttributesRequest) GetModeOk() (*string, bool)` + +GetModeOk returns a tuple with the Mode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMode + +`func (o *FirewallBehaviorSetWafAttributesRequest) SetMode(v string)` + +SetMode sets Mode field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallBehaviorSetWafRequest.md b/azion-api/docs/FirewallBehaviorSetWafRequest.md new file mode 100644 index 0000000..9db19d0 --- /dev/null +++ b/azion-api/docs/FirewallBehaviorSetWafRequest.md @@ -0,0 +1,72 @@ +# FirewallBehaviorSetWafRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `set_waf` - set_waf | +**Attributes** | [**FirewallBehaviorSetWafAttributesRequest**](FirewallBehaviorSetWafAttributesRequest.md) | | + +## Methods + +### NewFirewallBehaviorSetWafRequest + +`func NewFirewallBehaviorSetWafRequest(type_ string, attributes FirewallBehaviorSetWafAttributesRequest, ) *FirewallBehaviorSetWafRequest` + +NewFirewallBehaviorSetWafRequest instantiates a new FirewallBehaviorSetWafRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallBehaviorSetWafRequestWithDefaults + +`func NewFirewallBehaviorSetWafRequestWithDefaults() *FirewallBehaviorSetWafRequest` + +NewFirewallBehaviorSetWafRequestWithDefaults instantiates a new FirewallBehaviorSetWafRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *FirewallBehaviorSetWafRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *FirewallBehaviorSetWafRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *FirewallBehaviorSetWafRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *FirewallBehaviorSetWafRequest) GetAttributes() FirewallBehaviorSetWafAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *FirewallBehaviorSetWafRequest) GetAttributesOk() (*FirewallBehaviorSetWafAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *FirewallBehaviorSetWafRequest) SetAttributes(v FirewallBehaviorSetWafAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallCriterionArgument.md b/azion-api/docs/FirewallCriterionArgument.md new file mode 100644 index 0000000..bddb45a --- /dev/null +++ b/azion-api/docs/FirewallCriterionArgument.md @@ -0,0 +1,30 @@ +# FirewallCriterionArgument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewFirewallCriterionArgument + +`func NewFirewallCriterionArgument() *FirewallCriterionArgument` + +NewFirewallCriterionArgument instantiates a new FirewallCriterionArgument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallCriterionArgumentWithDefaults + +`func NewFirewallCriterionArgumentWithDefaults() *FirewallCriterionArgument` + +NewFirewallCriterionArgumentWithDefaults instantiates a new FirewallCriterionArgument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallCriterionArgumentRequest.md b/azion-api/docs/FirewallCriterionArgumentRequest.md new file mode 100644 index 0000000..63dfa18 --- /dev/null +++ b/azion-api/docs/FirewallCriterionArgumentRequest.md @@ -0,0 +1,30 @@ +# FirewallCriterionArgumentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewFirewallCriterionArgumentRequest + +`func NewFirewallCriterionArgumentRequest() *FirewallCriterionArgumentRequest` + +NewFirewallCriterionArgumentRequest instantiates a new FirewallCriterionArgumentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallCriterionArgumentRequestWithDefaults + +`func NewFirewallCriterionArgumentRequestWithDefaults() *FirewallCriterionArgumentRequest` + +NewFirewallCriterionArgumentRequestWithDefaults instantiates a new FirewallCriterionArgumentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallCriterionField.md b/azion-api/docs/FirewallCriterionField.md new file mode 100644 index 0000000..dd09ae1 --- /dev/null +++ b/azion-api/docs/FirewallCriterionField.md @@ -0,0 +1,129 @@ +# FirewallCriterionField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conditional** | **string** | * `if` - if * `or` - or * `and` - and | +**Variable** | **string** | * `${header_accept}` - ${header_accept} * `${header_accept_encoding}` - ${header_accept_encoding} * `${header_accept_language}` - ${header_accept_language} * `${header_cookie}` - ${header_cookie} * `${header_origin}` - ${header_origin} * `${header_referer}` - ${header_referer} * `${header_user_agent}` - ${header_user_agent} * `${host}` - ${host} * `${network}` - ${network} * `${request_args}` - ${request_args} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${scheme}` - ${scheme} * `${ssl_verification_status}` - ${ssl_verification_status} * `${client_certificate_validation}` - ${client_certificate_validation} | +**Operator** | **string** | * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with | +**Argument** | Pointer to [**NullableFirewallCriterionArgument**](FirewallCriterionArgument.md) | | [optional] + +## Methods + +### NewFirewallCriterionField + +`func NewFirewallCriterionField(conditional string, variable string, operator string, ) *FirewallCriterionField` + +NewFirewallCriterionField instantiates a new FirewallCriterionField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallCriterionFieldWithDefaults + +`func NewFirewallCriterionFieldWithDefaults() *FirewallCriterionField` + +NewFirewallCriterionFieldWithDefaults instantiates a new FirewallCriterionField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConditional + +`func (o *FirewallCriterionField) GetConditional() string` + +GetConditional returns the Conditional field if non-nil, zero value otherwise. + +### GetConditionalOk + +`func (o *FirewallCriterionField) GetConditionalOk() (*string, bool)` + +GetConditionalOk returns a tuple with the Conditional field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditional + +`func (o *FirewallCriterionField) SetConditional(v string)` + +SetConditional sets Conditional field to given value. + + +### GetVariable + +`func (o *FirewallCriterionField) GetVariable() string` + +GetVariable returns the Variable field if non-nil, zero value otherwise. + +### GetVariableOk + +`func (o *FirewallCriterionField) GetVariableOk() (*string, bool)` + +GetVariableOk returns a tuple with the Variable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariable + +`func (o *FirewallCriterionField) SetVariable(v string)` + +SetVariable sets Variable field to given value. + + +### GetOperator + +`func (o *FirewallCriterionField) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *FirewallCriterionField) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *FirewallCriterionField) SetOperator(v string)` + +SetOperator sets Operator field to given value. + + +### GetArgument + +`func (o *FirewallCriterionField) GetArgument() FirewallCriterionArgument` + +GetArgument returns the Argument field if non-nil, zero value otherwise. + +### GetArgumentOk + +`func (o *FirewallCriterionField) GetArgumentOk() (*FirewallCriterionArgument, bool)` + +GetArgumentOk returns a tuple with the Argument field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgument + +`func (o *FirewallCriterionField) SetArgument(v FirewallCriterionArgument)` + +SetArgument sets Argument field to given value. + +### HasArgument + +`func (o *FirewallCriterionField) HasArgument() bool` + +HasArgument returns a boolean if a field has been set. + +### SetArgumentNil + +`func (o *FirewallCriterionField) SetArgumentNil(b bool)` + + SetArgumentNil sets the value for Argument to be an explicit nil + +### UnsetArgument +`func (o *FirewallCriterionField) UnsetArgument()` + +UnsetArgument ensures that no value is present for Argument, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallCriterionFieldRequest.md b/azion-api/docs/FirewallCriterionFieldRequest.md new file mode 100644 index 0000000..e445520 --- /dev/null +++ b/azion-api/docs/FirewallCriterionFieldRequest.md @@ -0,0 +1,129 @@ +# FirewallCriterionFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Conditional** | **string** | * `if` - if * `or` - or * `and` - and | +**Variable** | **string** | * `${header_accept}` - ${header_accept} * `${header_accept_encoding}` - ${header_accept_encoding} * `${header_accept_language}` - ${header_accept_language} * `${header_cookie}` - ${header_cookie} * `${header_origin}` - ${header_origin} * `${header_referer}` - ${header_referer} * `${header_user_agent}` - ${header_user_agent} * `${host}` - ${host} * `${network}` - ${network} * `${request_args}` - ${request_args} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${scheme}` - ${scheme} * `${ssl_verification_status}` - ${ssl_verification_status} * `${client_certificate_validation}` - ${client_certificate_validation} | +**Operator** | **string** | * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with | +**Argument** | Pointer to [**NullableFirewallCriterionArgumentRequest**](FirewallCriterionArgumentRequest.md) | | [optional] + +## Methods + +### NewFirewallCriterionFieldRequest + +`func NewFirewallCriterionFieldRequest(conditional string, variable string, operator string, ) *FirewallCriterionFieldRequest` + +NewFirewallCriterionFieldRequest instantiates a new FirewallCriterionFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallCriterionFieldRequestWithDefaults + +`func NewFirewallCriterionFieldRequestWithDefaults() *FirewallCriterionFieldRequest` + +NewFirewallCriterionFieldRequestWithDefaults instantiates a new FirewallCriterionFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConditional + +`func (o *FirewallCriterionFieldRequest) GetConditional() string` + +GetConditional returns the Conditional field if non-nil, zero value otherwise. + +### GetConditionalOk + +`func (o *FirewallCriterionFieldRequest) GetConditionalOk() (*string, bool)` + +GetConditionalOk returns a tuple with the Conditional field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditional + +`func (o *FirewallCriterionFieldRequest) SetConditional(v string)` + +SetConditional sets Conditional field to given value. + + +### GetVariable + +`func (o *FirewallCriterionFieldRequest) GetVariable() string` + +GetVariable returns the Variable field if non-nil, zero value otherwise. + +### GetVariableOk + +`func (o *FirewallCriterionFieldRequest) GetVariableOk() (*string, bool)` + +GetVariableOk returns a tuple with the Variable field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVariable + +`func (o *FirewallCriterionFieldRequest) SetVariable(v string)` + +SetVariable sets Variable field to given value. + + +### GetOperator + +`func (o *FirewallCriterionFieldRequest) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *FirewallCriterionFieldRequest) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *FirewallCriterionFieldRequest) SetOperator(v string)` + +SetOperator sets Operator field to given value. + + +### GetArgument + +`func (o *FirewallCriterionFieldRequest) GetArgument() FirewallCriterionArgumentRequest` + +GetArgument returns the Argument field if non-nil, zero value otherwise. + +### GetArgumentOk + +`func (o *FirewallCriterionFieldRequest) GetArgumentOk() (*FirewallCriterionArgumentRequest, bool)` + +GetArgumentOk returns a tuple with the Argument field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgument + +`func (o *FirewallCriterionFieldRequest) SetArgument(v FirewallCriterionArgumentRequest)` + +SetArgument sets Argument field to given value. + +### HasArgument + +`func (o *FirewallCriterionFieldRequest) HasArgument() bool` + +HasArgument returns a boolean if a field has been set. + +### SetArgumentNil + +`func (o *FirewallCriterionFieldRequest) SetArgumentNil(b bool)` + + SetArgumentNil sets the value for Argument to be an explicit nil + +### UnsetArgument +`func (o *FirewallCriterionFieldRequest) UnsetArgument()` + +UnsetArgument ensures that no value is present for Argument, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallFunctionInstance.md b/azion-api/docs/FirewallFunctionInstance.md new file mode 100644 index 0000000..d249b64 --- /dev/null +++ b/azion-api/docs/FirewallFunctionInstance.md @@ -0,0 +1,223 @@ +# FirewallFunctionInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Args** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**Function** | **int64** | | +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | + +## Methods + +### NewFirewallFunctionInstance + +`func NewFirewallFunctionInstance(id int64, name string, function int64, lastEditor string, lastModified time.Time, ) *FirewallFunctionInstance` + +NewFirewallFunctionInstance instantiates a new FirewallFunctionInstance object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallFunctionInstanceWithDefaults + +`func NewFirewallFunctionInstanceWithDefaults() *FirewallFunctionInstance` + +NewFirewallFunctionInstanceWithDefaults instantiates a new FirewallFunctionInstance object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *FirewallFunctionInstance) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FirewallFunctionInstance) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FirewallFunctionInstance) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *FirewallFunctionInstance) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallFunctionInstance) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FirewallFunctionInstance) SetName(v string)` + +SetName sets Name field to given value. + + +### GetArgs + +`func (o *FirewallFunctionInstance) GetArgs() interface{}` + +GetArgs returns the Args field if non-nil, zero value otherwise. + +### GetArgsOk + +`func (o *FirewallFunctionInstance) GetArgsOk() (*interface{}, bool)` + +GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgs + +`func (o *FirewallFunctionInstance) SetArgs(v interface{})` + +SetArgs sets Args field to given value. + +### HasArgs + +`func (o *FirewallFunctionInstance) HasArgs() bool` + +HasArgs returns a boolean if a field has been set. + +### SetArgsNil + +`func (o *FirewallFunctionInstance) SetArgsNil(b bool)` + + SetArgsNil sets the value for Args to be an explicit nil + +### UnsetArgs +`func (o *FirewallFunctionInstance) UnsetArgs()` + +UnsetArgs ensures that no value is present for Args, not even an explicit nil +### GetAzionForm + +`func (o *FirewallFunctionInstance) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *FirewallFunctionInstance) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *FirewallFunctionInstance) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *FirewallFunctionInstance) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetFunction + +`func (o *FirewallFunctionInstance) GetFunction() int64` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *FirewallFunctionInstance) GetFunctionOk() (*int64, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *FirewallFunctionInstance) SetFunction(v int64)` + +SetFunction sets Function field to given value. + + +### GetActive + +`func (o *FirewallFunctionInstance) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FirewallFunctionInstance) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FirewallFunctionInstance) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FirewallFunctionInstance) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *FirewallFunctionInstance) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *FirewallFunctionInstance) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *FirewallFunctionInstance) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *FirewallFunctionInstance) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *FirewallFunctionInstance) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *FirewallFunctionInstance) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallFunctionInstanceRequest.md b/azion-api/docs/FirewallFunctionInstanceRequest.md new file mode 100644 index 0000000..382fa8c --- /dev/null +++ b/azion-api/docs/FirewallFunctionInstanceRequest.md @@ -0,0 +1,160 @@ +# FirewallFunctionInstanceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Args** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**Function** | **int64** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewFirewallFunctionInstanceRequest + +`func NewFirewallFunctionInstanceRequest(name string, function int64, ) *FirewallFunctionInstanceRequest` + +NewFirewallFunctionInstanceRequest instantiates a new FirewallFunctionInstanceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallFunctionInstanceRequestWithDefaults + +`func NewFirewallFunctionInstanceRequestWithDefaults() *FirewallFunctionInstanceRequest` + +NewFirewallFunctionInstanceRequestWithDefaults instantiates a new FirewallFunctionInstanceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FirewallFunctionInstanceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallFunctionInstanceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FirewallFunctionInstanceRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetArgs + +`func (o *FirewallFunctionInstanceRequest) GetArgs() interface{}` + +GetArgs returns the Args field if non-nil, zero value otherwise. + +### GetArgsOk + +`func (o *FirewallFunctionInstanceRequest) GetArgsOk() (*interface{}, bool)` + +GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgs + +`func (o *FirewallFunctionInstanceRequest) SetArgs(v interface{})` + +SetArgs sets Args field to given value. + +### HasArgs + +`func (o *FirewallFunctionInstanceRequest) HasArgs() bool` + +HasArgs returns a boolean if a field has been set. + +### SetArgsNil + +`func (o *FirewallFunctionInstanceRequest) SetArgsNil(b bool)` + + SetArgsNil sets the value for Args to be an explicit nil + +### UnsetArgs +`func (o *FirewallFunctionInstanceRequest) UnsetArgs()` + +UnsetArgs ensures that no value is present for Args, not even an explicit nil +### GetAzionForm + +`func (o *FirewallFunctionInstanceRequest) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *FirewallFunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *FirewallFunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *FirewallFunctionInstanceRequest) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetFunction + +`func (o *FirewallFunctionInstanceRequest) GetFunction() int64` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *FirewallFunctionInstanceRequest) GetFunctionOk() (*int64, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *FirewallFunctionInstanceRequest) SetFunction(v int64)` + +SetFunction sets Function field to given value. + + +### GetActive + +`func (o *FirewallFunctionInstanceRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FirewallFunctionInstanceRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FirewallFunctionInstanceRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FirewallFunctionInstanceRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallFunctionInstanceResponse.md b/azion-api/docs/FirewallFunctionInstanceResponse.md new file mode 100644 index 0000000..bd82cec --- /dev/null +++ b/azion-api/docs/FirewallFunctionInstanceResponse.md @@ -0,0 +1,77 @@ +# FirewallFunctionInstanceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**FirewallFunctionInstance**](FirewallFunctionInstance.md) | | + +## Methods + +### NewFirewallFunctionInstanceResponse + +`func NewFirewallFunctionInstanceResponse(data FirewallFunctionInstance, ) *FirewallFunctionInstanceResponse` + +NewFirewallFunctionInstanceResponse instantiates a new FirewallFunctionInstanceResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallFunctionInstanceResponseWithDefaults + +`func NewFirewallFunctionInstanceResponseWithDefaults() *FirewallFunctionInstanceResponse` + +NewFirewallFunctionInstanceResponseWithDefaults instantiates a new FirewallFunctionInstanceResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *FirewallFunctionInstanceResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *FirewallFunctionInstanceResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *FirewallFunctionInstanceResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *FirewallFunctionInstanceResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *FirewallFunctionInstanceResponse) GetData() FirewallFunctionInstance` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallFunctionInstanceResponse) GetDataOk() (*FirewallFunctionInstance, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *FirewallFunctionInstanceResponse) SetData(v FirewallFunctionInstance)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallModule.md b/azion-api/docs/FirewallModule.md new file mode 100644 index 0000000..e4bd94d --- /dev/null +++ b/azion-api/docs/FirewallModule.md @@ -0,0 +1,56 @@ +# FirewallModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewFirewallModule + +`func NewFirewallModule() *FirewallModule` + +NewFirewallModule instantiates a new FirewallModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallModuleWithDefaults + +`func NewFirewallModuleWithDefaults() *FirewallModule` + +NewFirewallModuleWithDefaults instantiates a new FirewallModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *FirewallModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *FirewallModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *FirewallModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *FirewallModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallModuleRequest.md b/azion-api/docs/FirewallModuleRequest.md new file mode 100644 index 0000000..4240dff --- /dev/null +++ b/azion-api/docs/FirewallModuleRequest.md @@ -0,0 +1,56 @@ +# FirewallModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewFirewallModuleRequest + +`func NewFirewallModuleRequest() *FirewallModuleRequest` + +NewFirewallModuleRequest instantiates a new FirewallModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallModuleRequestWithDefaults + +`func NewFirewallModuleRequestWithDefaults() *FirewallModuleRequest` + +NewFirewallModuleRequestWithDefaults instantiates a new FirewallModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *FirewallModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *FirewallModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *FirewallModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *FirewallModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallModules.md b/azion-api/docs/FirewallModules.md new file mode 100644 index 0000000..a89ea3e --- /dev/null +++ b/azion-api/docs/FirewallModules.md @@ -0,0 +1,129 @@ +# FirewallModules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DdosProtection** | [**FirewallModule**](FirewallModule.md) | | +**Functions** | Pointer to [**FirewallModule**](FirewallModule.md) | | [optional] +**NetworkProtection** | Pointer to [**FirewallModule**](FirewallModule.md) | | [optional] +**Waf** | Pointer to [**FirewallModule**](FirewallModule.md) | | [optional] + +## Methods + +### NewFirewallModules + +`func NewFirewallModules(ddosProtection FirewallModule, ) *FirewallModules` + +NewFirewallModules instantiates a new FirewallModules object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallModulesWithDefaults + +`func NewFirewallModulesWithDefaults() *FirewallModules` + +NewFirewallModulesWithDefaults instantiates a new FirewallModules object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDdosProtection + +`func (o *FirewallModules) GetDdosProtection() FirewallModule` + +GetDdosProtection returns the DdosProtection field if non-nil, zero value otherwise. + +### GetDdosProtectionOk + +`func (o *FirewallModules) GetDdosProtectionOk() (*FirewallModule, bool)` + +GetDdosProtectionOk returns a tuple with the DdosProtection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDdosProtection + +`func (o *FirewallModules) SetDdosProtection(v FirewallModule)` + +SetDdosProtection sets DdosProtection field to given value. + + +### GetFunctions + +`func (o *FirewallModules) GetFunctions() FirewallModule` + +GetFunctions returns the Functions field if non-nil, zero value otherwise. + +### GetFunctionsOk + +`func (o *FirewallModules) GetFunctionsOk() (*FirewallModule, bool)` + +GetFunctionsOk returns a tuple with the Functions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctions + +`func (o *FirewallModules) SetFunctions(v FirewallModule)` + +SetFunctions sets Functions field to given value. + +### HasFunctions + +`func (o *FirewallModules) HasFunctions() bool` + +HasFunctions returns a boolean if a field has been set. + +### GetNetworkProtection + +`func (o *FirewallModules) GetNetworkProtection() FirewallModule` + +GetNetworkProtection returns the NetworkProtection field if non-nil, zero value otherwise. + +### GetNetworkProtectionOk + +`func (o *FirewallModules) GetNetworkProtectionOk() (*FirewallModule, bool)` + +GetNetworkProtectionOk returns a tuple with the NetworkProtection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkProtection + +`func (o *FirewallModules) SetNetworkProtection(v FirewallModule)` + +SetNetworkProtection sets NetworkProtection field to given value. + +### HasNetworkProtection + +`func (o *FirewallModules) HasNetworkProtection() bool` + +HasNetworkProtection returns a boolean if a field has been set. + +### GetWaf + +`func (o *FirewallModules) GetWaf() FirewallModule` + +GetWaf returns the Waf field if non-nil, zero value otherwise. + +### GetWafOk + +`func (o *FirewallModules) GetWafOk() (*FirewallModule, bool)` + +GetWafOk returns a tuple with the Waf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWaf + +`func (o *FirewallModules) SetWaf(v FirewallModule)` + +SetWaf sets Waf field to given value. + +### HasWaf + +`func (o *FirewallModules) HasWaf() bool` + +HasWaf returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallModulesRequest.md b/azion-api/docs/FirewallModulesRequest.md new file mode 100644 index 0000000..2ad20c9 --- /dev/null +++ b/azion-api/docs/FirewallModulesRequest.md @@ -0,0 +1,108 @@ +# FirewallModulesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Functions** | Pointer to [**FirewallModuleRequest**](FirewallModuleRequest.md) | | [optional] +**NetworkProtection** | Pointer to [**FirewallModuleRequest**](FirewallModuleRequest.md) | | [optional] +**Waf** | Pointer to [**FirewallModuleRequest**](FirewallModuleRequest.md) | | [optional] + +## Methods + +### NewFirewallModulesRequest + +`func NewFirewallModulesRequest() *FirewallModulesRequest` + +NewFirewallModulesRequest instantiates a new FirewallModulesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallModulesRequestWithDefaults + +`func NewFirewallModulesRequestWithDefaults() *FirewallModulesRequest` + +NewFirewallModulesRequestWithDefaults instantiates a new FirewallModulesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFunctions + +`func (o *FirewallModulesRequest) GetFunctions() FirewallModuleRequest` + +GetFunctions returns the Functions field if non-nil, zero value otherwise. + +### GetFunctionsOk + +`func (o *FirewallModulesRequest) GetFunctionsOk() (*FirewallModuleRequest, bool)` + +GetFunctionsOk returns a tuple with the Functions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunctions + +`func (o *FirewallModulesRequest) SetFunctions(v FirewallModuleRequest)` + +SetFunctions sets Functions field to given value. + +### HasFunctions + +`func (o *FirewallModulesRequest) HasFunctions() bool` + +HasFunctions returns a boolean if a field has been set. + +### GetNetworkProtection + +`func (o *FirewallModulesRequest) GetNetworkProtection() FirewallModuleRequest` + +GetNetworkProtection returns the NetworkProtection field if non-nil, zero value otherwise. + +### GetNetworkProtectionOk + +`func (o *FirewallModulesRequest) GetNetworkProtectionOk() (*FirewallModuleRequest, bool)` + +GetNetworkProtectionOk returns a tuple with the NetworkProtection field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNetworkProtection + +`func (o *FirewallModulesRequest) SetNetworkProtection(v FirewallModuleRequest)` + +SetNetworkProtection sets NetworkProtection field to given value. + +### HasNetworkProtection + +`func (o *FirewallModulesRequest) HasNetworkProtection() bool` + +HasNetworkProtection returns a boolean if a field has been set. + +### GetWaf + +`func (o *FirewallModulesRequest) GetWaf() FirewallModuleRequest` + +GetWaf returns the Waf field if non-nil, zero value otherwise. + +### GetWafOk + +`func (o *FirewallModulesRequest) GetWafOk() (*FirewallModuleRequest, bool)` + +GetWafOk returns a tuple with the Waf field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWaf + +`func (o *FirewallModulesRequest) SetWaf(v FirewallModuleRequest)` + +SetWaf sets Waf field to given value. + +### HasWaf + +`func (o *FirewallModulesRequest) HasWaf() bool` + +HasWaf returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallRequest.md b/azion-api/docs/FirewallRequest.md new file mode 100644 index 0000000..8db1216 --- /dev/null +++ b/azion-api/docs/FirewallRequest.md @@ -0,0 +1,129 @@ +# FirewallRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Modules** | Pointer to [**FirewallModulesRequest**](FirewallModulesRequest.md) | | [optional] +**Debug** | Pointer to **bool** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewFirewallRequest + +`func NewFirewallRequest(name string, ) *FirewallRequest` + +NewFirewallRequest instantiates a new FirewallRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRequestWithDefaults + +`func NewFirewallRequestWithDefaults() *FirewallRequest` + +NewFirewallRequestWithDefaults instantiates a new FirewallRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FirewallRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FirewallRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetModules + +`func (o *FirewallRequest) GetModules() FirewallModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *FirewallRequest) GetModulesOk() (*FirewallModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *FirewallRequest) SetModules(v FirewallModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *FirewallRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### GetDebug + +`func (o *FirewallRequest) GetDebug() bool` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *FirewallRequest) GetDebugOk() (*bool, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *FirewallRequest) SetDebug(v bool)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *FirewallRequest) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + +### GetActive + +`func (o *FirewallRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FirewallRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FirewallRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FirewallRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallResponse.md b/azion-api/docs/FirewallResponse.md new file mode 100644 index 0000000..05149b5 --- /dev/null +++ b/azion-api/docs/FirewallResponse.md @@ -0,0 +1,77 @@ +# FirewallResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Firewall**](Firewall.md) | | + +## Methods + +### NewFirewallResponse + +`func NewFirewallResponse(data Firewall, ) *FirewallResponse` + +NewFirewallResponse instantiates a new FirewallResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallResponseWithDefaults + +`func NewFirewallResponseWithDefaults() *FirewallResponse` + +NewFirewallResponseWithDefaults instantiates a new FirewallResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *FirewallResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *FirewallResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *FirewallResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *FirewallResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *FirewallResponse) GetData() Firewall` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallResponse) GetDataOk() (*Firewall, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *FirewallResponse) SetData(v Firewall)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallRule.md b/azion-api/docs/FirewallRule.md new file mode 100644 index 0000000..6011954 --- /dev/null +++ b/azion-api/docs/FirewallRule.md @@ -0,0 +1,229 @@ +# FirewallRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**Criteria** | [**[][]FirewallCriterionField**]([]FirewallCriterionField.md) | | +**Behaviors** | [**[]FirewallBehavior**](FirewallBehavior.md) | | +**Description** | Pointer to **string** | | [optional] +**Order** | **int64** | | + +## Methods + +### NewFirewallRule + +`func NewFirewallRule(id int64, name string, lastEditor string, lastModified time.Time, criteria [][]FirewallCriterionField, behaviors []FirewallBehavior, order int64, ) *FirewallRule` + +NewFirewallRule instantiates a new FirewallRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleWithDefaults + +`func NewFirewallRuleWithDefaults() *FirewallRule` + +NewFirewallRuleWithDefaults instantiates a new FirewallRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *FirewallRule) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FirewallRule) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FirewallRule) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *FirewallRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FirewallRule) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *FirewallRule) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *FirewallRule) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *FirewallRule) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *FirewallRule) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *FirewallRule) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *FirewallRule) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *FirewallRule) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FirewallRule) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FirewallRule) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FirewallRule) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *FirewallRule) GetCriteria() [][]FirewallCriterionField` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *FirewallRule) GetCriteriaOk() (*[][]FirewallCriterionField, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *FirewallRule) SetCriteria(v [][]FirewallCriterionField)` + +SetCriteria sets Criteria field to given value. + + +### GetBehaviors + +`func (o *FirewallRule) GetBehaviors() []FirewallBehavior` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *FirewallRule) GetBehaviorsOk() (*[]FirewallBehavior, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *FirewallRule) SetBehaviors(v []FirewallBehavior)` + +SetBehaviors sets Behaviors field to given value. + + +### GetDescription + +`func (o *FirewallRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *FirewallRule) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *FirewallRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *FirewallRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrder + +`func (o *FirewallRule) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *FirewallRule) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *FirewallRule) SetOrder(v int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallRuleEngineOrderRequest.md b/azion-api/docs/FirewallRuleEngineOrderRequest.md new file mode 100644 index 0000000..4a26f44 --- /dev/null +++ b/azion-api/docs/FirewallRuleEngineOrderRequest.md @@ -0,0 +1,51 @@ +# FirewallRuleEngineOrderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Order** | **[]int64** | | + +## Methods + +### NewFirewallRuleEngineOrderRequest + +`func NewFirewallRuleEngineOrderRequest(order []int64, ) *FirewallRuleEngineOrderRequest` + +NewFirewallRuleEngineOrderRequest instantiates a new FirewallRuleEngineOrderRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleEngineOrderRequestWithDefaults + +`func NewFirewallRuleEngineOrderRequestWithDefaults() *FirewallRuleEngineOrderRequest` + +NewFirewallRuleEngineOrderRequestWithDefaults instantiates a new FirewallRuleEngineOrderRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrder + +`func (o *FirewallRuleEngineOrderRequest) GetOrder() []int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *FirewallRuleEngineOrderRequest) GetOrderOk() (*[]int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *FirewallRuleEngineOrderRequest) SetOrder(v []int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallRuleRequest.md b/azion-api/docs/FirewallRuleRequest.md new file mode 100644 index 0000000..3d19f02 --- /dev/null +++ b/azion-api/docs/FirewallRuleRequest.md @@ -0,0 +1,145 @@ +# FirewallRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Criteria** | [**[][]FirewallCriterionFieldRequest**]([]FirewallCriterionFieldRequest.md) | | +**Behaviors** | [**[]FirewallBehaviorRequest**](FirewallBehaviorRequest.md) | | +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewFirewallRuleRequest + +`func NewFirewallRuleRequest(name string, criteria [][]FirewallCriterionFieldRequest, behaviors []FirewallBehaviorRequest, ) *FirewallRuleRequest` + +NewFirewallRuleRequest instantiates a new FirewallRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleRequestWithDefaults + +`func NewFirewallRuleRequestWithDefaults() *FirewallRuleRequest` + +NewFirewallRuleRequestWithDefaults instantiates a new FirewallRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FirewallRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FirewallRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FirewallRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *FirewallRuleRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FirewallRuleRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FirewallRuleRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FirewallRuleRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *FirewallRuleRequest) GetCriteria() [][]FirewallCriterionFieldRequest` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *FirewallRuleRequest) GetCriteriaOk() (*[][]FirewallCriterionFieldRequest, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *FirewallRuleRequest) SetCriteria(v [][]FirewallCriterionFieldRequest)` + +SetCriteria sets Criteria field to given value. + + +### GetBehaviors + +`func (o *FirewallRuleRequest) GetBehaviors() []FirewallBehaviorRequest` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *FirewallRuleRequest) GetBehaviorsOk() (*[]FirewallBehaviorRequest, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *FirewallRuleRequest) SetBehaviors(v []FirewallBehaviorRequest)` + +SetBehaviors sets Behaviors field to given value. + + +### GetDescription + +`func (o *FirewallRuleRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *FirewallRuleRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *FirewallRuleRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *FirewallRuleRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallRuleResponse.md b/azion-api/docs/FirewallRuleResponse.md new file mode 100644 index 0000000..c583826 --- /dev/null +++ b/azion-api/docs/FirewallRuleResponse.md @@ -0,0 +1,77 @@ +# FirewallRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**FirewallRule**](FirewallRule.md) | | + +## Methods + +### NewFirewallRuleResponse + +`func NewFirewallRuleResponse(data FirewallRule, ) *FirewallRuleResponse` + +NewFirewallRuleResponse instantiates a new FirewallRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFirewallRuleResponseWithDefaults + +`func NewFirewallRuleResponseWithDefaults() *FirewallRuleResponse` + +NewFirewallRuleResponseWithDefaults instantiates a new FirewallRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *FirewallRuleResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *FirewallRuleResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *FirewallRuleResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *FirewallRuleResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *FirewallRuleResponse) GetData() FirewallRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FirewallRuleResponse) GetDataOk() (*FirewallRule, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *FirewallRuleResponse) SetData(v FirewallRule)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FirewallsAPI.md b/azion-api/docs/FirewallsAPI.md new file mode 100644 index 0000000..e381af6 --- /dev/null +++ b/azion-api/docs/FirewallsAPI.md @@ -0,0 +1,528 @@ +# \FirewallsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CloneFirewall**](FirewallsAPI.md#CloneFirewall) | **Post** /workspace/firewalls/{firewall_id}/clone | Clone a Firewall +[**CreateFirewall**](FirewallsAPI.md#CreateFirewall) | **Post** /workspace/firewalls | Create a Firewall +[**DeleteFirewall**](FirewallsAPI.md#DeleteFirewall) | **Delete** /workspace/firewalls/{firewall_id} | Delete a Firewall +[**ListFirewalls**](FirewallsAPI.md#ListFirewalls) | **Get** /workspace/firewalls | List Firewalls +[**PartialUpdateFirewall**](FirewallsAPI.md#PartialUpdateFirewall) | **Patch** /workspace/firewalls/{firewall_id} | Partially update a Firewall +[**RetrieveFirewall**](FirewallsAPI.md#RetrieveFirewall) | **Get** /workspace/firewalls/{firewall_id} | Retrieve details from a Firewall +[**UpdateFirewall**](FirewallsAPI.md#UpdateFirewall) | **Put** /workspace/firewalls/{firewall_id} | Update a Firewall + + + +## CloneFirewall + +> FirewallResponse CloneFirewall(ctx, firewallId).CloneFirewallRequest(cloneFirewallRequest).Execute() + +Clone a Firewall + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + cloneFirewallRequest := *openapiclient.NewCloneFirewallRequest("Name_example") // CloneFirewallRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.CloneFirewall(context.Background(), firewallId).CloneFirewallRequest(cloneFirewallRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.CloneFirewall``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CloneFirewall`: FirewallResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.CloneFirewall`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCloneFirewallRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cloneFirewallRequest** | [**CloneFirewallRequest**](CloneFirewallRequest.md) | | + +### Return type + +[**FirewallResponse**](FirewallResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateFirewall + +> FirewallResponse CreateFirewall(ctx).FirewallRequest(firewallRequest).Execute() + +Create a Firewall + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallRequest := *openapiclient.NewFirewallRequest("Name_example") // FirewallRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.CreateFirewall(context.Background()).FirewallRequest(firewallRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.CreateFirewall``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFirewall`: FirewallResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.CreateFirewall`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFirewallRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **firewallRequest** | [**FirewallRequest**](FirewallRequest.md) | | + +### Return type + +[**FirewallResponse**](FirewallResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFirewall + +> DeleteResponse DeleteFirewall(ctx, firewallId).Execute() + +Delete a Firewall + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.DeleteFirewall(context.Background(), firewallId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.DeleteFirewall``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteFirewall`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.DeleteFirewall`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFirewallRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFirewalls + +> PaginatedFirewallList ListFirewalls(ctx).Active(active).Debug(debug).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Firewalls + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + debug := true // bool | Filter by debug rules status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.ListFirewalls(context.Background()).Active(active).Debug(debug).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.ListFirewalls``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFirewalls`: PaginatedFirewallList + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.ListFirewalls`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFirewallsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **debug** | **bool** | Filter by debug rules status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFirewallList**](PaginatedFirewallList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateFirewall + +> FirewallResponse PartialUpdateFirewall(ctx, firewallId).PatchedFirewallRequest(patchedFirewallRequest).Execute() + +Partially update a Firewall + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + patchedFirewallRequest := *openapiclient.NewPatchedFirewallRequest() // PatchedFirewallRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.PartialUpdateFirewall(context.Background(), firewallId).PatchedFirewallRequest(patchedFirewallRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.PartialUpdateFirewall``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateFirewall`: FirewallResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.PartialUpdateFirewall`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateFirewallRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedFirewallRequest** | [**PatchedFirewallRequest**](PatchedFirewallRequest.md) | | + +### Return type + +[**FirewallResponse**](FirewallResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveFirewall + +> FirewallResponse RetrieveFirewall(ctx, firewallId).Fields(fields).Execute() + +Retrieve details from a Firewall + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.RetrieveFirewall(context.Background(), firewallId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.RetrieveFirewall``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveFirewall`: FirewallResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.RetrieveFirewall`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveFirewallRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**FirewallResponse**](FirewallResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFirewall + +> FirewallResponse UpdateFirewall(ctx, firewallId).FirewallRequest(firewallRequest).Execute() + +Update a Firewall + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + firewallRequest := *openapiclient.NewFirewallRequest("Name_example") // FirewallRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsAPI.UpdateFirewall(context.Background(), firewallId).FirewallRequest(firewallRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsAPI.UpdateFirewall``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateFirewall`: FirewallResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsAPI.UpdateFirewall`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateFirewallRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewallRequest** | [**FirewallRequest**](FirewallRequest.md) | | + +### Return type + +[**FirewallResponse**](FirewallResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/FirewallsFunctionAPI.md b/azion-api/docs/FirewallsFunctionAPI.md new file mode 100644 index 0000000..33716db --- /dev/null +++ b/azion-api/docs/FirewallsFunctionAPI.md @@ -0,0 +1,475 @@ +# \FirewallsFunctionAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFirewallFunction**](FirewallsFunctionAPI.md#CreateFirewallFunction) | **Post** /workspace/firewalls/{firewall_id}/functions | Create an Firewall Function +[**DeleteFirewallFunction**](FirewallsFunctionAPI.md#DeleteFirewallFunction) | **Delete** /workspace/firewalls/{firewall_id}/functions/{function_id} | Delete an Firewall Function +[**ListFirewallFunction**](FirewallsFunctionAPI.md#ListFirewallFunction) | **Get** /workspace/firewalls/{firewall_id}/functions | List Firewall Function +[**PartialUpdateFirewallFunction**](FirewallsFunctionAPI.md#PartialUpdateFirewallFunction) | **Patch** /workspace/firewalls/{firewall_id}/functions/{function_id} | Partially update an Firewall Function +[**RetrieveFirewallFunction**](FirewallsFunctionAPI.md#RetrieveFirewallFunction) | **Get** /workspace/firewalls/{firewall_id}/functions/{function_id} | Retrieve details of an Firewall Function +[**UpdateFirewallFunction**](FirewallsFunctionAPI.md#UpdateFirewallFunction) | **Put** /workspace/firewalls/{firewall_id}/functions/{function_id} | Update an Firewall Function + + + +## CreateFirewallFunction + +> FirewallFunctionInstanceResponse CreateFirewallFunction(ctx, firewallId).FirewallFunctionInstanceRequest(firewallFunctionInstanceRequest).Execute() + +Create an Firewall Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + firewallFunctionInstanceRequest := *openapiclient.NewFirewallFunctionInstanceRequest("Name_example", int64(123)) // FirewallFunctionInstanceRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsFunctionAPI.CreateFirewallFunction(context.Background(), firewallId).FirewallFunctionInstanceRequest(firewallFunctionInstanceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsFunctionAPI.CreateFirewallFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFirewallFunction`: FirewallFunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsFunctionAPI.CreateFirewallFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFirewallFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewallFunctionInstanceRequest** | [**FirewallFunctionInstanceRequest**](FirewallFunctionInstanceRequest.md) | | + +### Return type + +[**FirewallFunctionInstanceResponse**](FirewallFunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFirewallFunction + +> DeleteResponse DeleteFirewallFunction(ctx, firewallId, functionId).Execute() + +Delete an Firewall Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsFunctionAPI.DeleteFirewallFunction(context.Background(), firewallId, functionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsFunctionAPI.DeleteFirewallFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteFirewallFunction`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsFunctionAPI.DeleteFirewallFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFirewallFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFirewallFunction + +> PaginatedFirewallFunctionInstanceList ListFirewallFunction(ctx, firewallId).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Firewall Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsFunctionAPI.ListFirewallFunction(context.Background(), firewallId).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsFunctionAPI.ListFirewallFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFirewallFunction`: PaginatedFirewallFunctionInstanceList + fmt.Fprintf(os.Stdout, "Response from `FirewallsFunctionAPI.ListFirewallFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFirewallFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFirewallFunctionInstanceList**](PaginatedFirewallFunctionInstanceList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateFirewallFunction + +> FirewallFunctionInstanceResponse PartialUpdateFirewallFunction(ctx, firewallId, functionId).PatchedFirewallFunctionInstanceRequest(patchedFirewallFunctionInstanceRequest).Execute() + +Partially update an Firewall Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + patchedFirewallFunctionInstanceRequest := *openapiclient.NewPatchedFirewallFunctionInstanceRequest() // PatchedFirewallFunctionInstanceRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsFunctionAPI.PartialUpdateFirewallFunction(context.Background(), firewallId, functionId).PatchedFirewallFunctionInstanceRequest(patchedFirewallFunctionInstanceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsFunctionAPI.PartialUpdateFirewallFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateFirewallFunction`: FirewallFunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsFunctionAPI.PartialUpdateFirewallFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateFirewallFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedFirewallFunctionInstanceRequest** | [**PatchedFirewallFunctionInstanceRequest**](PatchedFirewallFunctionInstanceRequest.md) | | + +### Return type + +[**FirewallFunctionInstanceResponse**](FirewallFunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveFirewallFunction + +> FirewallFunctionInstanceResponse RetrieveFirewallFunction(ctx, firewallId, functionId).Fields(fields).Execute() + +Retrieve details of an Firewall Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsFunctionAPI.RetrieveFirewallFunction(context.Background(), firewallId, functionId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsFunctionAPI.RetrieveFirewallFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveFirewallFunction`: FirewallFunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsFunctionAPI.RetrieveFirewallFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveFirewallFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**FirewallFunctionInstanceResponse**](FirewallFunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFirewallFunction + +> FirewallFunctionInstanceResponse UpdateFirewallFunction(ctx, firewallId, functionId).FirewallFunctionInstanceRequest(firewallFunctionInstanceRequest).Execute() + +Update an Firewall Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + functionId := int64(789) // int64 | A unique integer value identifying the function instance. + firewallFunctionInstanceRequest := *openapiclient.NewFirewallFunctionInstanceRequest("Name_example", int64(123)) // FirewallFunctionInstanceRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsFunctionAPI.UpdateFirewallFunction(context.Background(), firewallId, functionId).FirewallFunctionInstanceRequest(firewallFunctionInstanceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsFunctionAPI.UpdateFirewallFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateFirewallFunction`: FirewallFunctionInstanceResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsFunctionAPI.UpdateFirewallFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**functionId** | **int64** | A unique integer value identifying the function instance. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateFirewallFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **firewallFunctionInstanceRequest** | [**FirewallFunctionInstanceRequest**](FirewallFunctionInstanceRequest.md) | | + +### Return type + +[**FirewallFunctionInstanceResponse**](FirewallFunctionInstanceResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/FirewallsRulesEngineAPI.md b/azion-api/docs/FirewallsRulesEngineAPI.md new file mode 100644 index 0000000..5150cdd --- /dev/null +++ b/azion-api/docs/FirewallsRulesEngineAPI.md @@ -0,0 +1,556 @@ +# \FirewallsRulesEngineAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFirewallRule**](FirewallsRulesEngineAPI.md#CreateFirewallRule) | **Post** /workspace/firewalls/{firewall_id}/request_rules | Create an Firewall Rule +[**DeleteFirewallRule**](FirewallsRulesEngineAPI.md#DeleteFirewallRule) | **Delete** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Delete an Firewall Rule +[**ListFirewallRules**](FirewallsRulesEngineAPI.md#ListFirewallRules) | **Get** /workspace/firewalls/{firewall_id}/request_rules | List Firewall Rules +[**OrderFirewallRules**](FirewallsRulesEngineAPI.md#OrderFirewallRules) | **Put** /workspace/firewalls/{firewall_id}/request_rules/order | Ordering Firewall Rules +[**PartialUpdateFirewallRule**](FirewallsRulesEngineAPI.md#PartialUpdateFirewallRule) | **Patch** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Partially update an Firewall Rule +[**RetrieveFirewallRule**](FirewallsRulesEngineAPI.md#RetrieveFirewallRule) | **Get** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Retrieve details of an Firewall Rule +[**UpdateFirewallRule**](FirewallsRulesEngineAPI.md#UpdateFirewallRule) | **Put** /workspace/firewalls/{firewall_id}/request_rules/{request_rule_id} | Update an Firewall Rule + + + +## CreateFirewallRule + +> FirewallRuleResponse CreateFirewallRule(ctx, firewallId).FirewallRuleRequest(firewallRuleRequest).Execute() + +Create an Firewall Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + firewallRuleRequest := *openapiclient.NewFirewallRuleRequest("Name_example", [][]FirewallCriterionFieldRequest{[]openapiclient.FirewallCriterionFieldRequest{*openapiclient.NewFirewallCriterionFieldRequest("Conditional_example", "Variable_example", "Operator_example")}}, []openapiclient.FirewallBehaviorRequest{openapiclient.FirewallBehaviorRequest{FirewallBehaviorNoArgsRequest: openapiclient.NewFirewallBehaviorNoArgsRequest("Type_example")}}) // FirewallRuleRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.CreateFirewallRule(context.Background(), firewallId).FirewallRuleRequest(firewallRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.CreateFirewallRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFirewallRule`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.CreateFirewallRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFirewallRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewallRuleRequest** | [**FirewallRuleRequest**](FirewallRuleRequest.md) | | + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFirewallRule + +> DeleteResponse DeleteFirewallRule(ctx, firewallId, requestRuleId).Execute() + +Delete an Firewall Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.DeleteFirewallRule(context.Background(), firewallId, requestRuleId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.DeleteFirewallRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteFirewallRule`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.DeleteFirewallRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFirewallRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFirewallRules + +> PaginatedFirewallRuleList ListFirewallRules(ctx, firewallId).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).OrderGte(orderGte).OrderLte(orderLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Firewall Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + description := "description_example" // string | Filter by description (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + orderGte := int64(789) // int64 | Filter by order (greater than or equal). (optional) + orderLte := int64(789) // int64 | Filter by order (less than or equal). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.ListFirewallRules(context.Background(), firewallId).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).OrderGte(orderGte).OrderLte(orderLte).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.ListFirewallRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFirewallRules`: PaginatedFirewallRuleList + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.ListFirewallRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFirewallRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **description** | **string** | Filter by description (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **orderGte** | **int64** | Filter by order (greater than or equal). | + **orderLte** | **int64** | Filter by order (less than or equal). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFirewallRuleList**](PaginatedFirewallRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## OrderFirewallRules + +> PaginatedFirewallRuleList OrderFirewallRules(ctx, firewallId).FirewallRuleEngineOrderRequest(firewallRuleEngineOrderRequest).Search(search).Execute() + +Ordering Firewall Rules + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + firewallRuleEngineOrderRequest := *openapiclient.NewFirewallRuleEngineOrderRequest([]int64{int64(123)}) // FirewallRuleEngineOrderRequest | + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.OrderFirewallRules(context.Background(), firewallId).FirewallRuleEngineOrderRequest(firewallRuleEngineOrderRequest).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.OrderFirewallRules``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OrderFirewallRules`: PaginatedFirewallRuleList + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.OrderFirewallRules`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiOrderFirewallRulesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **firewallRuleEngineOrderRequest** | [**FirewallRuleEngineOrderRequest**](FirewallRuleEngineOrderRequest.md) | | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFirewallRuleList**](PaginatedFirewallRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateFirewallRule + +> FirewallRuleResponse PartialUpdateFirewallRule(ctx, firewallId, requestRuleId).PatchedFirewallRuleRequest(patchedFirewallRuleRequest).Execute() + +Partially update an Firewall Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + patchedFirewallRuleRequest := *openapiclient.NewPatchedFirewallRuleRequest() // PatchedFirewallRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.PartialUpdateFirewallRule(context.Background(), firewallId, requestRuleId).PatchedFirewallRuleRequest(patchedFirewallRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.PartialUpdateFirewallRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateFirewallRule`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.PartialUpdateFirewallRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateFirewallRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedFirewallRuleRequest** | [**PatchedFirewallRuleRequest**](PatchedFirewallRuleRequest.md) | | + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveFirewallRule + +> FirewallRuleResponse RetrieveFirewallRule(ctx, firewallId, requestRuleId).Fields(fields).Execute() + +Retrieve details of an Firewall Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.RetrieveFirewallRule(context.Background(), firewallId, requestRuleId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.RetrieveFirewallRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveFirewallRule`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.RetrieveFirewallRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveFirewallRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFirewallRule + +> FirewallRuleResponse UpdateFirewallRule(ctx, firewallId, requestRuleId).FirewallRuleRequest(firewallRuleRequest).Execute() + +Update an Firewall Rule + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + firewallId := int64(789) // int64 | A unique integer value identifying the firewall. + requestRuleId := int64(789) // int64 | A unique integer value identifying the request rule. + firewallRuleRequest := *openapiclient.NewFirewallRuleRequest("Name_example", [][]FirewallCriterionFieldRequest{[]openapiclient.FirewallCriterionFieldRequest{*openapiclient.NewFirewallCriterionFieldRequest("Conditional_example", "Variable_example", "Operator_example")}}, []openapiclient.FirewallBehaviorRequest{openapiclient.FirewallBehaviorRequest{FirewallBehaviorNoArgsRequest: openapiclient.NewFirewallBehaviorNoArgsRequest("Type_example")}}) // FirewallRuleRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FirewallsRulesEngineAPI.UpdateFirewallRule(context.Background(), firewallId, requestRuleId).FirewallRuleRequest(firewallRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FirewallsRulesEngineAPI.UpdateFirewallRule``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateFirewallRule`: FirewallRuleResponse + fmt.Fprintf(os.Stdout, "Response from `FirewallsRulesEngineAPI.UpdateFirewallRule`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**firewallId** | **int64** | A unique integer value identifying the firewall. | +**requestRuleId** | **int64** | A unique integer value identifying the request rule. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateFirewallRuleRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **firewallRuleRequest** | [**FirewallRuleRequest**](FirewallRuleRequest.md) | | + +### Return type + +[**FirewallRuleResponse**](FirewallRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Folder.md b/azion-api/docs/Folder.md new file mode 100644 index 0000000..9ae03ce --- /dev/null +++ b/azion-api/docs/Folder.md @@ -0,0 +1,93 @@ +# Folder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | + +## Methods + +### NewFolder + +`func NewFolder(id int64, name string, scope string, ) *Folder` + +NewFolder instantiates a new Folder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFolderWithDefaults + +`func NewFolderWithDefaults() *Folder` + +NewFolderWithDefaults instantiates a new Folder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Folder) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Folder) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Folder) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Folder) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Folder) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Folder) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *Folder) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *Folder) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *Folder) SetScope(v string)` + +SetScope sets Scope field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FolderRequest.md b/azion-api/docs/FolderRequest.md new file mode 100644 index 0000000..7c91b73 --- /dev/null +++ b/azion-api/docs/FolderRequest.md @@ -0,0 +1,72 @@ +# FolderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | + +## Methods + +### NewFolderRequest + +`func NewFolderRequest(name string, scope string, ) *FolderRequest` + +NewFolderRequest instantiates a new FolderRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFolderRequestWithDefaults + +`func NewFolderRequestWithDefaults() *FolderRequest` + +NewFolderRequestWithDefaults instantiates a new FolderRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FolderRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FolderRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FolderRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *FolderRequest) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *FolderRequest) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *FolderRequest) SetScope(v string)` + +SetScope sets Scope field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionInstance.md b/azion-api/docs/FunctionInstance.md new file mode 100644 index 0000000..e2d67dd --- /dev/null +++ b/azion-api/docs/FunctionInstance.md @@ -0,0 +1,223 @@ +# FunctionInstance + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Args** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**Function** | **int64** | | +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | + +## Methods + +### NewFunctionInstance + +`func NewFunctionInstance(id int64, name string, function int64, lastEditor string, lastModified time.Time, ) *FunctionInstance` + +NewFunctionInstance instantiates a new FunctionInstance object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionInstanceWithDefaults + +`func NewFunctionInstanceWithDefaults() *FunctionInstance` + +NewFunctionInstanceWithDefaults instantiates a new FunctionInstance object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *FunctionInstance) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *FunctionInstance) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *FunctionInstance) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *FunctionInstance) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FunctionInstance) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FunctionInstance) SetName(v string)` + +SetName sets Name field to given value. + + +### GetArgs + +`func (o *FunctionInstance) GetArgs() interface{}` + +GetArgs returns the Args field if non-nil, zero value otherwise. + +### GetArgsOk + +`func (o *FunctionInstance) GetArgsOk() (*interface{}, bool)` + +GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgs + +`func (o *FunctionInstance) SetArgs(v interface{})` + +SetArgs sets Args field to given value. + +### HasArgs + +`func (o *FunctionInstance) HasArgs() bool` + +HasArgs returns a boolean if a field has been set. + +### SetArgsNil + +`func (o *FunctionInstance) SetArgsNil(b bool)` + + SetArgsNil sets the value for Args to be an explicit nil + +### UnsetArgs +`func (o *FunctionInstance) UnsetArgs()` + +UnsetArgs ensures that no value is present for Args, not even an explicit nil +### GetAzionForm + +`func (o *FunctionInstance) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *FunctionInstance) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *FunctionInstance) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *FunctionInstance) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetFunction + +`func (o *FunctionInstance) GetFunction() int64` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *FunctionInstance) GetFunctionOk() (*int64, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *FunctionInstance) SetFunction(v int64)` + +SetFunction sets Function field to given value. + + +### GetActive + +`func (o *FunctionInstance) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FunctionInstance) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FunctionInstance) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FunctionInstance) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *FunctionInstance) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *FunctionInstance) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *FunctionInstance) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *FunctionInstance) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *FunctionInstance) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *FunctionInstance) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionInstanceRequest.md b/azion-api/docs/FunctionInstanceRequest.md new file mode 100644 index 0000000..af961cf --- /dev/null +++ b/azion-api/docs/FunctionInstanceRequest.md @@ -0,0 +1,160 @@ +# FunctionInstanceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Args** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**Function** | **int64** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewFunctionInstanceRequest + +`func NewFunctionInstanceRequest(name string, function int64, ) *FunctionInstanceRequest` + +NewFunctionInstanceRequest instantiates a new FunctionInstanceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionInstanceRequestWithDefaults + +`func NewFunctionInstanceRequestWithDefaults() *FunctionInstanceRequest` + +NewFunctionInstanceRequestWithDefaults instantiates a new FunctionInstanceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FunctionInstanceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FunctionInstanceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FunctionInstanceRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetArgs + +`func (o *FunctionInstanceRequest) GetArgs() interface{}` + +GetArgs returns the Args field if non-nil, zero value otherwise. + +### GetArgsOk + +`func (o *FunctionInstanceRequest) GetArgsOk() (*interface{}, bool)` + +GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgs + +`func (o *FunctionInstanceRequest) SetArgs(v interface{})` + +SetArgs sets Args field to given value. + +### HasArgs + +`func (o *FunctionInstanceRequest) HasArgs() bool` + +HasArgs returns a boolean if a field has been set. + +### SetArgsNil + +`func (o *FunctionInstanceRequest) SetArgsNil(b bool)` + + SetArgsNil sets the value for Args to be an explicit nil + +### UnsetArgs +`func (o *FunctionInstanceRequest) UnsetArgs()` + +UnsetArgs ensures that no value is present for Args, not even an explicit nil +### GetAzionForm + +`func (o *FunctionInstanceRequest) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *FunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *FunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *FunctionInstanceRequest) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetFunction + +`func (o *FunctionInstanceRequest) GetFunction() int64` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *FunctionInstanceRequest) GetFunctionOk() (*int64, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *FunctionInstanceRequest) SetFunction(v int64)` + +SetFunction sets Function field to given value. + + +### GetActive + +`func (o *FunctionInstanceRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FunctionInstanceRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FunctionInstanceRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FunctionInstanceRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionInstanceResponse.md b/azion-api/docs/FunctionInstanceResponse.md new file mode 100644 index 0000000..845b8f5 --- /dev/null +++ b/azion-api/docs/FunctionInstanceResponse.md @@ -0,0 +1,77 @@ +# FunctionInstanceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**FunctionInstance**](FunctionInstance.md) | | + +## Methods + +### NewFunctionInstanceResponse + +`func NewFunctionInstanceResponse(data FunctionInstance, ) *FunctionInstanceResponse` + +NewFunctionInstanceResponse instantiates a new FunctionInstanceResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionInstanceResponseWithDefaults + +`func NewFunctionInstanceResponseWithDefaults() *FunctionInstanceResponse` + +NewFunctionInstanceResponseWithDefaults instantiates a new FunctionInstanceResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *FunctionInstanceResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *FunctionInstanceResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *FunctionInstanceResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *FunctionInstanceResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *FunctionInstanceResponse) GetData() FunctionInstance` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FunctionInstanceResponse) GetDataOk() (*FunctionInstance, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *FunctionInstanceResponse) SetData(v FunctionInstance)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionModule.md b/azion-api/docs/FunctionModule.md new file mode 100644 index 0000000..b8243b7 --- /dev/null +++ b/azion-api/docs/FunctionModule.md @@ -0,0 +1,56 @@ +# FunctionModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewFunctionModule + +`func NewFunctionModule() *FunctionModule` + +NewFunctionModule instantiates a new FunctionModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionModuleWithDefaults + +`func NewFunctionModuleWithDefaults() *FunctionModule` + +NewFunctionModuleWithDefaults instantiates a new FunctionModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *FunctionModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *FunctionModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *FunctionModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *FunctionModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionModuleRequest.md b/azion-api/docs/FunctionModuleRequest.md new file mode 100644 index 0000000..148d282 --- /dev/null +++ b/azion-api/docs/FunctionModuleRequest.md @@ -0,0 +1,56 @@ +# FunctionModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewFunctionModuleRequest + +`func NewFunctionModuleRequest() *FunctionModuleRequest` + +NewFunctionModuleRequest instantiates a new FunctionModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionModuleRequestWithDefaults + +`func NewFunctionModuleRequestWithDefaults() *FunctionModuleRequest` + +NewFunctionModuleRequestWithDefaults instantiates a new FunctionModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *FunctionModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *FunctionModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *FunctionModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *FunctionModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionResponse.md b/azion-api/docs/FunctionResponse.md new file mode 100644 index 0000000..3714871 --- /dev/null +++ b/azion-api/docs/FunctionResponse.md @@ -0,0 +1,77 @@ +# FunctionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Functions**](Functions.md) | | + +## Methods + +### NewFunctionResponse + +`func NewFunctionResponse(data Functions, ) *FunctionResponse` + +NewFunctionResponse instantiates a new FunctionResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionResponseWithDefaults + +`func NewFunctionResponseWithDefaults() *FunctionResponse` + +NewFunctionResponseWithDefaults instantiates a new FunctionResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *FunctionResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *FunctionResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *FunctionResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *FunctionResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *FunctionResponse) GetData() Functions` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *FunctionResponse) GetDataOk() (*Functions, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *FunctionResponse) SetData(v Functions)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Functions.md b/azion-api/docs/Functions.md new file mode 100644 index 0000000..2666e24 --- /dev/null +++ b/azion-api/docs/Functions.md @@ -0,0 +1,359 @@ +# Functions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ProductVersion** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Runtime** | Pointer to **string** | * `azion_js` - Azion JavaScript | [optional] +**ExecutionEnvironment** | Pointer to **string** | * `firewall` - Firewall * `application` - Application | [optional] +**Code** | **string** | String containing the function code. Maximum size: 20MB. | +**DefaultArgs** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**ReferenceCount** | **int64** | | +**Version** | **string** | Installed version, which may not be the latest if the vendor has released updates since installation. | +**Vendor** | **string** | | + +## Methods + +### NewFunctions + +`func NewFunctions(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, code string, referenceCount int64, version string, vendor string, ) *Functions` + +NewFunctions instantiates a new Functions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionsWithDefaults + +`func NewFunctionsWithDefaults() *Functions` + +NewFunctionsWithDefaults instantiates a new Functions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Functions) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Functions) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Functions) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Functions) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Functions) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Functions) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *Functions) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Functions) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Functions) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Functions) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Functions) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Functions) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *Functions) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Functions) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Functions) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + +### GetActive + +`func (o *Functions) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Functions) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Functions) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Functions) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetRuntime + +`func (o *Functions) GetRuntime() string` + +GetRuntime returns the Runtime field if non-nil, zero value otherwise. + +### GetRuntimeOk + +`func (o *Functions) GetRuntimeOk() (*string, bool)` + +GetRuntimeOk returns a tuple with the Runtime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuntime + +`func (o *Functions) SetRuntime(v string)` + +SetRuntime sets Runtime field to given value. + +### HasRuntime + +`func (o *Functions) HasRuntime() bool` + +HasRuntime returns a boolean if a field has been set. + +### GetExecutionEnvironment + +`func (o *Functions) GetExecutionEnvironment() string` + +GetExecutionEnvironment returns the ExecutionEnvironment field if non-nil, zero value otherwise. + +### GetExecutionEnvironmentOk + +`func (o *Functions) GetExecutionEnvironmentOk() (*string, bool)` + +GetExecutionEnvironmentOk returns a tuple with the ExecutionEnvironment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionEnvironment + +`func (o *Functions) SetExecutionEnvironment(v string)` + +SetExecutionEnvironment sets ExecutionEnvironment field to given value. + +### HasExecutionEnvironment + +`func (o *Functions) HasExecutionEnvironment() bool` + +HasExecutionEnvironment returns a boolean if a field has been set. + +### GetCode + +`func (o *Functions) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *Functions) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *Functions) SetCode(v string)` + +SetCode sets Code field to given value. + + +### GetDefaultArgs + +`func (o *Functions) GetDefaultArgs() interface{}` + +GetDefaultArgs returns the DefaultArgs field if non-nil, zero value otherwise. + +### GetDefaultArgsOk + +`func (o *Functions) GetDefaultArgsOk() (*interface{}, bool)` + +GetDefaultArgsOk returns a tuple with the DefaultArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultArgs + +`func (o *Functions) SetDefaultArgs(v interface{})` + +SetDefaultArgs sets DefaultArgs field to given value. + +### HasDefaultArgs + +`func (o *Functions) HasDefaultArgs() bool` + +HasDefaultArgs returns a boolean if a field has been set. + +### SetDefaultArgsNil + +`func (o *Functions) SetDefaultArgsNil(b bool)` + + SetDefaultArgsNil sets the value for DefaultArgs to be an explicit nil + +### UnsetDefaultArgs +`func (o *Functions) UnsetDefaultArgs()` + +UnsetDefaultArgs ensures that no value is present for DefaultArgs, not even an explicit nil +### GetAzionForm + +`func (o *Functions) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *Functions) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *Functions) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *Functions) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetReferenceCount + +`func (o *Functions) GetReferenceCount() int64` + +GetReferenceCount returns the ReferenceCount field if non-nil, zero value otherwise. + +### GetReferenceCountOk + +`func (o *Functions) GetReferenceCountOk() (*int64, bool)` + +GetReferenceCountOk returns a tuple with the ReferenceCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferenceCount + +`func (o *Functions) SetReferenceCount(v int64)` + +SetReferenceCount sets ReferenceCount field to given value. + + +### GetVersion + +`func (o *Functions) GetVersion() string` + +GetVersion returns the Version field if non-nil, zero value otherwise. + +### GetVersionOk + +`func (o *Functions) GetVersionOk() (*string, bool)` + +GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersion + +`func (o *Functions) SetVersion(v string)` + +SetVersion sets Version field to given value. + + +### GetVendor + +`func (o *Functions) GetVendor() string` + +GetVendor returns the Vendor field if non-nil, zero value otherwise. + +### GetVendorOk + +`func (o *Functions) GetVendorOk() (*string, bool)` + +GetVendorOk returns a tuple with the Vendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVendor + +`func (o *Functions) SetVendor(v string)` + +SetVendor sets Vendor field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionsAPI.md b/azion-api/docs/FunctionsAPI.md new file mode 100644 index 0000000..4522645 --- /dev/null +++ b/azion-api/docs/FunctionsAPI.md @@ -0,0 +1,457 @@ +# \FunctionsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFunction**](FunctionsAPI.md#CreateFunction) | **Post** /workspace/functions | Create an Function +[**DeleteFunction**](FunctionsAPI.md#DeleteFunction) | **Delete** /workspace/functions/{function_id} | Delete an Function +[**ListFunctions**](FunctionsAPI.md#ListFunctions) | **Get** /workspace/functions | List Functions +[**PartialUpdateFunction**](FunctionsAPI.md#PartialUpdateFunction) | **Patch** /workspace/functions/{function_id} | Partially update an Function +[**RetrieveFunction**](FunctionsAPI.md#RetrieveFunction) | **Get** /workspace/functions/{function_id} | Retrieve details of an Function +[**UpdateFunction**](FunctionsAPI.md#UpdateFunction) | **Put** /workspace/functions/{function_id} | Update an Function + + + +## CreateFunction + +> FunctionResponse CreateFunction(ctx).FunctionsRequest(functionsRequest).Execute() + +Create an Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + functionsRequest := *openapiclient.NewFunctionsRequest("Name_example", "Code_example") // FunctionsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsAPI.CreateFunction(context.Background()).FunctionsRequest(functionsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.CreateFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFunction`: FunctionResponse + fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.CreateFunction`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **functionsRequest** | [**FunctionsRequest**](FunctionsRequest.md) | | + +### Return type + +[**FunctionResponse**](FunctionResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFunction + +> DeleteResponse DeleteFunction(ctx, functionId).Execute() + +Delete an Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + functionId := int64(789) // int64 | A unique integer value identifying the function. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsAPI.DeleteFunction(context.Background(), functionId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.DeleteFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteFunction`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.DeleteFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**functionId** | **int64** | A unique integer value identifying the function. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFunctions + +> PaginatedFunctionsList ListFunctions(ctx).Active(active).Fields(fields).Id(id).LanguageIn(languageIn).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).RuntimeEnvironmentIn(runtimeEnvironmentIn).Search(search).Execute() + +List Functions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + languageIn := "languageIn_example" // string | Filter by language (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + runtimeEnvironmentIn := "runtimeEnvironmentIn_example" // string | Filter by runtime environment (accepts comma-separated values). (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsAPI.ListFunctions(context.Background()).Active(active).Fields(fields).Id(id).LanguageIn(languageIn).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).RuntimeEnvironmentIn(runtimeEnvironmentIn).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.ListFunctions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFunctions`: PaginatedFunctionsList + fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.ListFunctions`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFunctionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **languageIn** | **string** | Filter by language (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **runtimeEnvironmentIn** | **string** | Filter by runtime environment (accepts comma-separated values). | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFunctionsList**](PaginatedFunctionsList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateFunction + +> FunctionResponse PartialUpdateFunction(ctx, functionId).PatchedFunctionsRequest(patchedFunctionsRequest).Execute() + +Partially update an Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + functionId := int64(789) // int64 | A unique integer value identifying the function. + patchedFunctionsRequest := *openapiclient.NewPatchedFunctionsRequest() // PatchedFunctionsRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsAPI.PartialUpdateFunction(context.Background(), functionId).PatchedFunctionsRequest(patchedFunctionsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.PartialUpdateFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateFunction`: FunctionResponse + fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.PartialUpdateFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**functionId** | **int64** | A unique integer value identifying the function. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedFunctionsRequest** | [**PatchedFunctionsRequest**](PatchedFunctionsRequest.md) | | + +### Return type + +[**FunctionResponse**](FunctionResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveFunction + +> FunctionResponse RetrieveFunction(ctx, functionId).Fields(fields).Execute() + +Retrieve details of an Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + functionId := int64(789) // int64 | A unique integer value identifying the function. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsAPI.RetrieveFunction(context.Background(), functionId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.RetrieveFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveFunction`: FunctionResponse + fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.RetrieveFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**functionId** | **int64** | A unique integer value identifying the function. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**FunctionResponse**](FunctionResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFunction + +> FunctionResponse UpdateFunction(ctx, functionId).FunctionsRequest(functionsRequest).Execute() + +Update an Function + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + functionId := int64(789) // int64 | A unique integer value identifying the function. + functionsRequest := *openapiclient.NewFunctionsRequest("Name_example", "Code_example") // FunctionsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FunctionsAPI.UpdateFunction(context.Background(), functionId).FunctionsRequest(functionsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FunctionsAPI.UpdateFunction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateFunction`: FunctionResponse + fmt.Fprintf(os.Stdout, "Response from `FunctionsAPI.UpdateFunction`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**functionId** | **int64** | A unique integer value identifying the function. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateFunctionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **functionsRequest** | [**FunctionsRequest**](FunctionsRequest.md) | | + +### Return type + +[**FunctionResponse**](FunctionResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/FunctionsAzionForm.md b/azion-api/docs/FunctionsAzionForm.md new file mode 100644 index 0000000..d73a986 --- /dev/null +++ b/azion-api/docs/FunctionsAzionForm.md @@ -0,0 +1,56 @@ +# FunctionsAzionForm + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Arg** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewFunctionsAzionForm + +`func NewFunctionsAzionForm() *FunctionsAzionForm` + +NewFunctionsAzionForm instantiates a new FunctionsAzionForm object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionsAzionFormWithDefaults + +`func NewFunctionsAzionFormWithDefaults() *FunctionsAzionForm` + +NewFunctionsAzionFormWithDefaults instantiates a new FunctionsAzionForm object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetArg + +`func (o *FunctionsAzionForm) GetArg() map[string]interface{}` + +GetArg returns the Arg field if non-nil, zero value otherwise. + +### GetArgOk + +`func (o *FunctionsAzionForm) GetArgOk() (*map[string]interface{}, bool)` + +GetArgOk returns a tuple with the Arg field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArg + +`func (o *FunctionsAzionForm) SetArg(v map[string]interface{})` + +SetArg sets Arg field to given value. + +### HasArg + +`func (o *FunctionsAzionForm) HasArg() bool` + +HasArg returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/FunctionsRequest.md b/azion-api/docs/FunctionsRequest.md new file mode 100644 index 0000000..c894a66 --- /dev/null +++ b/azion-api/docs/FunctionsRequest.md @@ -0,0 +1,212 @@ +# FunctionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Runtime** | Pointer to **string** | * `azion_js` - Azion JavaScript | [optional] +**ExecutionEnvironment** | Pointer to **string** | * `firewall` - Firewall * `application` - Application | [optional] +**Code** | **string** | String containing the function code. Maximum size: 20MB. | +**DefaultArgs** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] + +## Methods + +### NewFunctionsRequest + +`func NewFunctionsRequest(name string, code string, ) *FunctionsRequest` + +NewFunctionsRequest instantiates a new FunctionsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFunctionsRequestWithDefaults + +`func NewFunctionsRequestWithDefaults() *FunctionsRequest` + +NewFunctionsRequestWithDefaults instantiates a new FunctionsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *FunctionsRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FunctionsRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FunctionsRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *FunctionsRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *FunctionsRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *FunctionsRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *FunctionsRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetRuntime + +`func (o *FunctionsRequest) GetRuntime() string` + +GetRuntime returns the Runtime field if non-nil, zero value otherwise. + +### GetRuntimeOk + +`func (o *FunctionsRequest) GetRuntimeOk() (*string, bool)` + +GetRuntimeOk returns a tuple with the Runtime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuntime + +`func (o *FunctionsRequest) SetRuntime(v string)` + +SetRuntime sets Runtime field to given value. + +### HasRuntime + +`func (o *FunctionsRequest) HasRuntime() bool` + +HasRuntime returns a boolean if a field has been set. + +### GetExecutionEnvironment + +`func (o *FunctionsRequest) GetExecutionEnvironment() string` + +GetExecutionEnvironment returns the ExecutionEnvironment field if non-nil, zero value otherwise. + +### GetExecutionEnvironmentOk + +`func (o *FunctionsRequest) GetExecutionEnvironmentOk() (*string, bool)` + +GetExecutionEnvironmentOk returns a tuple with the ExecutionEnvironment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionEnvironment + +`func (o *FunctionsRequest) SetExecutionEnvironment(v string)` + +SetExecutionEnvironment sets ExecutionEnvironment field to given value. + +### HasExecutionEnvironment + +`func (o *FunctionsRequest) HasExecutionEnvironment() bool` + +HasExecutionEnvironment returns a boolean if a field has been set. + +### GetCode + +`func (o *FunctionsRequest) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *FunctionsRequest) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *FunctionsRequest) SetCode(v string)` + +SetCode sets Code field to given value. + + +### GetDefaultArgs + +`func (o *FunctionsRequest) GetDefaultArgs() interface{}` + +GetDefaultArgs returns the DefaultArgs field if non-nil, zero value otherwise. + +### GetDefaultArgsOk + +`func (o *FunctionsRequest) GetDefaultArgsOk() (*interface{}, bool)` + +GetDefaultArgsOk returns a tuple with the DefaultArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultArgs + +`func (o *FunctionsRequest) SetDefaultArgs(v interface{})` + +SetDefaultArgs sets DefaultArgs field to given value. + +### HasDefaultArgs + +`func (o *FunctionsRequest) HasDefaultArgs() bool` + +HasDefaultArgs returns a boolean if a field has been set. + +### SetDefaultArgsNil + +`func (o *FunctionsRequest) SetDefaultArgsNil(b bool)` + + SetDefaultArgsNil sets the value for DefaultArgs to be an explicit nil + +### UnsetDefaultArgs +`func (o *FunctionsRequest) UnsetDefaultArgs()` + +UnsetDefaultArgs ensures that no value is present for DefaultArgs, not even an explicit nil +### GetAzionForm + +`func (o *FunctionsRequest) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *FunctionsRequest) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *FunctionsRequest) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *FunctionsRequest) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Grant.md b/azion-api/docs/Grant.md new file mode 100644 index 0000000..f219915 --- /dev/null +++ b/azion-api/docs/Grant.md @@ -0,0 +1,207 @@ +# Grant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Identity** | Pointer to **NullableInt64** | | [optional] +**Roles** | Pointer to **[]int64** | | [optional] +**Policies** | Pointer to **[]int64** | | [optional] +**Expires** | Pointer to **time.Time** | | [optional] +**Owner** | **bool** | | +**AccountId** | **int64** | | + +## Methods + +### NewGrant + +`func NewGrant(id int64, owner bool, accountId int64, ) *Grant` + +NewGrant instantiates a new Grant object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGrantWithDefaults + +`func NewGrantWithDefaults() *Grant` + +NewGrantWithDefaults instantiates a new Grant object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Grant) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Grant) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Grant) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetIdentity + +`func (o *Grant) GetIdentity() int64` + +GetIdentity returns the Identity field if non-nil, zero value otherwise. + +### GetIdentityOk + +`func (o *Grant) GetIdentityOk() (*int64, bool)` + +GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentity + +`func (o *Grant) SetIdentity(v int64)` + +SetIdentity sets Identity field to given value. + +### HasIdentity + +`func (o *Grant) HasIdentity() bool` + +HasIdentity returns a boolean if a field has been set. + +### SetIdentityNil + +`func (o *Grant) SetIdentityNil(b bool)` + + SetIdentityNil sets the value for Identity to be an explicit nil + +### UnsetIdentity +`func (o *Grant) UnsetIdentity()` + +UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +### GetRoles + +`func (o *Grant) GetRoles() []int64` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *Grant) GetRolesOk() (*[]int64, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *Grant) SetRoles(v []int64)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *Grant) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetPolicies + +`func (o *Grant) GetPolicies() []int64` + +GetPolicies returns the Policies field if non-nil, zero value otherwise. + +### GetPoliciesOk + +`func (o *Grant) GetPoliciesOk() (*[]int64, bool)` + +GetPoliciesOk returns a tuple with the Policies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicies + +`func (o *Grant) SetPolicies(v []int64)` + +SetPolicies sets Policies field to given value. + +### HasPolicies + +`func (o *Grant) HasPolicies() bool` + +HasPolicies returns a boolean if a field has been set. + +### GetExpires + +`func (o *Grant) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *Grant) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *Grant) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *Grant) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### GetOwner + +`func (o *Grant) GetOwner() bool` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *Grant) GetOwnerOk() (*bool, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *Grant) SetOwner(v bool)` + +SetOwner sets Owner field to given value. + + +### GetAccountId + +`func (o *Grant) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *Grant) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *Grant) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/GrantRequest.md b/azion-api/docs/GrantRequest.md new file mode 100644 index 0000000..c1f04b1 --- /dev/null +++ b/azion-api/docs/GrantRequest.md @@ -0,0 +1,186 @@ +# GrantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | Pointer to **NullableInt64** | | [optional] +**Roles** | Pointer to **[]int64** | | [optional] +**Policies** | Pointer to **[]int64** | | [optional] +**Expires** | Pointer to **time.Time** | | [optional] +**Owner** | **bool** | | +**AccountId** | **int64** | | + +## Methods + +### NewGrantRequest + +`func NewGrantRequest(owner bool, accountId int64, ) *GrantRequest` + +NewGrantRequest instantiates a new GrantRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGrantRequestWithDefaults + +`func NewGrantRequestWithDefaults() *GrantRequest` + +NewGrantRequestWithDefaults instantiates a new GrantRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIdentity + +`func (o *GrantRequest) GetIdentity() int64` + +GetIdentity returns the Identity field if non-nil, zero value otherwise. + +### GetIdentityOk + +`func (o *GrantRequest) GetIdentityOk() (*int64, bool)` + +GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentity + +`func (o *GrantRequest) SetIdentity(v int64)` + +SetIdentity sets Identity field to given value. + +### HasIdentity + +`func (o *GrantRequest) HasIdentity() bool` + +HasIdentity returns a boolean if a field has been set. + +### SetIdentityNil + +`func (o *GrantRequest) SetIdentityNil(b bool)` + + SetIdentityNil sets the value for Identity to be an explicit nil + +### UnsetIdentity +`func (o *GrantRequest) UnsetIdentity()` + +UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +### GetRoles + +`func (o *GrantRequest) GetRoles() []int64` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *GrantRequest) GetRolesOk() (*[]int64, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *GrantRequest) SetRoles(v []int64)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *GrantRequest) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetPolicies + +`func (o *GrantRequest) GetPolicies() []int64` + +GetPolicies returns the Policies field if non-nil, zero value otherwise. + +### GetPoliciesOk + +`func (o *GrantRequest) GetPoliciesOk() (*[]int64, bool)` + +GetPoliciesOk returns a tuple with the Policies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicies + +`func (o *GrantRequest) SetPolicies(v []int64)` + +SetPolicies sets Policies field to given value. + +### HasPolicies + +`func (o *GrantRequest) HasPolicies() bool` + +HasPolicies returns a boolean if a field has been set. + +### GetExpires + +`func (o *GrantRequest) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *GrantRequest) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *GrantRequest) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *GrantRequest) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### GetOwner + +`func (o *GrantRequest) GetOwner() bool` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *GrantRequest) GetOwnerOk() (*bool, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *GrantRequest) SetOwner(v bool)` + +SetOwner sets Owner field to given value. + + +### GetAccountId + +`func (o *GrantRequest) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *GrantRequest) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *GrantRequest) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Group.md b/azion-api/docs/Group.md new file mode 100644 index 0000000..66f2619 --- /dev/null +++ b/azion-api/docs/Group.md @@ -0,0 +1,203 @@ +# Group + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | + +## Methods + +### NewGroup + +`func NewGroup(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, ) *Group` + +NewGroup instantiates a new Group object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupWithDefaults + +`func NewGroupWithDefaults() *Group` + +NewGroupWithDefaults instantiates a new Group object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Group) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Group) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Group) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Group) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Group) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Group) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *Group) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *Group) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *Group) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *Group) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Group) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Group) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *Group) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Group) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Group) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Group) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Group) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Group) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *Group) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Group) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Group) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Group) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *Group) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *Group) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *Group) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/GroupMembers.md b/azion-api/docs/GroupMembers.md new file mode 100644 index 0000000..930169e --- /dev/null +++ b/azion-api/docs/GroupMembers.md @@ -0,0 +1,51 @@ +# GroupMembers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | **[]int64** | List of the users' IDs. | + +## Methods + +### NewGroupMembers + +`func NewGroupMembers(members []int64, ) *GroupMembers` + +NewGroupMembers instantiates a new GroupMembers object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupMembersWithDefaults + +`func NewGroupMembersWithDefaults() *GroupMembers` + +NewGroupMembersWithDefaults instantiates a new GroupMembers object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMembers + +`func (o *GroupMembers) GetMembers() []int64` + +GetMembers returns the Members field if non-nil, zero value otherwise. + +### GetMembersOk + +`func (o *GroupMembers) GetMembersOk() (*[]int64, bool)` + +GetMembersOk returns a tuple with the Members field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMembers + +`func (o *GroupMembers) SetMembers(v []int64)` + +SetMembers sets Members field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/GroupMembersRequest.md b/azion-api/docs/GroupMembersRequest.md new file mode 100644 index 0000000..acb9078 --- /dev/null +++ b/azion-api/docs/GroupMembersRequest.md @@ -0,0 +1,51 @@ +# GroupMembersRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Members** | **[]int64** | List of the users' IDs. | + +## Methods + +### NewGroupMembersRequest + +`func NewGroupMembersRequest(members []int64, ) *GroupMembersRequest` + +NewGroupMembersRequest instantiates a new GroupMembersRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupMembersRequestWithDefaults + +`func NewGroupMembersRequestWithDefaults() *GroupMembersRequest` + +NewGroupMembersRequestWithDefaults instantiates a new GroupMembersRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMembers + +`func (o *GroupMembersRequest) GetMembers() []int64` + +GetMembers returns the Members field if non-nil, zero value otherwise. + +### GetMembersOk + +`func (o *GroupMembersRequest) GetMembersOk() (*[]int64, bool)` + +GetMembersOk returns a tuple with the Members field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMembers + +`func (o *GroupMembersRequest) SetMembers(v []int64)` + +SetMembers sets Members field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/GroupRequest.md b/azion-api/docs/GroupRequest.md new file mode 100644 index 0000000..29daf9e --- /dev/null +++ b/azion-api/docs/GroupRequest.md @@ -0,0 +1,77 @@ +# GroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewGroupRequest + +`func NewGroupRequest(name string, ) *GroupRequest` + +NewGroupRequest instantiates a new GroupRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGroupRequestWithDefaults + +`func NewGroupRequestWithDefaults() *GroupRequest` + +NewGroupRequestWithDefaults instantiates a new GroupRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *GroupRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *GroupRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *GroupRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *GroupRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *GroupRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *GroupRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *GroupRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HMAC.md b/azion-api/docs/HMAC.md new file mode 100644 index 0000000..824e406 --- /dev/null +++ b/azion-api/docs/HMAC.md @@ -0,0 +1,87 @@ +# HMAC + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | +**Config** | Pointer to [**NullableAWS4HMAC**](AWS4HMAC.md) | | [optional] + +## Methods + +### NewHMAC + +`func NewHMAC(enabled bool, ) *HMAC` + +NewHMAC instantiates a new HMAC object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHMACWithDefaults + +`func NewHMACWithDefaults() *HMAC` + +NewHMACWithDefaults instantiates a new HMAC object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *HMAC) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *HMAC) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *HMAC) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetConfig + +`func (o *HMAC) GetConfig() AWS4HMAC` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *HMAC) GetConfigOk() (*AWS4HMAC, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *HMAC) SetConfig(v AWS4HMAC)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *HMAC) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *HMAC) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *HMAC) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HMACRequest.md b/azion-api/docs/HMACRequest.md new file mode 100644 index 0000000..ef9ab8b --- /dev/null +++ b/azion-api/docs/HMACRequest.md @@ -0,0 +1,87 @@ +# HMACRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | +**Config** | Pointer to [**NullableAWS4HMACRequest**](AWS4HMACRequest.md) | | [optional] + +## Methods + +### NewHMACRequest + +`func NewHMACRequest(enabled bool, ) *HMACRequest` + +NewHMACRequest instantiates a new HMACRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHMACRequestWithDefaults + +`func NewHMACRequestWithDefaults() *HMACRequest` + +NewHMACRequestWithDefaults instantiates a new HMACRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *HMACRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *HMACRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *HMACRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + + +### GetConfig + +`func (o *HMACRequest) GetConfig() AWS4HMACRequest` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *HMACRequest) GetConfigOk() (*AWS4HMACRequest, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *HMACRequest) SetConfig(v AWS4HMACRequest)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *HMACRequest) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *HMACRequest) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *HMACRequest) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HTTPConnectionOptions.md b/azion-api/docs/HTTPConnectionOptions.md new file mode 100644 index 0000000..b4e299c --- /dev/null +++ b/azion-api/docs/HTTPConnectionOptions.md @@ -0,0 +1,238 @@ +# HTTPConnectionOptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DnsResolution** | Pointer to **string** | DNS resolution policy: force IPv4 or both (IPv4 and IPv6) when connecting. * `both` - Both * `force_ipv4` - Force IPv4 | [optional] +**TransportPolicy** | Pointer to **string** | Transport protocol policy: preserve current scheme, force HTTP, or force HTTPS. * `preserve` - Preserve * `force_https` - Force HTTPS * `force_http` - Force HTTP | [optional] +**HttpVersionPolicy** | Pointer to **string** | Defines the HTTP version preference for outbound connections (e.g., HTTP/1.1). * `http1_1` - HTTP/1.1 | [optional] +**Host** | Pointer to **string** | Optional custom host used to override the default target hostname during connection. | [optional] +**PathPrefix** | Pointer to **string** | Optional prefix to add to all request paths (e.g., '/v1'). | [optional] +**FollowingRedirect** | Pointer to **bool** | If true, automatically follows HTTP redirects from the target server. | [optional] +**RealIpHeader** | Pointer to **string** | Header name used to forward the original client IP address. | [optional] +**RealPortHeader** | Pointer to **string** | Header name used to forward the original client port. | [optional] + +## Methods + +### NewHTTPConnectionOptions + +`func NewHTTPConnectionOptions() *HTTPConnectionOptions` + +NewHTTPConnectionOptions instantiates a new HTTPConnectionOptions object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHTTPConnectionOptionsWithDefaults + +`func NewHTTPConnectionOptionsWithDefaults() *HTTPConnectionOptions` + +NewHTTPConnectionOptionsWithDefaults instantiates a new HTTPConnectionOptions object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDnsResolution + +`func (o *HTTPConnectionOptions) GetDnsResolution() string` + +GetDnsResolution returns the DnsResolution field if non-nil, zero value otherwise. + +### GetDnsResolutionOk + +`func (o *HTTPConnectionOptions) GetDnsResolutionOk() (*string, bool)` + +GetDnsResolutionOk returns a tuple with the DnsResolution field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDnsResolution + +`func (o *HTTPConnectionOptions) SetDnsResolution(v string)` + +SetDnsResolution sets DnsResolution field to given value. + +### HasDnsResolution + +`func (o *HTTPConnectionOptions) HasDnsResolution() bool` + +HasDnsResolution returns a boolean if a field has been set. + +### GetTransportPolicy + +`func (o *HTTPConnectionOptions) GetTransportPolicy() string` + +GetTransportPolicy returns the TransportPolicy field if non-nil, zero value otherwise. + +### GetTransportPolicyOk + +`func (o *HTTPConnectionOptions) GetTransportPolicyOk() (*string, bool)` + +GetTransportPolicyOk returns a tuple with the TransportPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransportPolicy + +`func (o *HTTPConnectionOptions) SetTransportPolicy(v string)` + +SetTransportPolicy sets TransportPolicy field to given value. + +### HasTransportPolicy + +`func (o *HTTPConnectionOptions) HasTransportPolicy() bool` + +HasTransportPolicy returns a boolean if a field has been set. + +### GetHttpVersionPolicy + +`func (o *HTTPConnectionOptions) GetHttpVersionPolicy() string` + +GetHttpVersionPolicy returns the HttpVersionPolicy field if non-nil, zero value otherwise. + +### GetHttpVersionPolicyOk + +`func (o *HTTPConnectionOptions) GetHttpVersionPolicyOk() (*string, bool)` + +GetHttpVersionPolicyOk returns a tuple with the HttpVersionPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpVersionPolicy + +`func (o *HTTPConnectionOptions) SetHttpVersionPolicy(v string)` + +SetHttpVersionPolicy sets HttpVersionPolicy field to given value. + +### HasHttpVersionPolicy + +`func (o *HTTPConnectionOptions) HasHttpVersionPolicy() bool` + +HasHttpVersionPolicy returns a boolean if a field has been set. + +### GetHost + +`func (o *HTTPConnectionOptions) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *HTTPConnectionOptions) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *HTTPConnectionOptions) SetHost(v string)` + +SetHost sets Host field to given value. + +### HasHost + +`func (o *HTTPConnectionOptions) HasHost() bool` + +HasHost returns a boolean if a field has been set. + +### GetPathPrefix + +`func (o *HTTPConnectionOptions) GetPathPrefix() string` + +GetPathPrefix returns the PathPrefix field if non-nil, zero value otherwise. + +### GetPathPrefixOk + +`func (o *HTTPConnectionOptions) GetPathPrefixOk() (*string, bool)` + +GetPathPrefixOk returns a tuple with the PathPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathPrefix + +`func (o *HTTPConnectionOptions) SetPathPrefix(v string)` + +SetPathPrefix sets PathPrefix field to given value. + +### HasPathPrefix + +`func (o *HTTPConnectionOptions) HasPathPrefix() bool` + +HasPathPrefix returns a boolean if a field has been set. + +### GetFollowingRedirect + +`func (o *HTTPConnectionOptions) GetFollowingRedirect() bool` + +GetFollowingRedirect returns the FollowingRedirect field if non-nil, zero value otherwise. + +### GetFollowingRedirectOk + +`func (o *HTTPConnectionOptions) GetFollowingRedirectOk() (*bool, bool)` + +GetFollowingRedirectOk returns a tuple with the FollowingRedirect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFollowingRedirect + +`func (o *HTTPConnectionOptions) SetFollowingRedirect(v bool)` + +SetFollowingRedirect sets FollowingRedirect field to given value. + +### HasFollowingRedirect + +`func (o *HTTPConnectionOptions) HasFollowingRedirect() bool` + +HasFollowingRedirect returns a boolean if a field has been set. + +### GetRealIpHeader + +`func (o *HTTPConnectionOptions) GetRealIpHeader() string` + +GetRealIpHeader returns the RealIpHeader field if non-nil, zero value otherwise. + +### GetRealIpHeaderOk + +`func (o *HTTPConnectionOptions) GetRealIpHeaderOk() (*string, bool)` + +GetRealIpHeaderOk returns a tuple with the RealIpHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRealIpHeader + +`func (o *HTTPConnectionOptions) SetRealIpHeader(v string)` + +SetRealIpHeader sets RealIpHeader field to given value. + +### HasRealIpHeader + +`func (o *HTTPConnectionOptions) HasRealIpHeader() bool` + +HasRealIpHeader returns a boolean if a field has been set. + +### GetRealPortHeader + +`func (o *HTTPConnectionOptions) GetRealPortHeader() string` + +GetRealPortHeader returns the RealPortHeader field if non-nil, zero value otherwise. + +### GetRealPortHeaderOk + +`func (o *HTTPConnectionOptions) GetRealPortHeaderOk() (*string, bool)` + +GetRealPortHeaderOk returns a tuple with the RealPortHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRealPortHeader + +`func (o *HTTPConnectionOptions) SetRealPortHeader(v string)` + +SetRealPortHeader sets RealPortHeader field to given value. + +### HasRealPortHeader + +`func (o *HTTPConnectionOptions) HasRealPortHeader() bool` + +HasRealPortHeader returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HTTPConnectionOptionsRequest.md b/azion-api/docs/HTTPConnectionOptionsRequest.md new file mode 100644 index 0000000..586eff1 --- /dev/null +++ b/azion-api/docs/HTTPConnectionOptionsRequest.md @@ -0,0 +1,238 @@ +# HTTPConnectionOptionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DnsResolution** | Pointer to **string** | DNS resolution policy: force IPv4 or both (IPv4 and IPv6) when connecting. * `both` - Both * `force_ipv4` - Force IPv4 | [optional] +**TransportPolicy** | Pointer to **string** | Transport protocol policy: preserve current scheme, force HTTP, or force HTTPS. * `preserve` - Preserve * `force_https` - Force HTTPS * `force_http` - Force HTTP | [optional] +**HttpVersionPolicy** | Pointer to **string** | Defines the HTTP version preference for outbound connections (e.g., HTTP/1.1). * `http1_1` - HTTP/1.1 | [optional] +**Host** | Pointer to **string** | Optional custom host used to override the default target hostname during connection. | [optional] +**PathPrefix** | Pointer to **string** | Optional prefix to add to all request paths (e.g., '/v1'). | [optional] +**FollowingRedirect** | Pointer to **bool** | If true, automatically follows HTTP redirects from the target server. | [optional] +**RealIpHeader** | Pointer to **string** | Header name used to forward the original client IP address. | [optional] +**RealPortHeader** | Pointer to **string** | Header name used to forward the original client port. | [optional] + +## Methods + +### NewHTTPConnectionOptionsRequest + +`func NewHTTPConnectionOptionsRequest() *HTTPConnectionOptionsRequest` + +NewHTTPConnectionOptionsRequest instantiates a new HTTPConnectionOptionsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHTTPConnectionOptionsRequestWithDefaults + +`func NewHTTPConnectionOptionsRequestWithDefaults() *HTTPConnectionOptionsRequest` + +NewHTTPConnectionOptionsRequestWithDefaults instantiates a new HTTPConnectionOptionsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDnsResolution + +`func (o *HTTPConnectionOptionsRequest) GetDnsResolution() string` + +GetDnsResolution returns the DnsResolution field if non-nil, zero value otherwise. + +### GetDnsResolutionOk + +`func (o *HTTPConnectionOptionsRequest) GetDnsResolutionOk() (*string, bool)` + +GetDnsResolutionOk returns a tuple with the DnsResolution field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDnsResolution + +`func (o *HTTPConnectionOptionsRequest) SetDnsResolution(v string)` + +SetDnsResolution sets DnsResolution field to given value. + +### HasDnsResolution + +`func (o *HTTPConnectionOptionsRequest) HasDnsResolution() bool` + +HasDnsResolution returns a boolean if a field has been set. + +### GetTransportPolicy + +`func (o *HTTPConnectionOptionsRequest) GetTransportPolicy() string` + +GetTransportPolicy returns the TransportPolicy field if non-nil, zero value otherwise. + +### GetTransportPolicyOk + +`func (o *HTTPConnectionOptionsRequest) GetTransportPolicyOk() (*string, bool)` + +GetTransportPolicyOk returns a tuple with the TransportPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransportPolicy + +`func (o *HTTPConnectionOptionsRequest) SetTransportPolicy(v string)` + +SetTransportPolicy sets TransportPolicy field to given value. + +### HasTransportPolicy + +`func (o *HTTPConnectionOptionsRequest) HasTransportPolicy() bool` + +HasTransportPolicy returns a boolean if a field has been set. + +### GetHttpVersionPolicy + +`func (o *HTTPConnectionOptionsRequest) GetHttpVersionPolicy() string` + +GetHttpVersionPolicy returns the HttpVersionPolicy field if non-nil, zero value otherwise. + +### GetHttpVersionPolicyOk + +`func (o *HTTPConnectionOptionsRequest) GetHttpVersionPolicyOk() (*string, bool)` + +GetHttpVersionPolicyOk returns a tuple with the HttpVersionPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpVersionPolicy + +`func (o *HTTPConnectionOptionsRequest) SetHttpVersionPolicy(v string)` + +SetHttpVersionPolicy sets HttpVersionPolicy field to given value. + +### HasHttpVersionPolicy + +`func (o *HTTPConnectionOptionsRequest) HasHttpVersionPolicy() bool` + +HasHttpVersionPolicy returns a boolean if a field has been set. + +### GetHost + +`func (o *HTTPConnectionOptionsRequest) GetHost() string` + +GetHost returns the Host field if non-nil, zero value otherwise. + +### GetHostOk + +`func (o *HTTPConnectionOptionsRequest) GetHostOk() (*string, bool)` + +GetHostOk returns a tuple with the Host field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHost + +`func (o *HTTPConnectionOptionsRequest) SetHost(v string)` + +SetHost sets Host field to given value. + +### HasHost + +`func (o *HTTPConnectionOptionsRequest) HasHost() bool` + +HasHost returns a boolean if a field has been set. + +### GetPathPrefix + +`func (o *HTTPConnectionOptionsRequest) GetPathPrefix() string` + +GetPathPrefix returns the PathPrefix field if non-nil, zero value otherwise. + +### GetPathPrefixOk + +`func (o *HTTPConnectionOptionsRequest) GetPathPrefixOk() (*string, bool)` + +GetPathPrefixOk returns a tuple with the PathPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPathPrefix + +`func (o *HTTPConnectionOptionsRequest) SetPathPrefix(v string)` + +SetPathPrefix sets PathPrefix field to given value. + +### HasPathPrefix + +`func (o *HTTPConnectionOptionsRequest) HasPathPrefix() bool` + +HasPathPrefix returns a boolean if a field has been set. + +### GetFollowingRedirect + +`func (o *HTTPConnectionOptionsRequest) GetFollowingRedirect() bool` + +GetFollowingRedirect returns the FollowingRedirect field if non-nil, zero value otherwise. + +### GetFollowingRedirectOk + +`func (o *HTTPConnectionOptionsRequest) GetFollowingRedirectOk() (*bool, bool)` + +GetFollowingRedirectOk returns a tuple with the FollowingRedirect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFollowingRedirect + +`func (o *HTTPConnectionOptionsRequest) SetFollowingRedirect(v bool)` + +SetFollowingRedirect sets FollowingRedirect field to given value. + +### HasFollowingRedirect + +`func (o *HTTPConnectionOptionsRequest) HasFollowingRedirect() bool` + +HasFollowingRedirect returns a boolean if a field has been set. + +### GetRealIpHeader + +`func (o *HTTPConnectionOptionsRequest) GetRealIpHeader() string` + +GetRealIpHeader returns the RealIpHeader field if non-nil, zero value otherwise. + +### GetRealIpHeaderOk + +`func (o *HTTPConnectionOptionsRequest) GetRealIpHeaderOk() (*string, bool)` + +GetRealIpHeaderOk returns a tuple with the RealIpHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRealIpHeader + +`func (o *HTTPConnectionOptionsRequest) SetRealIpHeader(v string)` + +SetRealIpHeader sets RealIpHeader field to given value. + +### HasRealIpHeader + +`func (o *HTTPConnectionOptionsRequest) HasRealIpHeader() bool` + +HasRealIpHeader returns a boolean if a field has been set. + +### GetRealPortHeader + +`func (o *HTTPConnectionOptionsRequest) GetRealPortHeader() string` + +GetRealPortHeader returns the RealPortHeader field if non-nil, zero value otherwise. + +### GetRealPortHeaderOk + +`func (o *HTTPConnectionOptionsRequest) GetRealPortHeaderOk() (*string, bool)` + +GetRealPortHeaderOk returns a tuple with the RealPortHeader field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRealPortHeader + +`func (o *HTTPConnectionOptionsRequest) SetRealPortHeader(v string)` + +SetRealPortHeader sets RealPortHeader field to given value. + +### HasRealPortHeader + +`func (o *HTTPConnectionOptionsRequest) HasRealPortHeader() bool` + +HasRealPortHeader returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HTTPModules.md b/azion-api/docs/HTTPModules.md new file mode 100644 index 0000000..638c697 --- /dev/null +++ b/azion-api/docs/HTTPModules.md @@ -0,0 +1,82 @@ +# HTTPModules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LoadBalancer** | Pointer to [**LoadBalancerModule**](LoadBalancerModule.md) | | [optional] +**OriginShield** | Pointer to [**OriginShieldModule**](OriginShieldModule.md) | | [optional] + +## Methods + +### NewHTTPModules + +`func NewHTTPModules() *HTTPModules` + +NewHTTPModules instantiates a new HTTPModules object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHTTPModulesWithDefaults + +`func NewHTTPModulesWithDefaults() *HTTPModules` + +NewHTTPModulesWithDefaults instantiates a new HTTPModules object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLoadBalancer + +`func (o *HTTPModules) GetLoadBalancer() LoadBalancerModule` + +GetLoadBalancer returns the LoadBalancer field if non-nil, zero value otherwise. + +### GetLoadBalancerOk + +`func (o *HTTPModules) GetLoadBalancerOk() (*LoadBalancerModule, bool)` + +GetLoadBalancerOk returns a tuple with the LoadBalancer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoadBalancer + +`func (o *HTTPModules) SetLoadBalancer(v LoadBalancerModule)` + +SetLoadBalancer sets LoadBalancer field to given value. + +### HasLoadBalancer + +`func (o *HTTPModules) HasLoadBalancer() bool` + +HasLoadBalancer returns a boolean if a field has been set. + +### GetOriginShield + +`func (o *HTTPModules) GetOriginShield() OriginShieldModule` + +GetOriginShield returns the OriginShield field if non-nil, zero value otherwise. + +### GetOriginShieldOk + +`func (o *HTTPModules) GetOriginShieldOk() (*OriginShieldModule, bool)` + +GetOriginShieldOk returns a tuple with the OriginShield field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginShield + +`func (o *HTTPModules) SetOriginShield(v OriginShieldModule)` + +SetOriginShield sets OriginShield field to given value. + +### HasOriginShield + +`func (o *HTTPModules) HasOriginShield() bool` + +HasOriginShield returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HTTPModulesRequest.md b/azion-api/docs/HTTPModulesRequest.md new file mode 100644 index 0000000..767a227 --- /dev/null +++ b/azion-api/docs/HTTPModulesRequest.md @@ -0,0 +1,82 @@ +# HTTPModulesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LoadBalancer** | Pointer to [**LoadBalancerModuleRequest**](LoadBalancerModuleRequest.md) | | [optional] +**OriginShield** | Pointer to [**OriginShieldModuleRequest**](OriginShieldModuleRequest.md) | | [optional] + +## Methods + +### NewHTTPModulesRequest + +`func NewHTTPModulesRequest() *HTTPModulesRequest` + +NewHTTPModulesRequest instantiates a new HTTPModulesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHTTPModulesRequestWithDefaults + +`func NewHTTPModulesRequestWithDefaults() *HTTPModulesRequest` + +NewHTTPModulesRequestWithDefaults instantiates a new HTTPModulesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLoadBalancer + +`func (o *HTTPModulesRequest) GetLoadBalancer() LoadBalancerModuleRequest` + +GetLoadBalancer returns the LoadBalancer field if non-nil, zero value otherwise. + +### GetLoadBalancerOk + +`func (o *HTTPModulesRequest) GetLoadBalancerOk() (*LoadBalancerModuleRequest, bool)` + +GetLoadBalancerOk returns a tuple with the LoadBalancer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLoadBalancer + +`func (o *HTTPModulesRequest) SetLoadBalancer(v LoadBalancerModuleRequest)` + +SetLoadBalancer sets LoadBalancer field to given value. + +### HasLoadBalancer + +`func (o *HTTPModulesRequest) HasLoadBalancer() bool` + +HasLoadBalancer returns a boolean if a field has been set. + +### GetOriginShield + +`func (o *HTTPModulesRequest) GetOriginShield() OriginShieldModuleRequest` + +GetOriginShield returns the OriginShield field if non-nil, zero value otherwise. + +### GetOriginShieldOk + +`func (o *HTTPModulesRequest) GetOriginShieldOk() (*OriginShieldModuleRequest, bool)` + +GetOriginShieldOk returns a tuple with the OriginShield field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginShield + +`func (o *HTTPModulesRequest) SetOriginShield(v OriginShieldModuleRequest)` + +SetOriginShield sets OriginShield field to given value. + +### HasOriginShield + +`func (o *HTTPModulesRequest) HasOriginShield() bool` + +HasOriginShield returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HttpPostEndpoint.md b/azion-api/docs/HttpPostEndpoint.md new file mode 100644 index 0000000..dcc5b85 --- /dev/null +++ b/azion-api/docs/HttpPostEndpoint.md @@ -0,0 +1,181 @@ +# HttpPostEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**LogLineSeparator** | Pointer to **string** | | [optional] +**PayloadFormat** | Pointer to **string** | | [optional] +**MaxSize** | Pointer to **NullableInt64** | | [optional] +**Headers** | **map[string]string** | | +**Type** | **string** | Type identifier for this endpoint (standard) | + +## Methods + +### NewHttpPostEndpoint + +`func NewHttpPostEndpoint(url string, headers map[string]string, type_ string, ) *HttpPostEndpoint` + +NewHttpPostEndpoint instantiates a new HttpPostEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHttpPostEndpointWithDefaults + +`func NewHttpPostEndpointWithDefaults() *HttpPostEndpoint` + +NewHttpPostEndpointWithDefaults instantiates a new HttpPostEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *HttpPostEndpoint) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *HttpPostEndpoint) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *HttpPostEndpoint) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetLogLineSeparator + +`func (o *HttpPostEndpoint) GetLogLineSeparator() string` + +GetLogLineSeparator returns the LogLineSeparator field if non-nil, zero value otherwise. + +### GetLogLineSeparatorOk + +`func (o *HttpPostEndpoint) GetLogLineSeparatorOk() (*string, bool)` + +GetLogLineSeparatorOk returns a tuple with the LogLineSeparator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogLineSeparator + +`func (o *HttpPostEndpoint) SetLogLineSeparator(v string)` + +SetLogLineSeparator sets LogLineSeparator field to given value. + +### HasLogLineSeparator + +`func (o *HttpPostEndpoint) HasLogLineSeparator() bool` + +HasLogLineSeparator returns a boolean if a field has been set. + +### GetPayloadFormat + +`func (o *HttpPostEndpoint) GetPayloadFormat() string` + +GetPayloadFormat returns the PayloadFormat field if non-nil, zero value otherwise. + +### GetPayloadFormatOk + +`func (o *HttpPostEndpoint) GetPayloadFormatOk() (*string, bool)` + +GetPayloadFormatOk returns a tuple with the PayloadFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayloadFormat + +`func (o *HttpPostEndpoint) SetPayloadFormat(v string)` + +SetPayloadFormat sets PayloadFormat field to given value. + +### HasPayloadFormat + +`func (o *HttpPostEndpoint) HasPayloadFormat() bool` + +HasPayloadFormat returns a boolean if a field has been set. + +### GetMaxSize + +`func (o *HttpPostEndpoint) GetMaxSize() int64` + +GetMaxSize returns the MaxSize field if non-nil, zero value otherwise. + +### GetMaxSizeOk + +`func (o *HttpPostEndpoint) GetMaxSizeOk() (*int64, bool)` + +GetMaxSizeOk returns a tuple with the MaxSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxSize + +`func (o *HttpPostEndpoint) SetMaxSize(v int64)` + +SetMaxSize sets MaxSize field to given value. + +### HasMaxSize + +`func (o *HttpPostEndpoint) HasMaxSize() bool` + +HasMaxSize returns a boolean if a field has been set. + +### SetMaxSizeNil + +`func (o *HttpPostEndpoint) SetMaxSizeNil(b bool)` + + SetMaxSizeNil sets the value for MaxSize to be an explicit nil + +### UnsetMaxSize +`func (o *HttpPostEndpoint) UnsetMaxSize()` + +UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil +### GetHeaders + +`func (o *HttpPostEndpoint) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *HttpPostEndpoint) GetHeadersOk() (*map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *HttpPostEndpoint) SetHeaders(v map[string]string)` + +SetHeaders sets Headers field to given value. + + +### GetType + +`func (o *HttpPostEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *HttpPostEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *HttpPostEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HttpPostEndpointRequest.md b/azion-api/docs/HttpPostEndpointRequest.md new file mode 100644 index 0000000..47bae4e --- /dev/null +++ b/azion-api/docs/HttpPostEndpointRequest.md @@ -0,0 +1,181 @@ +# HttpPostEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**LogLineSeparator** | Pointer to **string** | | [optional] +**PayloadFormat** | Pointer to **string** | | [optional] +**MaxSize** | Pointer to **NullableInt64** | | [optional] +**Headers** | **map[string]string** | | +**Type** | **string** | Type identifier for this endpoint (standard) | + +## Methods + +### NewHttpPostEndpointRequest + +`func NewHttpPostEndpointRequest(url string, headers map[string]string, type_ string, ) *HttpPostEndpointRequest` + +NewHttpPostEndpointRequest instantiates a new HttpPostEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHttpPostEndpointRequestWithDefaults + +`func NewHttpPostEndpointRequestWithDefaults() *HttpPostEndpointRequest` + +NewHttpPostEndpointRequestWithDefaults instantiates a new HttpPostEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *HttpPostEndpointRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *HttpPostEndpointRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *HttpPostEndpointRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetLogLineSeparator + +`func (o *HttpPostEndpointRequest) GetLogLineSeparator() string` + +GetLogLineSeparator returns the LogLineSeparator field if non-nil, zero value otherwise. + +### GetLogLineSeparatorOk + +`func (o *HttpPostEndpointRequest) GetLogLineSeparatorOk() (*string, bool)` + +GetLogLineSeparatorOk returns a tuple with the LogLineSeparator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogLineSeparator + +`func (o *HttpPostEndpointRequest) SetLogLineSeparator(v string)` + +SetLogLineSeparator sets LogLineSeparator field to given value. + +### HasLogLineSeparator + +`func (o *HttpPostEndpointRequest) HasLogLineSeparator() bool` + +HasLogLineSeparator returns a boolean if a field has been set. + +### GetPayloadFormat + +`func (o *HttpPostEndpointRequest) GetPayloadFormat() string` + +GetPayloadFormat returns the PayloadFormat field if non-nil, zero value otherwise. + +### GetPayloadFormatOk + +`func (o *HttpPostEndpointRequest) GetPayloadFormatOk() (*string, bool)` + +GetPayloadFormatOk returns a tuple with the PayloadFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayloadFormat + +`func (o *HttpPostEndpointRequest) SetPayloadFormat(v string)` + +SetPayloadFormat sets PayloadFormat field to given value. + +### HasPayloadFormat + +`func (o *HttpPostEndpointRequest) HasPayloadFormat() bool` + +HasPayloadFormat returns a boolean if a field has been set. + +### GetMaxSize + +`func (o *HttpPostEndpointRequest) GetMaxSize() int64` + +GetMaxSize returns the MaxSize field if non-nil, zero value otherwise. + +### GetMaxSizeOk + +`func (o *HttpPostEndpointRequest) GetMaxSizeOk() (*int64, bool)` + +GetMaxSizeOk returns a tuple with the MaxSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxSize + +`func (o *HttpPostEndpointRequest) SetMaxSize(v int64)` + +SetMaxSize sets MaxSize field to given value. + +### HasMaxSize + +`func (o *HttpPostEndpointRequest) HasMaxSize() bool` + +HasMaxSize returns a boolean if a field has been set. + +### SetMaxSizeNil + +`func (o *HttpPostEndpointRequest) SetMaxSizeNil(b bool)` + + SetMaxSizeNil sets the value for MaxSize to be an explicit nil + +### UnsetMaxSize +`func (o *HttpPostEndpointRequest) UnsetMaxSize()` + +UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil +### GetHeaders + +`func (o *HttpPostEndpointRequest) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *HttpPostEndpointRequest) GetHeadersOk() (*map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *HttpPostEndpointRequest) SetHeaders(v map[string]string)` + +SetHeaders sets Headers field to given value. + + +### GetType + +`func (o *HttpPostEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *HttpPostEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *HttpPostEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HttpProtocol.md b/azion-api/docs/HttpProtocol.md new file mode 100644 index 0000000..c16f42b --- /dev/null +++ b/azion-api/docs/HttpProtocol.md @@ -0,0 +1,154 @@ +# HttpProtocol + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Versions** | Pointer to **[]string** | | [optional] +**HttpPorts** | Pointer to **[]int64** | | [optional] +**HttpsPorts** | Pointer to **[]int64** | | [optional] +**QuicPorts** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewHttpProtocol + +`func NewHttpProtocol() *HttpProtocol` + +NewHttpProtocol instantiates a new HttpProtocol object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHttpProtocolWithDefaults + +`func NewHttpProtocolWithDefaults() *HttpProtocol` + +NewHttpProtocolWithDefaults instantiates a new HttpProtocol object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVersions + +`func (o *HttpProtocol) GetVersions() []string` + +GetVersions returns the Versions field if non-nil, zero value otherwise. + +### GetVersionsOk + +`func (o *HttpProtocol) GetVersionsOk() (*[]string, bool)` + +GetVersionsOk returns a tuple with the Versions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersions + +`func (o *HttpProtocol) SetVersions(v []string)` + +SetVersions sets Versions field to given value. + +### HasVersions + +`func (o *HttpProtocol) HasVersions() bool` + +HasVersions returns a boolean if a field has been set. + +### GetHttpPorts + +`func (o *HttpProtocol) GetHttpPorts() []int64` + +GetHttpPorts returns the HttpPorts field if non-nil, zero value otherwise. + +### GetHttpPortsOk + +`func (o *HttpProtocol) GetHttpPortsOk() (*[]int64, bool)` + +GetHttpPortsOk returns a tuple with the HttpPorts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpPorts + +`func (o *HttpProtocol) SetHttpPorts(v []int64)` + +SetHttpPorts sets HttpPorts field to given value. + +### HasHttpPorts + +`func (o *HttpProtocol) HasHttpPorts() bool` + +HasHttpPorts returns a boolean if a field has been set. + +### GetHttpsPorts + +`func (o *HttpProtocol) GetHttpsPorts() []int64` + +GetHttpsPorts returns the HttpsPorts field if non-nil, zero value otherwise. + +### GetHttpsPortsOk + +`func (o *HttpProtocol) GetHttpsPortsOk() (*[]int64, bool)` + +GetHttpsPortsOk returns a tuple with the HttpsPorts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsPorts + +`func (o *HttpProtocol) SetHttpsPorts(v []int64)` + +SetHttpsPorts sets HttpsPorts field to given value. + +### HasHttpsPorts + +`func (o *HttpProtocol) HasHttpsPorts() bool` + +HasHttpsPorts returns a boolean if a field has been set. + +### SetHttpsPortsNil + +`func (o *HttpProtocol) SetHttpsPortsNil(b bool)` + + SetHttpsPortsNil sets the value for HttpsPorts to be an explicit nil + +### UnsetHttpsPorts +`func (o *HttpProtocol) UnsetHttpsPorts()` + +UnsetHttpsPorts ensures that no value is present for HttpsPorts, not even an explicit nil +### GetQuicPorts + +`func (o *HttpProtocol) GetQuicPorts() []int64` + +GetQuicPorts returns the QuicPorts field if non-nil, zero value otherwise. + +### GetQuicPortsOk + +`func (o *HttpProtocol) GetQuicPortsOk() (*[]int64, bool)` + +GetQuicPortsOk returns a tuple with the QuicPorts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuicPorts + +`func (o *HttpProtocol) SetQuicPorts(v []int64)` + +SetQuicPorts sets QuicPorts field to given value. + +### HasQuicPorts + +`func (o *HttpProtocol) HasQuicPorts() bool` + +HasQuicPorts returns a boolean if a field has been set. + +### SetQuicPortsNil + +`func (o *HttpProtocol) SetQuicPortsNil(b bool)` + + SetQuicPortsNil sets the value for QuicPorts to be an explicit nil + +### UnsetQuicPorts +`func (o *HttpProtocol) UnsetQuicPorts()` + +UnsetQuicPorts ensures that no value is present for QuicPorts, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/HttpProtocolRequest.md b/azion-api/docs/HttpProtocolRequest.md new file mode 100644 index 0000000..e273a92 --- /dev/null +++ b/azion-api/docs/HttpProtocolRequest.md @@ -0,0 +1,154 @@ +# HttpProtocolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Versions** | Pointer to **[]string** | | [optional] +**HttpPorts** | Pointer to **[]int64** | | [optional] +**HttpsPorts** | Pointer to **[]int64** | | [optional] +**QuicPorts** | Pointer to **[]int64** | | [optional] + +## Methods + +### NewHttpProtocolRequest + +`func NewHttpProtocolRequest() *HttpProtocolRequest` + +NewHttpProtocolRequest instantiates a new HttpProtocolRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewHttpProtocolRequestWithDefaults + +`func NewHttpProtocolRequestWithDefaults() *HttpProtocolRequest` + +NewHttpProtocolRequestWithDefaults instantiates a new HttpProtocolRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetVersions + +`func (o *HttpProtocolRequest) GetVersions() []string` + +GetVersions returns the Versions field if non-nil, zero value otherwise. + +### GetVersionsOk + +`func (o *HttpProtocolRequest) GetVersionsOk() (*[]string, bool)` + +GetVersionsOk returns a tuple with the Versions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersions + +`func (o *HttpProtocolRequest) SetVersions(v []string)` + +SetVersions sets Versions field to given value. + +### HasVersions + +`func (o *HttpProtocolRequest) HasVersions() bool` + +HasVersions returns a boolean if a field has been set. + +### GetHttpPorts + +`func (o *HttpProtocolRequest) GetHttpPorts() []int64` + +GetHttpPorts returns the HttpPorts field if non-nil, zero value otherwise. + +### GetHttpPortsOk + +`func (o *HttpProtocolRequest) GetHttpPortsOk() (*[]int64, bool)` + +GetHttpPortsOk returns a tuple with the HttpPorts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpPorts + +`func (o *HttpProtocolRequest) SetHttpPorts(v []int64)` + +SetHttpPorts sets HttpPorts field to given value. + +### HasHttpPorts + +`func (o *HttpProtocolRequest) HasHttpPorts() bool` + +HasHttpPorts returns a boolean if a field has been set. + +### GetHttpsPorts + +`func (o *HttpProtocolRequest) GetHttpsPorts() []int64` + +GetHttpsPorts returns the HttpsPorts field if non-nil, zero value otherwise. + +### GetHttpsPortsOk + +`func (o *HttpProtocolRequest) GetHttpsPortsOk() (*[]int64, bool)` + +GetHttpsPortsOk returns a tuple with the HttpsPorts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttpsPorts + +`func (o *HttpProtocolRequest) SetHttpsPorts(v []int64)` + +SetHttpsPorts sets HttpsPorts field to given value. + +### HasHttpsPorts + +`func (o *HttpProtocolRequest) HasHttpsPorts() bool` + +HasHttpsPorts returns a boolean if a field has been set. + +### SetHttpsPortsNil + +`func (o *HttpProtocolRequest) SetHttpsPortsNil(b bool)` + + SetHttpsPortsNil sets the value for HttpsPorts to be an explicit nil + +### UnsetHttpsPorts +`func (o *HttpProtocolRequest) UnsetHttpsPorts()` + +UnsetHttpsPorts ensures that no value is present for HttpsPorts, not even an explicit nil +### GetQuicPorts + +`func (o *HttpProtocolRequest) GetQuicPorts() []int64` + +GetQuicPorts returns the QuicPorts field if non-nil, zero value otherwise. + +### GetQuicPortsOk + +`func (o *HttpProtocolRequest) GetQuicPortsOk() (*[]int64, bool)` + +GetQuicPortsOk returns a tuple with the QuicPorts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuicPorts + +`func (o *HttpProtocolRequest) SetQuicPorts(v []int64)` + +SetQuicPorts sets QuicPorts field to given value. + +### HasQuicPorts + +`func (o *HttpProtocolRequest) HasQuicPorts() bool` + +HasQuicPorts returns a boolean if a field has been set. + +### SetQuicPortsNil + +`func (o *HttpProtocolRequest) SetQuicPortsNil(b bool)` + + SetQuicPortsNil sets the value for QuicPorts to be an explicit nil + +### UnsetQuicPorts +`func (o *HttpProtocolRequest) UnsetQuicPorts()` + +UnsetQuicPorts ensures that no value is present for QuicPorts, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/IdentityGrantsAPI.md b/azion-api/docs/IdentityGrantsAPI.md new file mode 100644 index 0000000..58b305e --- /dev/null +++ b/azion-api/docs/IdentityGrantsAPI.md @@ -0,0 +1,440 @@ +# \IdentityGrantsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateGrant**](IdentityGrantsAPI.md#CreateGrant) | **Post** /identity/grants | Create a new grant +[**DeleteGrant**](IdentityGrantsAPI.md#DeleteGrant) | **Delete** /identity/grants/{grant_id} | Delete a grant +[**ListGrants**](IdentityGrantsAPI.md#ListGrants) | **Get** /identity/grants | List grants for the account +[**PartialUpdateGrant**](IdentityGrantsAPI.md#PartialUpdateGrant) | **Patch** /identity/grants/{grant_id} | Partially update a grant +[**RetrieveGrant**](IdentityGrantsAPI.md#RetrieveGrant) | **Get** /identity/grants/{grant_id} | Retrieve grant details +[**UpdateGrant**](IdentityGrantsAPI.md#UpdateGrant) | **Put** /identity/grants/{grant_id} | Update a grant + + + +## CreateGrant + +> ResponseGrant CreateGrant(ctx).GrantRequest(grantRequest).Execute() + +Create a new grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantRequest := *openapiclient.NewGrantRequest(false, int64(123)) // GrantRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGrantsAPI.CreateGrant(context.Background()).GrantRequest(grantRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGrantsAPI.CreateGrant``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateGrant`: ResponseGrant + fmt.Fprintf(os.Stdout, "Response from `IdentityGrantsAPI.CreateGrant`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateGrantRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **grantRequest** | [**GrantRequest**](GrantRequest.md) | | + +### Return type + +[**ResponseGrant**](ResponseGrant.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteGrant + +> ResponseDeleteGrant DeleteGrant(ctx, grantId).Execute() + +Delete a grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantId := "grantId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGrantsAPI.DeleteGrant(context.Background(), grantId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGrantsAPI.DeleteGrant``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteGrant`: ResponseDeleteGrant + fmt.Fprintf(os.Stdout, "Response from `IdentityGrantsAPI.DeleteGrant`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteGrantRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteGrant**](ResponseDeleteGrant.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListGrants + +> PaginatedGrantList ListGrants(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List grants for the account + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGrantsAPI.ListGrants(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGrantsAPI.ListGrants``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListGrants`: PaginatedGrantList + fmt.Fprintf(os.Stdout, "Response from `IdentityGrantsAPI.ListGrants`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListGrantsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedGrantList**](PaginatedGrantList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateGrant + +> ResponseGrant PartialUpdateGrant(ctx, grantId).PatchedGrantRequest(patchedGrantRequest).Execute() + +Partially update a grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantId := "grantId_example" // string | + patchedGrantRequest := *openapiclient.NewPatchedGrantRequest() // PatchedGrantRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGrantsAPI.PartialUpdateGrant(context.Background(), grantId).PatchedGrantRequest(patchedGrantRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGrantsAPI.PartialUpdateGrant``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateGrant`: ResponseGrant + fmt.Fprintf(os.Stdout, "Response from `IdentityGrantsAPI.PartialUpdateGrant`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateGrantRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedGrantRequest** | [**PatchedGrantRequest**](PatchedGrantRequest.md) | | + +### Return type + +[**ResponseGrant**](ResponseGrant.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveGrant + +> ResponseRetrieveGrant RetrieveGrant(ctx, grantId).Fields(fields).Execute() + +Retrieve grant details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantId := "grantId_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGrantsAPI.RetrieveGrant(context.Background(), grantId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGrantsAPI.RetrieveGrant``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveGrant`: ResponseRetrieveGrant + fmt.Fprintf(os.Stdout, "Response from `IdentityGrantsAPI.RetrieveGrant`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveGrantRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveGrant**](ResponseRetrieveGrant.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateGrant + +> ResponseGrant UpdateGrant(ctx, grantId).GrantRequest(grantRequest).Execute() + +Update a grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + grantId := "grantId_example" // string | + grantRequest := *openapiclient.NewGrantRequest(false, int64(123)) // GrantRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGrantsAPI.UpdateGrant(context.Background(), grantId).GrantRequest(grantRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGrantsAPI.UpdateGrant``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateGrant`: ResponseGrant + fmt.Fprintf(os.Stdout, "Response from `IdentityGrantsAPI.UpdateGrant`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateGrantRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **grantRequest** | [**GrantRequest**](GrantRequest.md) | | + +### Return type + +[**ResponseGrant**](ResponseGrant.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityGroupMembersAPI.md b/azion-api/docs/IdentityGroupMembersAPI.md new file mode 100644 index 0000000..1d14d5c --- /dev/null +++ b/azion-api/docs/IdentityGroupMembersAPI.md @@ -0,0 +1,154 @@ +# \IdentityGroupMembersAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveMembersGroup**](IdentityGroupMembersAPI.md#RetrieveMembersGroup) | **Get** /identity/groups/{id}/members | Retrieve members from a group +[**UpdateMembersGroup**](IdentityGroupMembersAPI.md#UpdateMembersGroup) | **Put** /identity/groups/{id}/members | Update members from a group + + + +## RetrieveMembersGroup + +> ResponseRetrieveGroupMembers RetrieveMembersGroup(ctx, id).Fields(fields).Execute() + +Retrieve members from a group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupMembersAPI.RetrieveMembersGroup(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupMembersAPI.RetrieveMembersGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveMembersGroup`: ResponseRetrieveGroupMembers + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupMembersAPI.RetrieveMembersGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveMembersGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveGroupMembers**](ResponseRetrieveGroupMembers.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateMembersGroup + +> ResponseGroupMembers UpdateMembersGroup(ctx, id).GroupMembersRequest(groupMembersRequest).Execute() + +Update members from a group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := int64(789) // int64 | + groupMembersRequest := *openapiclient.NewGroupMembersRequest([]int64{int64(123)}) // GroupMembersRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupMembersAPI.UpdateMembersGroup(context.Background(), id).GroupMembersRequest(groupMembersRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupMembersAPI.UpdateMembersGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateMembersGroup`: ResponseGroupMembers + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupMembersAPI.UpdateMembersGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateMembersGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **groupMembersRequest** | [**GroupMembersRequest**](GroupMembersRequest.md) | | + +### Return type + +[**ResponseGroupMembers**](ResponseGroupMembers.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityGroupsAPI.md b/azion-api/docs/IdentityGroupsAPI.md new file mode 100644 index 0000000..ec375af --- /dev/null +++ b/azion-api/docs/IdentityGroupsAPI.md @@ -0,0 +1,440 @@ +# \IdentityGroupsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateGroup**](IdentityGroupsAPI.md#CreateGroup) | **Post** /identity/groups | Create a new group +[**DeleteGroup**](IdentityGroupsAPI.md#DeleteGroup) | **Delete** /identity/groups/{group_id} | Delete a group +[**ListGroup**](IdentityGroupsAPI.md#ListGroup) | **Get** /identity/groups | List of the account groups +[**PartialUpdateGroup**](IdentityGroupsAPI.md#PartialUpdateGroup) | **Patch** /identity/groups/{group_id} | Partially update a group +[**RetrieveGroup**](IdentityGroupsAPI.md#RetrieveGroup) | **Get** /identity/groups/{group_id} | Retrieve details from a group +[**UpdateGroup**](IdentityGroupsAPI.md#UpdateGroup) | **Put** /identity/groups/{group_id} | Update a group + + + +## CreateGroup + +> ResponseGroup CreateGroup(ctx).GroupRequest(groupRequest).Execute() + +Create a new group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupRequest := *openapiclient.NewGroupRequest("Name_example") // GroupRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupsAPI.CreateGroup(context.Background()).GroupRequest(groupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupsAPI.CreateGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateGroup`: ResponseGroup + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupsAPI.CreateGroup`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupRequest** | [**GroupRequest**](GroupRequest.md) | | + +### Return type + +[**ResponseGroup**](ResponseGroup.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteGroup + +> ResponseDeleteGroup DeleteGroup(ctx, groupId).Execute() + +Delete a group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := "groupId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupsAPI.DeleteGroup(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupsAPI.DeleteGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteGroup`: ResponseDeleteGroup + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupsAPI.DeleteGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteGroup**](ResponseDeleteGroup.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListGroup + +> PaginatedGroupList ListGroup(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the account groups + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupsAPI.ListGroup(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupsAPI.ListGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListGroup`: PaginatedGroupList + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupsAPI.ListGroup`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedGroupList**](PaginatedGroupList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateGroup + +> ResponseGroup PartialUpdateGroup(ctx, groupId).PatchedGroupRequest(patchedGroupRequest).Execute() + +Partially update a group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := "groupId_example" // string | + patchedGroupRequest := *openapiclient.NewPatchedGroupRequest() // PatchedGroupRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupsAPI.PartialUpdateGroup(context.Background(), groupId).PatchedGroupRequest(patchedGroupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupsAPI.PartialUpdateGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateGroup`: ResponseGroup + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupsAPI.PartialUpdateGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedGroupRequest** | [**PatchedGroupRequest**](PatchedGroupRequest.md) | | + +### Return type + +[**ResponseGroup**](ResponseGroup.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveGroup + +> ResponseRetrieveGroup RetrieveGroup(ctx, groupId).Fields(fields).Execute() + +Retrieve details from a group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := "groupId_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupsAPI.RetrieveGroup(context.Background(), groupId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupsAPI.RetrieveGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveGroup`: ResponseRetrieveGroup + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupsAPI.RetrieveGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveGroup**](ResponseRetrieveGroup.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateGroup + +> ResponseGroup UpdateGroup(ctx, groupId).GroupRequest(groupRequest).Execute() + +Update a group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := "groupId_example" // string | + groupRequest := *openapiclient.NewGroupRequest("Name_example") // GroupRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityGroupsAPI.UpdateGroup(context.Background(), groupId).GroupRequest(groupRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityGroupsAPI.UpdateGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateGroup`: ResponseGroup + fmt.Fprintf(os.Stdout, "Response from `IdentityGroupsAPI.UpdateGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **groupRequest** | [**GroupRequest**](GroupRequest.md) | | + +### Return type + +[**ResponseGroup**](ResponseGroup.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityLoggedInUserAPI.md b/azion-api/docs/IdentityLoggedInUserAPI.md new file mode 100644 index 0000000..85bfea0 --- /dev/null +++ b/azion-api/docs/IdentityLoggedInUserAPI.md @@ -0,0 +1,209 @@ +# \IdentityLoggedInUserAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListLoggedUser**](IdentityLoggedInUserAPI.md#ListLoggedUser) | **Get** /identity/user | Retrieve details from the currently logged-in user +[**PartialUpdateLoggedUser**](IdentityLoggedInUserAPI.md#PartialUpdateLoggedUser) | **Patch** /identity/user | Partially update the currently logged-in user +[**UpdateLoggedUser**](IdentityLoggedInUserAPI.md#UpdateLoggedUser) | **Put** /identity/user | Update the currently logged-in user + + + +## ListLoggedUser + +> ResponseRetrieveUser ListLoggedUser(ctx).Fields(fields).Execute() + +Retrieve details from the currently logged-in user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityLoggedInUserAPI.ListLoggedUser(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityLoggedInUserAPI.ListLoggedUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListLoggedUser`: ResponseRetrieveUser + fmt.Fprintf(os.Stdout, "Response from `IdentityLoggedInUserAPI.ListLoggedUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListLoggedUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveUser**](ResponseRetrieveUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateLoggedUser + +> ResponseUser PartialUpdateLoggedUser(ctx).PatchedUserRequest(patchedUserRequest).Execute() + +Partially update the currently logged-in user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + patchedUserRequest := *openapiclient.NewPatchedUserRequest() // PatchedUserRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityLoggedInUserAPI.PartialUpdateLoggedUser(context.Background()).PatchedUserRequest(patchedUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityLoggedInUserAPI.PartialUpdateLoggedUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateLoggedUser`: ResponseUser + fmt.Fprintf(os.Stdout, "Response from `IdentityLoggedInUserAPI.PartialUpdateLoggedUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateLoggedUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patchedUserRequest** | [**PatchedUserRequest**](PatchedUserRequest.md) | | + +### Return type + +[**ResponseUser**](ResponseUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateLoggedUser + +> ResponseUser UpdateLoggedUser(ctx).UserRequest(userRequest).Execute() + +Update the currently logged-in user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userRequest := *openapiclient.NewUserRequest("Name_example", "Email_example") // UserRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityLoggedInUserAPI.UpdateLoggedUser(context.Background()).UserRequest(userRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityLoggedInUserAPI.UpdateLoggedUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateLoggedUser`: ResponseUser + fmt.Fprintf(os.Stdout, "Response from `IdentityLoggedInUserAPI.UpdateLoggedUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateLoggedUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userRequest** | [**UserRequest**](UserRequest.md) | | + +### Return type + +[**ResponseUser**](ResponseUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityServiceTokenRenewAPI.md b/azion-api/docs/IdentityServiceTokenRenewAPI.md new file mode 100644 index 0000000..3ab2e5d --- /dev/null +++ b/azion-api/docs/IdentityServiceTokenRenewAPI.md @@ -0,0 +1,82 @@ +# \IdentityServiceTokenRenewAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RenewServiceToken**](IdentityServiceTokenRenewAPI.md#RenewServiceToken) | **Post** /identity/service-tokens/{id}/renew | Renews a service token + + + +## RenewServiceToken + +> ResponseServiceTokenRenew RenewServiceToken(ctx, id).ServiceTokenRenewRequest(serviceTokenRenewRequest).Execute() + +Renews a service token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := int64(789) // int64 | + serviceTokenRenewRequest := *openapiclient.NewServiceTokenRenewRequest(time.Now()) // ServiceTokenRenewRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokenRenewAPI.RenewServiceToken(context.Background(), id).ServiceTokenRenewRequest(serviceTokenRenewRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokenRenewAPI.RenewServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RenewServiceToken`: ResponseServiceTokenRenew + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokenRenewAPI.RenewServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRenewServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceTokenRenewRequest** | [**ServiceTokenRenewRequest**](ServiceTokenRenewRequest.md) | | + +### Return type + +[**ResponseServiceTokenRenew**](ResponseServiceTokenRenew.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityServiceTokensAPI.md b/azion-api/docs/IdentityServiceTokensAPI.md new file mode 100644 index 0000000..eb04c56 --- /dev/null +++ b/azion-api/docs/IdentityServiceTokensAPI.md @@ -0,0 +1,441 @@ +# \IdentityServiceTokensAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateServiceToken**](IdentityServiceTokensAPI.md#CreateServiceToken) | **Post** /identity/service-tokens | Create a new service token +[**DeleteServiceToken**](IdentityServiceTokensAPI.md#DeleteServiceToken) | **Delete** /identity/service-tokens/{token_id} | Delete a service token +[**ListServiceToken**](IdentityServiceTokensAPI.md#ListServiceToken) | **Get** /identity/service-tokens | List of the account service tokens +[**PartialUpdateServiceToken**](IdentityServiceTokensAPI.md#PartialUpdateServiceToken) | **Patch** /identity/service-tokens/{token_id} | Partially update a service token +[**RetrieveServiceToken**](IdentityServiceTokensAPI.md#RetrieveServiceToken) | **Get** /identity/service-tokens/{token_id} | Retrieve details from a service token +[**UpdateServiceToken**](IdentityServiceTokensAPI.md#UpdateServiceToken) | **Put** /identity/service-tokens/{token_id} | Update a service token + + + +## CreateServiceToken + +> ResponseServiceTokenCreate CreateServiceToken(ctx).ServiceTokenCreateRequest(serviceTokenCreateRequest).Execute() + +Create a new service token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceTokenCreateRequest := *openapiclient.NewServiceTokenCreateRequest("Name_example", time.Now()) // ServiceTokenCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokensAPI.CreateServiceToken(context.Background()).ServiceTokenCreateRequest(serviceTokenCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokensAPI.CreateServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateServiceToken`: ResponseServiceTokenCreate + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokensAPI.CreateServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **serviceTokenCreateRequest** | [**ServiceTokenCreateRequest**](ServiceTokenCreateRequest.md) | | + +### Return type + +[**ResponseServiceTokenCreate**](ResponseServiceTokenCreate.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteServiceToken + +> ResponseDeleteServiceToken DeleteServiceToken(ctx, tokenId).Execute() + +Delete a service token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tokenId := "tokenId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokensAPI.DeleteServiceToken(context.Background(), tokenId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokensAPI.DeleteServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteServiceToken`: ResponseDeleteServiceToken + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokensAPI.DeleteServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tokenId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteServiceToken**](ResponseDeleteServiceToken.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServiceToken + +> PaginatedServiceTokenList ListServiceToken(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the account service tokens + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokensAPI.ListServiceToken(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokensAPI.ListServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListServiceToken`: PaginatedServiceTokenList + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokensAPI.ListServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedServiceTokenList**](PaginatedServiceTokenList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateServiceToken + +> ResponseServiceToken PartialUpdateServiceToken(ctx, tokenId).PatchedServiceTokenUpdateRequest(patchedServiceTokenUpdateRequest).Execute() + +Partially update a service token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tokenId := "tokenId_example" // string | + patchedServiceTokenUpdateRequest := *openapiclient.NewPatchedServiceTokenUpdateRequest() // PatchedServiceTokenUpdateRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokensAPI.PartialUpdateServiceToken(context.Background(), tokenId).PatchedServiceTokenUpdateRequest(patchedServiceTokenUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokensAPI.PartialUpdateServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateServiceToken`: ResponseServiceToken + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokensAPI.PartialUpdateServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tokenId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedServiceTokenUpdateRequest** | [**PatchedServiceTokenUpdateRequest**](PatchedServiceTokenUpdateRequest.md) | | + +### Return type + +[**ResponseServiceToken**](ResponseServiceToken.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveServiceToken + +> ResponseRetrieveServiceToken RetrieveServiceToken(ctx, tokenId).Fields(fields).Execute() + +Retrieve details from a service token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tokenId := "tokenId_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokensAPI.RetrieveServiceToken(context.Background(), tokenId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokensAPI.RetrieveServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveServiceToken`: ResponseRetrieveServiceToken + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokensAPI.RetrieveServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tokenId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveServiceToken**](ResponseRetrieveServiceToken.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateServiceToken + +> ResponseServiceToken UpdateServiceToken(ctx, tokenId).ServiceTokenUpdateRequest(serviceTokenUpdateRequest).Execute() + +Update a service token + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + tokenId := "tokenId_example" // string | + serviceTokenUpdateRequest := *openapiclient.NewServiceTokenUpdateRequest("Name_example") // ServiceTokenUpdateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityServiceTokensAPI.UpdateServiceToken(context.Background(), tokenId).ServiceTokenUpdateRequest(serviceTokenUpdateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityServiceTokensAPI.UpdateServiceToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateServiceToken`: ResponseServiceToken + fmt.Fprintf(os.Stdout, "Response from `IdentityServiceTokensAPI.UpdateServiceToken`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**tokenId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateServiceTokenRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceTokenUpdateRequest** | [**ServiceTokenUpdateRequest**](ServiceTokenUpdateRequest.md) | | + +### Return type + +[**ResponseServiceToken**](ResponseServiceToken.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityUserInfoAPI.md b/azion-api/docs/IdentityUserInfoAPI.md new file mode 100644 index 0000000..5dec30c --- /dev/null +++ b/azion-api/docs/IdentityUserInfoAPI.md @@ -0,0 +1,154 @@ +# \IdentityUserInfoAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveUserInfo**](IdentityUserInfoAPI.md#RetrieveUserInfo) | **Get** /identity/users/{id}/info | Retrieve user info +[**UpdateUserInfo**](IdentityUserInfoAPI.md#UpdateUserInfo) | **Put** /identity/users/{id}/info | Update an user info + + + +## RetrieveUserInfo + +> ResponseRetrieveUserInfo RetrieveUserInfo(ctx, id).Fields(fields).Execute() + +Retrieve user info + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUserInfoAPI.RetrieveUserInfo(context.Background(), id).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUserInfoAPI.RetrieveUserInfo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveUserInfo`: ResponseRetrieveUserInfo + fmt.Fprintf(os.Stdout, "Response from `IdentityUserInfoAPI.RetrieveUserInfo`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveUserInfoRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveUserInfo**](ResponseRetrieveUserInfo.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUserInfo + +> ResponseUserInfo UpdateUserInfo(ctx, id).UpdateUserInfoRequest(updateUserInfoRequest).Execute() + +Update an user info + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + id := int64(789) // int64 | + updateUserInfoRequest := *openapiclient.NewUpdateUserInfoRequest() // UpdateUserInfoRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUserInfoAPI.UpdateUserInfo(context.Background(), id).UpdateUserInfoRequest(updateUserInfoRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUserInfoAPI.UpdateUserInfo``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateUserInfo`: ResponseUserInfo + fmt.Fprintf(os.Stdout, "Response from `IdentityUserInfoAPI.UpdateUserInfo`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserInfoRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **updateUserInfoRequest** | [**UpdateUserInfoRequest**](UpdateUserInfoRequest.md) | | + +### Return type + +[**ResponseUserInfo**](ResponseUserInfo.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/IdentityUsersAPI.md b/azion-api/docs/IdentityUsersAPI.md new file mode 100644 index 0000000..a15d913 --- /dev/null +++ b/azion-api/docs/IdentityUsersAPI.md @@ -0,0 +1,442 @@ +# \IdentityUsersAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateUser**](IdentityUsersAPI.md#CreateUser) | **Post** /identity/users | Create a new user +[**DeleteUser**](IdentityUsersAPI.md#DeleteUser) | **Delete** /identity/users/{user_id} | Delete an user +[**ListUsers**](IdentityUsersAPI.md#ListUsers) | **Get** /identity/users | List of the account users +[**PartialUpdateUser**](IdentityUsersAPI.md#PartialUpdateUser) | **Patch** /identity/users/{user_id} | Partially update an user +[**RetrieveUser**](IdentityUsersAPI.md#RetrieveUser) | **Get** /identity/users/{user_id} | Retrieve details from an user +[**UpdateUser**](IdentityUsersAPI.md#UpdateUser) | **Put** /identity/users/{user_id} | Update an user + + + +## CreateUser + +> ResponseUser CreateUser(ctx).UserRequest(userRequest).Execute() + +Create a new user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userRequest := *openapiclient.NewUserRequest("Name_example", "Email_example") // UserRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUsersAPI.CreateUser(context.Background()).UserRequest(userRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUsersAPI.CreateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateUser`: ResponseUser + fmt.Fprintf(os.Stdout, "Response from `IdentityUsersAPI.CreateUser`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userRequest** | [**UserRequest**](UserRequest.md) | | + +### Return type + +[**ResponseUser**](ResponseUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteUser + +> ResponseDeleteUser DeleteUser(ctx, userId).Execute() + +Delete an user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "userId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUsersAPI.DeleteUser(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUsersAPI.DeleteUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteUser`: ResponseDeleteUser + fmt.Fprintf(os.Stdout, "Response from `IdentityUsersAPI.DeleteUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteUser**](ResponseDeleteUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListUsers + +> PaginatedUserList ListUsers(ctx).Fields(fields).Locked(locked).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the account users + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + locked := true // bool | Filters users by locked status. - `true`: Returns only locked users. - `false`: Returns only unlocked users. - (not provided): Returns all users. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUsersAPI.ListUsers(context.Background()).Fields(fields).Locked(locked).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUsersAPI.ListUsers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListUsers`: PaginatedUserList + fmt.Fprintf(os.Stdout, "Response from `IdentityUsersAPI.ListUsers`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListUsersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **locked** | **bool** | Filters users by locked status. - `true`: Returns only locked users. - `false`: Returns only unlocked users. - (not provided): Returns all users. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedUserList**](PaginatedUserList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateUser + +> ResponseUser PartialUpdateUser(ctx, userId).PatchedUserRequest(patchedUserRequest).Execute() + +Partially update an user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "userId_example" // string | + patchedUserRequest := *openapiclient.NewPatchedUserRequest() // PatchedUserRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUsersAPI.PartialUpdateUser(context.Background(), userId).PatchedUserRequest(patchedUserRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUsersAPI.PartialUpdateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateUser`: ResponseUser + fmt.Fprintf(os.Stdout, "Response from `IdentityUsersAPI.PartialUpdateUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedUserRequest** | [**PatchedUserRequest**](PatchedUserRequest.md) | | + +### Return type + +[**ResponseUser**](ResponseUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveUser + +> ResponseRetrieveUser RetrieveUser(ctx, userId).Fields(fields).Execute() + +Retrieve details from an user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "userId_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUsersAPI.RetrieveUser(context.Background(), userId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUsersAPI.RetrieveUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveUser`: ResponseRetrieveUser + fmt.Fprintf(os.Stdout, "Response from `IdentityUsersAPI.RetrieveUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveUser**](ResponseRetrieveUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateUser + +> ResponseUser UpdateUser(ctx, userId).UserRequest(userRequest).Execute() + +Update an user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := "userId_example" // string | + userRequest := *openapiclient.NewUserRequest("Name_example", "Email_example") // UserRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.IdentityUsersAPI.UpdateUser(context.Background(), userId).UserRequest(userRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `IdentityUsersAPI.UpdateUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateUser`: ResponseUser + fmt.Fprintf(os.Stdout, "Response from `IdentityUsersAPI.UpdateUser`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **userRequest** | [**UserRequest**](UserRequest.md) | | + +### Return type + +[**ResponseUser**](ResponseUser.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/ImageProcessorModule.md b/azion-api/docs/ImageProcessorModule.md new file mode 100644 index 0000000..391ea92 --- /dev/null +++ b/azion-api/docs/ImageProcessorModule.md @@ -0,0 +1,56 @@ +# ImageProcessorModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewImageProcessorModule + +`func NewImageProcessorModule() *ImageProcessorModule` + +NewImageProcessorModule instantiates a new ImageProcessorModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImageProcessorModuleWithDefaults + +`func NewImageProcessorModuleWithDefaults() *ImageProcessorModule` + +NewImageProcessorModuleWithDefaults instantiates a new ImageProcessorModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *ImageProcessorModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ImageProcessorModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ImageProcessorModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ImageProcessorModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ImageProcessorModuleRequest.md b/azion-api/docs/ImageProcessorModuleRequest.md new file mode 100644 index 0000000..1409226 --- /dev/null +++ b/azion-api/docs/ImageProcessorModuleRequest.md @@ -0,0 +1,56 @@ +# ImageProcessorModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewImageProcessorModuleRequest + +`func NewImageProcessorModuleRequest() *ImageProcessorModuleRequest` + +NewImageProcessorModuleRequest instantiates a new ImageProcessorModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewImageProcessorModuleRequestWithDefaults + +`func NewImageProcessorModuleRequestWithDefaults() *ImageProcessorModuleRequest` + +NewImageProcessorModuleRequestWithDefaults instantiates a new ImageProcessorModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *ImageProcessorModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *ImageProcessorModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *ImageProcessorModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *ImageProcessorModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputDataSource.md b/azion-api/docs/InputDataSource.md new file mode 100644 index 0000000..12ff056 --- /dev/null +++ b/azion-api/docs/InputDataSource.md @@ -0,0 +1,51 @@ +# InputDataSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DataSource** | **string** | * `http` - Applications * `waf` - WAF Events * `functions` - Functions * `activity` - Activity History | + +## Methods + +### NewInputDataSource + +`func NewInputDataSource(dataSource string, ) *InputDataSource` + +NewInputDataSource instantiates a new InputDataSource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputDataSourceWithDefaults + +`func NewInputDataSourceWithDefaults() *InputDataSource` + +NewInputDataSourceWithDefaults instantiates a new InputDataSource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDataSource + +`func (o *InputDataSource) GetDataSource() string` + +GetDataSource returns the DataSource field if non-nil, zero value otherwise. + +### GetDataSourceOk + +`func (o *InputDataSource) GetDataSourceOk() (*string, bool)` + +GetDataSourceOk returns a tuple with the DataSource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSource + +`func (o *InputDataSource) SetDataSource(v string)` + +SetDataSource sets DataSource field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputDataSourceAttributes.md b/azion-api/docs/InputDataSourceAttributes.md new file mode 100644 index 0000000..7f37082 --- /dev/null +++ b/azion-api/docs/InputDataSourceAttributes.md @@ -0,0 +1,72 @@ +# InputDataSourceAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `raw_logs` - Raw Logs | +**Attributes** | [**InputDataSource**](InputDataSource.md) | | + +## Methods + +### NewInputDataSourceAttributes + +`func NewInputDataSourceAttributes(type_ string, attributes InputDataSource, ) *InputDataSourceAttributes` + +NewInputDataSourceAttributes instantiates a new InputDataSourceAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputDataSourceAttributesWithDefaults + +`func NewInputDataSourceAttributesWithDefaults() *InputDataSourceAttributes` + +NewInputDataSourceAttributesWithDefaults instantiates a new InputDataSourceAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InputDataSourceAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputDataSourceAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputDataSourceAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *InputDataSourceAttributes) GetAttributes() InputDataSource` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *InputDataSourceAttributes) GetAttributesOk() (*InputDataSource, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *InputDataSourceAttributes) SetAttributes(v InputDataSource)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputDataSourceAttributesRequest.md b/azion-api/docs/InputDataSourceAttributesRequest.md new file mode 100644 index 0000000..952714d --- /dev/null +++ b/azion-api/docs/InputDataSourceAttributesRequest.md @@ -0,0 +1,72 @@ +# InputDataSourceAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `raw_logs` - Raw Logs | +**Attributes** | [**InputDataSourceRequest**](InputDataSourceRequest.md) | | + +## Methods + +### NewInputDataSourceAttributesRequest + +`func NewInputDataSourceAttributesRequest(type_ string, attributes InputDataSourceRequest, ) *InputDataSourceAttributesRequest` + +NewInputDataSourceAttributesRequest instantiates a new InputDataSourceAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputDataSourceAttributesRequestWithDefaults + +`func NewInputDataSourceAttributesRequestWithDefaults() *InputDataSourceAttributesRequest` + +NewInputDataSourceAttributesRequestWithDefaults instantiates a new InputDataSourceAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InputDataSourceAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputDataSourceAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputDataSourceAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *InputDataSourceAttributesRequest) GetAttributes() InputDataSourceRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *InputDataSourceAttributesRequest) GetAttributesOk() (*InputDataSourceRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *InputDataSourceAttributesRequest) SetAttributes(v InputDataSourceRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputDataSourceRequest.md b/azion-api/docs/InputDataSourceRequest.md new file mode 100644 index 0000000..f6011da --- /dev/null +++ b/azion-api/docs/InputDataSourceRequest.md @@ -0,0 +1,51 @@ +# InputDataSourceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DataSource** | **string** | * `http` - Applications * `waf` - WAF Events * `functions` - Functions * `activity` - Activity History | + +## Methods + +### NewInputDataSourceRequest + +`func NewInputDataSourceRequest(dataSource string, ) *InputDataSourceRequest` + +NewInputDataSourceRequest instantiates a new InputDataSourceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputDataSourceRequestWithDefaults + +`func NewInputDataSourceRequestWithDefaults() *InputDataSourceRequest` + +NewInputDataSourceRequestWithDefaults instantiates a new InputDataSourceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDataSource + +`func (o *InputDataSourceRequest) GetDataSource() string` + +GetDataSource returns the DataSource field if non-nil, zero value otherwise. + +### GetDataSourceOk + +`func (o *InputDataSourceRequest) GetDataSourceOk() (*string, bool)` + +GetDataSourceOk returns a tuple with the DataSource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSource + +`func (o *InputDataSourceRequest) SetDataSource(v string)` + +SetDataSource sets DataSource field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputInputDataSourceAttributes.md b/azion-api/docs/InputInputDataSourceAttributes.md new file mode 100644 index 0000000..fc8478e --- /dev/null +++ b/azion-api/docs/InputInputDataSourceAttributes.md @@ -0,0 +1,72 @@ +# InputInputDataSourceAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (raw_logs) | +**Attributes** | [**InputDataSource**](InputDataSource.md) | | + +## Methods + +### NewInputInputDataSourceAttributes + +`func NewInputInputDataSourceAttributes(type_ string, attributes InputDataSource, ) *InputInputDataSourceAttributes` + +NewInputInputDataSourceAttributes instantiates a new InputInputDataSourceAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputInputDataSourceAttributesWithDefaults + +`func NewInputInputDataSourceAttributesWithDefaults() *InputInputDataSourceAttributes` + +NewInputInputDataSourceAttributesWithDefaults instantiates a new InputInputDataSourceAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InputInputDataSourceAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputInputDataSourceAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputInputDataSourceAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *InputInputDataSourceAttributes) GetAttributes() InputDataSource` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *InputInputDataSourceAttributes) GetAttributesOk() (*InputDataSource, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *InputInputDataSourceAttributes) SetAttributes(v InputDataSource)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputInputDataSourceAttributesRequest.md b/azion-api/docs/InputInputDataSourceAttributesRequest.md new file mode 100644 index 0000000..2673bfa --- /dev/null +++ b/azion-api/docs/InputInputDataSourceAttributesRequest.md @@ -0,0 +1,72 @@ +# InputInputDataSourceAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (raw_logs) | +**Attributes** | [**InputDataSourceRequest**](InputDataSourceRequest.md) | | + +## Methods + +### NewInputInputDataSourceAttributesRequest + +`func NewInputInputDataSourceAttributesRequest(type_ string, attributes InputDataSourceRequest, ) *InputInputDataSourceAttributesRequest` + +NewInputInputDataSourceAttributesRequest instantiates a new InputInputDataSourceAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputInputDataSourceAttributesRequestWithDefaults + +`func NewInputInputDataSourceAttributesRequestWithDefaults() *InputInputDataSourceAttributesRequest` + +NewInputInputDataSourceAttributesRequestWithDefaults instantiates a new InputInputDataSourceAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InputInputDataSourceAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputInputDataSourceAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputInputDataSourceAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *InputInputDataSourceAttributesRequest) GetAttributes() InputDataSourceRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *InputInputDataSourceAttributesRequest) GetAttributesOk() (*InputDataSourceRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *InputInputDataSourceAttributesRequest) SetAttributes(v InputDataSourceRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/InputShared.md b/azion-api/docs/InputShared.md new file mode 100644 index 0000000..4953fba --- /dev/null +++ b/azion-api/docs/InputShared.md @@ -0,0 +1,51 @@ +# InputShared + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | + +## Methods + +### NewInputShared + +`func NewInputShared(type_ string, ) *InputShared` + +NewInputShared instantiates a new InputShared object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewInputSharedWithDefaults + +`func NewInputSharedWithDefaults() *InputShared` + +NewInputSharedWithDefaults instantiates a new InputShared object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *InputShared) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *InputShared) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *InputShared) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Integration.md b/azion-api/docs/Integration.md new file mode 100644 index 0000000..fb92dd9 --- /dev/null +++ b/azion-api/docs/Integration.md @@ -0,0 +1,114 @@ +# Integration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Scope** | **string** | | +**ScopeType** | **string** | | +**Provider** | [**Platform**](Platform.md) | | + +## Methods + +### NewIntegration + +`func NewIntegration(id int64, scope string, scopeType string, provider Platform, ) *Integration` + +NewIntegration instantiates a new Integration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewIntegrationWithDefaults + +`func NewIntegrationWithDefaults() *Integration` + +NewIntegrationWithDefaults instantiates a new Integration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Integration) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Integration) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Integration) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetScope + +`func (o *Integration) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *Integration) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *Integration) SetScope(v string)` + +SetScope sets Scope field to given value. + + +### GetScopeType + +`func (o *Integration) GetScopeType() string` + +GetScopeType returns the ScopeType field if non-nil, zero value otherwise. + +### GetScopeTypeOk + +`func (o *Integration) GetScopeTypeOk() (*string, bool)` + +GetScopeTypeOk returns a tuple with the ScopeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScopeType + +`func (o *Integration) SetScopeType(v string)` + +SetScopeType sets ScopeType field to given value. + + +### GetProvider + +`func (o *Integration) GetProvider() Platform` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *Integration) GetProviderOk() (*Platform, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *Integration) SetProvider(v Platform)` + +SetProvider sets Provider field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/JSONAPIErrorObject.md b/azion-api/docs/JSONAPIErrorObject.md new file mode 100644 index 0000000..8748300 --- /dev/null +++ b/azion-api/docs/JSONAPIErrorObject.md @@ -0,0 +1,186 @@ +# JSONAPIErrorObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | Pointer to **string** | The HTTP status code applicable to this problem | [optional] +**Code** | Pointer to **string** | An application-specific error code | [optional] +**Title** | Pointer to **string** | A short, human-readable summary of the problem | [optional] +**Detail** | Pointer to **string** | A human-readable explanation specific to this occurrence of the problem | [optional] +**Source** | Pointer to [**JSONAPIErrorSource**](JSONAPIErrorSource.md) | References to the primary source of the error | [optional] +**Meta** | Pointer to **map[string]interface{}** | Non-standard meta-information about the error | [optional] + +## Methods + +### NewJSONAPIErrorObject + +`func NewJSONAPIErrorObject() *JSONAPIErrorObject` + +NewJSONAPIErrorObject instantiates a new JSONAPIErrorObject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewJSONAPIErrorObjectWithDefaults + +`func NewJSONAPIErrorObjectWithDefaults() *JSONAPIErrorObject` + +NewJSONAPIErrorObjectWithDefaults instantiates a new JSONAPIErrorObject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatus + +`func (o *JSONAPIErrorObject) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *JSONAPIErrorObject) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *JSONAPIErrorObject) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *JSONAPIErrorObject) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetCode + +`func (o *JSONAPIErrorObject) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *JSONAPIErrorObject) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *JSONAPIErrorObject) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *JSONAPIErrorObject) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetTitle + +`func (o *JSONAPIErrorObject) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *JSONAPIErrorObject) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *JSONAPIErrorObject) SetTitle(v string)` + +SetTitle sets Title field to given value. + +### HasTitle + +`func (o *JSONAPIErrorObject) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### GetDetail + +`func (o *JSONAPIErrorObject) GetDetail() string` + +GetDetail returns the Detail field if non-nil, zero value otherwise. + +### GetDetailOk + +`func (o *JSONAPIErrorObject) GetDetailOk() (*string, bool)` + +GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetail + +`func (o *JSONAPIErrorObject) SetDetail(v string)` + +SetDetail sets Detail field to given value. + +### HasDetail + +`func (o *JSONAPIErrorObject) HasDetail() bool` + +HasDetail returns a boolean if a field has been set. + +### GetSource + +`func (o *JSONAPIErrorObject) GetSource() JSONAPIErrorSource` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *JSONAPIErrorObject) GetSourceOk() (*JSONAPIErrorSource, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *JSONAPIErrorObject) SetSource(v JSONAPIErrorSource)` + +SetSource sets Source field to given value. + +### HasSource + +`func (o *JSONAPIErrorObject) HasSource() bool` + +HasSource returns a boolean if a field has been set. + +### GetMeta + +`func (o *JSONAPIErrorObject) GetMeta() map[string]interface{}` + +GetMeta returns the Meta field if non-nil, zero value otherwise. + +### GetMetaOk + +`func (o *JSONAPIErrorObject) GetMetaOk() (*map[string]interface{}, bool)` + +GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMeta + +`func (o *JSONAPIErrorObject) SetMeta(v map[string]interface{})` + +SetMeta sets Meta field to given value. + +### HasMeta + +`func (o *JSONAPIErrorObject) HasMeta() bool` + +HasMeta returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/JSONAPIErrorSource.md b/azion-api/docs/JSONAPIErrorSource.md new file mode 100644 index 0000000..e8eed3b --- /dev/null +++ b/azion-api/docs/JSONAPIErrorSource.md @@ -0,0 +1,108 @@ +# JSONAPIErrorSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Pointer** | Pointer to **string** | JSON Pointer to the value in the request document that caused the error | [optional] +**Parameter** | Pointer to **string** | URI query parameter that caused the error | [optional] +**Header** | Pointer to **string** | Request header name that caused the error | [optional] + +## Methods + +### NewJSONAPIErrorSource + +`func NewJSONAPIErrorSource() *JSONAPIErrorSource` + +NewJSONAPIErrorSource instantiates a new JSONAPIErrorSource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewJSONAPIErrorSourceWithDefaults + +`func NewJSONAPIErrorSourceWithDefaults() *JSONAPIErrorSource` + +NewJSONAPIErrorSourceWithDefaults instantiates a new JSONAPIErrorSource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPointer + +`func (o *JSONAPIErrorSource) GetPointer() string` + +GetPointer returns the Pointer field if non-nil, zero value otherwise. + +### GetPointerOk + +`func (o *JSONAPIErrorSource) GetPointerOk() (*string, bool)` + +GetPointerOk returns a tuple with the Pointer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPointer + +`func (o *JSONAPIErrorSource) SetPointer(v string)` + +SetPointer sets Pointer field to given value. + +### HasPointer + +`func (o *JSONAPIErrorSource) HasPointer() bool` + +HasPointer returns a boolean if a field has been set. + +### GetParameter + +`func (o *JSONAPIErrorSource) GetParameter() string` + +GetParameter returns the Parameter field if non-nil, zero value otherwise. + +### GetParameterOk + +`func (o *JSONAPIErrorSource) GetParameterOk() (*string, bool)` + +GetParameterOk returns a tuple with the Parameter field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParameter + +`func (o *JSONAPIErrorSource) SetParameter(v string)` + +SetParameter sets Parameter field to given value. + +### HasParameter + +`func (o *JSONAPIErrorSource) HasParameter() bool` + +HasParameter returns a boolean if a field has been set. + +### GetHeader + +`func (o *JSONAPIErrorSource) GetHeader() string` + +GetHeader returns the Header field if non-nil, zero value otherwise. + +### GetHeaderOk + +`func (o *JSONAPIErrorSource) GetHeaderOk() (*string, bool)` + +GetHeaderOk returns a tuple with the Header field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeader + +`func (o *JSONAPIErrorSource) SetHeader(v string)` + +SetHeader sets Header field to given value. + +### HasHeader + +`func (o *JSONAPIErrorSource) HasHeader() bool` + +HasHeader returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KBAskRequest.md b/azion-api/docs/KBAskRequest.md new file mode 100644 index 0000000..830c9be --- /dev/null +++ b/azion-api/docs/KBAskRequest.md @@ -0,0 +1,113 @@ +# KBAskRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Question** | **string** | | +**TopK** | Pointer to **int64** | | [optional] +**Model** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewKBAskRequest + +`func NewKBAskRequest(question string, ) *KBAskRequest` + +NewKBAskRequest instantiates a new KBAskRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKBAskRequestWithDefaults + +`func NewKBAskRequestWithDefaults() *KBAskRequest` + +NewKBAskRequestWithDefaults instantiates a new KBAskRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuestion + +`func (o *KBAskRequest) GetQuestion() string` + +GetQuestion returns the Question field if non-nil, zero value otherwise. + +### GetQuestionOk + +`func (o *KBAskRequest) GetQuestionOk() (*string, bool)` + +GetQuestionOk returns a tuple with the Question field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuestion + +`func (o *KBAskRequest) SetQuestion(v string)` + +SetQuestion sets Question field to given value. + + +### GetTopK + +`func (o *KBAskRequest) GetTopK() int64` + +GetTopK returns the TopK field if non-nil, zero value otherwise. + +### GetTopKOk + +`func (o *KBAskRequest) GetTopKOk() (*int64, bool)` + +GetTopKOk returns a tuple with the TopK field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopK + +`func (o *KBAskRequest) SetTopK(v int64)` + +SetTopK sets TopK field to given value. + +### HasTopK + +`func (o *KBAskRequest) HasTopK() bool` + +HasTopK returns a boolean if a field has been set. + +### GetModel + +`func (o *KBAskRequest) GetModel() string` + +GetModel returns the Model field if non-nil, zero value otherwise. + +### GetModelOk + +`func (o *KBAskRequest) GetModelOk() (*string, bool)` + +GetModelOk returns a tuple with the Model field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModel + +`func (o *KBAskRequest) SetModel(v string)` + +SetModel sets Model field to given value. + +### HasModel + +`func (o *KBAskRequest) HasModel() bool` + +HasModel returns a boolean if a field has been set. + +### SetModelNil + +`func (o *KBAskRequest) SetModelNil(b bool)` + + SetModelNil sets the value for Model to be an explicit nil + +### UnsetModel +`func (o *KBAskRequest) UnsetModel()` + +UnsetModel ensures that no value is present for Model, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KBAskResponse.md b/azion-api/docs/KBAskResponse.md new file mode 100644 index 0000000..dfab24a --- /dev/null +++ b/azion-api/docs/KBAskResponse.md @@ -0,0 +1,72 @@ +# KBAskResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Answer** | **string** | | +**Context** | [**[]KBQueryResult**](KBQueryResult.md) | | + +## Methods + +### NewKBAskResponse + +`func NewKBAskResponse(answer string, context []KBQueryResult, ) *KBAskResponse` + +NewKBAskResponse instantiates a new KBAskResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKBAskResponseWithDefaults + +`func NewKBAskResponseWithDefaults() *KBAskResponse` + +NewKBAskResponseWithDefaults instantiates a new KBAskResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAnswer + +`func (o *KBAskResponse) GetAnswer() string` + +GetAnswer returns the Answer field if non-nil, zero value otherwise. + +### GetAnswerOk + +`func (o *KBAskResponse) GetAnswerOk() (*string, bool)` + +GetAnswerOk returns a tuple with the Answer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAnswer + +`func (o *KBAskResponse) SetAnswer(v string)` + +SetAnswer sets Answer field to given value. + + +### GetContext + +`func (o *KBAskResponse) GetContext() []KBQueryResult` + +GetContext returns the Context field if non-nil, zero value otherwise. + +### GetContextOk + +`func (o *KBAskResponse) GetContextOk() (*[]KBQueryResult, bool)` + +GetContextOk returns a tuple with the Context field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContext + +`func (o *KBAskResponse) SetContext(v []KBQueryResult)` + +SetContext sets Context field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KBQueryRequest.md b/azion-api/docs/KBQueryRequest.md new file mode 100644 index 0000000..4337548 --- /dev/null +++ b/azion-api/docs/KBQueryRequest.md @@ -0,0 +1,77 @@ +# KBQueryRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | **string** | | +**TopK** | Pointer to **int64** | | [optional] + +## Methods + +### NewKBQueryRequest + +`func NewKBQueryRequest(query string, ) *KBQueryRequest` + +NewKBQueryRequest instantiates a new KBQueryRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKBQueryRequestWithDefaults + +`func NewKBQueryRequestWithDefaults() *KBQueryRequest` + +NewKBQueryRequestWithDefaults instantiates a new KBQueryRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetQuery + +`func (o *KBQueryRequest) GetQuery() string` + +GetQuery returns the Query field if non-nil, zero value otherwise. + +### GetQueryOk + +`func (o *KBQueryRequest) GetQueryOk() (*string, bool)` + +GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQuery + +`func (o *KBQueryRequest) SetQuery(v string)` + +SetQuery sets Query field to given value. + + +### GetTopK + +`func (o *KBQueryRequest) GetTopK() int64` + +GetTopK returns the TopK field if non-nil, zero value otherwise. + +### GetTopKOk + +`func (o *KBQueryRequest) GetTopKOk() (*int64, bool)` + +GetTopKOk returns a tuple with the TopK field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTopK + +`func (o *KBQueryRequest) SetTopK(v int64)` + +SetTopK sets TopK field to given value. + +### HasTopK + +`func (o *KBQueryRequest) HasTopK() bool` + +HasTopK returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KBQueryResponse.md b/azion-api/docs/KBQueryResponse.md new file mode 100644 index 0000000..1edfe01 --- /dev/null +++ b/azion-api/docs/KBQueryResponse.md @@ -0,0 +1,51 @@ +# KBQueryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]KBQueryResult**](KBQueryResult.md) | | + +## Methods + +### NewKBQueryResponse + +`func NewKBQueryResponse(results []KBQueryResult, ) *KBQueryResponse` + +NewKBQueryResponse instantiates a new KBQueryResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKBQueryResponseWithDefaults + +`func NewKBQueryResponseWithDefaults() *KBQueryResponse` + +NewKBQueryResponseWithDefaults instantiates a new KBQueryResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *KBQueryResponse) GetResults() []KBQueryResult` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *KBQueryResponse) GetResultsOk() (*[]KBQueryResult, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *KBQueryResponse) SetResults(v []KBQueryResult)` + +SetResults sets Results field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KBQueryResult.md b/azion-api/docs/KBQueryResult.md new file mode 100644 index 0000000..3403ff3 --- /dev/null +++ b/azion-api/docs/KBQueryResult.md @@ -0,0 +1,171 @@ +# KBQueryResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ChunkId** | **string** | | +**Title** | **string** | | +**Content** | **string** | | +**Source** | **string** | | +**Similarity** | Pointer to **NullableFloat64** | | [optional] +**SearchType** | **string** | | + +## Methods + +### NewKBQueryResult + +`func NewKBQueryResult(chunkId string, title string, content string, source string, searchType string, ) *KBQueryResult` + +NewKBQueryResult instantiates a new KBQueryResult object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKBQueryResultWithDefaults + +`func NewKBQueryResultWithDefaults() *KBQueryResult` + +NewKBQueryResultWithDefaults instantiates a new KBQueryResult object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetChunkId + +`func (o *KBQueryResult) GetChunkId() string` + +GetChunkId returns the ChunkId field if non-nil, zero value otherwise. + +### GetChunkIdOk + +`func (o *KBQueryResult) GetChunkIdOk() (*string, bool)` + +GetChunkIdOk returns a tuple with the ChunkId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChunkId + +`func (o *KBQueryResult) SetChunkId(v string)` + +SetChunkId sets ChunkId field to given value. + + +### GetTitle + +`func (o *KBQueryResult) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *KBQueryResult) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *KBQueryResult) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetContent + +`func (o *KBQueryResult) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *KBQueryResult) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *KBQueryResult) SetContent(v string)` + +SetContent sets Content field to given value. + + +### GetSource + +`func (o *KBQueryResult) GetSource() string` + +GetSource returns the Source field if non-nil, zero value otherwise. + +### GetSourceOk + +`func (o *KBQueryResult) GetSourceOk() (*string, bool)` + +GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSource + +`func (o *KBQueryResult) SetSource(v string)` + +SetSource sets Source field to given value. + + +### GetSimilarity + +`func (o *KBQueryResult) GetSimilarity() float64` + +GetSimilarity returns the Similarity field if non-nil, zero value otherwise. + +### GetSimilarityOk + +`func (o *KBQueryResult) GetSimilarityOk() (*float64, bool)` + +GetSimilarityOk returns a tuple with the Similarity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSimilarity + +`func (o *KBQueryResult) SetSimilarity(v float64)` + +SetSimilarity sets Similarity field to given value. + +### HasSimilarity + +`func (o *KBQueryResult) HasSimilarity() bool` + +HasSimilarity returns a boolean if a field has been set. + +### SetSimilarityNil + +`func (o *KBQueryResult) SetSimilarityNil(b bool)` + + SetSimilarityNil sets the value for Similarity to be an explicit nil + +### UnsetSimilarity +`func (o *KBQueryResult) UnsetSimilarity()` + +UnsetSimilarity ensures that no value is present for Similarity, not even an explicit nil +### GetSearchType + +`func (o *KBQueryResult) GetSearchType() string` + +GetSearchType returns the SearchType field if non-nil, zero value otherwise. + +### GetSearchTypeOk + +`func (o *KBQueryResult) GetSearchTypeOk() (*string, bool)` + +GetSearchTypeOk returns a tuple with the SearchType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSearchType + +`func (o *KBQueryResult) SetSearchType(v string)` + +SetSearchType sets SearchType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KVNamespacesAPI.md b/azion-api/docs/KVNamespacesAPI.md new file mode 100644 index 0000000..fa21125 --- /dev/null +++ b/azion-api/docs/KVNamespacesAPI.md @@ -0,0 +1,219 @@ +# \KVNamespacesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateNamespace**](KVNamespacesAPI.md#CreateNamespace) | **Post** /workspace/kv/namespaces | Create namespace +[**ListNamespaces**](KVNamespacesAPI.md#ListNamespaces) | **Get** /workspace/kv/namespaces | List namespaces +[**RetrieveNamespace**](KVNamespacesAPI.md#RetrieveNamespace) | **Get** /workspace/kv/namespaces/{namespace} | Retrieve namespace + + + +## CreateNamespace + +> Namespace CreateNamespace(ctx).NamespaceCreateRequest(namespaceCreateRequest).Execute() + +Create namespace + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + namespaceCreateRequest := *openapiclient.NewNamespaceCreateRequest("Name_example") // NamespaceCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KVNamespacesAPI.CreateNamespace(context.Background()).NamespaceCreateRequest(namespaceCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KVNamespacesAPI.CreateNamespace``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateNamespace`: Namespace + fmt.Fprintf(os.Stdout, "Response from `KVNamespacesAPI.CreateNamespace`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateNamespaceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **namespaceCreateRequest** | [**NamespaceCreateRequest**](NamespaceCreateRequest.md) | | + +### Return type + +[**Namespace**](Namespace.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNamespaces + +> NamespaceList ListNamespaces(ctx).Fields(fields).Page(page).PageSize(pageSize).Execute() + +List namespaces + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KVNamespacesAPI.ListNamespaces(context.Background()).Fields(fields).Page(page).PageSize(pageSize).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KVNamespacesAPI.ListNamespaces``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNamespaces`: NamespaceList + fmt.Fprintf(os.Stdout, "Response from `KVNamespacesAPI.ListNamespaces`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListNamespacesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + +### Return type + +[**NamespaceList**](NamespaceList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveNamespace + +> Namespace RetrieveNamespace(ctx, namespace).Fields(fields).Execute() + +Retrieve namespace + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + namespace := "namespace_example" // string | The unique identifier (name) of the namespace + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.KVNamespacesAPI.RetrieveNamespace(context.Background(), namespace).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `KVNamespacesAPI.RetrieveNamespace``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveNamespace`: Namespace + fmt.Fprintf(os.Stdout, "Response from `KVNamespacesAPI.RetrieveNamespace`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**namespace** | **string** | The unique identifier (name) of the namespace | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveNamespaceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**Namespace**](Namespace.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/KafkaEndpoint.md b/azion-api/docs/KafkaEndpoint.md new file mode 100644 index 0000000..15be31b --- /dev/null +++ b/azion-api/docs/KafkaEndpoint.md @@ -0,0 +1,114 @@ +# KafkaEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BootstrapServers** | **string** | | +**KafkaTopic** | **string** | | +**UseTls** | **bool** | | +**Type** | **string** | Type identifier for this endpoint (kafka) | + +## Methods + +### NewKafkaEndpoint + +`func NewKafkaEndpoint(bootstrapServers string, kafkaTopic string, useTls bool, type_ string, ) *KafkaEndpoint` + +NewKafkaEndpoint instantiates a new KafkaEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKafkaEndpointWithDefaults + +`func NewKafkaEndpointWithDefaults() *KafkaEndpoint` + +NewKafkaEndpointWithDefaults instantiates a new KafkaEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBootstrapServers + +`func (o *KafkaEndpoint) GetBootstrapServers() string` + +GetBootstrapServers returns the BootstrapServers field if non-nil, zero value otherwise. + +### GetBootstrapServersOk + +`func (o *KafkaEndpoint) GetBootstrapServersOk() (*string, bool)` + +GetBootstrapServersOk returns a tuple with the BootstrapServers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBootstrapServers + +`func (o *KafkaEndpoint) SetBootstrapServers(v string)` + +SetBootstrapServers sets BootstrapServers field to given value. + + +### GetKafkaTopic + +`func (o *KafkaEndpoint) GetKafkaTopic() string` + +GetKafkaTopic returns the KafkaTopic field if non-nil, zero value otherwise. + +### GetKafkaTopicOk + +`func (o *KafkaEndpoint) GetKafkaTopicOk() (*string, bool)` + +GetKafkaTopicOk returns a tuple with the KafkaTopic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaTopic + +`func (o *KafkaEndpoint) SetKafkaTopic(v string)` + +SetKafkaTopic sets KafkaTopic field to given value. + + +### GetUseTls + +`func (o *KafkaEndpoint) GetUseTls() bool` + +GetUseTls returns the UseTls field if non-nil, zero value otherwise. + +### GetUseTlsOk + +`func (o *KafkaEndpoint) GetUseTlsOk() (*bool, bool)` + +GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTls + +`func (o *KafkaEndpoint) SetUseTls(v bool)` + +SetUseTls sets UseTls field to given value. + + +### GetType + +`func (o *KafkaEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *KafkaEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *KafkaEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KafkaEndpointRequest.md b/azion-api/docs/KafkaEndpointRequest.md new file mode 100644 index 0000000..bd06151 --- /dev/null +++ b/azion-api/docs/KafkaEndpointRequest.md @@ -0,0 +1,114 @@ +# KafkaEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BootstrapServers** | **string** | | +**KafkaTopic** | **string** | | +**UseTls** | **bool** | | +**Type** | **string** | Type identifier for this endpoint (kafka) | + +## Methods + +### NewKafkaEndpointRequest + +`func NewKafkaEndpointRequest(bootstrapServers string, kafkaTopic string, useTls bool, type_ string, ) *KafkaEndpointRequest` + +NewKafkaEndpointRequest instantiates a new KafkaEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKafkaEndpointRequestWithDefaults + +`func NewKafkaEndpointRequestWithDefaults() *KafkaEndpointRequest` + +NewKafkaEndpointRequestWithDefaults instantiates a new KafkaEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetBootstrapServers + +`func (o *KafkaEndpointRequest) GetBootstrapServers() string` + +GetBootstrapServers returns the BootstrapServers field if non-nil, zero value otherwise. + +### GetBootstrapServersOk + +`func (o *KafkaEndpointRequest) GetBootstrapServersOk() (*string, bool)` + +GetBootstrapServersOk returns a tuple with the BootstrapServers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBootstrapServers + +`func (o *KafkaEndpointRequest) SetBootstrapServers(v string)` + +SetBootstrapServers sets BootstrapServers field to given value. + + +### GetKafkaTopic + +`func (o *KafkaEndpointRequest) GetKafkaTopic() string` + +GetKafkaTopic returns the KafkaTopic field if non-nil, zero value otherwise. + +### GetKafkaTopicOk + +`func (o *KafkaEndpointRequest) GetKafkaTopicOk() (*string, bool)` + +GetKafkaTopicOk returns a tuple with the KafkaTopic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaTopic + +`func (o *KafkaEndpointRequest) SetKafkaTopic(v string)` + +SetKafkaTopic sets KafkaTopic field to given value. + + +### GetUseTls + +`func (o *KafkaEndpointRequest) GetUseTls() bool` + +GetUseTls returns the UseTls field if non-nil, zero value otherwise. + +### GetUseTlsOk + +`func (o *KafkaEndpointRequest) GetUseTlsOk() (*bool, bool)` + +GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTls + +`func (o *KafkaEndpointRequest) SetUseTls(v bool)` + +SetUseTls sets UseTls field to given value. + + +### GetType + +`func (o *KafkaEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *KafkaEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *KafkaEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KnowledgeBase.md b/azion-api/docs/KnowledgeBase.md new file mode 100644 index 0000000..17b1d3a --- /dev/null +++ b/azion-api/docs/KnowledgeBase.md @@ -0,0 +1,260 @@ +# KnowledgeBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**KbId** | **int64** | | +**AccountId** | **NullableInt64** | | +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**EmbeddingModel** | Pointer to **string** | * `text-embedding-3-small` - text-embedding-3-small | [optional] +**SqlId** | **string** | | +**SqlDbName** | **string** | | +**StorageName** | **string** | | +**LastModified** | **time.Time** | | +**LastEditor** | **string** | | + +## Methods + +### NewKnowledgeBase + +`func NewKnowledgeBase(kbId int64, accountId NullableInt64, name string, sqlId string, sqlDbName string, storageName string, lastModified time.Time, lastEditor string, ) *KnowledgeBase` + +NewKnowledgeBase instantiates a new KnowledgeBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKnowledgeBaseWithDefaults + +`func NewKnowledgeBaseWithDefaults() *KnowledgeBase` + +NewKnowledgeBaseWithDefaults instantiates a new KnowledgeBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetKbId + +`func (o *KnowledgeBase) GetKbId() int64` + +GetKbId returns the KbId field if non-nil, zero value otherwise. + +### GetKbIdOk + +`func (o *KnowledgeBase) GetKbIdOk() (*int64, bool)` + +GetKbIdOk returns a tuple with the KbId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKbId + +`func (o *KnowledgeBase) SetKbId(v int64)` + +SetKbId sets KbId field to given value. + + +### GetAccountId + +`func (o *KnowledgeBase) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *KnowledgeBase) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *KnowledgeBase) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### SetAccountIdNil + +`func (o *KnowledgeBase) SetAccountIdNil(b bool)` + + SetAccountIdNil sets the value for AccountId to be an explicit nil + +### UnsetAccountId +`func (o *KnowledgeBase) UnsetAccountId()` + +UnsetAccountId ensures that no value is present for AccountId, not even an explicit nil +### GetName + +`func (o *KnowledgeBase) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *KnowledgeBase) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *KnowledgeBase) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *KnowledgeBase) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *KnowledgeBase) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *KnowledgeBase) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *KnowledgeBase) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetEmbeddingModel + +`func (o *KnowledgeBase) GetEmbeddingModel() string` + +GetEmbeddingModel returns the EmbeddingModel field if non-nil, zero value otherwise. + +### GetEmbeddingModelOk + +`func (o *KnowledgeBase) GetEmbeddingModelOk() (*string, bool)` + +GetEmbeddingModelOk returns a tuple with the EmbeddingModel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmbeddingModel + +`func (o *KnowledgeBase) SetEmbeddingModel(v string)` + +SetEmbeddingModel sets EmbeddingModel field to given value. + +### HasEmbeddingModel + +`func (o *KnowledgeBase) HasEmbeddingModel() bool` + +HasEmbeddingModel returns a boolean if a field has been set. + +### GetSqlId + +`func (o *KnowledgeBase) GetSqlId() string` + +GetSqlId returns the SqlId field if non-nil, zero value otherwise. + +### GetSqlIdOk + +`func (o *KnowledgeBase) GetSqlIdOk() (*string, bool)` + +GetSqlIdOk returns a tuple with the SqlId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSqlId + +`func (o *KnowledgeBase) SetSqlId(v string)` + +SetSqlId sets SqlId field to given value. + + +### GetSqlDbName + +`func (o *KnowledgeBase) GetSqlDbName() string` + +GetSqlDbName returns the SqlDbName field if non-nil, zero value otherwise. + +### GetSqlDbNameOk + +`func (o *KnowledgeBase) GetSqlDbNameOk() (*string, bool)` + +GetSqlDbNameOk returns a tuple with the SqlDbName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSqlDbName + +`func (o *KnowledgeBase) SetSqlDbName(v string)` + +SetSqlDbName sets SqlDbName field to given value. + + +### GetStorageName + +`func (o *KnowledgeBase) GetStorageName() string` + +GetStorageName returns the StorageName field if non-nil, zero value otherwise. + +### GetStorageNameOk + +`func (o *KnowledgeBase) GetStorageNameOk() (*string, bool)` + +GetStorageNameOk returns a tuple with the StorageName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStorageName + +`func (o *KnowledgeBase) SetStorageName(v string)` + +SetStorageName sets StorageName field to given value. + + +### GetLastModified + +`func (o *KnowledgeBase) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *KnowledgeBase) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *KnowledgeBase) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetLastEditor + +`func (o *KnowledgeBase) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *KnowledgeBase) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *KnowledgeBase) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/KnowledgeBaseRequest.md b/azion-api/docs/KnowledgeBaseRequest.md new file mode 100644 index 0000000..4f892f3 --- /dev/null +++ b/azion-api/docs/KnowledgeBaseRequest.md @@ -0,0 +1,103 @@ +# KnowledgeBaseRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**EmbeddingModel** | Pointer to **string** | * `text-embedding-3-small` - text-embedding-3-small | [optional] + +## Methods + +### NewKnowledgeBaseRequest + +`func NewKnowledgeBaseRequest(name string, ) *KnowledgeBaseRequest` + +NewKnowledgeBaseRequest instantiates a new KnowledgeBaseRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewKnowledgeBaseRequestWithDefaults + +`func NewKnowledgeBaseRequestWithDefaults() *KnowledgeBaseRequest` + +NewKnowledgeBaseRequestWithDefaults instantiates a new KnowledgeBaseRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *KnowledgeBaseRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *KnowledgeBaseRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *KnowledgeBaseRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *KnowledgeBaseRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *KnowledgeBaseRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *KnowledgeBaseRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *KnowledgeBaseRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetEmbeddingModel + +`func (o *KnowledgeBaseRequest) GetEmbeddingModel() string` + +GetEmbeddingModel returns the EmbeddingModel field if non-nil, zero value otherwise. + +### GetEmbeddingModelOk + +`func (o *KnowledgeBaseRequest) GetEmbeddingModelOk() (*string, bool)` + +GetEmbeddingModelOk returns a tuple with the EmbeddingModel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmbeddingModel + +`func (o *KnowledgeBaseRequest) SetEmbeddingModel(v string)` + +SetEmbeddingModel sets EmbeddingModel field to given value. + +### HasEmbeddingModel + +`func (o *KnowledgeBaseRequest) HasEmbeddingModel() bool` + +HasEmbeddingModel returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LargeFileCacheModule.md b/azion-api/docs/LargeFileCacheModule.md new file mode 100644 index 0000000..06d786f --- /dev/null +++ b/azion-api/docs/LargeFileCacheModule.md @@ -0,0 +1,82 @@ +# LargeFileCacheModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] +**Offset** | Pointer to **int64** | | [optional] + +## Methods + +### NewLargeFileCacheModule + +`func NewLargeFileCacheModule() *LargeFileCacheModule` + +NewLargeFileCacheModule instantiates a new LargeFileCacheModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLargeFileCacheModuleWithDefaults + +`func NewLargeFileCacheModuleWithDefaults() *LargeFileCacheModule` + +NewLargeFileCacheModuleWithDefaults instantiates a new LargeFileCacheModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *LargeFileCacheModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *LargeFileCacheModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *LargeFileCacheModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *LargeFileCacheModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetOffset + +`func (o *LargeFileCacheModule) GetOffset() int64` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *LargeFileCacheModule) GetOffsetOk() (*int64, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *LargeFileCacheModule) SetOffset(v int64)` + +SetOffset sets Offset field to given value. + +### HasOffset + +`func (o *LargeFileCacheModule) HasOffset() bool` + +HasOffset returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LargeFileCacheModuleRequest.md b/azion-api/docs/LargeFileCacheModuleRequest.md new file mode 100644 index 0000000..fb2aa16 --- /dev/null +++ b/azion-api/docs/LargeFileCacheModuleRequest.md @@ -0,0 +1,82 @@ +# LargeFileCacheModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] +**Offset** | Pointer to **int64** | | [optional] + +## Methods + +### NewLargeFileCacheModuleRequest + +`func NewLargeFileCacheModuleRequest() *LargeFileCacheModuleRequest` + +NewLargeFileCacheModuleRequest instantiates a new LargeFileCacheModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLargeFileCacheModuleRequestWithDefaults + +`func NewLargeFileCacheModuleRequestWithDefaults() *LargeFileCacheModuleRequest` + +NewLargeFileCacheModuleRequestWithDefaults instantiates a new LargeFileCacheModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *LargeFileCacheModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *LargeFileCacheModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *LargeFileCacheModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *LargeFileCacheModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetOffset + +`func (o *LargeFileCacheModuleRequest) GetOffset() int64` + +GetOffset returns the Offset field if non-nil, zero value otherwise. + +### GetOffsetOk + +`func (o *LargeFileCacheModuleRequest) GetOffsetOk() (*int64, bool)` + +GetOffsetOk returns a tuple with the Offset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOffset + +`func (o *LargeFileCacheModuleRequest) SetOffset(v int64)` + +SetOffset sets Offset field to given value. + +### HasOffset + +`func (o *LargeFileCacheModuleRequest) HasOffset() bool` + +HasOffset returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LibraryReportRequest.md b/azion-api/docs/LibraryReportRequest.md new file mode 100644 index 0000000..86bef28 --- /dev/null +++ b/azion-api/docs/LibraryReportRequest.md @@ -0,0 +1,317 @@ +# LibraryReportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | | +**Type** | **string** | * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. | +**XAxis** | Pointer to **string** | | [optional] +**AggregationType** | **string** | * `avg` - Aggregation by average. * `sum` - Aggregation by sum. | +**DataUnit** | **string** | * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. | +**Queries** | [**[]BaseQueryRequest**](BaseQueryRequest.md) | | +**Library** | Pointer to **bool** | | [optional] +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | +**Rotated** | Pointer to **bool** | | [optional] +**ComparisonType** | Pointer to **string** | * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. | [optional] +**HelpCenterPath** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewLibraryReportRequest + +`func NewLibraryReportRequest(description string, type_ string, aggregationType string, dataUnit string, queries []BaseQueryRequest, name string, scope string, ) *LibraryReportRequest` + +NewLibraryReportRequest instantiates a new LibraryReportRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLibraryReportRequestWithDefaults + +`func NewLibraryReportRequestWithDefaults() *LibraryReportRequest` + +NewLibraryReportRequestWithDefaults instantiates a new LibraryReportRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *LibraryReportRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *LibraryReportRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *LibraryReportRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *LibraryReportRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *LibraryReportRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *LibraryReportRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetXAxis + +`func (o *LibraryReportRequest) GetXAxis() string` + +GetXAxis returns the XAxis field if non-nil, zero value otherwise. + +### GetXAxisOk + +`func (o *LibraryReportRequest) GetXAxisOk() (*string, bool)` + +GetXAxisOk returns a tuple with the XAxis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXAxis + +`func (o *LibraryReportRequest) SetXAxis(v string)` + +SetXAxis sets XAxis field to given value. + +### HasXAxis + +`func (o *LibraryReportRequest) HasXAxis() bool` + +HasXAxis returns a boolean if a field has been set. + +### GetAggregationType + +`func (o *LibraryReportRequest) GetAggregationType() string` + +GetAggregationType returns the AggregationType field if non-nil, zero value otherwise. + +### GetAggregationTypeOk + +`func (o *LibraryReportRequest) GetAggregationTypeOk() (*string, bool)` + +GetAggregationTypeOk returns a tuple with the AggregationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregationType + +`func (o *LibraryReportRequest) SetAggregationType(v string)` + +SetAggregationType sets AggregationType field to given value. + + +### GetDataUnit + +`func (o *LibraryReportRequest) GetDataUnit() string` + +GetDataUnit returns the DataUnit field if non-nil, zero value otherwise. + +### GetDataUnitOk + +`func (o *LibraryReportRequest) GetDataUnitOk() (*string, bool)` + +GetDataUnitOk returns a tuple with the DataUnit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataUnit + +`func (o *LibraryReportRequest) SetDataUnit(v string)` + +SetDataUnit sets DataUnit field to given value. + + +### GetQueries + +`func (o *LibraryReportRequest) GetQueries() []BaseQueryRequest` + +GetQueries returns the Queries field if non-nil, zero value otherwise. + +### GetQueriesOk + +`func (o *LibraryReportRequest) GetQueriesOk() (*[]BaseQueryRequest, bool)` + +GetQueriesOk returns a tuple with the Queries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueries + +`func (o *LibraryReportRequest) SetQueries(v []BaseQueryRequest)` + +SetQueries sets Queries field to given value. + + +### GetLibrary + +`func (o *LibraryReportRequest) GetLibrary() bool` + +GetLibrary returns the Library field if non-nil, zero value otherwise. + +### GetLibraryOk + +`func (o *LibraryReportRequest) GetLibraryOk() (*bool, bool)` + +GetLibraryOk returns a tuple with the Library field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibrary + +`func (o *LibraryReportRequest) SetLibrary(v bool)` + +SetLibrary sets Library field to given value. + +### HasLibrary + +`func (o *LibraryReportRequest) HasLibrary() bool` + +HasLibrary returns a boolean if a field has been set. + +### GetName + +`func (o *LibraryReportRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *LibraryReportRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *LibraryReportRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *LibraryReportRequest) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *LibraryReportRequest) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *LibraryReportRequest) SetScope(v string)` + +SetScope sets Scope field to given value. + + +### GetRotated + +`func (o *LibraryReportRequest) GetRotated() bool` + +GetRotated returns the Rotated field if non-nil, zero value otherwise. + +### GetRotatedOk + +`func (o *LibraryReportRequest) GetRotatedOk() (*bool, bool)` + +GetRotatedOk returns a tuple with the Rotated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRotated + +`func (o *LibraryReportRequest) SetRotated(v bool)` + +SetRotated sets Rotated field to given value. + +### HasRotated + +`func (o *LibraryReportRequest) HasRotated() bool` + +HasRotated returns a boolean if a field has been set. + +### GetComparisonType + +`func (o *LibraryReportRequest) GetComparisonType() string` + +GetComparisonType returns the ComparisonType field if non-nil, zero value otherwise. + +### GetComparisonTypeOk + +`func (o *LibraryReportRequest) GetComparisonTypeOk() (*string, bool)` + +GetComparisonTypeOk returns a tuple with the ComparisonType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComparisonType + +`func (o *LibraryReportRequest) SetComparisonType(v string)` + +SetComparisonType sets ComparisonType field to given value. + +### HasComparisonType + +`func (o *LibraryReportRequest) HasComparisonType() bool` + +HasComparisonType returns a boolean if a field has been set. + +### GetHelpCenterPath + +`func (o *LibraryReportRequest) GetHelpCenterPath() string` + +GetHelpCenterPath returns the HelpCenterPath field if non-nil, zero value otherwise. + +### GetHelpCenterPathOk + +`func (o *LibraryReportRequest) GetHelpCenterPathOk() (*string, bool)` + +GetHelpCenterPathOk returns a tuple with the HelpCenterPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHelpCenterPath + +`func (o *LibraryReportRequest) SetHelpCenterPath(v string)` + +SetHelpCenterPath sets HelpCenterPath field to given value. + +### HasHelpCenterPath + +`func (o *LibraryReportRequest) HasHelpCenterPath() bool` + +HasHelpCenterPath returns a boolean if a field has been set. + +### SetHelpCenterPathNil + +`func (o *LibraryReportRequest) SetHelpCenterPathNil(b bool)` + + SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil + +### UnsetHelpCenterPath +`func (o *LibraryReportRequest) UnsetHelpCenterPath()` + +UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LoadBalancerModule.md b/azion-api/docs/LoadBalancerModule.md new file mode 100644 index 0000000..5374af7 --- /dev/null +++ b/azion-api/docs/LoadBalancerModule.md @@ -0,0 +1,92 @@ +# LoadBalancerModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] +**Config** | Pointer to [**NullableLoadBalancerModuleConfig**](LoadBalancerModuleConfig.md) | | [optional] + +## Methods + +### NewLoadBalancerModule + +`func NewLoadBalancerModule() *LoadBalancerModule` + +NewLoadBalancerModule instantiates a new LoadBalancerModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerModuleWithDefaults + +`func NewLoadBalancerModuleWithDefaults() *LoadBalancerModule` + +NewLoadBalancerModuleWithDefaults instantiates a new LoadBalancerModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *LoadBalancerModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *LoadBalancerModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *LoadBalancerModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *LoadBalancerModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetConfig + +`func (o *LoadBalancerModule) GetConfig() LoadBalancerModuleConfig` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *LoadBalancerModule) GetConfigOk() (*LoadBalancerModuleConfig, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *LoadBalancerModule) SetConfig(v LoadBalancerModuleConfig)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *LoadBalancerModule) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *LoadBalancerModule) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *LoadBalancerModule) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LoadBalancerModuleConfig.md b/azion-api/docs/LoadBalancerModuleConfig.md new file mode 100644 index 0000000..9b59606 --- /dev/null +++ b/azion-api/docs/LoadBalancerModuleConfig.md @@ -0,0 +1,134 @@ +# LoadBalancerModuleConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | Pointer to **string** | Load balancing method to use (e.g., round-robin, least_conn). * `round_robin` - Round Robin * `least_conn` - Least Connections * `ip_hash` - IP Hash | [optional] +**MaxRetries** | Pointer to **int64** | Maximum number of retry attempts on connection failure. | [optional] +**ConnectionTimeout** | Pointer to **int64** | Maximum time (in seconds) to wait for a connection to be established. | [optional] +**ReadWriteTimeout** | Pointer to **int64** | Maximum time (in seconds) to wait for data read/write after connection. | [optional] + +## Methods + +### NewLoadBalancerModuleConfig + +`func NewLoadBalancerModuleConfig() *LoadBalancerModuleConfig` + +NewLoadBalancerModuleConfig instantiates a new LoadBalancerModuleConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerModuleConfigWithDefaults + +`func NewLoadBalancerModuleConfigWithDefaults() *LoadBalancerModuleConfig` + +NewLoadBalancerModuleConfigWithDefaults instantiates a new LoadBalancerModuleConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *LoadBalancerModuleConfig) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancerModuleConfig) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancerModuleConfig) SetMethod(v string)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LoadBalancerModuleConfig) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetMaxRetries + +`func (o *LoadBalancerModuleConfig) GetMaxRetries() int64` + +GetMaxRetries returns the MaxRetries field if non-nil, zero value otherwise. + +### GetMaxRetriesOk + +`func (o *LoadBalancerModuleConfig) GetMaxRetriesOk() (*int64, bool)` + +GetMaxRetriesOk returns a tuple with the MaxRetries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxRetries + +`func (o *LoadBalancerModuleConfig) SetMaxRetries(v int64)` + +SetMaxRetries sets MaxRetries field to given value. + +### HasMaxRetries + +`func (o *LoadBalancerModuleConfig) HasMaxRetries() bool` + +HasMaxRetries returns a boolean if a field has been set. + +### GetConnectionTimeout + +`func (o *LoadBalancerModuleConfig) GetConnectionTimeout() int64` + +GetConnectionTimeout returns the ConnectionTimeout field if non-nil, zero value otherwise. + +### GetConnectionTimeoutOk + +`func (o *LoadBalancerModuleConfig) GetConnectionTimeoutOk() (*int64, bool)` + +GetConnectionTimeoutOk returns a tuple with the ConnectionTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionTimeout + +`func (o *LoadBalancerModuleConfig) SetConnectionTimeout(v int64)` + +SetConnectionTimeout sets ConnectionTimeout field to given value. + +### HasConnectionTimeout + +`func (o *LoadBalancerModuleConfig) HasConnectionTimeout() bool` + +HasConnectionTimeout returns a boolean if a field has been set. + +### GetReadWriteTimeout + +`func (o *LoadBalancerModuleConfig) GetReadWriteTimeout() int64` + +GetReadWriteTimeout returns the ReadWriteTimeout field if non-nil, zero value otherwise. + +### GetReadWriteTimeoutOk + +`func (o *LoadBalancerModuleConfig) GetReadWriteTimeoutOk() (*int64, bool)` + +GetReadWriteTimeoutOk returns a tuple with the ReadWriteTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReadWriteTimeout + +`func (o *LoadBalancerModuleConfig) SetReadWriteTimeout(v int64)` + +SetReadWriteTimeout sets ReadWriteTimeout field to given value. + +### HasReadWriteTimeout + +`func (o *LoadBalancerModuleConfig) HasReadWriteTimeout() bool` + +HasReadWriteTimeout returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LoadBalancerModuleConfigRequest.md b/azion-api/docs/LoadBalancerModuleConfigRequest.md new file mode 100644 index 0000000..e5d1f70 --- /dev/null +++ b/azion-api/docs/LoadBalancerModuleConfigRequest.md @@ -0,0 +1,134 @@ +# LoadBalancerModuleConfigRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | Pointer to **string** | Load balancing method to use (e.g., round-robin, least_conn). * `round_robin` - Round Robin * `least_conn` - Least Connections * `ip_hash` - IP Hash | [optional] +**MaxRetries** | Pointer to **int64** | Maximum number of retry attempts on connection failure. | [optional] +**ConnectionTimeout** | Pointer to **int64** | Maximum time (in seconds) to wait for a connection to be established. | [optional] +**ReadWriteTimeout** | Pointer to **int64** | Maximum time (in seconds) to wait for data read/write after connection. | [optional] + +## Methods + +### NewLoadBalancerModuleConfigRequest + +`func NewLoadBalancerModuleConfigRequest() *LoadBalancerModuleConfigRequest` + +NewLoadBalancerModuleConfigRequest instantiates a new LoadBalancerModuleConfigRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerModuleConfigRequestWithDefaults + +`func NewLoadBalancerModuleConfigRequestWithDefaults() *LoadBalancerModuleConfigRequest` + +NewLoadBalancerModuleConfigRequestWithDefaults instantiates a new LoadBalancerModuleConfigRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *LoadBalancerModuleConfigRequest) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *LoadBalancerModuleConfigRequest) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *LoadBalancerModuleConfigRequest) SetMethod(v string)` + +SetMethod sets Method field to given value. + +### HasMethod + +`func (o *LoadBalancerModuleConfigRequest) HasMethod() bool` + +HasMethod returns a boolean if a field has been set. + +### GetMaxRetries + +`func (o *LoadBalancerModuleConfigRequest) GetMaxRetries() int64` + +GetMaxRetries returns the MaxRetries field if non-nil, zero value otherwise. + +### GetMaxRetriesOk + +`func (o *LoadBalancerModuleConfigRequest) GetMaxRetriesOk() (*int64, bool)` + +GetMaxRetriesOk returns a tuple with the MaxRetries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxRetries + +`func (o *LoadBalancerModuleConfigRequest) SetMaxRetries(v int64)` + +SetMaxRetries sets MaxRetries field to given value. + +### HasMaxRetries + +`func (o *LoadBalancerModuleConfigRequest) HasMaxRetries() bool` + +HasMaxRetries returns a boolean if a field has been set. + +### GetConnectionTimeout + +`func (o *LoadBalancerModuleConfigRequest) GetConnectionTimeout() int64` + +GetConnectionTimeout returns the ConnectionTimeout field if non-nil, zero value otherwise. + +### GetConnectionTimeoutOk + +`func (o *LoadBalancerModuleConfigRequest) GetConnectionTimeoutOk() (*int64, bool)` + +GetConnectionTimeoutOk returns a tuple with the ConnectionTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnectionTimeout + +`func (o *LoadBalancerModuleConfigRequest) SetConnectionTimeout(v int64)` + +SetConnectionTimeout sets ConnectionTimeout field to given value. + +### HasConnectionTimeout + +`func (o *LoadBalancerModuleConfigRequest) HasConnectionTimeout() bool` + +HasConnectionTimeout returns a boolean if a field has been set. + +### GetReadWriteTimeout + +`func (o *LoadBalancerModuleConfigRequest) GetReadWriteTimeout() int64` + +GetReadWriteTimeout returns the ReadWriteTimeout field if non-nil, zero value otherwise. + +### GetReadWriteTimeoutOk + +`func (o *LoadBalancerModuleConfigRequest) GetReadWriteTimeoutOk() (*int64, bool)` + +GetReadWriteTimeoutOk returns a tuple with the ReadWriteTimeout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReadWriteTimeout + +`func (o *LoadBalancerModuleConfigRequest) SetReadWriteTimeout(v int64)` + +SetReadWriteTimeout sets ReadWriteTimeout field to given value. + +### HasReadWriteTimeout + +`func (o *LoadBalancerModuleConfigRequest) HasReadWriteTimeout() bool` + +HasReadWriteTimeout returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LoadBalancerModuleRequest.md b/azion-api/docs/LoadBalancerModuleRequest.md new file mode 100644 index 0000000..d25cd23 --- /dev/null +++ b/azion-api/docs/LoadBalancerModuleRequest.md @@ -0,0 +1,92 @@ +# LoadBalancerModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] +**Config** | Pointer to [**NullableLoadBalancerModuleConfigRequest**](LoadBalancerModuleConfigRequest.md) | | [optional] + +## Methods + +### NewLoadBalancerModuleRequest + +`func NewLoadBalancerModuleRequest() *LoadBalancerModuleRequest` + +NewLoadBalancerModuleRequest instantiates a new LoadBalancerModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoadBalancerModuleRequestWithDefaults + +`func NewLoadBalancerModuleRequestWithDefaults() *LoadBalancerModuleRequest` + +NewLoadBalancerModuleRequestWithDefaults instantiates a new LoadBalancerModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *LoadBalancerModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *LoadBalancerModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *LoadBalancerModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *LoadBalancerModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetConfig + +`func (o *LoadBalancerModuleRequest) GetConfig() LoadBalancerModuleConfigRequest` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *LoadBalancerModuleRequest) GetConfigOk() (*LoadBalancerModuleConfigRequest, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *LoadBalancerModuleRequest) SetConfig(v LoadBalancerModuleConfigRequest)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *LoadBalancerModuleRequest) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *LoadBalancerModuleRequest) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *LoadBalancerModuleRequest) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LockoutPolicy.md b/azion-api/docs/LockoutPolicy.md new file mode 100644 index 0000000..7cc4e35 --- /dev/null +++ b/azion-api/docs/LockoutPolicy.md @@ -0,0 +1,93 @@ +# LockoutPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | **bool** | | +**MaxAttempts** | **int64** | Maximum number of failed login attempts before lockout | +**BlockingPeriod** | **int64** | Blocking period in minutes | + +## Methods + +### NewLockoutPolicy + +`func NewLockoutPolicy(active bool, maxAttempts int64, blockingPeriod int64, ) *LockoutPolicy` + +NewLockoutPolicy instantiates a new LockoutPolicy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLockoutPolicyWithDefaults + +`func NewLockoutPolicyWithDefaults() *LockoutPolicy` + +NewLockoutPolicyWithDefaults instantiates a new LockoutPolicy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActive + +`func (o *LockoutPolicy) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *LockoutPolicy) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *LockoutPolicy) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetMaxAttempts + +`func (o *LockoutPolicy) GetMaxAttempts() int64` + +GetMaxAttempts returns the MaxAttempts field if non-nil, zero value otherwise. + +### GetMaxAttemptsOk + +`func (o *LockoutPolicy) GetMaxAttemptsOk() (*int64, bool)` + +GetMaxAttemptsOk returns a tuple with the MaxAttempts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAttempts + +`func (o *LockoutPolicy) SetMaxAttempts(v int64)` + +SetMaxAttempts sets MaxAttempts field to given value. + + +### GetBlockingPeriod + +`func (o *LockoutPolicy) GetBlockingPeriod() int64` + +GetBlockingPeriod returns the BlockingPeriod field if non-nil, zero value otherwise. + +### GetBlockingPeriodOk + +`func (o *LockoutPolicy) GetBlockingPeriodOk() (*int64, bool)` + +GetBlockingPeriodOk returns a tuple with the BlockingPeriod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlockingPeriod + +`func (o *LockoutPolicy) SetBlockingPeriod(v int64)` + +SetBlockingPeriod sets BlockingPeriod field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LockoutPolicyRequest.md b/azion-api/docs/LockoutPolicyRequest.md new file mode 100644 index 0000000..138e508 --- /dev/null +++ b/azion-api/docs/LockoutPolicyRequest.md @@ -0,0 +1,93 @@ +# LockoutPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | **bool** | | +**MaxAttempts** | **int64** | Maximum number of failed login attempts before lockout | +**BlockingPeriod** | **int64** | Blocking period in minutes | + +## Methods + +### NewLockoutPolicyRequest + +`func NewLockoutPolicyRequest(active bool, maxAttempts int64, blockingPeriod int64, ) *LockoutPolicyRequest` + +NewLockoutPolicyRequest instantiates a new LockoutPolicyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLockoutPolicyRequestWithDefaults + +`func NewLockoutPolicyRequestWithDefaults() *LockoutPolicyRequest` + +NewLockoutPolicyRequestWithDefaults instantiates a new LockoutPolicyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActive + +`func (o *LockoutPolicyRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *LockoutPolicyRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *LockoutPolicyRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetMaxAttempts + +`func (o *LockoutPolicyRequest) GetMaxAttempts() int64` + +GetMaxAttempts returns the MaxAttempts field if non-nil, zero value otherwise. + +### GetMaxAttemptsOk + +`func (o *LockoutPolicyRequest) GetMaxAttemptsOk() (*int64, bool)` + +GetMaxAttemptsOk returns a tuple with the MaxAttempts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxAttempts + +`func (o *LockoutPolicyRequest) SetMaxAttempts(v int64)` + +SetMaxAttempts sets MaxAttempts field to given value. + + +### GetBlockingPeriod + +`func (o *LockoutPolicyRequest) GetBlockingPeriod() int64` + +GetBlockingPeriod returns the BlockingPeriod field if non-nil, zero value otherwise. + +### GetBlockingPeriodOk + +`func (o *LockoutPolicyRequest) GetBlockingPeriodOk() (*int64, bool)` + +GetBlockingPeriodOk returns a tuple with the BlockingPeriod field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlockingPeriod + +`func (o *LockoutPolicyRequest) SetBlockingPeriod(v int64)` + +SetBlockingPeriod sets BlockingPeriod field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LockoutPolicyResponse.md b/azion-api/docs/LockoutPolicyResponse.md new file mode 100644 index 0000000..25a5680 --- /dev/null +++ b/azion-api/docs/LockoutPolicyResponse.md @@ -0,0 +1,51 @@ +# LockoutPolicyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**LockoutPolicy**](LockoutPolicy.md) | | + +## Methods + +### NewLockoutPolicyResponse + +`func NewLockoutPolicyResponse(data LockoutPolicy, ) *LockoutPolicyResponse` + +NewLockoutPolicyResponse instantiates a new LockoutPolicyResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLockoutPolicyResponseWithDefaults + +`func NewLockoutPolicyResponseWithDefaults() *LockoutPolicyResponse` + +NewLockoutPolicyResponseWithDefaults instantiates a new LockoutPolicyResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *LockoutPolicyResponse) GetData() LockoutPolicy` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *LockoutPolicyResponse) GetDataOk() (*LockoutPolicy, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *LockoutPolicyResponse) SetData(v LockoutPolicy)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LoginRequest.md b/azion-api/docs/LoginRequest.md new file mode 100644 index 0000000..43d42fc --- /dev/null +++ b/azion-api/docs/LoginRequest.md @@ -0,0 +1,108 @@ +# LoginRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | +**Password** | **string** | User password | +**AccountId** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewLoginRequest + +`func NewLoginRequest(email string, password string, ) *LoginRequest` + +NewLoginRequest instantiates a new LoginRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoginRequestWithDefaults + +`func NewLoginRequestWithDefaults() *LoginRequest` + +NewLoginRequestWithDefaults instantiates a new LoginRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEmail + +`func (o *LoginRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *LoginRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *LoginRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetPassword + +`func (o *LoginRequest) GetPassword() string` + +GetPassword returns the Password field if non-nil, zero value otherwise. + +### GetPasswordOk + +`func (o *LoginRequest) GetPasswordOk() (*string, bool)` + +GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPassword + +`func (o *LoginRequest) SetPassword(v string)` + +SetPassword sets Password field to given value. + + +### GetAccountId + +`func (o *LoginRequest) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *LoginRequest) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *LoginRequest) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *LoginRequest) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### SetAccountIdNil + +`func (o *LoginRequest) SetAccountIdNil(b bool)` + + SetAccountIdNil sets the value for AccountId to be an explicit nil + +### UnsetAccountId +`func (o *LoginRequest) UnsetAccountId()` + +UnsetAccountId ensures that no value is present for AccountId, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/LoginResponse.md b/azion-api/docs/LoginResponse.md new file mode 100644 index 0000000..2b88fe1 --- /dev/null +++ b/azion-api/docs/LoginResponse.md @@ -0,0 +1,156 @@ +# LoginResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **string** | The access_token is a short-lived token (e.g., 10 minutes) used for API authentication in the Authorization: Bearer <access_token> header. | +**RefreshToken** | **string** | A long-lived JWT token used to refresh the access_token without requiring the user to authenticate again. | +**ResponseType** | **string** | Discriminator field for LoginResponse | +**TwoFactorRequired** | **bool** | Specifies the type of two-factor authentication configured. Currently supports 'TOTP' (Time-based One-Time Password). | +**TwoFactorType** | **string** | Indicates whether the user has an active TOTP device configured. If false, the user must register a device before using MFA authentication. | +**HasActiveDevice** | **bool** | Indicates whether the user already has an active TOTP device configured.If false, the user needs to set up a new device before using MFA authentication. | + +## Methods + +### NewLoginResponse + +`func NewLoginResponse(accessToken string, refreshToken string, responseType string, twoFactorRequired bool, twoFactorType string, hasActiveDevice bool, ) *LoginResponse` + +NewLoginResponse instantiates a new LoginResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewLoginResponseWithDefaults + +`func NewLoginResponseWithDefaults() *LoginResponse` + +NewLoginResponseWithDefaults instantiates a new LoginResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *LoginResponse) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *LoginResponse) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *LoginResponse) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + + +### GetRefreshToken + +`func (o *LoginResponse) GetRefreshToken() string` + +GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. + +### GetRefreshTokenOk + +`func (o *LoginResponse) GetRefreshTokenOk() (*string, bool)` + +GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshToken + +`func (o *LoginResponse) SetRefreshToken(v string)` + +SetRefreshToken sets RefreshToken field to given value. + + +### GetResponseType + +`func (o *LoginResponse) GetResponseType() string` + +GetResponseType returns the ResponseType field if non-nil, zero value otherwise. + +### GetResponseTypeOk + +`func (o *LoginResponse) GetResponseTypeOk() (*string, bool)` + +GetResponseTypeOk returns a tuple with the ResponseType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseType + +`func (o *LoginResponse) SetResponseType(v string)` + +SetResponseType sets ResponseType field to given value. + + +### GetTwoFactorRequired + +`func (o *LoginResponse) GetTwoFactorRequired() bool` + +GetTwoFactorRequired returns the TwoFactorRequired field if non-nil, zero value otherwise. + +### GetTwoFactorRequiredOk + +`func (o *LoginResponse) GetTwoFactorRequiredOk() (*bool, bool)` + +GetTwoFactorRequiredOk returns a tuple with the TwoFactorRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorRequired + +`func (o *LoginResponse) SetTwoFactorRequired(v bool)` + +SetTwoFactorRequired sets TwoFactorRequired field to given value. + + +### GetTwoFactorType + +`func (o *LoginResponse) GetTwoFactorType() string` + +GetTwoFactorType returns the TwoFactorType field if non-nil, zero value otherwise. + +### GetTwoFactorTypeOk + +`func (o *LoginResponse) GetTwoFactorTypeOk() (*string, bool)` + +GetTwoFactorTypeOk returns a tuple with the TwoFactorType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorType + +`func (o *LoginResponse) SetTwoFactorType(v string)` + +SetTwoFactorType sets TwoFactorType field to given value. + + +### GetHasActiveDevice + +`func (o *LoginResponse) GetHasActiveDevice() bool` + +GetHasActiveDevice returns the HasActiveDevice field if non-nil, zero value otherwise. + +### GetHasActiveDeviceOk + +`func (o *LoginResponse) GetHasActiveDeviceOk() (*bool, bool)` + +GetHasActiveDeviceOk returns a tuple with the HasActiveDevice field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasActiveDevice + +`func (o *LoginResponse) SetHasActiveDevice(v bool)` + +SetHasActiveDevice sets HasActiveDevice field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MFAToken.md b/azion-api/docs/MFAToken.md new file mode 100644 index 0000000..24cf7d6 --- /dev/null +++ b/azion-api/docs/MFAToken.md @@ -0,0 +1,135 @@ +# MFAToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **string** | The access_token is a short-lived token (e.g., 10 minutes) used for API authentication in the Authorization: Bearer <access_token> header. | +**TwoFactorRequired** | **bool** | Specifies the type of two-factor authentication configured. Currently supports 'TOTP' (Time-based One-Time Password). | +**TwoFactorType** | **string** | Indicates whether the user has an active TOTP device configured. If false, the user must register a device before using MFA authentication. | +**HasActiveDevice** | **bool** | Indicates whether the user already has an active TOTP device configured.If false, the user needs to set up a new device before using MFA authentication. | +**ResponseType** | **string** | Discriminator field for LoginResponse | + +## Methods + +### NewMFAToken + +`func NewMFAToken(accessToken string, twoFactorRequired bool, twoFactorType string, hasActiveDevice bool, responseType string, ) *MFAToken` + +NewMFAToken instantiates a new MFAToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMFATokenWithDefaults + +`func NewMFATokenWithDefaults() *MFAToken` + +NewMFATokenWithDefaults instantiates a new MFAToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *MFAToken) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *MFAToken) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *MFAToken) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + + +### GetTwoFactorRequired + +`func (o *MFAToken) GetTwoFactorRequired() bool` + +GetTwoFactorRequired returns the TwoFactorRequired field if non-nil, zero value otherwise. + +### GetTwoFactorRequiredOk + +`func (o *MFAToken) GetTwoFactorRequiredOk() (*bool, bool)` + +GetTwoFactorRequiredOk returns a tuple with the TwoFactorRequired field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorRequired + +`func (o *MFAToken) SetTwoFactorRequired(v bool)` + +SetTwoFactorRequired sets TwoFactorRequired field to given value. + + +### GetTwoFactorType + +`func (o *MFAToken) GetTwoFactorType() string` + +GetTwoFactorType returns the TwoFactorType field if non-nil, zero value otherwise. + +### GetTwoFactorTypeOk + +`func (o *MFAToken) GetTwoFactorTypeOk() (*string, bool)` + +GetTwoFactorTypeOk returns a tuple with the TwoFactorType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorType + +`func (o *MFAToken) SetTwoFactorType(v string)` + +SetTwoFactorType sets TwoFactorType field to given value. + + +### GetHasActiveDevice + +`func (o *MFAToken) GetHasActiveDevice() bool` + +GetHasActiveDevice returns the HasActiveDevice field if non-nil, zero value otherwise. + +### GetHasActiveDeviceOk + +`func (o *MFAToken) GetHasActiveDeviceOk() (*bool, bool)` + +GetHasActiveDeviceOk returns a tuple with the HasActiveDevice field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasActiveDevice + +`func (o *MFAToken) SetHasActiveDevice(v bool)` + +SetHasActiveDevice sets HasActiveDevice field to given value. + + +### GetResponseType + +`func (o *MFAToken) GetResponseType() string` + +GetResponseType returns the ResponseType field if non-nil, zero value otherwise. + +### GetResponseTypeOk + +`func (o *MFAToken) GetResponseTypeOk() (*string, bool)` + +GetResponseTypeOk returns a tuple with the ResponseType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseType + +`func (o *MFAToken) SetResponseType(v string)` + +SetResponseType sets ResponseType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MTLS.md b/azion-api/docs/MTLS.md new file mode 100644 index 0000000..3cf090b --- /dev/null +++ b/azion-api/docs/MTLS.md @@ -0,0 +1,102 @@ +# MTLS + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **NullableBool** | | [optional] +**Config** | Pointer to [**NullableMTLSConfig**](MTLSConfig.md) | | [optional] + +## Methods + +### NewMTLS + +`func NewMTLS() *MTLS` + +NewMTLS instantiates a new MTLS object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMTLSWithDefaults + +`func NewMTLSWithDefaults() *MTLS` + +NewMTLSWithDefaults instantiates a new MTLS object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *MTLS) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *MTLS) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *MTLS) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *MTLS) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### SetEnabledNil + +`func (o *MTLS) SetEnabledNil(b bool)` + + SetEnabledNil sets the value for Enabled to be an explicit nil + +### UnsetEnabled +`func (o *MTLS) UnsetEnabled()` + +UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +### GetConfig + +`func (o *MTLS) GetConfig() MTLSConfig` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *MTLS) GetConfigOk() (*MTLSConfig, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *MTLS) SetConfig(v MTLSConfig)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *MTLS) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *MTLS) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *MTLS) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MTLSConfig.md b/azion-api/docs/MTLSConfig.md new file mode 100644 index 0000000..0a17711 --- /dev/null +++ b/azion-api/docs/MTLSConfig.md @@ -0,0 +1,138 @@ +# MTLSConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificate** | Pointer to **NullableInt64** | | [optional] +**Crl** | Pointer to **[]int64** | | [optional] +**Verification** | Pointer to **NullableString** | * `enforce` - Enforce * `permissive` - Permissive | [optional] + +## Methods + +### NewMTLSConfig + +`func NewMTLSConfig() *MTLSConfig` + +NewMTLSConfig instantiates a new MTLSConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMTLSConfigWithDefaults + +`func NewMTLSConfigWithDefaults() *MTLSConfig` + +NewMTLSConfigWithDefaults instantiates a new MTLSConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCertificate + +`func (o *MTLSConfig) GetCertificate() int64` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *MTLSConfig) GetCertificateOk() (*int64, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *MTLSConfig) SetCertificate(v int64)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *MTLSConfig) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *MTLSConfig) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *MTLSConfig) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetCrl + +`func (o *MTLSConfig) GetCrl() []int64` + +GetCrl returns the Crl field if non-nil, zero value otherwise. + +### GetCrlOk + +`func (o *MTLSConfig) GetCrlOk() (*[]int64, bool)` + +GetCrlOk returns a tuple with the Crl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrl + +`func (o *MTLSConfig) SetCrl(v []int64)` + +SetCrl sets Crl field to given value. + +### HasCrl + +`func (o *MTLSConfig) HasCrl() bool` + +HasCrl returns a boolean if a field has been set. + +### SetCrlNil + +`func (o *MTLSConfig) SetCrlNil(b bool)` + + SetCrlNil sets the value for Crl to be an explicit nil + +### UnsetCrl +`func (o *MTLSConfig) UnsetCrl()` + +UnsetCrl ensures that no value is present for Crl, not even an explicit nil +### GetVerification + +`func (o *MTLSConfig) GetVerification() string` + +GetVerification returns the Verification field if non-nil, zero value otherwise. + +### GetVerificationOk + +`func (o *MTLSConfig) GetVerificationOk() (*string, bool)` + +GetVerificationOk returns a tuple with the Verification field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerification + +`func (o *MTLSConfig) SetVerification(v string)` + +SetVerification sets Verification field to given value. + +### HasVerification + +`func (o *MTLSConfig) HasVerification() bool` + +HasVerification returns a boolean if a field has been set. + +### SetVerificationNil + +`func (o *MTLSConfig) SetVerificationNil(b bool)` + + SetVerificationNil sets the value for Verification to be an explicit nil + +### UnsetVerification +`func (o *MTLSConfig) UnsetVerification()` + +UnsetVerification ensures that no value is present for Verification, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MTLSConfigRequest.md b/azion-api/docs/MTLSConfigRequest.md new file mode 100644 index 0000000..4c0c9ff --- /dev/null +++ b/azion-api/docs/MTLSConfigRequest.md @@ -0,0 +1,138 @@ +# MTLSConfigRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificate** | Pointer to **NullableInt64** | | [optional] +**Crl** | Pointer to **[]int64** | | [optional] +**Verification** | Pointer to **NullableString** | * `enforce` - Enforce * `permissive` - Permissive | [optional] + +## Methods + +### NewMTLSConfigRequest + +`func NewMTLSConfigRequest() *MTLSConfigRequest` + +NewMTLSConfigRequest instantiates a new MTLSConfigRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMTLSConfigRequestWithDefaults + +`func NewMTLSConfigRequestWithDefaults() *MTLSConfigRequest` + +NewMTLSConfigRequestWithDefaults instantiates a new MTLSConfigRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCertificate + +`func (o *MTLSConfigRequest) GetCertificate() int64` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *MTLSConfigRequest) GetCertificateOk() (*int64, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *MTLSConfigRequest) SetCertificate(v int64)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *MTLSConfigRequest) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *MTLSConfigRequest) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *MTLSConfigRequest) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetCrl + +`func (o *MTLSConfigRequest) GetCrl() []int64` + +GetCrl returns the Crl field if non-nil, zero value otherwise. + +### GetCrlOk + +`func (o *MTLSConfigRequest) GetCrlOk() (*[]int64, bool)` + +GetCrlOk returns a tuple with the Crl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrl + +`func (o *MTLSConfigRequest) SetCrl(v []int64)` + +SetCrl sets Crl field to given value. + +### HasCrl + +`func (o *MTLSConfigRequest) HasCrl() bool` + +HasCrl returns a boolean if a field has been set. + +### SetCrlNil + +`func (o *MTLSConfigRequest) SetCrlNil(b bool)` + + SetCrlNil sets the value for Crl to be an explicit nil + +### UnsetCrl +`func (o *MTLSConfigRequest) UnsetCrl()` + +UnsetCrl ensures that no value is present for Crl, not even an explicit nil +### GetVerification + +`func (o *MTLSConfigRequest) GetVerification() string` + +GetVerification returns the Verification field if non-nil, zero value otherwise. + +### GetVerificationOk + +`func (o *MTLSConfigRequest) GetVerificationOk() (*string, bool)` + +GetVerificationOk returns a tuple with the Verification field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVerification + +`func (o *MTLSConfigRequest) SetVerification(v string)` + +SetVerification sets Verification field to given value. + +### HasVerification + +`func (o *MTLSConfigRequest) HasVerification() bool` + +HasVerification returns a boolean if a field has been set. + +### SetVerificationNil + +`func (o *MTLSConfigRequest) SetVerificationNil(b bool)` + + SetVerificationNil sets the value for Verification to be an explicit nil + +### UnsetVerification +`func (o *MTLSConfigRequest) UnsetVerification()` + +UnsetVerification ensures that no value is present for Verification, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MTLSRequest.md b/azion-api/docs/MTLSRequest.md new file mode 100644 index 0000000..f381248 --- /dev/null +++ b/azion-api/docs/MTLSRequest.md @@ -0,0 +1,102 @@ +# MTLSRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **NullableBool** | | [optional] +**Config** | Pointer to [**NullableMTLSConfigRequest**](MTLSConfigRequest.md) | | [optional] + +## Methods + +### NewMTLSRequest + +`func NewMTLSRequest() *MTLSRequest` + +NewMTLSRequest instantiates a new MTLSRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMTLSRequestWithDefaults + +`func NewMTLSRequestWithDefaults() *MTLSRequest` + +NewMTLSRequestWithDefaults instantiates a new MTLSRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *MTLSRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *MTLSRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *MTLSRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *MTLSRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### SetEnabledNil + +`func (o *MTLSRequest) SetEnabledNil(b bool)` + + SetEnabledNil sets the value for Enabled to be an explicit nil + +### UnsetEnabled +`func (o *MTLSRequest) UnsetEnabled()` + +UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +### GetConfig + +`func (o *MTLSRequest) GetConfig() MTLSConfigRequest` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *MTLSRequest) GetConfigOk() (*MTLSConfigRequest, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *MTLSRequest) SetConfig(v MTLSConfigRequest)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *MTLSRequest) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *MTLSRequest) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *MTLSRequest) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Message.md b/azion-api/docs/Message.md new file mode 100644 index 0000000..0741332 --- /dev/null +++ b/azion-api/docs/Message.md @@ -0,0 +1,213 @@ +# Message + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **int64** | | +**ThreadId** | **int64** | | +**LastEditor** | **string** | | +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Message** | **map[string]interface{}** | | +**Metadata** | Pointer to **map[string]interface{}** | | [optional] +**LastModified** | **time.Time** | | + +## Methods + +### NewMessage + +`func NewMessage(messageId int64, threadId int64, lastEditor string, message map[string]interface{}, lastModified time.Time, ) *Message` + +NewMessage instantiates a new Message object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMessageWithDefaults + +`func NewMessageWithDefaults() *Message` + +NewMessageWithDefaults instantiates a new Message object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMessageId + +`func (o *Message) GetMessageId() int64` + +GetMessageId returns the MessageId field if non-nil, zero value otherwise. + +### GetMessageIdOk + +`func (o *Message) GetMessageIdOk() (*int64, bool)` + +GetMessageIdOk returns a tuple with the MessageId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessageId + +`func (o *Message) SetMessageId(v int64)` + +SetMessageId sets MessageId field to given value. + + +### GetThreadId + +`func (o *Message) GetThreadId() int64` + +GetThreadId returns the ThreadId field if non-nil, zero value otherwise. + +### GetThreadIdOk + +`func (o *Message) GetThreadIdOk() (*int64, bool)` + +GetThreadIdOk returns a tuple with the ThreadId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreadId + +`func (o *Message) SetThreadId(v int64)` + +SetThreadId sets ThreadId field to given value. + + +### GetLastEditor + +`func (o *Message) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Message) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Message) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetName + +`func (o *Message) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Message) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Message) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Message) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *Message) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Message) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Message) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Message) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetMessage + +`func (o *Message) GetMessage() map[string]interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *Message) GetMessageOk() (*map[string]interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *Message) SetMessage(v map[string]interface{})` + +SetMessage sets Message field to given value. + + +### GetMetadata + +`func (o *Message) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *Message) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *Message) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *Message) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetLastModified + +`func (o *Message) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Message) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Message) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MessageRequest.md b/azion-api/docs/MessageRequest.md new file mode 100644 index 0000000..c345b51 --- /dev/null +++ b/azion-api/docs/MessageRequest.md @@ -0,0 +1,129 @@ +# MessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Message** | **map[string]interface{}** | | +**Metadata** | Pointer to **map[string]interface{}** | | [optional] + +## Methods + +### NewMessageRequest + +`func NewMessageRequest(message map[string]interface{}, ) *MessageRequest` + +NewMessageRequest instantiates a new MessageRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewMessageRequestWithDefaults + +`func NewMessageRequestWithDefaults() *MessageRequest` + +NewMessageRequestWithDefaults instantiates a new MessageRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *MessageRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *MessageRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *MessageRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *MessageRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *MessageRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *MessageRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *MessageRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *MessageRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetMessage + +`func (o *MessageRequest) GetMessage() map[string]interface{}` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *MessageRequest) GetMessageOk() (*map[string]interface{}, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *MessageRequest) SetMessage(v map[string]interface{})` + +SetMessage sets Message field to given value. + + +### GetMetadata + +`func (o *MessageRequest) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *MessageRequest) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *MessageRequest) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *MessageRequest) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/MetricsDashboardAPI.md b/azion-api/docs/MetricsDashboardAPI.md new file mode 100644 index 0000000..bc2ff32 --- /dev/null +++ b/azion-api/docs/MetricsDashboardAPI.md @@ -0,0 +1,468 @@ +# \MetricsDashboardAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDashboard**](MetricsDashboardAPI.md#CreateDashboard) | **Post** /metrics/folders/{folder_id}/dashboards | Create a new dashboard +[**DeleteDashboard**](MetricsDashboardAPI.md#DeleteDashboard) | **Delete** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Delete a dashboard +[**ListDashboards**](MetricsDashboardAPI.md#ListDashboards) | **Get** /metrics/folders/{folder_id}/dashboards | List of the dashboards +[**PartialUpdateDashboard**](MetricsDashboardAPI.md#PartialUpdateDashboard) | **Patch** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Partially update a dashboard +[**RetrieveDashboard**](MetricsDashboardAPI.md#RetrieveDashboard) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Retrieve details from a dashboard +[**UpdateDashboard**](MetricsDashboardAPI.md#UpdateDashboard) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id} | Update a dashboard + + + +## CreateDashboard + +> ResponseDashboard CreateDashboard(ctx, folderId).DashboardRequest(dashboardRequest).Execute() + +Create a new dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderId := int64(789) // int64 | The unique identifier of the folder + dashboardRequest := *openapiclient.NewDashboardRequest("Name_example", "Scope_example") // DashboardRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsDashboardAPI.CreateDashboard(context.Background(), folderId).DashboardRequest(dashboardRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsDashboardAPI.CreateDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDashboard`: ResponseDashboard + fmt.Fprintf(os.Stdout, "Response from `MetricsDashboardAPI.CreateDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **dashboardRequest** | [**DashboardRequest**](DashboardRequest.md) | | + +### Return type + +[**ResponseDashboard**](ResponseDashboard.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDashboard + +> ResponseDeleteDashboard DeleteDashboard(ctx, dashboardId, folderId).Execute() + +Delete a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsDashboardAPI.DeleteDashboard(context.Background(), dashboardId, folderId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsDashboardAPI.DeleteDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteDashboard`: ResponseDeleteDashboard + fmt.Fprintf(os.Stdout, "Response from `MetricsDashboardAPI.DeleteDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ResponseDeleteDashboard**](ResponseDeleteDashboard.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDashboards + +> PaginatedDashboardList ListDashboards(ctx, folderId).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the dashboards + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderId := int64(789) // int64 | The unique identifier of the folder + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsDashboardAPI.ListDashboards(context.Background(), folderId).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsDashboardAPI.ListDashboards``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDashboards`: PaginatedDashboardList + fmt.Fprintf(os.Stdout, "Response from `MetricsDashboardAPI.ListDashboards`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDashboardsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedDashboardList**](PaginatedDashboardList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateDashboard + +> ResponseDashboard PartialUpdateDashboard(ctx, dashboardId, folderId).PatchedDashboardRequest(patchedDashboardRequest).Execute() + +Partially update a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + patchedDashboardRequest := *openapiclient.NewPatchedDashboardRequest() // PatchedDashboardRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsDashboardAPI.PartialUpdateDashboard(context.Background(), dashboardId, folderId).PatchedDashboardRequest(patchedDashboardRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsDashboardAPI.PartialUpdateDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateDashboard`: ResponseDashboard + fmt.Fprintf(os.Stdout, "Response from `MetricsDashboardAPI.PartialUpdateDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedDashboardRequest** | [**PatchedDashboardRequest**](PatchedDashboardRequest.md) | | + +### Return type + +[**ResponseDashboard**](ResponseDashboard.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDashboard + +> ResponseRetrieveDashboard RetrieveDashboard(ctx, dashboardId, folderId).Fields(fields).Execute() + +Retrieve details from a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsDashboardAPI.RetrieveDashboard(context.Background(), dashboardId, folderId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsDashboardAPI.RetrieveDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDashboard`: ResponseRetrieveDashboard + fmt.Fprintf(os.Stdout, "Response from `MetricsDashboardAPI.RetrieveDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveDashboard**](ResponseRetrieveDashboard.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateDashboard + +> ResponseDashboard UpdateDashboard(ctx, dashboardId, folderId).DashboardRequest(dashboardRequest).Execute() + +Update a dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + dashboardRequest := *openapiclient.NewDashboardRequest("Name_example", "Scope_example") // DashboardRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsDashboardAPI.UpdateDashboard(context.Background(), dashboardId, folderId).DashboardRequest(dashboardRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsDashboardAPI.UpdateDashboard``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateDashboard`: ResponseDashboard + fmt.Fprintf(os.Stdout, "Response from `MetricsDashboardAPI.UpdateDashboard`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateDashboardRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **dashboardRequest** | [**DashboardRequest**](DashboardRequest.md) | | + +### Return type + +[**ResponseDashboard**](ResponseDashboard.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/MetricsFoldersAPI.md b/azion-api/docs/MetricsFoldersAPI.md new file mode 100644 index 0000000..2573a58 --- /dev/null +++ b/azion-api/docs/MetricsFoldersAPI.md @@ -0,0 +1,444 @@ +# \MetricsFoldersAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFolder**](MetricsFoldersAPI.md#CreateFolder) | **Post** /metrics/folders | Create a new folder +[**DeleteFolder**](MetricsFoldersAPI.md#DeleteFolder) | **Delete** /metrics/folders/{folder_id} | Delete a folder +[**ListFolders**](MetricsFoldersAPI.md#ListFolders) | **Get** /metrics/folders | List of the folders +[**PartialUpdateFolder**](MetricsFoldersAPI.md#PartialUpdateFolder) | **Patch** /metrics/folders/{folder_id} | Partially update a folder +[**RetrieveFolder**](MetricsFoldersAPI.md#RetrieveFolder) | **Get** /metrics/folders/{folder_id} | Retrieve details from a folder +[**UpdateFolder**](MetricsFoldersAPI.md#UpdateFolder) | **Put** /metrics/folders/{folder_id} | Update a folder + + + +## CreateFolder + +> ResponseFolder CreateFolder(ctx).FolderRequest(folderRequest).Execute() + +Create a new folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderRequest := *openapiclient.NewFolderRequest("Name_example", "Scope_example") // FolderRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsFoldersAPI.CreateFolder(context.Background()).FolderRequest(folderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsFoldersAPI.CreateFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateFolder`: ResponseFolder + fmt.Fprintf(os.Stdout, "Response from `MetricsFoldersAPI.CreateFolder`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateFolderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **folderRequest** | [**FolderRequest**](FolderRequest.md) | | + +### Return type + +[**ResponseFolder**](ResponseFolder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteFolder + +> ResponseDeleteFolder DeleteFolder(ctx, folderId).Execute() + +Delete a folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderId := int64(789) // int64 | The unique identifier of the folder + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsFoldersAPI.DeleteFolder(context.Background(), folderId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsFoldersAPI.DeleteFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteFolder`: ResponseDeleteFolder + fmt.Fprintf(os.Stdout, "Response from `MetricsFoldersAPI.DeleteFolder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteFolderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteFolder**](ResponseDeleteFolder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListFolders + +> PaginatedFolderList ListFolders(ctx).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the folders + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsFoldersAPI.ListFolders(context.Background()).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsFoldersAPI.ListFolders``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListFolders`: PaginatedFolderList + fmt.Fprintf(os.Stdout, "Response from `MetricsFoldersAPI.ListFolders`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListFoldersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFolderList**](PaginatedFolderList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateFolder + +> ResponseFolder PartialUpdateFolder(ctx, folderId).PatchedFolderRequest(patchedFolderRequest).Execute() + +Partially update a folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderId := int64(789) // int64 | The unique identifier of the folder + patchedFolderRequest := *openapiclient.NewPatchedFolderRequest() // PatchedFolderRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsFoldersAPI.PartialUpdateFolder(context.Background(), folderId).PatchedFolderRequest(patchedFolderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsFoldersAPI.PartialUpdateFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateFolder`: ResponseFolder + fmt.Fprintf(os.Stdout, "Response from `MetricsFoldersAPI.PartialUpdateFolder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateFolderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedFolderRequest** | [**PatchedFolderRequest**](PatchedFolderRequest.md) | | + +### Return type + +[**ResponseFolder**](ResponseFolder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveFolder + +> ResponseRetrieveFolder RetrieveFolder(ctx, folderId).Fields(fields).Execute() + +Retrieve details from a folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderId := int64(789) // int64 | The unique identifier of the folder + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsFoldersAPI.RetrieveFolder(context.Background(), folderId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsFoldersAPI.RetrieveFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveFolder`: ResponseRetrieveFolder + fmt.Fprintf(os.Stdout, "Response from `MetricsFoldersAPI.RetrieveFolder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveFolderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveFolder**](ResponseRetrieveFolder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateFolder + +> ResponseFolder UpdateFolder(ctx, folderId).FolderRequest(folderRequest).Execute() + +Update a folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + folderId := int64(789) // int64 | The unique identifier of the folder + folderRequest := *openapiclient.NewFolderRequest("Name_example", "Scope_example") // FolderRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsFoldersAPI.UpdateFolder(context.Background(), folderId).FolderRequest(folderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsFoldersAPI.UpdateFolder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateFolder`: ResponseFolder + fmt.Fprintf(os.Stdout, "Response from `MetricsFoldersAPI.UpdateFolder`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateFolderRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **folderRequest** | [**FolderRequest**](FolderRequest.md) | | + +### Return type + +[**ResponseFolder**](ResponseFolder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/MetricsLibraryReportsAPI.md b/azion-api/docs/MetricsLibraryReportsAPI.md new file mode 100644 index 0000000..30127df --- /dev/null +++ b/azion-api/docs/MetricsLibraryReportsAPI.md @@ -0,0 +1,375 @@ +# \MetricsLibraryReportsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateLibraryReport**](MetricsLibraryReportsAPI.md#CreateLibraryReport) | **Post** /metrics/library/reports | Create a new library report +[**DeleteLibraryReport**](MetricsLibraryReportsAPI.md#DeleteLibraryReport) | **Delete** /metrics/library/reports/{library_report_id} | Delete a library report +[**ListLibraryReports**](MetricsLibraryReportsAPI.md#ListLibraryReports) | **Get** /metrics/library/reports | List of library reports +[**RetrieveLibraryReport**](MetricsLibraryReportsAPI.md#RetrieveLibraryReport) | **Get** /metrics/library/reports/{library_report_id} | Retrieve details from a library report +[**UpdateLibraryReport**](MetricsLibraryReportsAPI.md#UpdateLibraryReport) | **Put** /metrics/library/reports/{library_report_id} | Update a library report + + + +## CreateLibraryReport + +> ResponseReport CreateLibraryReport(ctx).LibraryReportRequest(libraryReportRequest).Execute() + +Create a new library report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + libraryReportRequest := *openapiclient.NewLibraryReportRequest("Description_example", "Type_example", "AggregationType_example", "DataUnit_example", []openapiclient.BaseQueryRequest{*openapiclient.NewBaseQueryRequest("Dataset_example", int64(123), "OrderDirection_example")}, "Name_example", "Scope_example") // LibraryReportRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsLibraryReportsAPI.CreateLibraryReport(context.Background()).LibraryReportRequest(libraryReportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsLibraryReportsAPI.CreateLibraryReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateLibraryReport`: ResponseReport + fmt.Fprintf(os.Stdout, "Response from `MetricsLibraryReportsAPI.CreateLibraryReport`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateLibraryReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **libraryReportRequest** | [**LibraryReportRequest**](LibraryReportRequest.md) | | + +### Return type + +[**ResponseReport**](ResponseReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteLibraryReport + +> ResponseDeleteReport DeleteLibraryReport(ctx, libraryReportId).Execute() + +Delete a library report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + libraryReportId := int64(789) // int64 | The unique identifier of the library report + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsLibraryReportsAPI.DeleteLibraryReport(context.Background(), libraryReportId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsLibraryReportsAPI.DeleteLibraryReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteLibraryReport`: ResponseDeleteReport + fmt.Fprintf(os.Stdout, "Response from `MetricsLibraryReportsAPI.DeleteLibraryReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**libraryReportId** | **int64** | The unique identifier of the library report | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteLibraryReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteReport**](ResponseDeleteReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListLibraryReports + +> PaginatedReportList ListLibraryReports(ctx).AggregationType(aggregationType).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Type_(type_).Execute() + +List of library reports + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + aggregationType := "aggregationType_example" // string | Filter by aggregation type (accepts comma-separated values). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + type_ := "type__example" // string | Filter by type (accepts comma-separated values). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsLibraryReportsAPI.ListLibraryReports(context.Background()).AggregationType(aggregationType).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Type_(type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsLibraryReportsAPI.ListLibraryReports``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListLibraryReports`: PaginatedReportList + fmt.Fprintf(os.Stdout, "Response from `MetricsLibraryReportsAPI.ListLibraryReports`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListLibraryReportsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **aggregationType** | **string** | Filter by aggregation type (accepts comma-separated values). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **type_** | **string** | Filter by type (accepts comma-separated values). | + +### Return type + +[**PaginatedReportList**](PaginatedReportList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveLibraryReport + +> ResponseRetrieveReport RetrieveLibraryReport(ctx, libraryReportId).Fields(fields).Execute() + +Retrieve details from a library report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + libraryReportId := int64(789) // int64 | The unique identifier of the library report + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsLibraryReportsAPI.RetrieveLibraryReport(context.Background(), libraryReportId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsLibraryReportsAPI.RetrieveLibraryReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveLibraryReport`: ResponseRetrieveReport + fmt.Fprintf(os.Stdout, "Response from `MetricsLibraryReportsAPI.RetrieveLibraryReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**libraryReportId** | **int64** | The unique identifier of the library report | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveLibraryReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveReport**](ResponseRetrieveReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateLibraryReport + +> ResponseReport UpdateLibraryReport(ctx, libraryReportId).LibraryReportRequest(libraryReportRequest).Execute() + +Update a library report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + libraryReportId := int64(789) // int64 | The unique identifier of the library report + libraryReportRequest := *openapiclient.NewLibraryReportRequest("Description_example", "Type_example", "AggregationType_example", "DataUnit_example", []openapiclient.BaseQueryRequest{*openapiclient.NewBaseQueryRequest("Dataset_example", int64(123), "OrderDirection_example")}, "Name_example", "Scope_example") // LibraryReportRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsLibraryReportsAPI.UpdateLibraryReport(context.Background(), libraryReportId).LibraryReportRequest(libraryReportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsLibraryReportsAPI.UpdateLibraryReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateLibraryReport`: ResponseReport + fmt.Fprintf(os.Stdout, "Response from `MetricsLibraryReportsAPI.UpdateLibraryReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**libraryReportId** | **int64** | The unique identifier of the library report | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateLibraryReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **libraryReportRequest** | [**LibraryReportRequest**](LibraryReportRequest.md) | | + +### Return type + +[**ResponseReport**](ResponseReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/MetricsRecommendationsAPI.md b/azion-api/docs/MetricsRecommendationsAPI.md new file mode 100644 index 0000000..c2b4255 --- /dev/null +++ b/azion-api/docs/MetricsRecommendationsAPI.md @@ -0,0 +1,225 @@ +# \MetricsRecommendationsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRecommendation**](MetricsRecommendationsAPI.md#CreateRecommendation) | **Post** /metrics/recommendations | Create a new recommendation +[**DeleteRecommendation**](MetricsRecommendationsAPI.md#DeleteRecommendation) | **Delete** /metrics/recommendations/{recommendation_id} | Delete a recommendation +[**ListRecommendations**](MetricsRecommendationsAPI.md#ListRecommendations) | **Get** /metrics/recommendations | List of the recommendations + + + +## CreateRecommendation + +> ResponseFolder CreateRecommendation(ctx).RecommendationRequest(recommendationRequest).Execute() + +Create a new recommendation + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + recommendationRequest := *openapiclient.NewRecommendationRequest(int64(123)) // RecommendationRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRecommendationsAPI.CreateRecommendation(context.Background()).RecommendationRequest(recommendationRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRecommendationsAPI.CreateRecommendation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRecommendation`: ResponseFolder + fmt.Fprintf(os.Stdout, "Response from `MetricsRecommendationsAPI.CreateRecommendation`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRecommendationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **recommendationRequest** | [**RecommendationRequest**](RecommendationRequest.md) | | + +### Return type + +[**ResponseFolder**](ResponseFolder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRecommendation + +> ResponseDeleteRecommendation DeleteRecommendation(ctx, recommendationId).Execute() + +Delete a recommendation + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + recommendationId := int64(789) // int64 | The unique identifier of the recommendation + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRecommendationsAPI.DeleteRecommendation(context.Background(), recommendationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRecommendationsAPI.DeleteRecommendation``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteRecommendation`: ResponseDeleteRecommendation + fmt.Fprintf(os.Stdout, "Response from `MetricsRecommendationsAPI.DeleteRecommendation`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**recommendationId** | **int64** | The unique identifier of the recommendation | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRecommendationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteRecommendation**](ResponseDeleteRecommendation.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRecommendations + +> PaginatedFolderList ListRecommendations(ctx).Dashboard(dashboard).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of the recommendations + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboard := "dashboard_example" // string | Filter by dashboard ID (accepts comma-separated values). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := "id_example" // string | Filter by recommendation ID (accepts comma-separated values). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRecommendationsAPI.ListRecommendations(context.Background()).Dashboard(dashboard).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRecommendationsAPI.ListRecommendations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRecommendations`: PaginatedFolderList + fmt.Fprintf(os.Stdout, "Response from `MetricsRecommendationsAPI.ListRecommendations`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRecommendationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dashboard** | **string** | Filter by dashboard ID (accepts comma-separated values). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **string** | Filter by recommendation ID (accepts comma-separated values). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedFolderList**](PaginatedFolderList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/MetricsReportsAPI.md b/azion-api/docs/MetricsReportsAPI.md new file mode 100644 index 0000000..e47d526 --- /dev/null +++ b/azion-api/docs/MetricsReportsAPI.md @@ -0,0 +1,505 @@ +# \MetricsReportsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateReport**](MetricsReportsAPI.md#CreateReport) | **Post** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports | Create a new report +[**DeleteReport**](MetricsReportsAPI.md#DeleteReport) | **Delete** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id} | Delete a report +[**ListReports**](MetricsReportsAPI.md#ListReports) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports | List of reports +[**OrderingReport**](MetricsReportsAPI.md#OrderingReport) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/order | Ordering reports in row +[**RetrieveReport**](MetricsReportsAPI.md#RetrieveReport) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id} | Retrieve details from a report +[**UpdateReport**](MetricsReportsAPI.md#UpdateReport) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id}/reports/{report_id} | Update a report + + + +## CreateReport + +> ResponseReport CreateReport(ctx, dashboardId, folderId, rowId).ReportRequest(reportRequest).Execute() + +Create a new report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowId := int64(789) // int64 | The unique identifier of the row + reportRequest := *openapiclient.NewReportRequest("Description_example", "Type_example", "AggregationType_example", "DataUnit_example", []openapiclient.BaseQueryRequest{*openapiclient.NewBaseQueryRequest("Dataset_example", int64(123), "OrderDirection_example")}, int64(123), "Name_example") // ReportRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsReportsAPI.CreateReport(context.Background(), dashboardId, folderId, rowId).ReportRequest(reportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsReportsAPI.CreateReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateReport`: ResponseReport + fmt.Fprintf(os.Stdout, "Response from `MetricsReportsAPI.CreateReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **reportRequest** | [**ReportRequest**](ReportRequest.md) | | + +### Return type + +[**ResponseReport**](ResponseReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteReport + +> ResponseDeleteReport DeleteReport(ctx, dashboardId, folderId, reportId, rowId).Execute() + +Delete a report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + reportId := int64(789) // int64 | The unique identifier of the report + rowId := int64(789) // int64 | The unique identifier of the row + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsReportsAPI.DeleteReport(context.Background(), dashboardId, folderId, reportId, rowId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsReportsAPI.DeleteReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteReport`: ResponseDeleteReport + fmt.Fprintf(os.Stdout, "Response from `MetricsReportsAPI.DeleteReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**reportId** | **int64** | The unique identifier of the report | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + +### Return type + +[**ResponseDeleteReport**](ResponseDeleteReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListReports + +> PaginatedReportList ListReports(ctx, dashboardId, folderId, rowId).AggregationType(aggregationType).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Type_(type_).Execute() + +List of reports + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowId := int64(789) // int64 | The unique identifier of the row + aggregationType := "aggregationType_example" // string | Filter by aggregation type (accepts comma-separated values). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + type_ := "type__example" // string | Filter by type (accepts comma-separated values). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsReportsAPI.ListReports(context.Background(), dashboardId, folderId, rowId).AggregationType(aggregationType).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Type_(type_).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsReportsAPI.ListReports``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListReports`: PaginatedReportList + fmt.Fprintf(os.Stdout, "Response from `MetricsReportsAPI.ListReports`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListReportsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **aggregationType** | **string** | Filter by aggregation type (accepts comma-separated values). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **type_** | **string** | Filter by type (accepts comma-separated values). | + +### Return type + +[**PaginatedReportList**](PaginatedReportList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## OrderingReport + +> ResponseOrder OrderingReport(ctx, dashboardId, folderId, rowId).OrderRequest(orderRequest).Execute() + +Ordering reports in row + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowId := int64(789) // int64 | The unique identifier of the row + orderRequest := *openapiclient.NewOrderRequest([]int64{int64(123)}) // OrderRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsReportsAPI.OrderingReport(context.Background(), dashboardId, folderId, rowId).OrderRequest(orderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsReportsAPI.OrderingReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OrderingReport`: ResponseOrder + fmt.Fprintf(os.Stdout, "Response from `MetricsReportsAPI.OrderingReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiOrderingReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **orderRequest** | [**OrderRequest**](OrderRequest.md) | | + +### Return type + +[**ResponseOrder**](ResponseOrder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveReport + +> ResponseRetrieveReport RetrieveReport(ctx, dashboardId, folderId, reportId, rowId).Fields(fields).Execute() + +Retrieve details from a report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + reportId := int64(789) // int64 | The unique identifier of the report + rowId := int64(789) // int64 | The unique identifier of the row + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsReportsAPI.RetrieveReport(context.Background(), dashboardId, folderId, reportId, rowId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsReportsAPI.RetrieveReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveReport`: ResponseRetrieveReport + fmt.Fprintf(os.Stdout, "Response from `MetricsReportsAPI.RetrieveReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**reportId** | **int64** | The unique identifier of the report | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveReport**](ResponseRetrieveReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateReport + +> ResponseReport UpdateReport(ctx, dashboardId, folderId, reportId, rowId).ReportRequest(reportRequest).Execute() + +Update a report + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + reportId := int64(789) // int64 | The unique identifier of the report + rowId := int64(789) // int64 | The unique identifier of the row + reportRequest := *openapiclient.NewReportRequest("Description_example", "Type_example", "AggregationType_example", "DataUnit_example", []openapiclient.BaseQueryRequest{*openapiclient.NewBaseQueryRequest("Dataset_example", int64(123), "OrderDirection_example")}, int64(123), "Name_example") // ReportRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsReportsAPI.UpdateReport(context.Background(), dashboardId, folderId, reportId, rowId).ReportRequest(reportRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsReportsAPI.UpdateReport``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateReport`: ResponseReport + fmt.Fprintf(os.Stdout, "Response from `MetricsReportsAPI.UpdateReport`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**reportId** | **int64** | The unique identifier of the report | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateReportRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + + **reportRequest** | [**ReportRequest**](ReportRequest.md) | | + +### Return type + +[**ResponseReport**](ResponseReport.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/MetricsRowsAPI.md b/azion-api/docs/MetricsRowsAPI.md new file mode 100644 index 0000000..27cbded --- /dev/null +++ b/azion-api/docs/MetricsRowsAPI.md @@ -0,0 +1,483 @@ +# \MetricsRowsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateRow**](MetricsRowsAPI.md#CreateRow) | **Post** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows | Create a new row +[**DeleteRow**](MetricsRowsAPI.md#DeleteRow) | **Delete** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id} | Delete a row +[**ListRows**](MetricsRowsAPI.md#ListRows) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows | List of the rows +[**OrderingRow**](MetricsRowsAPI.md#OrderingRow) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/order | Ordering rows in dashboard +[**RetrieveRow**](MetricsRowsAPI.md#RetrieveRow) | **Get** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id} | Retrieve details from a row +[**UpdateRow**](MetricsRowsAPI.md#UpdateRow) | **Put** /metrics/folders/{folder_id}/dashboards/{dashboard_id}/rows/{row_id} | Update a row + + + +## CreateRow + +> ResponseRow CreateRow(ctx, dashboardId, folderId).RowRequest(rowRequest).Execute() + +Create a new row + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowRequest := *openapiclient.NewRowRequest("Title_example") // RowRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRowsAPI.CreateRow(context.Background(), dashboardId, folderId).RowRequest(rowRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRowsAPI.CreateRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateRow`: ResponseRow + fmt.Fprintf(os.Stdout, "Response from `MetricsRowsAPI.CreateRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **rowRequest** | [**RowRequest**](RowRequest.md) | | + +### Return type + +[**ResponseRow**](ResponseRow.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteRow + +> ResponseDeleteRow DeleteRow(ctx, dashboardId, folderId, rowId).Execute() + +Delete a row + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowId := int64(789) // int64 | The unique identifier of the row + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRowsAPI.DeleteRow(context.Background(), dashboardId, folderId, rowId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRowsAPI.DeleteRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteRow`: ResponseDeleteRow + fmt.Fprintf(os.Stdout, "Response from `MetricsRowsAPI.DeleteRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**ResponseDeleteRow**](ResponseDeleteRow.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRows + +> PaginatedRowList ListRows(ctx, dashboardId, folderId).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Title(title).Execute() + +List of the rows + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + title := "title_example" // string | Filter by title (case-insensitive, partial match). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRowsAPI.ListRows(context.Background(), dashboardId, folderId).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Title(title).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRowsAPI.ListRows``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRows`: PaginatedRowList + fmt.Fprintf(os.Stdout, "Response from `MetricsRowsAPI.ListRows`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRowsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **title** | **string** | Filter by title (case-insensitive, partial match). | + +### Return type + +[**PaginatedRowList**](PaginatedRowList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## OrderingRow + +> ResponseOrder OrderingRow(ctx, dashboardId, folderId).OrderRequest(orderRequest).Execute() + +Ordering rows in dashboard + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + orderRequest := *openapiclient.NewOrderRequest([]int64{int64(123)}) // OrderRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRowsAPI.OrderingRow(context.Background(), dashboardId, folderId).OrderRequest(orderRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRowsAPI.OrderingRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OrderingRow`: ResponseOrder + fmt.Fprintf(os.Stdout, "Response from `MetricsRowsAPI.OrderingRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | + +### Other Parameters + +Other parameters are passed through a pointer to a apiOrderingRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **orderRequest** | [**OrderRequest**](OrderRequest.md) | | + +### Return type + +[**ResponseOrder**](ResponseOrder.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveRow + +> ResponseRetrieveRow RetrieveRow(ctx, dashboardId, folderId, rowId).Fields(fields).Execute() + +Retrieve details from a row + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowId := int64(789) // int64 | The unique identifier of the row + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRowsAPI.RetrieveRow(context.Background(), dashboardId, folderId, rowId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRowsAPI.RetrieveRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveRow`: ResponseRetrieveRow + fmt.Fprintf(os.Stdout, "Response from `MetricsRowsAPI.RetrieveRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveRow**](ResponseRetrieveRow.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateRow + +> ResponseRow UpdateRow(ctx, dashboardId, folderId, rowId).RowRequest(rowRequest).Execute() + +Update a row + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + dashboardId := int64(789) // int64 | The unique identifier of the dashboard + folderId := int64(789) // int64 | The unique identifier of the folder + rowId := int64(789) // int64 | The unique identifier of the row + rowRequest := *openapiclient.NewRowRequest("Title_example") // RowRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.MetricsRowsAPI.UpdateRow(context.Background(), dashboardId, folderId, rowId).RowRequest(rowRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `MetricsRowsAPI.UpdateRow``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateRow`: ResponseRow + fmt.Fprintf(os.Stdout, "Response from `MetricsRowsAPI.UpdateRow`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**dashboardId** | **int64** | The unique identifier of the dashboard | +**folderId** | **int64** | The unique identifier of the folder | +**rowId** | **int64** | The unique identifier of the row | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRowRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **rowRequest** | [**RowRequest**](RowRequest.md) | | + +### Return type + +[**ResponseRow**](ResponseRow.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Namespace.md b/azion-api/docs/Namespace.md new file mode 100644 index 0000000..c4c58a5 --- /dev/null +++ b/azion-api/docs/Namespace.md @@ -0,0 +1,113 @@ +# Namespace + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**CreatedAt** | **NullableTime** | | +**LastModified** | **NullableTime** | | + +## Methods + +### NewNamespace + +`func NewNamespace(name string, createdAt NullableTime, lastModified NullableTime, ) *Namespace` + +NewNamespace instantiates a new Namespace object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNamespaceWithDefaults + +`func NewNamespaceWithDefaults() *Namespace` + +NewNamespaceWithDefaults instantiates a new Namespace object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *Namespace) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Namespace) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Namespace) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCreatedAt + +`func (o *Namespace) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *Namespace) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *Namespace) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### SetCreatedAtNil + +`func (o *Namespace) SetCreatedAtNil(b bool)` + + SetCreatedAtNil sets the value for CreatedAt to be an explicit nil + +### UnsetCreatedAt +`func (o *Namespace) UnsetCreatedAt()` + +UnsetCreatedAt ensures that no value is present for CreatedAt, not even an explicit nil +### GetLastModified + +`func (o *Namespace) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Namespace) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Namespace) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### SetLastModifiedNil + +`func (o *Namespace) SetLastModifiedNil(b bool)` + + SetLastModifiedNil sets the value for LastModified to be an explicit nil + +### UnsetLastModified +`func (o *Namespace) UnsetLastModified()` + +UnsetLastModified ensures that no value is present for LastModified, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NamespaceCreateRequest.md b/azion-api/docs/NamespaceCreateRequest.md new file mode 100644 index 0000000..47f9664 --- /dev/null +++ b/azion-api/docs/NamespaceCreateRequest.md @@ -0,0 +1,51 @@ +# NamespaceCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +## Methods + +### NewNamespaceCreateRequest + +`func NewNamespaceCreateRequest(name string, ) *NamespaceCreateRequest` + +NewNamespaceCreateRequest instantiates a new NamespaceCreateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNamespaceCreateRequestWithDefaults + +`func NewNamespaceCreateRequestWithDefaults() *NamespaceCreateRequest` + +NewNamespaceCreateRequestWithDefaults instantiates a new NamespaceCreateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NamespaceCreateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NamespaceCreateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NamespaceCreateRequest) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NamespaceList.md b/azion-api/docs/NamespaceList.md new file mode 100644 index 0000000..91da21c --- /dev/null +++ b/azion-api/docs/NamespaceList.md @@ -0,0 +1,72 @@ +# NamespaceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]Namespace**](Namespace.md) | | +**Pagination** | [**Pagination**](Pagination.md) | | + +## Methods + +### NewNamespaceList + +`func NewNamespaceList(results []Namespace, pagination Pagination, ) *NamespaceList` + +NewNamespaceList instantiates a new NamespaceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNamespaceListWithDefaults + +`func NewNamespaceListWithDefaults() *NamespaceList` + +NewNamespaceListWithDefaults instantiates a new NamespaceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetResults + +`func (o *NamespaceList) GetResults() []Namespace` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *NamespaceList) GetResultsOk() (*[]Namespace, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *NamespaceList) SetResults(v []Namespace)` + +SetResults sets Results field to given value. + + +### GetPagination + +`func (o *NamespaceList) GetPagination() Pagination` + +GetPagination returns the Pagination field if non-nil, zero value otherwise. + +### GetPaginationOk + +`func (o *NamespaceList) GetPaginationOk() (*Pagination, bool)` + +GetPaginationOk returns a tuple with the Pagination field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPagination + +`func (o *NamespaceList) SetPagination(v Pagination)` + +SetPagination sets Pagination field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NetworkList.md b/azion-api/docs/NetworkList.md new file mode 100644 index 0000000..b9474a5 --- /dev/null +++ b/azion-api/docs/NetworkList.md @@ -0,0 +1,182 @@ +# NetworkList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Type** | **string** | * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR | +**Items** | **[]string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewNetworkList + +`func NewNetworkList(id int64, name string, type_ string, items []string, lastEditor string, lastModified time.Time, ) *NetworkList` + +NewNetworkList instantiates a new NetworkList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNetworkListWithDefaults + +`func NewNetworkListWithDefaults() *NetworkList` + +NewNetworkListWithDefaults instantiates a new NetworkList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NetworkList) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NetworkList) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NetworkList) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *NetworkList) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NetworkList) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NetworkList) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *NetworkList) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NetworkList) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NetworkList) SetType(v string)` + +SetType sets Type field to given value. + + +### GetItems + +`func (o *NetworkList) GetItems() []string` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *NetworkList) GetItemsOk() (*[]string, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *NetworkList) SetItems(v []string)` + +SetItems sets Items field to given value. + + +### GetLastEditor + +`func (o *NetworkList) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *NetworkList) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *NetworkList) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *NetworkList) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *NetworkList) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *NetworkList) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *NetworkList) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NetworkList) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NetworkList) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NetworkList) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NetworkListRequest.md b/azion-api/docs/NetworkListRequest.md new file mode 100644 index 0000000..471e407 --- /dev/null +++ b/azion-api/docs/NetworkListRequest.md @@ -0,0 +1,119 @@ +# NetworkListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | **string** | * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR | +**Items** | **[]string** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewNetworkListRequest + +`func NewNetworkListRequest(name string, type_ string, items []string, ) *NetworkListRequest` + +NewNetworkListRequest instantiates a new NetworkListRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNetworkListRequestWithDefaults + +`func NewNetworkListRequestWithDefaults() *NetworkListRequest` + +NewNetworkListRequestWithDefaults instantiates a new NetworkListRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NetworkListRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NetworkListRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NetworkListRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *NetworkListRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NetworkListRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NetworkListRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetItems + +`func (o *NetworkListRequest) GetItems() []string` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *NetworkListRequest) GetItemsOk() (*[]string, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *NetworkListRequest) SetItems(v []string)` + +SetItems sets Items field to given value. + + +### GetActive + +`func (o *NetworkListRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NetworkListRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NetworkListRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NetworkListRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NetworkListResponse.md b/azion-api/docs/NetworkListResponse.md new file mode 100644 index 0000000..eae5d75 --- /dev/null +++ b/azion-api/docs/NetworkListResponse.md @@ -0,0 +1,77 @@ +# NetworkListResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**NetworkList**](NetworkList.md) | | + +## Methods + +### NewNetworkListResponse + +`func NewNetworkListResponse(data NetworkList, ) *NetworkListResponse` + +NewNetworkListResponse instantiates a new NetworkListResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNetworkListResponseWithDefaults + +`func NewNetworkListResponseWithDefaults() *NetworkListResponse` + +NewNetworkListResponseWithDefaults instantiates a new NetworkListResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *NetworkListResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *NetworkListResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *NetworkListResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *NetworkListResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *NetworkListResponse) GetData() NetworkList` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *NetworkListResponse) GetDataOk() (*NetworkList, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *NetworkListResponse) SetData(v NetworkList)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NetworkListSummary.md b/azion-api/docs/NetworkListSummary.md new file mode 100644 index 0000000..6bd515f --- /dev/null +++ b/azion-api/docs/NetworkListSummary.md @@ -0,0 +1,161 @@ +# NetworkListSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Type** | **string** | * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewNetworkListSummary + +`func NewNetworkListSummary(id int64, name string, type_ string, lastEditor string, lastModified time.Time, ) *NetworkListSummary` + +NewNetworkListSummary instantiates a new NetworkListSummary object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNetworkListSummaryWithDefaults + +`func NewNetworkListSummaryWithDefaults() *NetworkListSummary` + +NewNetworkListSummaryWithDefaults instantiates a new NetworkListSummary object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NetworkListSummary) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NetworkListSummary) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NetworkListSummary) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *NetworkListSummary) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NetworkListSummary) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NetworkListSummary) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *NetworkListSummary) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NetworkListSummary) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *NetworkListSummary) SetType(v string)` + +SetType sets Type field to given value. + + +### GetLastEditor + +`func (o *NetworkListSummary) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *NetworkListSummary) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *NetworkListSummary) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *NetworkListSummary) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *NetworkListSummary) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *NetworkListSummary) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *NetworkListSummary) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NetworkListSummary) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NetworkListSummary) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NetworkListSummary) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NetworkListsAPI.md b/azion-api/docs/NetworkListsAPI.md new file mode 100644 index 0000000..be59854 --- /dev/null +++ b/azion-api/docs/NetworkListsAPI.md @@ -0,0 +1,457 @@ +# \NetworkListsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateNetworkList**](NetworkListsAPI.md#CreateNetworkList) | **Post** /workspace/network_lists | Create a Network List +[**DeleteNetworkList**](NetworkListsAPI.md#DeleteNetworkList) | **Delete** /workspace/network_lists/{network_list_id} | Delete a Network List +[**ListNetworkLists**](NetworkListsAPI.md#ListNetworkLists) | **Get** /workspace/network_lists | List Network Lists +[**PartialUpdateNetworkList**](NetworkListsAPI.md#PartialUpdateNetworkList) | **Patch** /workspace/network_lists/{network_list_id} | Partially update a Network List +[**RetrieveNetworkList**](NetworkListsAPI.md#RetrieveNetworkList) | **Get** /workspace/network_lists/{network_list_id} | Retrieve details of a Network List +[**UpdateNetworkList**](NetworkListsAPI.md#UpdateNetworkList) | **Put** /workspace/network_lists/{network_list_id} | Update a Network List + + + +## CreateNetworkList + +> NetworkListResponse CreateNetworkList(ctx).NetworkListRequest(networkListRequest).Execute() + +Create a Network List + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + networkListRequest := *openapiclient.NewNetworkListRequest("Name_example", "Type_example", []string{"Items_example"}) // NetworkListRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.NetworkListsAPI.CreateNetworkList(context.Background()).NetworkListRequest(networkListRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NetworkListsAPI.CreateNetworkList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateNetworkList`: NetworkListResponse + fmt.Fprintf(os.Stdout, "Response from `NetworkListsAPI.CreateNetworkList`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateNetworkListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **networkListRequest** | [**NetworkListRequest**](NetworkListRequest.md) | | + +### Return type + +[**NetworkListResponse**](NetworkListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteNetworkList + +> DeleteResponse DeleteNetworkList(ctx, networkListId).Execute() + +Delete a Network List + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + networkListId := int64(789) // int64 | A unique integer value identifying the network list. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.NetworkListsAPI.DeleteNetworkList(context.Background(), networkListId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NetworkListsAPI.DeleteNetworkList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteNetworkList`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `NetworkListsAPI.DeleteNetworkList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**networkListId** | **int64** | A unique integer value identifying the network list. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteNetworkListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNetworkLists + +> PaginatedNetworkListSummaryList ListNetworkLists(ctx).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).ListTypeIn(listTypeIn).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Network Lists + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + listTypeIn := "listTypeIn_example" // string | Filter by list type (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.NetworkListsAPI.ListNetworkLists(context.Background()).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).ListTypeIn(listTypeIn).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NetworkListsAPI.ListNetworkLists``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNetworkLists`: PaginatedNetworkListSummaryList + fmt.Fprintf(os.Stdout, "Response from `NetworkListsAPI.ListNetworkLists`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListNetworkListsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **listTypeIn** | **string** | Filter by list type (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedNetworkListSummaryList**](PaginatedNetworkListSummaryList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateNetworkList + +> NetworkListResponse PartialUpdateNetworkList(ctx, networkListId).PatchedNetworkListRequest(patchedNetworkListRequest).Execute() + +Partially update a Network List + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + networkListId := int64(789) // int64 | A unique integer value identifying the network list. + patchedNetworkListRequest := *openapiclient.NewPatchedNetworkListRequest() // PatchedNetworkListRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.NetworkListsAPI.PartialUpdateNetworkList(context.Background(), networkListId).PatchedNetworkListRequest(patchedNetworkListRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NetworkListsAPI.PartialUpdateNetworkList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateNetworkList`: NetworkListResponse + fmt.Fprintf(os.Stdout, "Response from `NetworkListsAPI.PartialUpdateNetworkList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**networkListId** | **int64** | A unique integer value identifying the network list. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateNetworkListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedNetworkListRequest** | [**PatchedNetworkListRequest**](PatchedNetworkListRequest.md) | | + +### Return type + +[**NetworkListResponse**](NetworkListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveNetworkList + +> NetworkListResponse RetrieveNetworkList(ctx, networkListId).Fields(fields).Ipv4(ipv4).Ipv6(ipv6).Execute() + +Retrieve details of a Network List + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + networkListId := int64(789) // int64 | A unique integer value identifying the network list. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ipv4 := true // bool | Filter by IPv4. Only applicable for network lists of type 'ip_cidr'. (optional) + ipv6 := true // bool | Filter by IPv6. Only applicable for network lists of type 'ip_cidr'. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.NetworkListsAPI.RetrieveNetworkList(context.Background(), networkListId).Fields(fields).Ipv4(ipv4).Ipv6(ipv6).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NetworkListsAPI.RetrieveNetworkList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveNetworkList`: NetworkListResponse + fmt.Fprintf(os.Stdout, "Response from `NetworkListsAPI.RetrieveNetworkList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**networkListId** | **int64** | A unique integer value identifying the network list. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveNetworkListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ipv4** | **bool** | Filter by IPv4. Only applicable for network lists of type 'ip_cidr'. | + **ipv6** | **bool** | Filter by IPv6. Only applicable for network lists of type 'ip_cidr'. | + +### Return type + +[**NetworkListResponse**](NetworkListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateNetworkList + +> NetworkListResponse UpdateNetworkList(ctx, networkListId).NetworkListRequest(networkListRequest).Execute() + +Update a Network List + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + networkListId := int64(789) // int64 | A unique integer value identifying the network list. + networkListRequest := *openapiclient.NewNetworkListRequest("Name_example", "Type_example", []string{"Items_example"}) // NetworkListRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.NetworkListsAPI.UpdateNetworkList(context.Background(), networkListId).NetworkListRequest(networkListRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `NetworkListsAPI.UpdateNetworkList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateNetworkList`: NetworkListResponse + fmt.Fprintf(os.Stdout, "Response from `NetworkListsAPI.UpdateNetworkList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**networkListId** | **int64** | A unique integer value identifying the network list. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateNetworkListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **networkListRequest** | [**NetworkListRequest**](NetworkListRequest.md) | | + +### Return type + +[**NetworkListResponse**](NetworkListResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/NodeGroups.md b/azion-api/docs/NodeGroups.md new file mode 100644 index 0000000..a161feb --- /dev/null +++ b/azion-api/docs/NodeGroups.md @@ -0,0 +1,119 @@ +# NodeGroups + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**RefCount** | **int64** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewNodeGroups + +`func NewNodeGroups(id int64, name string, refCount int64, ) *NodeGroups` + +NewNodeGroups instantiates a new NodeGroups object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeGroupsWithDefaults + +`func NewNodeGroupsWithDefaults() *NodeGroups` + +NewNodeGroupsWithDefaults instantiates a new NodeGroups object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NodeGroups) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NodeGroups) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NodeGroups) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *NodeGroups) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NodeGroups) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NodeGroups) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRefCount + +`func (o *NodeGroups) GetRefCount() int64` + +GetRefCount returns the RefCount field if non-nil, zero value otherwise. + +### GetRefCountOk + +`func (o *NodeGroups) GetRefCountOk() (*int64, bool)` + +GetRefCountOk returns a tuple with the RefCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefCount + +`func (o *NodeGroups) SetRefCount(v int64)` + +SetRefCount sets RefCount field to given value. + + +### GetActive + +`func (o *NodeGroups) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NodeGroups) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NodeGroups) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NodeGroups) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodeGroupsById.md b/azion-api/docs/NodeGroupsById.md new file mode 100644 index 0000000..cbac7db --- /dev/null +++ b/azion-api/docs/NodeGroupsById.md @@ -0,0 +1,77 @@ +# NodeGroupsById + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewNodeGroupsById + +`func NewNodeGroupsById(id int64, ) *NodeGroupsById` + +NewNodeGroupsById instantiates a new NodeGroupsById object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeGroupsByIdWithDefaults + +`func NewNodeGroupsByIdWithDefaults() *NodeGroupsById` + +NewNodeGroupsByIdWithDefaults instantiates a new NodeGroupsById object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NodeGroupsById) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NodeGroupsById) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NodeGroupsById) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *NodeGroupsById) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NodeGroupsById) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NodeGroupsById) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NodeGroupsById) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodeGroupsByIdRequest.md b/azion-api/docs/NodeGroupsByIdRequest.md new file mode 100644 index 0000000..8fd894b --- /dev/null +++ b/azion-api/docs/NodeGroupsByIdRequest.md @@ -0,0 +1,82 @@ +# NodeGroupsByIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**NodeGroup** | Pointer to **int64** | | [optional] + +## Methods + +### NewNodeGroupsByIdRequest + +`func NewNodeGroupsByIdRequest() *NodeGroupsByIdRequest` + +NewNodeGroupsByIdRequest instantiates a new NodeGroupsByIdRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeGroupsByIdRequestWithDefaults + +`func NewNodeGroupsByIdRequestWithDefaults() *NodeGroupsByIdRequest` + +NewNodeGroupsByIdRequestWithDefaults instantiates a new NodeGroupsByIdRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NodeGroupsByIdRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NodeGroupsByIdRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NodeGroupsByIdRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *NodeGroupsByIdRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetNodeGroup + +`func (o *NodeGroupsByIdRequest) GetNodeGroup() int64` + +GetNodeGroup returns the NodeGroup field if non-nil, zero value otherwise. + +### GetNodeGroupOk + +`func (o *NodeGroupsByIdRequest) GetNodeGroupOk() (*int64, bool)` + +GetNodeGroupOk returns a tuple with the NodeGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNodeGroup + +`func (o *NodeGroupsByIdRequest) SetNodeGroup(v int64)` + +SetNodeGroup sets NodeGroup field to given value. + +### HasNodeGroup + +`func (o *NodeGroupsByIdRequest) HasNodeGroup() bool` + +HasNodeGroup returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodeGroupsRequest.md b/azion-api/docs/NodeGroupsRequest.md new file mode 100644 index 0000000..a2dbed1 --- /dev/null +++ b/azion-api/docs/NodeGroupsRequest.md @@ -0,0 +1,77 @@ +# NodeGroupsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewNodeGroupsRequest + +`func NewNodeGroupsRequest(name string, ) *NodeGroupsRequest` + +NewNodeGroupsRequest instantiates a new NodeGroupsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeGroupsRequestWithDefaults + +`func NewNodeGroupsRequestWithDefaults() *NodeGroupsRequest` + +NewNodeGroupsRequestWithDefaults instantiates a new NodeGroupsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NodeGroupsRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NodeGroupsRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NodeGroupsRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *NodeGroupsRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NodeGroupsRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NodeGroupsRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NodeGroupsRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodeServiceBind.md b/azion-api/docs/NodeServiceBind.md new file mode 100644 index 0000000..0b3e5d0 --- /dev/null +++ b/azion-api/docs/NodeServiceBind.md @@ -0,0 +1,156 @@ +# NodeServiceBind + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**ServiceName** | **string** | | +**ServiceId** | **int64** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **string** | | + +## Methods + +### NewNodeServiceBind + +`func NewNodeServiceBind(id int64, serviceName string, serviceId int64, active bool, lastEditor string, lastModified string, ) *NodeServiceBind` + +NewNodeServiceBind instantiates a new NodeServiceBind object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeServiceBindWithDefaults + +`func NewNodeServiceBindWithDefaults() *NodeServiceBind` + +NewNodeServiceBindWithDefaults instantiates a new NodeServiceBind object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NodeServiceBind) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NodeServiceBind) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NodeServiceBind) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetServiceName + +`func (o *NodeServiceBind) GetServiceName() string` + +GetServiceName returns the ServiceName field if non-nil, zero value otherwise. + +### GetServiceNameOk + +`func (o *NodeServiceBind) GetServiceNameOk() (*string, bool)` + +GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceName + +`func (o *NodeServiceBind) SetServiceName(v string)` + +SetServiceName sets ServiceName field to given value. + + +### GetServiceId + +`func (o *NodeServiceBind) GetServiceId() int64` + +GetServiceId returns the ServiceId field if non-nil, zero value otherwise. + +### GetServiceIdOk + +`func (o *NodeServiceBind) GetServiceIdOk() (*int64, bool)` + +GetServiceIdOk returns a tuple with the ServiceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceId + +`func (o *NodeServiceBind) SetServiceId(v int64)` + +SetServiceId sets ServiceId field to given value. + + +### GetActive + +`func (o *NodeServiceBind) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NodeServiceBind) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NodeServiceBind) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *NodeServiceBind) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *NodeServiceBind) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *NodeServiceBind) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *NodeServiceBind) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *NodeServiceBind) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *NodeServiceBind) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodeServices.md b/azion-api/docs/NodeServices.md new file mode 100644 index 0000000..ea75d15 --- /dev/null +++ b/azion-api/docs/NodeServices.md @@ -0,0 +1,171 @@ +# NodeServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**ServiceName** | Pointer to **string** | | [optional] +**ServiceId** | **int64** | | +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **string** | | + +## Methods + +### NewNodeServices + +`func NewNodeServices(serviceId int64, lastEditor string, lastModified string, ) *NodeServices` + +NewNodeServices instantiates a new NodeServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeServicesWithDefaults + +`func NewNodeServicesWithDefaults() *NodeServices` + +NewNodeServicesWithDefaults instantiates a new NodeServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NodeServices) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NodeServices) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NodeServices) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *NodeServices) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetServiceName + +`func (o *NodeServices) GetServiceName() string` + +GetServiceName returns the ServiceName field if non-nil, zero value otherwise. + +### GetServiceNameOk + +`func (o *NodeServices) GetServiceNameOk() (*string, bool)` + +GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceName + +`func (o *NodeServices) SetServiceName(v string)` + +SetServiceName sets ServiceName field to given value. + +### HasServiceName + +`func (o *NodeServices) HasServiceName() bool` + +HasServiceName returns a boolean if a field has been set. + +### GetServiceId + +`func (o *NodeServices) GetServiceId() int64` + +GetServiceId returns the ServiceId field if non-nil, zero value otherwise. + +### GetServiceIdOk + +`func (o *NodeServices) GetServiceIdOk() (*int64, bool)` + +GetServiceIdOk returns a tuple with the ServiceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceId + +`func (o *NodeServices) SetServiceId(v int64)` + +SetServiceId sets ServiceId field to given value. + + +### GetActive + +`func (o *NodeServices) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NodeServices) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NodeServices) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NodeServices) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *NodeServices) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *NodeServices) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *NodeServices) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *NodeServices) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *NodeServices) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *NodeServices) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodeServicesRequest.md b/azion-api/docs/NodeServicesRequest.md new file mode 100644 index 0000000..293f26e --- /dev/null +++ b/azion-api/docs/NodeServicesRequest.md @@ -0,0 +1,129 @@ +# NodeServicesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**ServiceName** | Pointer to **string** | | [optional] +**ServiceId** | **int64** | | +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewNodeServicesRequest + +`func NewNodeServicesRequest(serviceId int64, ) *NodeServicesRequest` + +NewNodeServicesRequest instantiates a new NodeServicesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodeServicesRequestWithDefaults + +`func NewNodeServicesRequestWithDefaults() *NodeServicesRequest` + +NewNodeServicesRequestWithDefaults instantiates a new NodeServicesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *NodeServicesRequest) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *NodeServicesRequest) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *NodeServicesRequest) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *NodeServicesRequest) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetServiceName + +`func (o *NodeServicesRequest) GetServiceName() string` + +GetServiceName returns the ServiceName field if non-nil, zero value otherwise. + +### GetServiceNameOk + +`func (o *NodeServicesRequest) GetServiceNameOk() (*string, bool)` + +GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceName + +`func (o *NodeServicesRequest) SetServiceName(v string)` + +SetServiceName sets ServiceName field to given value. + +### HasServiceName + +`func (o *NodeServicesRequest) HasServiceName() bool` + +HasServiceName returns a boolean if a field has been set. + +### GetServiceId + +`func (o *NodeServicesRequest) GetServiceId() int64` + +GetServiceId returns the ServiceId field if non-nil, zero value otherwise. + +### GetServiceIdOk + +`func (o *NodeServicesRequest) GetServiceIdOk() (*int64, bool)` + +GetServiceIdOk returns a tuple with the ServiceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceId + +`func (o *NodeServicesRequest) SetServiceId(v int64)` + +SetServiceId sets ServiceId field to given value. + + +### GetActive + +`func (o *NodeServicesRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *NodeServicesRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *NodeServicesRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *NodeServicesRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Nodes.md b/azion-api/docs/Nodes.md new file mode 100644 index 0000000..80a9e43 --- /dev/null +++ b/azion-api/docs/Nodes.md @@ -0,0 +1,234 @@ +# Nodes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**HashId** | **string** | | +**Name** | **string** | | +**Status** | **string** | * `waiting_authorization` - waiting_authorization * `authorized` - authorized | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **string** | | +**Modules** | Pointer to **interface{}** | | [optional] +**ProductVersion** | **string** | | + +## Methods + +### NewNodes + +`func NewNodes(id int64, hashId string, name string, status string, active bool, lastEditor string, lastModified string, productVersion string, ) *Nodes` + +NewNodes instantiates a new Nodes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodesWithDefaults + +`func NewNodesWithDefaults() *Nodes` + +NewNodesWithDefaults instantiates a new Nodes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Nodes) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Nodes) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Nodes) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetHashId + +`func (o *Nodes) GetHashId() string` + +GetHashId returns the HashId field if non-nil, zero value otherwise. + +### GetHashIdOk + +`func (o *Nodes) GetHashIdOk() (*string, bool)` + +GetHashIdOk returns a tuple with the HashId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHashId + +`func (o *Nodes) SetHashId(v string)` + +SetHashId sets HashId field to given value. + + +### GetName + +`func (o *Nodes) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Nodes) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Nodes) SetName(v string)` + +SetName sets Name field to given value. + + +### GetStatus + +`func (o *Nodes) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Nodes) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Nodes) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetActive + +`func (o *Nodes) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Nodes) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Nodes) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *Nodes) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Nodes) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Nodes) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Nodes) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Nodes) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Nodes) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + +### GetModules + +`func (o *Nodes) GetModules() interface{}` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *Nodes) GetModulesOk() (*interface{}, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *Nodes) SetModules(v interface{})` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *Nodes) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### SetModulesNil + +`func (o *Nodes) SetModulesNil(b bool)` + + SetModulesNil sets the value for Modules to be an explicit nil + +### UnsetModules +`func (o *Nodes) UnsetModules()` + +UnsetModules ensures that no value is present for Modules, not even an explicit nil +### GetProductVersion + +`func (o *Nodes) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Nodes) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Nodes) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/NodesRequest.md b/azion-api/docs/NodesRequest.md new file mode 100644 index 0000000..916eff3 --- /dev/null +++ b/azion-api/docs/NodesRequest.md @@ -0,0 +1,108 @@ +# NodesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Status** | **string** | * `waiting_authorization` - waiting_authorization * `authorized` - authorized | +**Modules** | Pointer to **interface{}** | | [optional] + +## Methods + +### NewNodesRequest + +`func NewNodesRequest(name string, status string, ) *NodesRequest` + +NewNodesRequest instantiates a new NodesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewNodesRequestWithDefaults + +`func NewNodesRequestWithDefaults() *NodesRequest` + +NewNodesRequestWithDefaults instantiates a new NodesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *NodesRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NodesRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *NodesRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetStatus + +`func (o *NodesRequest) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *NodesRequest) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *NodesRequest) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetModules + +`func (o *NodesRequest) GetModules() interface{}` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *NodesRequest) GetModulesOk() (*interface{}, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *NodesRequest) SetModules(v interface{})` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *NodesRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### SetModulesNil + +`func (o *NodesRequest) SetModulesNil(b bool)` + + SetModulesNil sets the value for Modules to be an explicit nil + +### UnsetModules +`func (o *NodesRequest) UnsetModules()` + +UnsetModules ensures that no value is present for Modules, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ObjectResponseAsyncData.md b/azion-api/docs/ObjectResponseAsyncData.md new file mode 100644 index 0000000..f66e3ba --- /dev/null +++ b/azion-api/docs/ObjectResponseAsyncData.md @@ -0,0 +1,51 @@ +# ObjectResponseAsyncData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ObjectKey** | **string** | | + +## Methods + +### NewObjectResponseAsyncData + +`func NewObjectResponseAsyncData(objectKey string, ) *ObjectResponseAsyncData` + +NewObjectResponseAsyncData instantiates a new ObjectResponseAsyncData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObjectResponseAsyncDataWithDefaults + +`func NewObjectResponseAsyncDataWithDefaults() *ObjectResponseAsyncData` + +NewObjectResponseAsyncDataWithDefaults instantiates a new ObjectResponseAsyncData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObjectKey + +`func (o *ObjectResponseAsyncData) GetObjectKey() string` + +GetObjectKey returns the ObjectKey field if non-nil, zero value otherwise. + +### GetObjectKeyOk + +`func (o *ObjectResponseAsyncData) GetObjectKeyOk() (*string, bool)` + +GetObjectKeyOk returns a tuple with the ObjectKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectKey + +`func (o *ObjectResponseAsyncData) SetObjectKey(v string)` + +SetObjectKey sets ObjectKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ObjectResponseData.md b/azion-api/docs/ObjectResponseData.md new file mode 100644 index 0000000..8498700 --- /dev/null +++ b/azion-api/docs/ObjectResponseData.md @@ -0,0 +1,51 @@ +# ObjectResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ObjectKey** | **string** | | + +## Methods + +### NewObjectResponseData + +`func NewObjectResponseData(objectKey string, ) *ObjectResponseData` + +NewObjectResponseData instantiates a new ObjectResponseData object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewObjectResponseDataWithDefaults + +`func NewObjectResponseDataWithDefaults() *ObjectResponseData` + +NewObjectResponseDataWithDefaults instantiates a new ObjectResponseData object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObjectKey + +`func (o *ObjectResponseData) GetObjectKey() string` + +GetObjectKey returns the ObjectKey field if non-nil, zero value otherwise. + +### GetObjectKeyOk + +`func (o *ObjectResponseData) GetObjectKeyOk() (*string, bool)` + +GetObjectKeyOk returns a tuple with the ObjectKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectKey + +`func (o *ObjectResponseData) SetObjectKey(v string)` + +SetObjectKey sets ObjectKey field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OrchestratorNodeGroupsAPI.md b/azion-api/docs/OrchestratorNodeGroupsAPI.md new file mode 100644 index 0000000..072b396 --- /dev/null +++ b/azion-api/docs/OrchestratorNodeGroupsAPI.md @@ -0,0 +1,373 @@ +# \OrchestratorNodeGroupsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**BindNodeGroup**](OrchestratorNodeGroupsAPI.md#BindNodeGroup) | **Post** /orchestrator/nodes/{node_id}/groups | Bind Node Group +[**CreateNodeGroup**](OrchestratorNodeGroupsAPI.md#CreateNodeGroup) | **Post** /orchestrator/nodes/groups | Create Node Group +[**ListNodeGroups**](OrchestratorNodeGroupsAPI.md#ListNodeGroups) | **Get** /orchestrator/nodes/groups | List Node Groups +[**ListNodeGroupsByID**](OrchestratorNodeGroupsAPI.md#ListNodeGroupsByID) | **Get** /orchestrator/nodes/{node_id}/groups | List Node Groups by id +[**RemoveNodeGroup**](OrchestratorNodeGroupsAPI.md#RemoveNodeGroup) | **Delete** /orchestrator/nodes/groups/{group_id} | Remove Node Group + + + +## BindNodeGroup + +> ResponseAsyncNodeGroupsById BindNodeGroup(ctx, nodeId).NodeGroupsByIdRequest(nodeGroupsByIdRequest).Execute() + +Bind Node Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + nodeGroupsByIdRequest := *openapiclient.NewNodeGroupsByIdRequest() // NodeGroupsByIdRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeGroupsAPI.BindNodeGroup(context.Background(), nodeId).NodeGroupsByIdRequest(nodeGroupsByIdRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeGroupsAPI.BindNodeGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BindNodeGroup`: ResponseAsyncNodeGroupsById + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeGroupsAPI.BindNodeGroup`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBindNodeGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nodeGroupsByIdRequest** | [**NodeGroupsByIdRequest**](NodeGroupsByIdRequest.md) | | + +### Return type + +[**ResponseAsyncNodeGroupsById**](ResponseAsyncNodeGroupsById.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateNodeGroup + +> NodeGroups CreateNodeGroup(ctx).NodeGroupsRequest(nodeGroupsRequest).Execute() + +Create Node Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeGroupsRequest := *openapiclient.NewNodeGroupsRequest("Name_example") // NodeGroupsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeGroupsAPI.CreateNodeGroup(context.Background()).NodeGroupsRequest(nodeGroupsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeGroupsAPI.CreateNodeGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateNodeGroup`: NodeGroups + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeGroupsAPI.CreateNodeGroup`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateNodeGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **nodeGroupsRequest** | [**NodeGroupsRequest**](NodeGroupsRequest.md) | | + +### Return type + +[**NodeGroups**](NodeGroups.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNodeGroups + +> PaginatedNodeGroupsList ListNodeGroups(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Node Groups + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeGroupsAPI.ListNodeGroups(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeGroupsAPI.ListNodeGroups``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNodeGroups`: PaginatedNodeGroupsList + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeGroupsAPI.ListNodeGroups`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListNodeGroupsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedNodeGroupsList**](PaginatedNodeGroupsList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNodeGroupsByID + +> PaginatedNodeGroupsByIdList ListNodeGroupsByID(ctx, nodeId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Node Groups by id + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeGroupsAPI.ListNodeGroupsByID(context.Background(), nodeId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeGroupsAPI.ListNodeGroupsByID``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNodeGroupsByID`: PaginatedNodeGroupsByIdList + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeGroupsAPI.ListNodeGroupsByID`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListNodeGroupsByIDRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedNodeGroupsByIdList**](PaginatedNodeGroupsByIdList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RemoveNodeGroup + +> RemoveNodeGroup(ctx, groupId).Execute() + +Remove Node Group + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + groupId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrchestratorNodeGroupsAPI.RemoveNodeGroup(context.Background(), groupId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeGroupsAPI.RemoveNodeGroup``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**groupId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRemoveNodeGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/OrchestratorNodeServicesAPI.md b/azion-api/docs/OrchestratorNodeServicesAPI.md new file mode 100644 index 0000000..e5e049e --- /dev/null +++ b/azion-api/docs/OrchestratorNodeServicesAPI.md @@ -0,0 +1,312 @@ +# \OrchestratorNodeServicesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**BindNodeServices**](OrchestratorNodeServicesAPI.md#BindNodeServices) | **Post** /orchestrator/nodes/{node_id}/services | Bind Node Service +[**ListNodeServices**](OrchestratorNodeServicesAPI.md#ListNodeServices) | **Get** /orchestrator/nodes/{node_id}/services | List Node Services +[**RetrieveNodeServiceBind**](OrchestratorNodeServicesAPI.md#RetrieveNodeServiceBind) | **Get** /orchestrator/nodes/{node_id}/services/{bind_id} | Retrieve details of an Node Service Bind +[**UnbindNodeService**](OrchestratorNodeServicesAPI.md#UnbindNodeService) | **Delete** /orchestrator/nodes/{node_id}/services/{bind_id} | Unbind Node Service + + + +## BindNodeServices + +> ResponseAsyncNodeServices BindNodeServices(ctx, nodeId).NodeServicesRequest(nodeServicesRequest).Execute() + +Bind Node Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + nodeServicesRequest := *openapiclient.NewNodeServicesRequest(int64(123)) // NodeServicesRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeServicesAPI.BindNodeServices(context.Background(), nodeId).NodeServicesRequest(nodeServicesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeServicesAPI.BindNodeServices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `BindNodeServices`: ResponseAsyncNodeServices + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeServicesAPI.BindNodeServices`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiBindNodeServicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nodeServicesRequest** | [**NodeServicesRequest**](NodeServicesRequest.md) | | + +### Return type + +[**ResponseAsyncNodeServices**](ResponseAsyncNodeServices.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNodeServices + +> PaginatedNodeServicesList ListNodeServices(ctx, nodeId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Node Services + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeServicesAPI.ListNodeServices(context.Background(), nodeId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeServicesAPI.ListNodeServices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNodeServices`: PaginatedNodeServicesList + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeServicesAPI.ListNodeServices`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListNodeServicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedNodeServicesList**](PaginatedNodeServicesList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveNodeServiceBind + +> ResponseRetrieveNodeServiceBind RetrieveNodeServiceBind(ctx, bindId, nodeId).Fields(fields).Execute() + +Retrieve details of an Node Service Bind + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bindId := int64(789) // int64 | + nodeId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeServicesAPI.RetrieveNodeServiceBind(context.Background(), bindId, nodeId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeServicesAPI.RetrieveNodeServiceBind``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveNodeServiceBind`: ResponseRetrieveNodeServiceBind + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeServicesAPI.RetrieveNodeServiceBind`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bindId** | **int64** | | +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveNodeServiceBindRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveNodeServiceBind**](ResponseRetrieveNodeServiceBind.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UnbindNodeService + +> ResponseAsyncDeleteNodeServiceBind UnbindNodeService(ctx, bindId, nodeId).Execute() + +Unbind Node Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bindId := int64(789) // int64 | + nodeId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodeServicesAPI.UnbindNodeService(context.Background(), bindId, nodeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodeServicesAPI.UnbindNodeService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UnbindNodeService`: ResponseAsyncDeleteNodeServiceBind + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodeServicesAPI.UnbindNodeService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bindId** | **int64** | | +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUnbindNodeServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**ResponseAsyncDeleteNodeServiceBind**](ResponseAsyncDeleteNodeServiceBind.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/OrchestratorNodesAPI.md b/azion-api/docs/OrchestratorNodesAPI.md new file mode 100644 index 0000000..9e511f6 --- /dev/null +++ b/azion-api/docs/OrchestratorNodesAPI.md @@ -0,0 +1,596 @@ +# \OrchestratorNodesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteNode**](OrchestratorNodesAPI.md#DeleteNode) | **Delete** /orchestrator/nodes/{node_id} | Delete an Node +[**ListNodes**](OrchestratorNodesAPI.md#ListNodes) | **Get** /orchestrator/nodes | List Nodes +[**PartialUpdateNode**](OrchestratorNodesAPI.md#PartialUpdateNode) | **Patch** /orchestrator/nodes/{node_id} | Partially update an Node +[**PartialUpdateNode2**](OrchestratorNodesAPI.md#PartialUpdateNode2) | **Patch** /orchestrator/nodes/{node_id}/ | Partially update an Node +[**RetrieveNode**](OrchestratorNodesAPI.md#RetrieveNode) | **Get** /orchestrator/nodes/{node_id} | Retrieve details of an Node +[**RetrieveNode2**](OrchestratorNodesAPI.md#RetrieveNode2) | **Get** /orchestrator/nodes/{node_id}/ | Retrieve details of an Node +[**UpdateNode**](OrchestratorNodesAPI.md#UpdateNode) | **Put** /orchestrator/nodes/{node_id} | Update an Node +[**UpdateNode2**](OrchestratorNodesAPI.md#UpdateNode2) | **Put** /orchestrator/nodes/{node_id}/ | Update an Node + + + +## DeleteNode + +> ResponseAsyncDeleteNodes DeleteNode(ctx, nodeId).Execute() + +Delete an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := "nodeId_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.DeleteNode(context.Background(), nodeId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.DeleteNode``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteNode`: ResponseAsyncDeleteNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.DeleteNode`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteNodeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseAsyncDeleteNodes**](ResponseAsyncDeleteNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListNodes + +> PaginatedNodesList ListNodes(ctx).Fields(fields).HashId(hashId).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Nodes + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + hashId := "hashId_example" // string | Search by hash_id (optional) + name := "name_example" // string | Search by name (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.ListNodes(context.Background()).Fields(fields).HashId(hashId).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.ListNodes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListNodes`: PaginatedNodesList + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.ListNodes`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListNodesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **hashId** | **string** | Search by hash_id | + **name** | **string** | Search by name | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedNodesList**](PaginatedNodesList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateNode + +> ResponseAsyncNodes PartialUpdateNode(ctx, nodeId).PatchedNodesRequest(patchedNodesRequest).Execute() + +Partially update an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := "nodeId_example" // string | + patchedNodesRequest := *openapiclient.NewPatchedNodesRequest() // PatchedNodesRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.PartialUpdateNode(context.Background(), nodeId).PatchedNodesRequest(patchedNodesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.PartialUpdateNode``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateNode`: ResponseAsyncNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.PartialUpdateNode`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateNodeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedNodesRequest** | [**PatchedNodesRequest**](PatchedNodesRequest.md) | | + +### Return type + +[**ResponseAsyncNodes**](ResponseAsyncNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateNode2 + +> ResponseAsyncNodes PartialUpdateNode2(ctx, nodeId).PatchedNodesRequest(patchedNodesRequest).Execute() + +Partially update an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + patchedNodesRequest := *openapiclient.NewPatchedNodesRequest() // PatchedNodesRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.PartialUpdateNode2(context.Background(), nodeId).PatchedNodesRequest(patchedNodesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.PartialUpdateNode2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateNode2`: ResponseAsyncNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.PartialUpdateNode2`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateNode2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedNodesRequest** | [**PatchedNodesRequest**](PatchedNodesRequest.md) | | + +### Return type + +[**ResponseAsyncNodes**](ResponseAsyncNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveNode + +> ResponseRetrieveNodes RetrieveNode(ctx, nodeId).Fields(fields).Execute() + +Retrieve details of an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := "nodeId_example" // string | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.RetrieveNode(context.Background(), nodeId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.RetrieveNode``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveNode`: ResponseRetrieveNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.RetrieveNode`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveNodeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveNodes**](ResponseRetrieveNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveNode2 + +> ResponseRetrieveNodes RetrieveNode2(ctx, nodeId).Fields(fields).Execute() + +Retrieve details of an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.RetrieveNode2(context.Background(), nodeId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.RetrieveNode2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveNode2`: ResponseRetrieveNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.RetrieveNode2`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveNode2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveNodes**](ResponseRetrieveNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateNode + +> ResponseAsyncNodes UpdateNode(ctx, nodeId).NodesRequest(nodesRequest).Execute() + +Update an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := "nodeId_example" // string | + nodesRequest := *openapiclient.NewNodesRequest("Name_example", "Status_example") // NodesRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.UpdateNode(context.Background(), nodeId).NodesRequest(nodesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.UpdateNode``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateNode`: ResponseAsyncNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.UpdateNode`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateNodeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nodesRequest** | [**NodesRequest**](NodesRequest.md) | | + +### Return type + +[**ResponseAsyncNodes**](ResponseAsyncNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateNode2 + +> ResponseAsyncNodes UpdateNode2(ctx, nodeId).NodesRequest(nodesRequest).Execute() + +Update an Node + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + nodeId := int64(789) // int64 | + nodesRequest := *openapiclient.NewNodesRequest("Name_example", "Status_example") // NodesRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorNodesAPI.UpdateNode2(context.Background(), nodeId).NodesRequest(nodesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorNodesAPI.UpdateNode2``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateNode2`: ResponseAsyncNodes + fmt.Fprintf(os.Stdout, "Response from `OrchestratorNodesAPI.UpdateNode2`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**nodeId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateNode2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **nodesRequest** | [**NodesRequest**](NodesRequest.md) | | + +### Return type + +[**ResponseAsyncNodes**](ResponseAsyncNodes.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/OrchestratorServiceResourcesAPI.md b/azion-api/docs/OrchestratorServiceResourcesAPI.md new file mode 100644 index 0000000..6833c61 --- /dev/null +++ b/azion-api/docs/OrchestratorServiceResourcesAPI.md @@ -0,0 +1,538 @@ +# \OrchestratorServiceResourcesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateResource**](OrchestratorServiceResourcesAPI.md#CreateResource) | **Post** /orchestrator/services/{service_id}/resources | Create Service Resource +[**DeleteResource**](OrchestratorServiceResourcesAPI.md#DeleteResource) | **Delete** /orchestrator/services/{service_id}/resources/{resource_id} | Delete Resource +[**ListResourcesOfAService**](OrchestratorServiceResourcesAPI.md#ListResourcesOfAService) | **Get** /orchestrator/services/{service_id}/resources | List Service Resources +[**RetrieveResource**](OrchestratorServiceResourcesAPI.md#RetrieveResource) | **Get** /orchestrator/services/{service_id}/resources/{resource_id} | Retrieve details of a Resource +[**RetrieveResourceContent**](OrchestratorServiceResourcesAPI.md#RetrieveResourceContent) | **Get** /orchestrator/services/{service_id}/resources/{resource_id}/content | Retrieve content of a Resource +[**UpdateResource**](OrchestratorServiceResourcesAPI.md#UpdateResource) | **Put** /orchestrator/services/{service_id}/resources/{resource_id} | Update Resource +[**UploadResourceContent**](OrchestratorServiceResourcesAPI.md#UploadResourceContent) | **Put** /orchestrator/services/{service_id}/resources/{resource_id}/content | Upload content of a Resource + + + +## CreateResource + +> ServiceResource CreateResource(ctx, serviceId).ServiceResourceRequest(serviceResourceRequest).Execute() + +Create Service Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := int64(789) // int64 | + serviceResourceRequest := *openapiclient.NewServiceResourceRequest("Name_example", "ContentType_example", "FileGroup_example", "FileMode_example", "FileOwner_example") // ServiceResourceRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServiceResourcesAPI.CreateResource(context.Background(), serviceId).ServiceResourceRequest(serviceResourceRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.CreateResource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateResource`: ServiceResource + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServiceResourcesAPI.CreateResource`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateResourceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **serviceResourceRequest** | [**ServiceResourceRequest**](ServiceResourceRequest.md) | | + +### Return type + +[**ServiceResource**](ServiceResource.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteResource + +> DeleteResource(ctx, resourceId, serviceId).Execute() + +Delete Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + resourceId := int64(789) // int64 | + serviceId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.OrchestratorServiceResourcesAPI.DeleteResource(context.Background(), resourceId, serviceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.DeleteResource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **int64** | | +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteResourceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + + (empty response body) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListResourcesOfAService + +> PaginatedServiceResourceList ListResourcesOfAService(ctx, serviceId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Service Resources + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServiceResourcesAPI.ListResourcesOfAService(context.Background(), serviceId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.ListResourcesOfAService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListResourcesOfAService`: PaginatedServiceResourceList + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServiceResourcesAPI.ListResourcesOfAService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListResourcesOfAServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedServiceResourceList**](PaginatedServiceResourceList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveResource + +> ServiceResourceId RetrieveResource(ctx, resourceId, serviceId).Fields(fields).Execute() + +Retrieve details of a Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + resourceId := int64(789) // int64 | + serviceId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServiceResourcesAPI.RetrieveResource(context.Background(), resourceId, serviceId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.RetrieveResource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveResource`: ServiceResourceId + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServiceResourcesAPI.RetrieveResource`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **int64** | | +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveResourceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ServiceResourceId**](ServiceResourceId.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveResourceContent + +> Content RetrieveResourceContent(ctx, resourceId, serviceId).Fields(fields).Execute() + +Retrieve content of a Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + resourceId := int64(789) // int64 | + serviceId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServiceResourcesAPI.RetrieveResourceContent(context.Background(), resourceId, serviceId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.RetrieveResourceContent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveResourceContent`: Content + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServiceResourcesAPI.RetrieveResourceContent`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **int64** | | +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveResourceContentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**Content**](Content.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateResource + +> ServiceResourceId UpdateResource(ctx, resourceId, serviceId).ServiceResourceIdRequest(serviceResourceIdRequest).Execute() + +Update Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + resourceId := int64(789) // int64 | + serviceId := int64(789) // int64 | + serviceResourceIdRequest := *openapiclient.NewServiceResourceIdRequest("Name_example", "FileGroup_example", "FileMode_example", "FileOwner_example") // ServiceResourceIdRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServiceResourcesAPI.UpdateResource(context.Background(), resourceId, serviceId).ServiceResourceIdRequest(serviceResourceIdRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.UpdateResource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateResource`: ServiceResourceId + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServiceResourcesAPI.UpdateResource`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **int64** | | +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateResourceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **serviceResourceIdRequest** | [**ServiceResourceIdRequest**](ServiceResourceIdRequest.md) | | + +### Return type + +[**ServiceResourceId**](ServiceResourceId.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UploadResourceContent + +> Content UploadResourceContent(ctx, resourceId, serviceId).ContentRequest(contentRequest).Execute() + +Upload content of a Resource + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + resourceId := int64(789) // int64 | + serviceId := int64(789) // int64 | + contentRequest := *openapiclient.NewContentRequest("Name_example", "ContentType_example", "ContentHash_example") // ContentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServiceResourcesAPI.UploadResourceContent(context.Background(), resourceId, serviceId).ContentRequest(contentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServiceResourcesAPI.UploadResourceContent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UploadResourceContent`: Content + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServiceResourcesAPI.UploadResourceContent`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**resourceId** | **int64** | | +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUploadResourceContentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentRequest** | [**ContentRequest**](ContentRequest.md) | | + +### Return type + +[**Content**](Content.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/OrchestratorServicesAPI.md b/azion-api/docs/OrchestratorServicesAPI.md new file mode 100644 index 0000000..69a677b --- /dev/null +++ b/azion-api/docs/OrchestratorServicesAPI.md @@ -0,0 +1,440 @@ +# \OrchestratorServicesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateService**](OrchestratorServicesAPI.md#CreateService) | **Post** /orchestrator/services | Create Service +[**DestroyService**](OrchestratorServicesAPI.md#DestroyService) | **Delete** /orchestrator/services/{service_id} | Destroy an Service +[**ListServices**](OrchestratorServicesAPI.md#ListServices) | **Get** /orchestrator/services | List Services +[**PartialUpdateService**](OrchestratorServicesAPI.md#PartialUpdateService) | **Patch** /orchestrator/services/{service_id} | Partially update an Service +[**RetrieveService**](OrchestratorServicesAPI.md#RetrieveService) | **Get** /orchestrator/services/{service_id} | Retrieve details of an Service +[**UpdateService**](OrchestratorServicesAPI.md#UpdateService) | **Put** /orchestrator/services/{service_id} | Update an Service + + + +## CreateService + +> ResponseAsyncServices CreateService(ctx).ServicesRequest(servicesRequest).Execute() + +Create Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + servicesRequest := *openapiclient.NewServicesRequest() // ServicesRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServicesAPI.CreateService(context.Background()).ServicesRequest(servicesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServicesAPI.CreateService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateService`: ResponseAsyncServices + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServicesAPI.CreateService`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **servicesRequest** | [**ServicesRequest**](ServicesRequest.md) | | + +### Return type + +[**ResponseAsyncServices**](ResponseAsyncServices.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DestroyService + +> ResponseAsyncDeleteServices DestroyService(ctx, serviceId).Execute() + +Destroy an Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := int64(789) // int64 | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServicesAPI.DestroyService(context.Background(), serviceId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServicesAPI.DestroyService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DestroyService`: ResponseAsyncDeleteServices + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServicesAPI.DestroyService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseAsyncDeleteServices**](ResponseAsyncDeleteServices.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListServices + +> PaginatedServicesList ListServices(ctx).Fields(fields).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Execute() + +List Services + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + name := "name_example" // string | Search by name (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServicesAPI.ListServices(context.Background()).Fields(fields).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServicesAPI.ListServices``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListServices`: PaginatedServicesList + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServicesAPI.ListServices`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListServicesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **name** | **string** | Search by name | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + +### Return type + +[**PaginatedServicesList**](PaginatedServicesList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateService + +> ResponseAsyncServices PartialUpdateService(ctx, serviceId).PatchedServicesRequest(patchedServicesRequest).Execute() + +Partially update an Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := int64(789) // int64 | + patchedServicesRequest := *openapiclient.NewPatchedServicesRequest() // PatchedServicesRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServicesAPI.PartialUpdateService(context.Background(), serviceId).PatchedServicesRequest(patchedServicesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServicesAPI.PartialUpdateService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateService`: ResponseAsyncServices + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServicesAPI.PartialUpdateService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedServicesRequest** | [**PatchedServicesRequest**](PatchedServicesRequest.md) | | + +### Return type + +[**ResponseAsyncServices**](ResponseAsyncServices.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveService + +> ResponseRetrieveServices RetrieveService(ctx, serviceId).Fields(fields).Execute() + +Retrieve details of an Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := int64(789) // int64 | + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServicesAPI.RetrieveService(context.Background(), serviceId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServicesAPI.RetrieveService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveService`: ResponseRetrieveServices + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServicesAPI.RetrieveService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **int64** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveServices**](ResponseRetrieveServices.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateService + +> ResponseAsyncServices UpdateService(ctx, serviceId).ServicesRequest(servicesRequest).Execute() + +Update an Service + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + serviceId := "serviceId_example" // string | + servicesRequest := *openapiclient.NewServicesRequest() // ServicesRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.OrchestratorServicesAPI.UpdateService(context.Background(), serviceId).ServicesRequest(servicesRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `OrchestratorServicesAPI.UpdateService``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateService`: ResponseAsyncServices + fmt.Fprintf(os.Stdout, "Response from `OrchestratorServicesAPI.UpdateService`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**serviceId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateServiceRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **servicesRequest** | [**ServicesRequest**](ServicesRequest.md) | | + +### Return type + +[**ResponseAsyncServices**](ResponseAsyncServices.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Order.md b/azion-api/docs/Order.md new file mode 100644 index 0000000..4ea5477 --- /dev/null +++ b/azion-api/docs/Order.md @@ -0,0 +1,51 @@ +# Order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Order** | **[]int64** | | + +## Methods + +### NewOrder + +`func NewOrder(order []int64, ) *Order` + +NewOrder instantiates a new Order object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderWithDefaults + +`func NewOrderWithDefaults() *Order` + +NewOrderWithDefaults instantiates a new Order object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrder + +`func (o *Order) GetOrder() []int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *Order) GetOrderOk() (*[]int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *Order) SetOrder(v []int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OrderRequest.md b/azion-api/docs/OrderRequest.md new file mode 100644 index 0000000..c88d18e --- /dev/null +++ b/azion-api/docs/OrderRequest.md @@ -0,0 +1,51 @@ +# OrderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Order** | **[]int64** | | + +## Methods + +### NewOrderRequest + +`func NewOrderRequest(order []int64, ) *OrderRequest` + +NewOrderRequest instantiates a new OrderRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderRequestWithDefaults + +`func NewOrderRequestWithDefaults() *OrderRequest` + +NewOrderRequestWithDefaults instantiates a new OrderRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOrder + +`func (o *OrderRequest) GetOrder() []int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *OrderRequest) GetOrderOk() (*[]int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *OrderRequest) SetOrder(v []int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Organization.md b/azion-api/docs/Organization.md new file mode 100644 index 0000000..0e7cff5 --- /dev/null +++ b/azion-api/docs/Organization.md @@ -0,0 +1,261 @@ +# Organization + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ParentId** | **int64** | | +**Created** | **time.Time** | | +**Info** | **map[string]interface{}** | | +**Status** | **string** | * `active` - Active account status, can be used for regular operations. * `suspended` - Suspended account status, for accounts with limited access to support and payments only. * `disabled` - Disabled account status, services are offline, user can only access support. * `closed` - Closed account status, services are offline but can be reactivated. | +**Reason** | **string** | * `trial` - Trial account status, currently on a trial period. * `online` - Online account status, used for online sales operations. * `regular` - Regular account status, indicates the customer has an active contract. * `overdue` - Overdue status, the account failed necessary payments after retries. * `quarantine` - Quarantine status, the account is suspended due to suspected misuse or security breach. * `violation` - Violation status, temporarily suspended due to administrative, technical, security, or policy violations. * `idle` - Idle status, the account was removed due to inactivity. * `terminated` - Terminated status, the account was shut down by the service provider. * `voluntary` - Voluntary status, the account was canceled by its owner. | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewOrganization + +`func NewOrganization(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, status string, reason string, type_ string, ) *Organization` + +NewOrganization instantiates a new Organization object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrganizationWithDefaults + +`func NewOrganizationWithDefaults() *Organization` + +NewOrganizationWithDefaults instantiates a new Organization object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Organization) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Organization) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Organization) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Organization) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Organization) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Organization) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *Organization) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Organization) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Organization) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *Organization) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Organization) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Organization) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Organization) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Organization) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Organization) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetParentId + +`func (o *Organization) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *Organization) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *Organization) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCreated + +`func (o *Organization) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Organization) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Organization) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetInfo + +`func (o *Organization) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *Organization) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *Organization) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetStatus + +`func (o *Organization) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *Organization) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *Organization) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetReason + +`func (o *Organization) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *Organization) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *Organization) SetReason(v string)` + +SetReason sets Reason field to given value. + + +### GetType + +`func (o *Organization) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Organization) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Organization) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OrganizationRequest.md b/azion-api/docs/OrganizationRequest.md new file mode 100644 index 0000000..a3b0880 --- /dev/null +++ b/azion-api/docs/OrganizationRequest.md @@ -0,0 +1,72 @@ +# OrganizationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewOrganizationRequest + +`func NewOrganizationRequest(name string, type_ string, ) *OrganizationRequest` + +NewOrganizationRequest instantiates a new OrganizationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrganizationRequestWithDefaults + +`func NewOrganizationRequestWithDefaults() *OrganizationRequest` + +NewOrganizationRequestWithDefaults instantiates a new OrganizationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *OrganizationRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OrganizationRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OrganizationRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *OrganizationRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OrganizationRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OrganizationRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OriginIPACL.md b/azion-api/docs/OriginIPACL.md new file mode 100644 index 0000000..2bfde7f --- /dev/null +++ b/azion-api/docs/OriginIPACL.md @@ -0,0 +1,56 @@ +# OriginIPACL + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewOriginIPACL + +`func NewOriginIPACL() *OriginIPACL` + +NewOriginIPACL instantiates a new OriginIPACL object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOriginIPACLWithDefaults + +`func NewOriginIPACLWithDefaults() *OriginIPACL` + +NewOriginIPACLWithDefaults instantiates a new OriginIPACL object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *OriginIPACL) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *OriginIPACL) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *OriginIPACL) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *OriginIPACL) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OriginIPACLRequest.md b/azion-api/docs/OriginIPACLRequest.md new file mode 100644 index 0000000..f9fc21f --- /dev/null +++ b/azion-api/docs/OriginIPACLRequest.md @@ -0,0 +1,56 @@ +# OriginIPACLRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewOriginIPACLRequest + +`func NewOriginIPACLRequest() *OriginIPACLRequest` + +NewOriginIPACLRequest instantiates a new OriginIPACLRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOriginIPACLRequestWithDefaults + +`func NewOriginIPACLRequestWithDefaults() *OriginIPACLRequest` + +NewOriginIPACLRequestWithDefaults instantiates a new OriginIPACLRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *OriginIPACLRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *OriginIPACLRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *OriginIPACLRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *OriginIPACLRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OriginShieldConfig.md b/azion-api/docs/OriginShieldConfig.md new file mode 100644 index 0000000..0a1dca5 --- /dev/null +++ b/azion-api/docs/OriginShieldConfig.md @@ -0,0 +1,82 @@ +# OriginShieldConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OriginIpAcl** | Pointer to [**OriginIPACL**](OriginIPACL.md) | | [optional] +**Hmac** | Pointer to [**HMAC**](HMAC.md) | | [optional] + +## Methods + +### NewOriginShieldConfig + +`func NewOriginShieldConfig() *OriginShieldConfig` + +NewOriginShieldConfig instantiates a new OriginShieldConfig object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOriginShieldConfigWithDefaults + +`func NewOriginShieldConfigWithDefaults() *OriginShieldConfig` + +NewOriginShieldConfigWithDefaults instantiates a new OriginShieldConfig object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOriginIpAcl + +`func (o *OriginShieldConfig) GetOriginIpAcl() OriginIPACL` + +GetOriginIpAcl returns the OriginIpAcl field if non-nil, zero value otherwise. + +### GetOriginIpAclOk + +`func (o *OriginShieldConfig) GetOriginIpAclOk() (*OriginIPACL, bool)` + +GetOriginIpAclOk returns a tuple with the OriginIpAcl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginIpAcl + +`func (o *OriginShieldConfig) SetOriginIpAcl(v OriginIPACL)` + +SetOriginIpAcl sets OriginIpAcl field to given value. + +### HasOriginIpAcl + +`func (o *OriginShieldConfig) HasOriginIpAcl() bool` + +HasOriginIpAcl returns a boolean if a field has been set. + +### GetHmac + +`func (o *OriginShieldConfig) GetHmac() HMAC` + +GetHmac returns the Hmac field if non-nil, zero value otherwise. + +### GetHmacOk + +`func (o *OriginShieldConfig) GetHmacOk() (*HMAC, bool)` + +GetHmacOk returns a tuple with the Hmac field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHmac + +`func (o *OriginShieldConfig) SetHmac(v HMAC)` + +SetHmac sets Hmac field to given value. + +### HasHmac + +`func (o *OriginShieldConfig) HasHmac() bool` + +HasHmac returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OriginShieldConfigRequest.md b/azion-api/docs/OriginShieldConfigRequest.md new file mode 100644 index 0000000..8b08a72 --- /dev/null +++ b/azion-api/docs/OriginShieldConfigRequest.md @@ -0,0 +1,82 @@ +# OriginShieldConfigRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OriginIpAcl** | Pointer to [**OriginIPACLRequest**](OriginIPACLRequest.md) | | [optional] +**Hmac** | Pointer to [**HMACRequest**](HMACRequest.md) | | [optional] + +## Methods + +### NewOriginShieldConfigRequest + +`func NewOriginShieldConfigRequest() *OriginShieldConfigRequest` + +NewOriginShieldConfigRequest instantiates a new OriginShieldConfigRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOriginShieldConfigRequestWithDefaults + +`func NewOriginShieldConfigRequestWithDefaults() *OriginShieldConfigRequest` + +NewOriginShieldConfigRequestWithDefaults instantiates a new OriginShieldConfigRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetOriginIpAcl + +`func (o *OriginShieldConfigRequest) GetOriginIpAcl() OriginIPACLRequest` + +GetOriginIpAcl returns the OriginIpAcl field if non-nil, zero value otherwise. + +### GetOriginIpAclOk + +`func (o *OriginShieldConfigRequest) GetOriginIpAclOk() (*OriginIPACLRequest, bool)` + +GetOriginIpAclOk returns a tuple with the OriginIpAcl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOriginIpAcl + +`func (o *OriginShieldConfigRequest) SetOriginIpAcl(v OriginIPACLRequest)` + +SetOriginIpAcl sets OriginIpAcl field to given value. + +### HasOriginIpAcl + +`func (o *OriginShieldConfigRequest) HasOriginIpAcl() bool` + +HasOriginIpAcl returns a boolean if a field has been set. + +### GetHmac + +`func (o *OriginShieldConfigRequest) GetHmac() HMACRequest` + +GetHmac returns the Hmac field if non-nil, zero value otherwise. + +### GetHmacOk + +`func (o *OriginShieldConfigRequest) GetHmacOk() (*HMACRequest, bool)` + +GetHmacOk returns a tuple with the Hmac field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHmac + +`func (o *OriginShieldConfigRequest) SetHmac(v HMACRequest)` + +SetHmac sets Hmac field to given value. + +### HasHmac + +`func (o *OriginShieldConfigRequest) HasHmac() bool` + +HasHmac returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OriginShieldModule.md b/azion-api/docs/OriginShieldModule.md new file mode 100644 index 0000000..5d93d32 --- /dev/null +++ b/azion-api/docs/OriginShieldModule.md @@ -0,0 +1,92 @@ +# OriginShieldModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] +**Config** | Pointer to [**NullableOriginShieldConfig**](OriginShieldConfig.md) | | [optional] + +## Methods + +### NewOriginShieldModule + +`func NewOriginShieldModule() *OriginShieldModule` + +NewOriginShieldModule instantiates a new OriginShieldModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOriginShieldModuleWithDefaults + +`func NewOriginShieldModuleWithDefaults() *OriginShieldModule` + +NewOriginShieldModuleWithDefaults instantiates a new OriginShieldModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *OriginShieldModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *OriginShieldModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *OriginShieldModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *OriginShieldModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetConfig + +`func (o *OriginShieldModule) GetConfig() OriginShieldConfig` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *OriginShieldModule) GetConfigOk() (*OriginShieldConfig, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *OriginShieldModule) SetConfig(v OriginShieldConfig)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *OriginShieldModule) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *OriginShieldModule) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *OriginShieldModule) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OriginShieldModuleRequest.md b/azion-api/docs/OriginShieldModuleRequest.md new file mode 100644 index 0000000..8ab27a6 --- /dev/null +++ b/azion-api/docs/OriginShieldModuleRequest.md @@ -0,0 +1,92 @@ +# OriginShieldModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] +**Config** | Pointer to [**NullableOriginShieldConfigRequest**](OriginShieldConfigRequest.md) | | [optional] + +## Methods + +### NewOriginShieldModuleRequest + +`func NewOriginShieldModuleRequest() *OriginShieldModuleRequest` + +NewOriginShieldModuleRequest instantiates a new OriginShieldModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOriginShieldModuleRequestWithDefaults + +`func NewOriginShieldModuleRequestWithDefaults() *OriginShieldModuleRequest` + +NewOriginShieldModuleRequestWithDefaults instantiates a new OriginShieldModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *OriginShieldModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *OriginShieldModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *OriginShieldModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *OriginShieldModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### GetConfig + +`func (o *OriginShieldModuleRequest) GetConfig() OriginShieldConfigRequest` + +GetConfig returns the Config field if non-nil, zero value otherwise. + +### GetConfigOk + +`func (o *OriginShieldModuleRequest) GetConfigOk() (*OriginShieldConfigRequest, bool)` + +GetConfigOk returns a tuple with the Config field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfig + +`func (o *OriginShieldModuleRequest) SetConfig(v OriginShieldConfigRequest)` + +SetConfig sets Config field to given value. + +### HasConfig + +`func (o *OriginShieldModuleRequest) HasConfig() bool` + +HasConfig returns a boolean if a field has been set. + +### SetConfigNil + +`func (o *OriginShieldModuleRequest) SetConfigNil(b bool)` + + SetConfigNil sets the value for Config to be an explicit nil + +### UnsetConfig +`func (o *OriginShieldModuleRequest) UnsetConfig()` + +UnsetConfig ensures that no value is present for Config, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Output.md b/azion-api/docs/Output.md new file mode 100644 index 0000000..fac2c87 --- /dev/null +++ b/azion-api/docs/Output.md @@ -0,0 +1,72 @@ +# Output + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `standard` - Standard HTTP/HTTPS POST * `kafka` - Apache Kafka * `s3` - Simple Storage Service (S3) * `big_query` - Google BigQuery * `elasticsearch` - Elasticsearch * `splunk` - Splunk * `aws_kinesis_firehose` - AWS Kinesis Data Firehose * `datadog` - Datadog * `qradar` - IBM QRadar * `azure_monitor` - Azure Monitor * `azure_blob_storage` - Azure Blob Storage | +**Attributes** | [**Output2**](Output2.md) | | + +## Methods + +### NewOutput + +`func NewOutput(type_ string, attributes Output2, ) *Output` + +NewOutput instantiates a new Output object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOutputWithDefaults + +`func NewOutputWithDefaults() *Output` + +NewOutputWithDefaults instantiates a new Output object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *Output) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Output) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Output) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *Output) GetAttributes() Output2` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *Output) GetAttributesOk() (*Output2, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *Output) SetAttributes(v Output2)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Output2.md b/azion-api/docs/Output2.md new file mode 100644 index 0000000..17bcaa7 --- /dev/null +++ b/azion-api/docs/Output2.md @@ -0,0 +1,694 @@ +# Output2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**LogLineSeparator** | Pointer to **string** | | [optional] +**PayloadFormat** | Pointer to **string** | | [optional] +**MaxSize** | Pointer to **NullableInt64** | | [optional] +**Headers** | **map[string]string** | | +**Type** | **string** | Type identifier for this endpoint (splunk) | +**BootstrapServers** | **string** | | +**KafkaTopic** | **string** | | +**UseTls** | **bool** | | +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Region** | **string** | | +**ObjectKeyPrefix** | Pointer to **NullableString** | | [optional] +**BucketName** | **string** | | +**ContentType** | **string** | * `plain/text` - plain/text * `application/gzip` - application/gzip | +**HostUrl** | **string** | | +**DatasetId** | **string** | | +**ProjectId** | **string** | | +**TableId** | **string** | | +**ServiceAccountKey** | **string** | | +**ApiKey** | **string** | | +**StreamName** | **string** | | +**LogType** | **string** | | +**SharedKey** | **string** | | +**TimeGeneratedField** | Pointer to **NullableString** | | [optional] +**WorkspaceId** | **string** | | +**StorageAccount** | **string** | | +**ContainerName** | **string** | | +**BlobSasToken** | **string** | | + +## Methods + +### NewOutput2 + +`func NewOutput2(url string, headers map[string]string, type_ string, bootstrapServers string, kafkaTopic string, useTls bool, accessKey string, secretKey string, region string, bucketName string, contentType string, hostUrl string, datasetId string, projectId string, tableId string, serviceAccountKey string, apiKey string, streamName string, logType string, sharedKey string, workspaceId string, storageAccount string, containerName string, blobSasToken string, ) *Output2` + +NewOutput2 instantiates a new Output2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOutput2WithDefaults + +`func NewOutput2WithDefaults() *Output2` + +NewOutput2WithDefaults instantiates a new Output2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *Output2) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *Output2) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *Output2) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetLogLineSeparator + +`func (o *Output2) GetLogLineSeparator() string` + +GetLogLineSeparator returns the LogLineSeparator field if non-nil, zero value otherwise. + +### GetLogLineSeparatorOk + +`func (o *Output2) GetLogLineSeparatorOk() (*string, bool)` + +GetLogLineSeparatorOk returns a tuple with the LogLineSeparator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogLineSeparator + +`func (o *Output2) SetLogLineSeparator(v string)` + +SetLogLineSeparator sets LogLineSeparator field to given value. + +### HasLogLineSeparator + +`func (o *Output2) HasLogLineSeparator() bool` + +HasLogLineSeparator returns a boolean if a field has been set. + +### GetPayloadFormat + +`func (o *Output2) GetPayloadFormat() string` + +GetPayloadFormat returns the PayloadFormat field if non-nil, zero value otherwise. + +### GetPayloadFormatOk + +`func (o *Output2) GetPayloadFormatOk() (*string, bool)` + +GetPayloadFormatOk returns a tuple with the PayloadFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayloadFormat + +`func (o *Output2) SetPayloadFormat(v string)` + +SetPayloadFormat sets PayloadFormat field to given value. + +### HasPayloadFormat + +`func (o *Output2) HasPayloadFormat() bool` + +HasPayloadFormat returns a boolean if a field has been set. + +### GetMaxSize + +`func (o *Output2) GetMaxSize() int64` + +GetMaxSize returns the MaxSize field if non-nil, zero value otherwise. + +### GetMaxSizeOk + +`func (o *Output2) GetMaxSizeOk() (*int64, bool)` + +GetMaxSizeOk returns a tuple with the MaxSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxSize + +`func (o *Output2) SetMaxSize(v int64)` + +SetMaxSize sets MaxSize field to given value. + +### HasMaxSize + +`func (o *Output2) HasMaxSize() bool` + +HasMaxSize returns a boolean if a field has been set. + +### SetMaxSizeNil + +`func (o *Output2) SetMaxSizeNil(b bool)` + + SetMaxSizeNil sets the value for MaxSize to be an explicit nil + +### UnsetMaxSize +`func (o *Output2) UnsetMaxSize()` + +UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil +### GetHeaders + +`func (o *Output2) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *Output2) GetHeadersOk() (*map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *Output2) SetHeaders(v map[string]string)` + +SetHeaders sets Headers field to given value. + + +### GetType + +`func (o *Output2) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Output2) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Output2) SetType(v string)` + +SetType sets Type field to given value. + + +### GetBootstrapServers + +`func (o *Output2) GetBootstrapServers() string` + +GetBootstrapServers returns the BootstrapServers field if non-nil, zero value otherwise. + +### GetBootstrapServersOk + +`func (o *Output2) GetBootstrapServersOk() (*string, bool)` + +GetBootstrapServersOk returns a tuple with the BootstrapServers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBootstrapServers + +`func (o *Output2) SetBootstrapServers(v string)` + +SetBootstrapServers sets BootstrapServers field to given value. + + +### GetKafkaTopic + +`func (o *Output2) GetKafkaTopic() string` + +GetKafkaTopic returns the KafkaTopic field if non-nil, zero value otherwise. + +### GetKafkaTopicOk + +`func (o *Output2) GetKafkaTopicOk() (*string, bool)` + +GetKafkaTopicOk returns a tuple with the KafkaTopic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaTopic + +`func (o *Output2) SetKafkaTopic(v string)` + +SetKafkaTopic sets KafkaTopic field to given value. + + +### GetUseTls + +`func (o *Output2) GetUseTls() bool` + +GetUseTls returns the UseTls field if non-nil, zero value otherwise. + +### GetUseTlsOk + +`func (o *Output2) GetUseTlsOk() (*bool, bool)` + +GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTls + +`func (o *Output2) SetUseTls(v bool)` + +SetUseTls sets UseTls field to given value. + + +### GetAccessKey + +`func (o *Output2) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *Output2) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *Output2) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *Output2) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *Output2) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *Output2) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetRegion + +`func (o *Output2) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *Output2) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *Output2) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetObjectKeyPrefix + +`func (o *Output2) GetObjectKeyPrefix() string` + +GetObjectKeyPrefix returns the ObjectKeyPrefix field if non-nil, zero value otherwise. + +### GetObjectKeyPrefixOk + +`func (o *Output2) GetObjectKeyPrefixOk() (*string, bool)` + +GetObjectKeyPrefixOk returns a tuple with the ObjectKeyPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectKeyPrefix + +`func (o *Output2) SetObjectKeyPrefix(v string)` + +SetObjectKeyPrefix sets ObjectKeyPrefix field to given value. + +### HasObjectKeyPrefix + +`func (o *Output2) HasObjectKeyPrefix() bool` + +HasObjectKeyPrefix returns a boolean if a field has been set. + +### SetObjectKeyPrefixNil + +`func (o *Output2) SetObjectKeyPrefixNil(b bool)` + + SetObjectKeyPrefixNil sets the value for ObjectKeyPrefix to be an explicit nil + +### UnsetObjectKeyPrefix +`func (o *Output2) UnsetObjectKeyPrefix()` + +UnsetObjectKeyPrefix ensures that no value is present for ObjectKeyPrefix, not even an explicit nil +### GetBucketName + +`func (o *Output2) GetBucketName() string` + +GetBucketName returns the BucketName field if non-nil, zero value otherwise. + +### GetBucketNameOk + +`func (o *Output2) GetBucketNameOk() (*string, bool)` + +GetBucketNameOk returns a tuple with the BucketName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketName + +`func (o *Output2) SetBucketName(v string)` + +SetBucketName sets BucketName field to given value. + + +### GetContentType + +`func (o *Output2) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *Output2) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *Output2) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetHostUrl + +`func (o *Output2) GetHostUrl() string` + +GetHostUrl returns the HostUrl field if non-nil, zero value otherwise. + +### GetHostUrlOk + +`func (o *Output2) GetHostUrlOk() (*string, bool)` + +GetHostUrlOk returns a tuple with the HostUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostUrl + +`func (o *Output2) SetHostUrl(v string)` + +SetHostUrl sets HostUrl field to given value. + + +### GetDatasetId + +`func (o *Output2) GetDatasetId() string` + +GetDatasetId returns the DatasetId field if non-nil, zero value otherwise. + +### GetDatasetIdOk + +`func (o *Output2) GetDatasetIdOk() (*string, bool)` + +GetDatasetIdOk returns a tuple with the DatasetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatasetId + +`func (o *Output2) SetDatasetId(v string)` + +SetDatasetId sets DatasetId field to given value. + + +### GetProjectId + +`func (o *Output2) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *Output2) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *Output2) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + + +### GetTableId + +`func (o *Output2) GetTableId() string` + +GetTableId returns the TableId field if non-nil, zero value otherwise. + +### GetTableIdOk + +`func (o *Output2) GetTableIdOk() (*string, bool)` + +GetTableIdOk returns a tuple with the TableId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTableId + +`func (o *Output2) SetTableId(v string)` + +SetTableId sets TableId field to given value. + + +### GetServiceAccountKey + +`func (o *Output2) GetServiceAccountKey() string` + +GetServiceAccountKey returns the ServiceAccountKey field if non-nil, zero value otherwise. + +### GetServiceAccountKeyOk + +`func (o *Output2) GetServiceAccountKeyOk() (*string, bool)` + +GetServiceAccountKeyOk returns a tuple with the ServiceAccountKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceAccountKey + +`func (o *Output2) SetServiceAccountKey(v string)` + +SetServiceAccountKey sets ServiceAccountKey field to given value. + + +### GetApiKey + +`func (o *Output2) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *Output2) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *Output2) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetStreamName + +`func (o *Output2) GetStreamName() string` + +GetStreamName returns the StreamName field if non-nil, zero value otherwise. + +### GetStreamNameOk + +`func (o *Output2) GetStreamNameOk() (*string, bool)` + +GetStreamNameOk returns a tuple with the StreamName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamName + +`func (o *Output2) SetStreamName(v string)` + +SetStreamName sets StreamName field to given value. + + +### GetLogType + +`func (o *Output2) GetLogType() string` + +GetLogType returns the LogType field if non-nil, zero value otherwise. + +### GetLogTypeOk + +`func (o *Output2) GetLogTypeOk() (*string, bool)` + +GetLogTypeOk returns a tuple with the LogType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogType + +`func (o *Output2) SetLogType(v string)` + +SetLogType sets LogType field to given value. + + +### GetSharedKey + +`func (o *Output2) GetSharedKey() string` + +GetSharedKey returns the SharedKey field if non-nil, zero value otherwise. + +### GetSharedKeyOk + +`func (o *Output2) GetSharedKeyOk() (*string, bool)` + +GetSharedKeyOk returns a tuple with the SharedKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSharedKey + +`func (o *Output2) SetSharedKey(v string)` + +SetSharedKey sets SharedKey field to given value. + + +### GetTimeGeneratedField + +`func (o *Output2) GetTimeGeneratedField() string` + +GetTimeGeneratedField returns the TimeGeneratedField field if non-nil, zero value otherwise. + +### GetTimeGeneratedFieldOk + +`func (o *Output2) GetTimeGeneratedFieldOk() (*string, bool)` + +GetTimeGeneratedFieldOk returns a tuple with the TimeGeneratedField field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeGeneratedField + +`func (o *Output2) SetTimeGeneratedField(v string)` + +SetTimeGeneratedField sets TimeGeneratedField field to given value. + +### HasTimeGeneratedField + +`func (o *Output2) HasTimeGeneratedField() bool` + +HasTimeGeneratedField returns a boolean if a field has been set. + +### SetTimeGeneratedFieldNil + +`func (o *Output2) SetTimeGeneratedFieldNil(b bool)` + + SetTimeGeneratedFieldNil sets the value for TimeGeneratedField to be an explicit nil + +### UnsetTimeGeneratedField +`func (o *Output2) UnsetTimeGeneratedField()` + +UnsetTimeGeneratedField ensures that no value is present for TimeGeneratedField, not even an explicit nil +### GetWorkspaceId + +`func (o *Output2) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *Output2) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *Output2) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + +### GetStorageAccount + +`func (o *Output2) GetStorageAccount() string` + +GetStorageAccount returns the StorageAccount field if non-nil, zero value otherwise. + +### GetStorageAccountOk + +`func (o *Output2) GetStorageAccountOk() (*string, bool)` + +GetStorageAccountOk returns a tuple with the StorageAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStorageAccount + +`func (o *Output2) SetStorageAccount(v string)` + +SetStorageAccount sets StorageAccount field to given value. + + +### GetContainerName + +`func (o *Output2) GetContainerName() string` + +GetContainerName returns the ContainerName field if non-nil, zero value otherwise. + +### GetContainerNameOk + +`func (o *Output2) GetContainerNameOk() (*string, bool)` + +GetContainerNameOk returns a tuple with the ContainerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainerName + +`func (o *Output2) SetContainerName(v string)` + +SetContainerName sets ContainerName field to given value. + + +### GetBlobSasToken + +`func (o *Output2) GetBlobSasToken() string` + +GetBlobSasToken returns the BlobSasToken field if non-nil, zero value otherwise. + +### GetBlobSasTokenOk + +`func (o *Output2) GetBlobSasTokenOk() (*string, bool)` + +GetBlobSasTokenOk returns a tuple with the BlobSasToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlobSasToken + +`func (o *Output2) SetBlobSasToken(v string)` + +SetBlobSasToken sets BlobSasToken field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OutputRequest.md b/azion-api/docs/OutputRequest.md new file mode 100644 index 0000000..7f9ae4c --- /dev/null +++ b/azion-api/docs/OutputRequest.md @@ -0,0 +1,72 @@ +# OutputRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `standard` - Standard HTTP/HTTPS POST * `kafka` - Apache Kafka * `s3` - Simple Storage Service (S3) * `big_query` - Google BigQuery * `elasticsearch` - Elasticsearch * `splunk` - Splunk * `aws_kinesis_firehose` - AWS Kinesis Data Firehose * `datadog` - Datadog * `qradar` - IBM QRadar * `azure_monitor` - Azure Monitor * `azure_blob_storage` - Azure Blob Storage | +**Attributes** | [**OutputRequest2**](OutputRequest2.md) | | + +## Methods + +### NewOutputRequest + +`func NewOutputRequest(type_ string, attributes OutputRequest2, ) *OutputRequest` + +NewOutputRequest instantiates a new OutputRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOutputRequestWithDefaults + +`func NewOutputRequestWithDefaults() *OutputRequest` + +NewOutputRequestWithDefaults instantiates a new OutputRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *OutputRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OutputRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OutputRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *OutputRequest) GetAttributes() OutputRequest2` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *OutputRequest) GetAttributesOk() (*OutputRequest2, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *OutputRequest) SetAttributes(v OutputRequest2)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/OutputRequest2.md b/azion-api/docs/OutputRequest2.md new file mode 100644 index 0000000..4a7d4e0 --- /dev/null +++ b/azion-api/docs/OutputRequest2.md @@ -0,0 +1,694 @@ +# OutputRequest2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**LogLineSeparator** | Pointer to **string** | | [optional] +**PayloadFormat** | Pointer to **string** | | [optional] +**MaxSize** | Pointer to **NullableInt64** | | [optional] +**Headers** | **map[string]string** | | +**Type** | **string** | Type identifier for this endpoint (splunk) | +**BootstrapServers** | **string** | | +**KafkaTopic** | **string** | | +**UseTls** | **bool** | | +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Region** | **string** | | +**ObjectKeyPrefix** | Pointer to **NullableString** | | [optional] +**BucketName** | **string** | | +**ContentType** | **string** | * `plain/text` - plain/text * `application/gzip` - application/gzip | +**HostUrl** | **string** | | +**DatasetId** | **string** | | +**ProjectId** | **string** | | +**TableId** | **string** | | +**ServiceAccountKey** | **string** | | +**ApiKey** | **string** | | +**StreamName** | **string** | | +**LogType** | **string** | | +**SharedKey** | **string** | | +**TimeGeneratedField** | Pointer to **NullableString** | | [optional] +**WorkspaceId** | **string** | | +**StorageAccount** | **string** | | +**ContainerName** | **string** | | +**BlobSasToken** | **string** | | + +## Methods + +### NewOutputRequest2 + +`func NewOutputRequest2(url string, headers map[string]string, type_ string, bootstrapServers string, kafkaTopic string, useTls bool, accessKey string, secretKey string, region string, bucketName string, contentType string, hostUrl string, datasetId string, projectId string, tableId string, serviceAccountKey string, apiKey string, streamName string, logType string, sharedKey string, workspaceId string, storageAccount string, containerName string, blobSasToken string, ) *OutputRequest2` + +NewOutputRequest2 instantiates a new OutputRequest2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOutputRequest2WithDefaults + +`func NewOutputRequest2WithDefaults() *OutputRequest2` + +NewOutputRequest2WithDefaults instantiates a new OutputRequest2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *OutputRequest2) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *OutputRequest2) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *OutputRequest2) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetLogLineSeparator + +`func (o *OutputRequest2) GetLogLineSeparator() string` + +GetLogLineSeparator returns the LogLineSeparator field if non-nil, zero value otherwise. + +### GetLogLineSeparatorOk + +`func (o *OutputRequest2) GetLogLineSeparatorOk() (*string, bool)` + +GetLogLineSeparatorOk returns a tuple with the LogLineSeparator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogLineSeparator + +`func (o *OutputRequest2) SetLogLineSeparator(v string)` + +SetLogLineSeparator sets LogLineSeparator field to given value. + +### HasLogLineSeparator + +`func (o *OutputRequest2) HasLogLineSeparator() bool` + +HasLogLineSeparator returns a boolean if a field has been set. + +### GetPayloadFormat + +`func (o *OutputRequest2) GetPayloadFormat() string` + +GetPayloadFormat returns the PayloadFormat field if non-nil, zero value otherwise. + +### GetPayloadFormatOk + +`func (o *OutputRequest2) GetPayloadFormatOk() (*string, bool)` + +GetPayloadFormatOk returns a tuple with the PayloadFormat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPayloadFormat + +`func (o *OutputRequest2) SetPayloadFormat(v string)` + +SetPayloadFormat sets PayloadFormat field to given value. + +### HasPayloadFormat + +`func (o *OutputRequest2) HasPayloadFormat() bool` + +HasPayloadFormat returns a boolean if a field has been set. + +### GetMaxSize + +`func (o *OutputRequest2) GetMaxSize() int64` + +GetMaxSize returns the MaxSize field if non-nil, zero value otherwise. + +### GetMaxSizeOk + +`func (o *OutputRequest2) GetMaxSizeOk() (*int64, bool)` + +GetMaxSizeOk returns a tuple with the MaxSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxSize + +`func (o *OutputRequest2) SetMaxSize(v int64)` + +SetMaxSize sets MaxSize field to given value. + +### HasMaxSize + +`func (o *OutputRequest2) HasMaxSize() bool` + +HasMaxSize returns a boolean if a field has been set. + +### SetMaxSizeNil + +`func (o *OutputRequest2) SetMaxSizeNil(b bool)` + + SetMaxSizeNil sets the value for MaxSize to be an explicit nil + +### UnsetMaxSize +`func (o *OutputRequest2) UnsetMaxSize()` + +UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil +### GetHeaders + +`func (o *OutputRequest2) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *OutputRequest2) GetHeadersOk() (*map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHeaders + +`func (o *OutputRequest2) SetHeaders(v map[string]string)` + +SetHeaders sets Headers field to given value. + + +### GetType + +`func (o *OutputRequest2) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OutputRequest2) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OutputRequest2) SetType(v string)` + +SetType sets Type field to given value. + + +### GetBootstrapServers + +`func (o *OutputRequest2) GetBootstrapServers() string` + +GetBootstrapServers returns the BootstrapServers field if non-nil, zero value otherwise. + +### GetBootstrapServersOk + +`func (o *OutputRequest2) GetBootstrapServersOk() (*string, bool)` + +GetBootstrapServersOk returns a tuple with the BootstrapServers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBootstrapServers + +`func (o *OutputRequest2) SetBootstrapServers(v string)` + +SetBootstrapServers sets BootstrapServers field to given value. + + +### GetKafkaTopic + +`func (o *OutputRequest2) GetKafkaTopic() string` + +GetKafkaTopic returns the KafkaTopic field if non-nil, zero value otherwise. + +### GetKafkaTopicOk + +`func (o *OutputRequest2) GetKafkaTopicOk() (*string, bool)` + +GetKafkaTopicOk returns a tuple with the KafkaTopic field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKafkaTopic + +`func (o *OutputRequest2) SetKafkaTopic(v string)` + +SetKafkaTopic sets KafkaTopic field to given value. + + +### GetUseTls + +`func (o *OutputRequest2) GetUseTls() bool` + +GetUseTls returns the UseTls field if non-nil, zero value otherwise. + +### GetUseTlsOk + +`func (o *OutputRequest2) GetUseTlsOk() (*bool, bool)` + +GetUseTlsOk returns a tuple with the UseTls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUseTls + +`func (o *OutputRequest2) SetUseTls(v bool)` + +SetUseTls sets UseTls field to given value. + + +### GetAccessKey + +`func (o *OutputRequest2) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *OutputRequest2) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *OutputRequest2) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *OutputRequest2) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *OutputRequest2) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *OutputRequest2) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetRegion + +`func (o *OutputRequest2) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *OutputRequest2) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *OutputRequest2) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetObjectKeyPrefix + +`func (o *OutputRequest2) GetObjectKeyPrefix() string` + +GetObjectKeyPrefix returns the ObjectKeyPrefix field if non-nil, zero value otherwise. + +### GetObjectKeyPrefixOk + +`func (o *OutputRequest2) GetObjectKeyPrefixOk() (*string, bool)` + +GetObjectKeyPrefixOk returns a tuple with the ObjectKeyPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectKeyPrefix + +`func (o *OutputRequest2) SetObjectKeyPrefix(v string)` + +SetObjectKeyPrefix sets ObjectKeyPrefix field to given value. + +### HasObjectKeyPrefix + +`func (o *OutputRequest2) HasObjectKeyPrefix() bool` + +HasObjectKeyPrefix returns a boolean if a field has been set. + +### SetObjectKeyPrefixNil + +`func (o *OutputRequest2) SetObjectKeyPrefixNil(b bool)` + + SetObjectKeyPrefixNil sets the value for ObjectKeyPrefix to be an explicit nil + +### UnsetObjectKeyPrefix +`func (o *OutputRequest2) UnsetObjectKeyPrefix()` + +UnsetObjectKeyPrefix ensures that no value is present for ObjectKeyPrefix, not even an explicit nil +### GetBucketName + +`func (o *OutputRequest2) GetBucketName() string` + +GetBucketName returns the BucketName field if non-nil, zero value otherwise. + +### GetBucketNameOk + +`func (o *OutputRequest2) GetBucketNameOk() (*string, bool)` + +GetBucketNameOk returns a tuple with the BucketName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketName + +`func (o *OutputRequest2) SetBucketName(v string)` + +SetBucketName sets BucketName field to given value. + + +### GetContentType + +`func (o *OutputRequest2) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *OutputRequest2) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *OutputRequest2) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetHostUrl + +`func (o *OutputRequest2) GetHostUrl() string` + +GetHostUrl returns the HostUrl field if non-nil, zero value otherwise. + +### GetHostUrlOk + +`func (o *OutputRequest2) GetHostUrlOk() (*string, bool)` + +GetHostUrlOk returns a tuple with the HostUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostUrl + +`func (o *OutputRequest2) SetHostUrl(v string)` + +SetHostUrl sets HostUrl field to given value. + + +### GetDatasetId + +`func (o *OutputRequest2) GetDatasetId() string` + +GetDatasetId returns the DatasetId field if non-nil, zero value otherwise. + +### GetDatasetIdOk + +`func (o *OutputRequest2) GetDatasetIdOk() (*string, bool)` + +GetDatasetIdOk returns a tuple with the DatasetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDatasetId + +`func (o *OutputRequest2) SetDatasetId(v string)` + +SetDatasetId sets DatasetId field to given value. + + +### GetProjectId + +`func (o *OutputRequest2) GetProjectId() string` + +GetProjectId returns the ProjectId field if non-nil, zero value otherwise. + +### GetProjectIdOk + +`func (o *OutputRequest2) GetProjectIdOk() (*string, bool)` + +GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProjectId + +`func (o *OutputRequest2) SetProjectId(v string)` + +SetProjectId sets ProjectId field to given value. + + +### GetTableId + +`func (o *OutputRequest2) GetTableId() string` + +GetTableId returns the TableId field if non-nil, zero value otherwise. + +### GetTableIdOk + +`func (o *OutputRequest2) GetTableIdOk() (*string, bool)` + +GetTableIdOk returns a tuple with the TableId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTableId + +`func (o *OutputRequest2) SetTableId(v string)` + +SetTableId sets TableId field to given value. + + +### GetServiceAccountKey + +`func (o *OutputRequest2) GetServiceAccountKey() string` + +GetServiceAccountKey returns the ServiceAccountKey field if non-nil, zero value otherwise. + +### GetServiceAccountKeyOk + +`func (o *OutputRequest2) GetServiceAccountKeyOk() (*string, bool)` + +GetServiceAccountKeyOk returns a tuple with the ServiceAccountKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceAccountKey + +`func (o *OutputRequest2) SetServiceAccountKey(v string)` + +SetServiceAccountKey sets ServiceAccountKey field to given value. + + +### GetApiKey + +`func (o *OutputRequest2) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *OutputRequest2) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *OutputRequest2) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetStreamName + +`func (o *OutputRequest2) GetStreamName() string` + +GetStreamName returns the StreamName field if non-nil, zero value otherwise. + +### GetStreamNameOk + +`func (o *OutputRequest2) GetStreamNameOk() (*string, bool)` + +GetStreamNameOk returns a tuple with the StreamName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreamName + +`func (o *OutputRequest2) SetStreamName(v string)` + +SetStreamName sets StreamName field to given value. + + +### GetLogType + +`func (o *OutputRequest2) GetLogType() string` + +GetLogType returns the LogType field if non-nil, zero value otherwise. + +### GetLogTypeOk + +`func (o *OutputRequest2) GetLogTypeOk() (*string, bool)` + +GetLogTypeOk returns a tuple with the LogType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLogType + +`func (o *OutputRequest2) SetLogType(v string)` + +SetLogType sets LogType field to given value. + + +### GetSharedKey + +`func (o *OutputRequest2) GetSharedKey() string` + +GetSharedKey returns the SharedKey field if non-nil, zero value otherwise. + +### GetSharedKeyOk + +`func (o *OutputRequest2) GetSharedKeyOk() (*string, bool)` + +GetSharedKeyOk returns a tuple with the SharedKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSharedKey + +`func (o *OutputRequest2) SetSharedKey(v string)` + +SetSharedKey sets SharedKey field to given value. + + +### GetTimeGeneratedField + +`func (o *OutputRequest2) GetTimeGeneratedField() string` + +GetTimeGeneratedField returns the TimeGeneratedField field if non-nil, zero value otherwise. + +### GetTimeGeneratedFieldOk + +`func (o *OutputRequest2) GetTimeGeneratedFieldOk() (*string, bool)` + +GetTimeGeneratedFieldOk returns a tuple with the TimeGeneratedField field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTimeGeneratedField + +`func (o *OutputRequest2) SetTimeGeneratedField(v string)` + +SetTimeGeneratedField sets TimeGeneratedField field to given value. + +### HasTimeGeneratedField + +`func (o *OutputRequest2) HasTimeGeneratedField() bool` + +HasTimeGeneratedField returns a boolean if a field has been set. + +### SetTimeGeneratedFieldNil + +`func (o *OutputRequest2) SetTimeGeneratedFieldNil(b bool)` + + SetTimeGeneratedFieldNil sets the value for TimeGeneratedField to be an explicit nil + +### UnsetTimeGeneratedField +`func (o *OutputRequest2) UnsetTimeGeneratedField()` + +UnsetTimeGeneratedField ensures that no value is present for TimeGeneratedField, not even an explicit nil +### GetWorkspaceId + +`func (o *OutputRequest2) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *OutputRequest2) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *OutputRequest2) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + +### GetStorageAccount + +`func (o *OutputRequest2) GetStorageAccount() string` + +GetStorageAccount returns the StorageAccount field if non-nil, zero value otherwise. + +### GetStorageAccountOk + +`func (o *OutputRequest2) GetStorageAccountOk() (*string, bool)` + +GetStorageAccountOk returns a tuple with the StorageAccount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStorageAccount + +`func (o *OutputRequest2) SetStorageAccount(v string)` + +SetStorageAccount sets StorageAccount field to given value. + + +### GetContainerName + +`func (o *OutputRequest2) GetContainerName() string` + +GetContainerName returns the ContainerName field if non-nil, zero value otherwise. + +### GetContainerNameOk + +`func (o *OutputRequest2) GetContainerNameOk() (*string, bool)` + +GetContainerNameOk returns a tuple with the ContainerName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContainerName + +`func (o *OutputRequest2) SetContainerName(v string)` + +SetContainerName sets ContainerName field to given value. + + +### GetBlobSasToken + +`func (o *OutputRequest2) GetBlobSasToken() string` + +GetBlobSasToken returns the BlobSasToken field if non-nil, zero value otherwise. + +### GetBlobSasTokenOk + +`func (o *OutputRequest2) GetBlobSasTokenOk() (*string, bool)` + +GetBlobSasTokenOk returns a tuple with the BlobSasToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBlobSasToken + +`func (o *OutputRequest2) SetBlobSasToken(v string)` + +SetBlobSasToken sets BlobSasToken field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Page.md b/azion-api/docs/Page.md new file mode 100644 index 0000000..767423a --- /dev/null +++ b/azion-api/docs/Page.md @@ -0,0 +1,72 @@ +# Page + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | * `default` - default * `400` - Bad Request * `401` - Unauthorized * `403` - Forbidden * `404` - Not Found * `405` - Method Not Allowed * `406` - Not Acceptable * `408` - Request Timeout * `409` - Conflict * `410` - Gone * `411` - Length Required * `414` - URI Too Long * `415` - Unsupported Media Type * `416` - Range Not Satisfiable * `426` - Upgrade Required * `429` - Too Many Requests * `431` - Request Header Fields Too Large * `500` - Internal Server Error * `501` - Not Implemented * `502` - Bad Gateway * `503` - Service Unavailable * `504` - Gateway Timeout * `505` - HTTP Version Not Supported | +**Page** | [**PageConnector**](PageConnector.md) | | + +## Methods + +### NewPage + +`func NewPage(code string, page PageConnector, ) *Page` + +NewPage instantiates a new Page object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageWithDefaults + +`func NewPageWithDefaults() *Page` + +NewPageWithDefaults instantiates a new Page object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *Page) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *Page) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *Page) SetCode(v string)` + +SetCode sets Code field to given value. + + +### GetPage + +`func (o *Page) GetPage() PageConnector` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *Page) GetPageOk() (*PageConnector, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *Page) SetPage(v PageConnector)` + +SetPage sets Page field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PageConnector.md b/azion-api/docs/PageConnector.md new file mode 100644 index 0000000..3a1b246 --- /dev/null +++ b/azion-api/docs/PageConnector.md @@ -0,0 +1,72 @@ +# PageConnector + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**PageConnectorAttributes**](PageConnectorAttributes.md) | | + +## Methods + +### NewPageConnector + +`func NewPageConnector(type_ string, attributes PageConnectorAttributes, ) *PageConnector` + +NewPageConnector instantiates a new PageConnector object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageConnectorWithDefaults + +`func NewPageConnectorWithDefaults() *PageConnector` + +NewPageConnectorWithDefaults instantiates a new PageConnector object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *PageConnector) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PageConnector) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PageConnector) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *PageConnector) GetAttributes() PageConnectorAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *PageConnector) GetAttributesOk() (*PageConnectorAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *PageConnector) SetAttributes(v PageConnectorAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PageConnectorAttributes.md b/azion-api/docs/PageConnectorAttributes.md new file mode 100644 index 0000000..b419d1e --- /dev/null +++ b/azion-api/docs/PageConnectorAttributes.md @@ -0,0 +1,149 @@ +# PageConnectorAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Connector** | **int64** | | +**Ttl** | Pointer to **int64** | | [optional] +**Uri** | Pointer to **NullableString** | | [optional] +**CustomStatusCode** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewPageConnectorAttributes + +`func NewPageConnectorAttributes(connector int64, ) *PageConnectorAttributes` + +NewPageConnectorAttributes instantiates a new PageConnectorAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageConnectorAttributesWithDefaults + +`func NewPageConnectorAttributesWithDefaults() *PageConnectorAttributes` + +NewPageConnectorAttributesWithDefaults instantiates a new PageConnectorAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnector + +`func (o *PageConnectorAttributes) GetConnector() int64` + +GetConnector returns the Connector field if non-nil, zero value otherwise. + +### GetConnectorOk + +`func (o *PageConnectorAttributes) GetConnectorOk() (*int64, bool)` + +GetConnectorOk returns a tuple with the Connector field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnector + +`func (o *PageConnectorAttributes) SetConnector(v int64)` + +SetConnector sets Connector field to given value. + + +### GetTtl + +`func (o *PageConnectorAttributes) GetTtl() int64` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *PageConnectorAttributes) GetTtlOk() (*int64, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *PageConnectorAttributes) SetTtl(v int64)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *PageConnectorAttributes) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetUri + +`func (o *PageConnectorAttributes) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *PageConnectorAttributes) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *PageConnectorAttributes) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *PageConnectorAttributes) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### SetUriNil + +`func (o *PageConnectorAttributes) SetUriNil(b bool)` + + SetUriNil sets the value for Uri to be an explicit nil + +### UnsetUri +`func (o *PageConnectorAttributes) UnsetUri()` + +UnsetUri ensures that no value is present for Uri, not even an explicit nil +### GetCustomStatusCode + +`func (o *PageConnectorAttributes) GetCustomStatusCode() int64` + +GetCustomStatusCode returns the CustomStatusCode field if non-nil, zero value otherwise. + +### GetCustomStatusCodeOk + +`func (o *PageConnectorAttributes) GetCustomStatusCodeOk() (*int64, bool)` + +GetCustomStatusCodeOk returns a tuple with the CustomStatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomStatusCode + +`func (o *PageConnectorAttributes) SetCustomStatusCode(v int64)` + +SetCustomStatusCode sets CustomStatusCode field to given value. + +### HasCustomStatusCode + +`func (o *PageConnectorAttributes) HasCustomStatusCode() bool` + +HasCustomStatusCode returns a boolean if a field has been set. + +### SetCustomStatusCodeNil + +`func (o *PageConnectorAttributes) SetCustomStatusCodeNil(b bool)` + + SetCustomStatusCodeNil sets the value for CustomStatusCode to be an explicit nil + +### UnsetCustomStatusCode +`func (o *PageConnectorAttributes) UnsetCustomStatusCode()` + +UnsetCustomStatusCode ensures that no value is present for CustomStatusCode, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PageConnectorAttributesRequest.md b/azion-api/docs/PageConnectorAttributesRequest.md new file mode 100644 index 0000000..b5b30d5 --- /dev/null +++ b/azion-api/docs/PageConnectorAttributesRequest.md @@ -0,0 +1,149 @@ +# PageConnectorAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Connector** | **int64** | | +**Ttl** | Pointer to **int64** | | [optional] +**Uri** | Pointer to **NullableString** | | [optional] +**CustomStatusCode** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewPageConnectorAttributesRequest + +`func NewPageConnectorAttributesRequest(connector int64, ) *PageConnectorAttributesRequest` + +NewPageConnectorAttributesRequest instantiates a new PageConnectorAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageConnectorAttributesRequestWithDefaults + +`func NewPageConnectorAttributesRequestWithDefaults() *PageConnectorAttributesRequest` + +NewPageConnectorAttributesRequestWithDefaults instantiates a new PageConnectorAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetConnector + +`func (o *PageConnectorAttributesRequest) GetConnector() int64` + +GetConnector returns the Connector field if non-nil, zero value otherwise. + +### GetConnectorOk + +`func (o *PageConnectorAttributesRequest) GetConnectorOk() (*int64, bool)` + +GetConnectorOk returns a tuple with the Connector field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConnector + +`func (o *PageConnectorAttributesRequest) SetConnector(v int64)` + +SetConnector sets Connector field to given value. + + +### GetTtl + +`func (o *PageConnectorAttributesRequest) GetTtl() int64` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *PageConnectorAttributesRequest) GetTtlOk() (*int64, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *PageConnectorAttributesRequest) SetTtl(v int64)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *PageConnectorAttributesRequest) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetUri + +`func (o *PageConnectorAttributesRequest) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *PageConnectorAttributesRequest) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *PageConnectorAttributesRequest) SetUri(v string)` + +SetUri sets Uri field to given value. + +### HasUri + +`func (o *PageConnectorAttributesRequest) HasUri() bool` + +HasUri returns a boolean if a field has been set. + +### SetUriNil + +`func (o *PageConnectorAttributesRequest) SetUriNil(b bool)` + + SetUriNil sets the value for Uri to be an explicit nil + +### UnsetUri +`func (o *PageConnectorAttributesRequest) UnsetUri()` + +UnsetUri ensures that no value is present for Uri, not even an explicit nil +### GetCustomStatusCode + +`func (o *PageConnectorAttributesRequest) GetCustomStatusCode() int64` + +GetCustomStatusCode returns the CustomStatusCode field if non-nil, zero value otherwise. + +### GetCustomStatusCodeOk + +`func (o *PageConnectorAttributesRequest) GetCustomStatusCodeOk() (*int64, bool)` + +GetCustomStatusCodeOk returns a tuple with the CustomStatusCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomStatusCode + +`func (o *PageConnectorAttributesRequest) SetCustomStatusCode(v int64)` + +SetCustomStatusCode sets CustomStatusCode field to given value. + +### HasCustomStatusCode + +`func (o *PageConnectorAttributesRequest) HasCustomStatusCode() bool` + +HasCustomStatusCode returns a boolean if a field has been set. + +### SetCustomStatusCodeNil + +`func (o *PageConnectorAttributesRequest) SetCustomStatusCodeNil(b bool)` + + SetCustomStatusCodeNil sets the value for CustomStatusCode to be an explicit nil + +### UnsetCustomStatusCode +`func (o *PageConnectorAttributesRequest) UnsetCustomStatusCode()` + +UnsetCustomStatusCode ensures that no value is present for CustomStatusCode, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PageConnectorRequest.md b/azion-api/docs/PageConnectorRequest.md new file mode 100644 index 0000000..211fba2 --- /dev/null +++ b/azion-api/docs/PageConnectorRequest.md @@ -0,0 +1,72 @@ +# PageConnectorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**PageConnectorAttributesRequest**](PageConnectorAttributesRequest.md) | | + +## Methods + +### NewPageConnectorRequest + +`func NewPageConnectorRequest(type_ string, attributes PageConnectorAttributesRequest, ) *PageConnectorRequest` + +NewPageConnectorRequest instantiates a new PageConnectorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageConnectorRequestWithDefaults + +`func NewPageConnectorRequestWithDefaults() *PageConnectorRequest` + +NewPageConnectorRequestWithDefaults instantiates a new PageConnectorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *PageConnectorRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PageConnectorRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PageConnectorRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *PageConnectorRequest) GetAttributes() PageConnectorAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *PageConnectorRequest) GetAttributesOk() (*PageConnectorAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *PageConnectorRequest) SetAttributes(v PageConnectorAttributesRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PageRequest.md b/azion-api/docs/PageRequest.md new file mode 100644 index 0000000..acebafe --- /dev/null +++ b/azion-api/docs/PageRequest.md @@ -0,0 +1,72 @@ +# PageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | * `default` - default * `400` - Bad Request * `401` - Unauthorized * `403` - Forbidden * `404` - Not Found * `405` - Method Not Allowed * `406` - Not Acceptable * `408` - Request Timeout * `409` - Conflict * `410` - Gone * `411` - Length Required * `414` - URI Too Long * `415` - Unsupported Media Type * `416` - Range Not Satisfiable * `426` - Upgrade Required * `429` - Too Many Requests * `431` - Request Header Fields Too Large * `500` - Internal Server Error * `501` - Not Implemented * `502` - Bad Gateway * `503` - Service Unavailable * `504` - Gateway Timeout * `505` - HTTP Version Not Supported | +**Page** | [**PageConnectorRequest**](PageConnectorRequest.md) | | + +## Methods + +### NewPageRequest + +`func NewPageRequest(code string, page PageConnectorRequest, ) *PageRequest` + +NewPageRequest instantiates a new PageRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPageRequestWithDefaults + +`func NewPageRequestWithDefaults() *PageRequest` + +NewPageRequestWithDefaults instantiates a new PageRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *PageRequest) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *PageRequest) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *PageRequest) SetCode(v string)` + +SetCode sets Code field to given value. + + +### GetPage + +`func (o *PageRequest) GetPage() PageConnectorRequest` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PageRequest) GetPageOk() (*PageConnectorRequest, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PageRequest) SetPage(v PageConnectorRequest)` + +SetPage sets Page field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedAccountList.md b/azion-api/docs/PaginatedAccountList.md new file mode 100644 index 0000000..497d547 --- /dev/null +++ b/azion-api/docs/PaginatedAccountList.md @@ -0,0 +1,160 @@ +# PaginatedAccountList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListAccount**](ResponseListAccount.md) | | [optional] + +## Methods + +### NewPaginatedAccountList + +`func NewPaginatedAccountList() *PaginatedAccountList` + +NewPaginatedAccountList instantiates a new PaginatedAccountList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedAccountListWithDefaults + +`func NewPaginatedAccountListWithDefaults() *PaginatedAccountList` + +NewPaginatedAccountListWithDefaults instantiates a new PaginatedAccountList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedAccountList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedAccountList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedAccountList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedAccountList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedAccountList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedAccountList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedAccountList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedAccountList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedAccountList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedAccountList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedAccountList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedAccountList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedAccountList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedAccountList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedAccountList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedAccountList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedAccountList) GetResults() []ResponseListAccount` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedAccountList) GetResultsOk() (*[]ResponseListAccount, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedAccountList) SetResults(v []ResponseListAccount)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedAccountList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedApplicationList.md b/azion-api/docs/PaginatedApplicationList.md new file mode 100644 index 0000000..67897ea --- /dev/null +++ b/azion-api/docs/PaginatedApplicationList.md @@ -0,0 +1,232 @@ +# PaginatedApplicationList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Application**](Application.md) | | [optional] + +## Methods + +### NewPaginatedApplicationList + +`func NewPaginatedApplicationList() *PaginatedApplicationList` + +NewPaginatedApplicationList instantiates a new PaginatedApplicationList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedApplicationListWithDefaults + +`func NewPaginatedApplicationListWithDefaults() *PaginatedApplicationList` + +NewPaginatedApplicationListWithDefaults instantiates a new PaginatedApplicationList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedApplicationList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedApplicationList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedApplicationList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedApplicationList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedApplicationList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedApplicationList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedApplicationList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedApplicationList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedApplicationList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedApplicationList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedApplicationList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedApplicationList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedApplicationList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedApplicationList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedApplicationList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedApplicationList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedApplicationList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedApplicationList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedApplicationList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedApplicationList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedApplicationList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedApplicationList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedApplicationList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedApplicationList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedApplicationList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedApplicationList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedApplicationList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedApplicationList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedApplicationList) GetResults() []Application` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedApplicationList) GetResultsOk() (*[]Application, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedApplicationList) SetResults(v []Application)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedApplicationList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedBucketList.md b/azion-api/docs/PaginatedBucketList.md new file mode 100644 index 0000000..65a88de --- /dev/null +++ b/azion-api/docs/PaginatedBucketList.md @@ -0,0 +1,232 @@ +# PaginatedBucketList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Bucket**](Bucket.md) | | [optional] + +## Methods + +### NewPaginatedBucketList + +`func NewPaginatedBucketList() *PaginatedBucketList` + +NewPaginatedBucketList instantiates a new PaginatedBucketList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedBucketListWithDefaults + +`func NewPaginatedBucketListWithDefaults() *PaginatedBucketList` + +NewPaginatedBucketListWithDefaults instantiates a new PaginatedBucketList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedBucketList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedBucketList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedBucketList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedBucketList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedBucketList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedBucketList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedBucketList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedBucketList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedBucketList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedBucketList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedBucketList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedBucketList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedBucketList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedBucketList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedBucketList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedBucketList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedBucketList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedBucketList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedBucketList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedBucketList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedBucketList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedBucketList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedBucketList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedBucketList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedBucketList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedBucketList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedBucketList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedBucketList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedBucketList) GetResults() []Bucket` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedBucketList) GetResultsOk() (*[]Bucket, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedBucketList) SetResults(v []Bucket)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedBucketList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedCacheSettingList.md b/azion-api/docs/PaginatedCacheSettingList.md new file mode 100644 index 0000000..ddfc9ff --- /dev/null +++ b/azion-api/docs/PaginatedCacheSettingList.md @@ -0,0 +1,232 @@ +# PaginatedCacheSettingList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]CacheSetting**](CacheSetting.md) | | [optional] + +## Methods + +### NewPaginatedCacheSettingList + +`func NewPaginatedCacheSettingList() *PaginatedCacheSettingList` + +NewPaginatedCacheSettingList instantiates a new PaginatedCacheSettingList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedCacheSettingListWithDefaults + +`func NewPaginatedCacheSettingListWithDefaults() *PaginatedCacheSettingList` + +NewPaginatedCacheSettingListWithDefaults instantiates a new PaginatedCacheSettingList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedCacheSettingList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedCacheSettingList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedCacheSettingList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedCacheSettingList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedCacheSettingList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedCacheSettingList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedCacheSettingList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedCacheSettingList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedCacheSettingList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedCacheSettingList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedCacheSettingList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedCacheSettingList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedCacheSettingList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedCacheSettingList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedCacheSettingList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedCacheSettingList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedCacheSettingList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedCacheSettingList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedCacheSettingList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedCacheSettingList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedCacheSettingList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedCacheSettingList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedCacheSettingList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedCacheSettingList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedCacheSettingList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedCacheSettingList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedCacheSettingList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedCacheSettingList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedCacheSettingList) GetResults() []CacheSetting` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedCacheSettingList) GetResultsOk() (*[]CacheSetting, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedCacheSettingList) SetResults(v []CacheSetting)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedCacheSettingList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedCertificateList.md b/azion-api/docs/PaginatedCertificateList.md new file mode 100644 index 0000000..fae9d26 --- /dev/null +++ b/azion-api/docs/PaginatedCertificateList.md @@ -0,0 +1,232 @@ +# PaginatedCertificateList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Certificate**](Certificate.md) | | [optional] + +## Methods + +### NewPaginatedCertificateList + +`func NewPaginatedCertificateList() *PaginatedCertificateList` + +NewPaginatedCertificateList instantiates a new PaginatedCertificateList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedCertificateListWithDefaults + +`func NewPaginatedCertificateListWithDefaults() *PaginatedCertificateList` + +NewPaginatedCertificateListWithDefaults instantiates a new PaginatedCertificateList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedCertificateList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedCertificateList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedCertificateList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedCertificateList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedCertificateList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedCertificateList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedCertificateList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedCertificateList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedCertificateList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedCertificateList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedCertificateList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedCertificateList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedCertificateList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedCertificateList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedCertificateList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedCertificateList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedCertificateList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedCertificateList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedCertificateList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedCertificateList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedCertificateList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedCertificateList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedCertificateList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedCertificateList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedCertificateList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedCertificateList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedCertificateList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedCertificateList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedCertificateList) GetResults() []Certificate` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedCertificateList) GetResultsOk() (*[]Certificate, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedCertificateList) SetResults(v []Certificate)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedCertificateList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedCertificateRevocationList.md b/azion-api/docs/PaginatedCertificateRevocationList.md new file mode 100644 index 0000000..86c85da --- /dev/null +++ b/azion-api/docs/PaginatedCertificateRevocationList.md @@ -0,0 +1,232 @@ +# PaginatedCertificateRevocationList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]CertificateRevocationList**](CertificateRevocationList.md) | | [optional] + +## Methods + +### NewPaginatedCertificateRevocationList + +`func NewPaginatedCertificateRevocationList() *PaginatedCertificateRevocationList` + +NewPaginatedCertificateRevocationList instantiates a new PaginatedCertificateRevocationList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedCertificateRevocationListWithDefaults + +`func NewPaginatedCertificateRevocationListWithDefaults() *PaginatedCertificateRevocationList` + +NewPaginatedCertificateRevocationListWithDefaults instantiates a new PaginatedCertificateRevocationList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedCertificateRevocationList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedCertificateRevocationList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedCertificateRevocationList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedCertificateRevocationList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedCertificateRevocationList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedCertificateRevocationList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedCertificateRevocationList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedCertificateRevocationList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedCertificateRevocationList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedCertificateRevocationList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedCertificateRevocationList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedCertificateRevocationList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedCertificateRevocationList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedCertificateRevocationList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedCertificateRevocationList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedCertificateRevocationList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedCertificateRevocationList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedCertificateRevocationList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedCertificateRevocationList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedCertificateRevocationList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedCertificateRevocationList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedCertificateRevocationList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedCertificateRevocationList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedCertificateRevocationList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedCertificateRevocationList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedCertificateRevocationList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedCertificateRevocationList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedCertificateRevocationList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedCertificateRevocationList) GetResults() []CertificateRevocationList` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedCertificateRevocationList) GetResultsOk() (*[]CertificateRevocationList, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedCertificateRevocationList) SetResults(v []CertificateRevocationList)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedCertificateRevocationList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedChatThreadList.md b/azion-api/docs/PaginatedChatThreadList.md new file mode 100644 index 0000000..0437c8e --- /dev/null +++ b/azion-api/docs/PaginatedChatThreadList.md @@ -0,0 +1,82 @@ +# PaginatedChatThreadList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ChatThread**](ChatThread.md) | | [optional] + +## Methods + +### NewPaginatedChatThreadList + +`func NewPaginatedChatThreadList() *PaginatedChatThreadList` + +NewPaginatedChatThreadList instantiates a new PaginatedChatThreadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedChatThreadListWithDefaults + +`func NewPaginatedChatThreadListWithDefaults() *PaginatedChatThreadList` + +NewPaginatedChatThreadListWithDefaults instantiates a new PaginatedChatThreadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedChatThreadList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedChatThreadList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedChatThreadList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedChatThreadList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedChatThreadList) GetResults() []ChatThread` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedChatThreadList) GetResultsOk() (*[]ChatThread, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedChatThreadList) SetResults(v []ChatThread)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedChatThreadList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedChunkList.md b/azion-api/docs/PaginatedChunkList.md new file mode 100644 index 0000000..83aa8c6 --- /dev/null +++ b/azion-api/docs/PaginatedChunkList.md @@ -0,0 +1,82 @@ +# PaginatedChunkList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]Chunk**](Chunk.md) | | [optional] + +## Methods + +### NewPaginatedChunkList + +`func NewPaginatedChunkList() *PaginatedChunkList` + +NewPaginatedChunkList instantiates a new PaginatedChunkList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedChunkListWithDefaults + +`func NewPaginatedChunkListWithDefaults() *PaginatedChunkList` + +NewPaginatedChunkListWithDefaults instantiates a new PaginatedChunkList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedChunkList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedChunkList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedChunkList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedChunkList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedChunkList) GetResults() []Chunk` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedChunkList) GetResultsOk() (*[]Chunk, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedChunkList) SetResults(v []Chunk)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedChunkList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedConnectorList.md b/azion-api/docs/PaginatedConnectorList.md new file mode 100644 index 0000000..3652f5b --- /dev/null +++ b/azion-api/docs/PaginatedConnectorList.md @@ -0,0 +1,232 @@ +# PaginatedConnectorList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Connector2**](Connector2.md) | | [optional] + +## Methods + +### NewPaginatedConnectorList + +`func NewPaginatedConnectorList() *PaginatedConnectorList` + +NewPaginatedConnectorList instantiates a new PaginatedConnectorList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedConnectorListWithDefaults + +`func NewPaginatedConnectorListWithDefaults() *PaginatedConnectorList` + +NewPaginatedConnectorListWithDefaults instantiates a new PaginatedConnectorList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedConnectorList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedConnectorList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedConnectorList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedConnectorList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedConnectorList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedConnectorList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedConnectorList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedConnectorList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedConnectorList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedConnectorList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedConnectorList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedConnectorList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedConnectorList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedConnectorList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedConnectorList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedConnectorList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedConnectorList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedConnectorList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedConnectorList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedConnectorList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedConnectorList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedConnectorList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedConnectorList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedConnectorList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedConnectorList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedConnectorList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedConnectorList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedConnectorList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedConnectorList) GetResults() []Connector2` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedConnectorList) GetResultsOk() (*[]Connector2, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedConnectorList) SetResults(v []Connector2)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedConnectorList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedContinuousDeploymentList.md b/azion-api/docs/PaginatedContinuousDeploymentList.md new file mode 100644 index 0000000..c097845 --- /dev/null +++ b/azion-api/docs/PaginatedContinuousDeploymentList.md @@ -0,0 +1,160 @@ +# PaginatedContinuousDeploymentList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListContinuousDeployment**](ResponseListContinuousDeployment.md) | | [optional] + +## Methods + +### NewPaginatedContinuousDeploymentList + +`func NewPaginatedContinuousDeploymentList() *PaginatedContinuousDeploymentList` + +NewPaginatedContinuousDeploymentList instantiates a new PaginatedContinuousDeploymentList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedContinuousDeploymentListWithDefaults + +`func NewPaginatedContinuousDeploymentListWithDefaults() *PaginatedContinuousDeploymentList` + +NewPaginatedContinuousDeploymentListWithDefaults instantiates a new PaginatedContinuousDeploymentList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedContinuousDeploymentList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedContinuousDeploymentList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedContinuousDeploymentList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedContinuousDeploymentList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedContinuousDeploymentList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedContinuousDeploymentList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedContinuousDeploymentList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedContinuousDeploymentList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedContinuousDeploymentList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedContinuousDeploymentList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedContinuousDeploymentList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedContinuousDeploymentList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedContinuousDeploymentList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedContinuousDeploymentList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedContinuousDeploymentList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedContinuousDeploymentList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedContinuousDeploymentList) GetResults() []ResponseListContinuousDeployment` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedContinuousDeploymentList) GetResultsOk() (*[]ResponseListContinuousDeployment, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedContinuousDeploymentList) SetResults(v []ResponseListContinuousDeployment)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedContinuousDeploymentList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedCredentialList.md b/azion-api/docs/PaginatedCredentialList.md new file mode 100644 index 0000000..6454cfa --- /dev/null +++ b/azion-api/docs/PaginatedCredentialList.md @@ -0,0 +1,232 @@ +# PaginatedCredentialList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Credential**](Credential.md) | | [optional] + +## Methods + +### NewPaginatedCredentialList + +`func NewPaginatedCredentialList() *PaginatedCredentialList` + +NewPaginatedCredentialList instantiates a new PaginatedCredentialList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedCredentialListWithDefaults + +`func NewPaginatedCredentialListWithDefaults() *PaginatedCredentialList` + +NewPaginatedCredentialListWithDefaults instantiates a new PaginatedCredentialList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedCredentialList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedCredentialList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedCredentialList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedCredentialList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedCredentialList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedCredentialList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedCredentialList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedCredentialList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedCredentialList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedCredentialList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedCredentialList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedCredentialList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedCredentialList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedCredentialList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedCredentialList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedCredentialList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedCredentialList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedCredentialList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedCredentialList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedCredentialList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedCredentialList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedCredentialList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedCredentialList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedCredentialList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedCredentialList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedCredentialList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedCredentialList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedCredentialList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedCredentialList) GetResults() []Credential` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedCredentialList) GetResultsOk() (*[]Credential, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedCredentialList) SetResults(v []Credential)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedCredentialList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedCustomPageList.md b/azion-api/docs/PaginatedCustomPageList.md new file mode 100644 index 0000000..e7de98c --- /dev/null +++ b/azion-api/docs/PaginatedCustomPageList.md @@ -0,0 +1,232 @@ +# PaginatedCustomPageList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]CustomPage**](CustomPage.md) | | [optional] + +## Methods + +### NewPaginatedCustomPageList + +`func NewPaginatedCustomPageList() *PaginatedCustomPageList` + +NewPaginatedCustomPageList instantiates a new PaginatedCustomPageList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedCustomPageListWithDefaults + +`func NewPaginatedCustomPageListWithDefaults() *PaginatedCustomPageList` + +NewPaginatedCustomPageListWithDefaults instantiates a new PaginatedCustomPageList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedCustomPageList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedCustomPageList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedCustomPageList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedCustomPageList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedCustomPageList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedCustomPageList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedCustomPageList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedCustomPageList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedCustomPageList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedCustomPageList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedCustomPageList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedCustomPageList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedCustomPageList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedCustomPageList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedCustomPageList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedCustomPageList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedCustomPageList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedCustomPageList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedCustomPageList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedCustomPageList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedCustomPageList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedCustomPageList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedCustomPageList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedCustomPageList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedCustomPageList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedCustomPageList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedCustomPageList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedCustomPageList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedCustomPageList) GetResults() []CustomPage` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedCustomPageList) GetResultsOk() (*[]CustomPage, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedCustomPageList) SetResults(v []CustomPage)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedCustomPageList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedDashboardList.md b/azion-api/docs/PaginatedDashboardList.md new file mode 100644 index 0000000..7c95572 --- /dev/null +++ b/azion-api/docs/PaginatedDashboardList.md @@ -0,0 +1,160 @@ +# PaginatedDashboardList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListDashboard**](ResponseListDashboard.md) | | [optional] + +## Methods + +### NewPaginatedDashboardList + +`func NewPaginatedDashboardList() *PaginatedDashboardList` + +NewPaginatedDashboardList instantiates a new PaginatedDashboardList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedDashboardListWithDefaults + +`func NewPaginatedDashboardListWithDefaults() *PaginatedDashboardList` + +NewPaginatedDashboardListWithDefaults instantiates a new PaginatedDashboardList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedDashboardList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedDashboardList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedDashboardList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedDashboardList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedDashboardList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedDashboardList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedDashboardList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedDashboardList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedDashboardList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedDashboardList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedDashboardList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedDashboardList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedDashboardList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedDashboardList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedDashboardList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedDashboardList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedDashboardList) GetResults() []ResponseListDashboard` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedDashboardList) GetResultsOk() (*[]ResponseListDashboard, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedDashboardList) SetResults(v []ResponseListDashboard)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedDashboardList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedDataSourceList.md b/azion-api/docs/PaginatedDataSourceList.md new file mode 100644 index 0000000..8c19f93 --- /dev/null +++ b/azion-api/docs/PaginatedDataSourceList.md @@ -0,0 +1,232 @@ +# PaginatedDataSourceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]DataSource**](DataSource.md) | | [optional] + +## Methods + +### NewPaginatedDataSourceList + +`func NewPaginatedDataSourceList() *PaginatedDataSourceList` + +NewPaginatedDataSourceList instantiates a new PaginatedDataSourceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedDataSourceListWithDefaults + +`func NewPaginatedDataSourceListWithDefaults() *PaginatedDataSourceList` + +NewPaginatedDataSourceListWithDefaults instantiates a new PaginatedDataSourceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedDataSourceList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedDataSourceList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedDataSourceList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedDataSourceList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedDataSourceList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedDataSourceList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedDataSourceList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedDataSourceList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedDataSourceList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedDataSourceList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedDataSourceList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedDataSourceList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedDataSourceList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedDataSourceList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedDataSourceList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedDataSourceList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedDataSourceList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedDataSourceList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedDataSourceList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedDataSourceList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedDataSourceList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedDataSourceList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedDataSourceList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedDataSourceList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedDataSourceList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedDataSourceList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedDataSourceList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedDataSourceList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedDataSourceList) GetResults() []DataSource` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedDataSourceList) GetResultsOk() (*[]DataSource, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedDataSourceList) SetResults(v []DataSource)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedDataSourceList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedDataStreamList.md b/azion-api/docs/PaginatedDataStreamList.md new file mode 100644 index 0000000..2b2e516 --- /dev/null +++ b/azion-api/docs/PaginatedDataStreamList.md @@ -0,0 +1,232 @@ +# PaginatedDataStreamList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]DataStream**](DataStream.md) | | [optional] + +## Methods + +### NewPaginatedDataStreamList + +`func NewPaginatedDataStreamList() *PaginatedDataStreamList` + +NewPaginatedDataStreamList instantiates a new PaginatedDataStreamList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedDataStreamListWithDefaults + +`func NewPaginatedDataStreamListWithDefaults() *PaginatedDataStreamList` + +NewPaginatedDataStreamListWithDefaults instantiates a new PaginatedDataStreamList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedDataStreamList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedDataStreamList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedDataStreamList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedDataStreamList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedDataStreamList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedDataStreamList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedDataStreamList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedDataStreamList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedDataStreamList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedDataStreamList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedDataStreamList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedDataStreamList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedDataStreamList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedDataStreamList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedDataStreamList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedDataStreamList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedDataStreamList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedDataStreamList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedDataStreamList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedDataStreamList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedDataStreamList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedDataStreamList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedDataStreamList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedDataStreamList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedDataStreamList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedDataStreamList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedDataStreamList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedDataStreamList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedDataStreamList) GetResults() []DataStream` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedDataStreamList) GetResultsOk() (*[]DataStream, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedDataStreamList) SetResults(v []DataStream)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedDataStreamList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedDatabaseDetailList.md b/azion-api/docs/PaginatedDatabaseDetailList.md new file mode 100644 index 0000000..9c18b29 --- /dev/null +++ b/azion-api/docs/PaginatedDatabaseDetailList.md @@ -0,0 +1,232 @@ +# PaginatedDatabaseDetailList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]DatabaseDetail**](DatabaseDetail.md) | | [optional] + +## Methods + +### NewPaginatedDatabaseDetailList + +`func NewPaginatedDatabaseDetailList() *PaginatedDatabaseDetailList` + +NewPaginatedDatabaseDetailList instantiates a new PaginatedDatabaseDetailList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedDatabaseDetailListWithDefaults + +`func NewPaginatedDatabaseDetailListWithDefaults() *PaginatedDatabaseDetailList` + +NewPaginatedDatabaseDetailListWithDefaults instantiates a new PaginatedDatabaseDetailList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedDatabaseDetailList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedDatabaseDetailList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedDatabaseDetailList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedDatabaseDetailList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedDatabaseDetailList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedDatabaseDetailList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedDatabaseDetailList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedDatabaseDetailList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedDatabaseDetailList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedDatabaseDetailList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedDatabaseDetailList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedDatabaseDetailList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedDatabaseDetailList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedDatabaseDetailList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedDatabaseDetailList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedDatabaseDetailList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedDatabaseDetailList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedDatabaseDetailList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedDatabaseDetailList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedDatabaseDetailList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedDatabaseDetailList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedDatabaseDetailList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedDatabaseDetailList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedDatabaseDetailList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedDatabaseDetailList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedDatabaseDetailList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedDatabaseDetailList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedDatabaseDetailList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedDatabaseDetailList) GetResults() []DatabaseDetail` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedDatabaseDetailList) GetResultsOk() (*[]DatabaseDetail, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedDatabaseDetailList) SetResults(v []DatabaseDetail)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedDatabaseDetailList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedDeviceGroupList.md b/azion-api/docs/PaginatedDeviceGroupList.md new file mode 100644 index 0000000..ee27815 --- /dev/null +++ b/azion-api/docs/PaginatedDeviceGroupList.md @@ -0,0 +1,232 @@ +# PaginatedDeviceGroupList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]DeviceGroup**](DeviceGroup.md) | | [optional] + +## Methods + +### NewPaginatedDeviceGroupList + +`func NewPaginatedDeviceGroupList() *PaginatedDeviceGroupList` + +NewPaginatedDeviceGroupList instantiates a new PaginatedDeviceGroupList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedDeviceGroupListWithDefaults + +`func NewPaginatedDeviceGroupListWithDefaults() *PaginatedDeviceGroupList` + +NewPaginatedDeviceGroupListWithDefaults instantiates a new PaginatedDeviceGroupList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedDeviceGroupList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedDeviceGroupList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedDeviceGroupList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedDeviceGroupList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedDeviceGroupList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedDeviceGroupList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedDeviceGroupList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedDeviceGroupList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedDeviceGroupList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedDeviceGroupList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedDeviceGroupList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedDeviceGroupList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedDeviceGroupList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedDeviceGroupList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedDeviceGroupList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedDeviceGroupList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedDeviceGroupList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedDeviceGroupList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedDeviceGroupList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedDeviceGroupList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedDeviceGroupList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedDeviceGroupList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedDeviceGroupList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedDeviceGroupList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedDeviceGroupList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedDeviceGroupList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedDeviceGroupList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedDeviceGroupList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedDeviceGroupList) GetResults() []DeviceGroup` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedDeviceGroupList) GetResultsOk() (*[]DeviceGroup, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedDeviceGroupList) SetResults(v []DeviceGroup)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedDeviceGroupList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedDocumentList.md b/azion-api/docs/PaginatedDocumentList.md new file mode 100644 index 0000000..359479e --- /dev/null +++ b/azion-api/docs/PaginatedDocumentList.md @@ -0,0 +1,82 @@ +# PaginatedDocumentList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]Document**](Document.md) | | [optional] + +## Methods + +### NewPaginatedDocumentList + +`func NewPaginatedDocumentList() *PaginatedDocumentList` + +NewPaginatedDocumentList instantiates a new PaginatedDocumentList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedDocumentListWithDefaults + +`func NewPaginatedDocumentListWithDefaults() *PaginatedDocumentList` + +NewPaginatedDocumentListWithDefaults instantiates a new PaginatedDocumentList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedDocumentList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedDocumentList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedDocumentList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedDocumentList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedDocumentList) GetResults() []Document` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedDocumentList) GetResultsOk() (*[]Document, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedDocumentList) SetResults(v []Document)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedDocumentList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedExecutionList.md b/azion-api/docs/PaginatedExecutionList.md new file mode 100644 index 0000000..580a368 --- /dev/null +++ b/azion-api/docs/PaginatedExecutionList.md @@ -0,0 +1,160 @@ +# PaginatedExecutionList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListExecution**](ResponseListExecution.md) | | [optional] + +## Methods + +### NewPaginatedExecutionList + +`func NewPaginatedExecutionList() *PaginatedExecutionList` + +NewPaginatedExecutionList instantiates a new PaginatedExecutionList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedExecutionListWithDefaults + +`func NewPaginatedExecutionListWithDefaults() *PaginatedExecutionList` + +NewPaginatedExecutionListWithDefaults instantiates a new PaginatedExecutionList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedExecutionList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedExecutionList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedExecutionList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedExecutionList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedExecutionList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedExecutionList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedExecutionList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedExecutionList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedExecutionList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedExecutionList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedExecutionList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedExecutionList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedExecutionList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedExecutionList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedExecutionList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedExecutionList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedExecutionList) GetResults() []ResponseListExecution` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedExecutionList) GetResultsOk() (*[]ResponseListExecution, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedExecutionList) SetResults(v []ResponseListExecution)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedExecutionList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedExecutionScriptList.md b/azion-api/docs/PaginatedExecutionScriptList.md new file mode 100644 index 0000000..2933ee8 --- /dev/null +++ b/azion-api/docs/PaginatedExecutionScriptList.md @@ -0,0 +1,160 @@ +# PaginatedExecutionScriptList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListExecutionScript**](ResponseListExecutionScript.md) | | [optional] + +## Methods + +### NewPaginatedExecutionScriptList + +`func NewPaginatedExecutionScriptList() *PaginatedExecutionScriptList` + +NewPaginatedExecutionScriptList instantiates a new PaginatedExecutionScriptList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedExecutionScriptListWithDefaults + +`func NewPaginatedExecutionScriptListWithDefaults() *PaginatedExecutionScriptList` + +NewPaginatedExecutionScriptListWithDefaults instantiates a new PaginatedExecutionScriptList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedExecutionScriptList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedExecutionScriptList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedExecutionScriptList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedExecutionScriptList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedExecutionScriptList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedExecutionScriptList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedExecutionScriptList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedExecutionScriptList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedExecutionScriptList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedExecutionScriptList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedExecutionScriptList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedExecutionScriptList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedExecutionScriptList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedExecutionScriptList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedExecutionScriptList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedExecutionScriptList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedExecutionScriptList) GetResults() []ResponseListExecutionScript` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedExecutionScriptList) GetResultsOk() (*[]ResponseListExecutionScript, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedExecutionScriptList) SetResults(v []ResponseListExecutionScript)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedExecutionScriptList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFavoriteList.md b/azion-api/docs/PaginatedFavoriteList.md new file mode 100644 index 0000000..e4ac94a --- /dev/null +++ b/azion-api/docs/PaginatedFavoriteList.md @@ -0,0 +1,82 @@ +# PaginatedFavoriteList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListFavorite**](ResponseListFavorite.md) | | [optional] + +## Methods + +### NewPaginatedFavoriteList + +`func NewPaginatedFavoriteList() *PaginatedFavoriteList` + +NewPaginatedFavoriteList instantiates a new PaginatedFavoriteList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFavoriteListWithDefaults + +`func NewPaginatedFavoriteListWithDefaults() *PaginatedFavoriteList` + +NewPaginatedFavoriteListWithDefaults instantiates a new PaginatedFavoriteList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFavoriteList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFavoriteList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFavoriteList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFavoriteList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedFavoriteList) GetResults() []ResponseListFavorite` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFavoriteList) GetResultsOk() (*[]ResponseListFavorite, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFavoriteList) SetResults(v []ResponseListFavorite)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFavoriteList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFirewallFunctionInstanceList.md b/azion-api/docs/PaginatedFirewallFunctionInstanceList.md new file mode 100644 index 0000000..3e26a28 --- /dev/null +++ b/azion-api/docs/PaginatedFirewallFunctionInstanceList.md @@ -0,0 +1,232 @@ +# PaginatedFirewallFunctionInstanceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]FirewallFunctionInstance**](FirewallFunctionInstance.md) | | [optional] + +## Methods + +### NewPaginatedFirewallFunctionInstanceList + +`func NewPaginatedFirewallFunctionInstanceList() *PaginatedFirewallFunctionInstanceList` + +NewPaginatedFirewallFunctionInstanceList instantiates a new PaginatedFirewallFunctionInstanceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFirewallFunctionInstanceListWithDefaults + +`func NewPaginatedFirewallFunctionInstanceListWithDefaults() *PaginatedFirewallFunctionInstanceList` + +NewPaginatedFirewallFunctionInstanceListWithDefaults instantiates a new PaginatedFirewallFunctionInstanceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFirewallFunctionInstanceList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFirewallFunctionInstanceList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFirewallFunctionInstanceList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedFirewallFunctionInstanceList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedFirewallFunctionInstanceList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedFirewallFunctionInstanceList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedFirewallFunctionInstanceList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedFirewallFunctionInstanceList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedFirewallFunctionInstanceList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedFirewallFunctionInstanceList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedFirewallFunctionInstanceList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedFirewallFunctionInstanceList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedFirewallFunctionInstanceList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedFirewallFunctionInstanceList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedFirewallFunctionInstanceList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedFirewallFunctionInstanceList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedFirewallFunctionInstanceList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedFirewallFunctionInstanceList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedFirewallFunctionInstanceList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedFirewallFunctionInstanceList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedFirewallFunctionInstanceList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedFirewallFunctionInstanceList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedFirewallFunctionInstanceList) GetResults() []FirewallFunctionInstance` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFirewallFunctionInstanceList) GetResultsOk() (*[]FirewallFunctionInstance, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFirewallFunctionInstanceList) SetResults(v []FirewallFunctionInstance)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFirewallFunctionInstanceList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFirewallList.md b/azion-api/docs/PaginatedFirewallList.md new file mode 100644 index 0000000..212f387 --- /dev/null +++ b/azion-api/docs/PaginatedFirewallList.md @@ -0,0 +1,232 @@ +# PaginatedFirewallList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Firewall**](Firewall.md) | | [optional] + +## Methods + +### NewPaginatedFirewallList + +`func NewPaginatedFirewallList() *PaginatedFirewallList` + +NewPaginatedFirewallList instantiates a new PaginatedFirewallList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFirewallListWithDefaults + +`func NewPaginatedFirewallListWithDefaults() *PaginatedFirewallList` + +NewPaginatedFirewallListWithDefaults instantiates a new PaginatedFirewallList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFirewallList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFirewallList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFirewallList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFirewallList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedFirewallList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedFirewallList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedFirewallList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedFirewallList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedFirewallList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedFirewallList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedFirewallList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedFirewallList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedFirewallList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedFirewallList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedFirewallList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedFirewallList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedFirewallList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedFirewallList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedFirewallList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedFirewallList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedFirewallList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedFirewallList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedFirewallList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedFirewallList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedFirewallList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedFirewallList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedFirewallList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedFirewallList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedFirewallList) GetResults() []Firewall` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFirewallList) GetResultsOk() (*[]Firewall, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFirewallList) SetResults(v []Firewall)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFirewallList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFirewallRuleList.md b/azion-api/docs/PaginatedFirewallRuleList.md new file mode 100644 index 0000000..3c28cb0 --- /dev/null +++ b/azion-api/docs/PaginatedFirewallRuleList.md @@ -0,0 +1,232 @@ +# PaginatedFirewallRuleList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]FirewallRule**](FirewallRule.md) | | [optional] + +## Methods + +### NewPaginatedFirewallRuleList + +`func NewPaginatedFirewallRuleList() *PaginatedFirewallRuleList` + +NewPaginatedFirewallRuleList instantiates a new PaginatedFirewallRuleList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFirewallRuleListWithDefaults + +`func NewPaginatedFirewallRuleListWithDefaults() *PaginatedFirewallRuleList` + +NewPaginatedFirewallRuleListWithDefaults instantiates a new PaginatedFirewallRuleList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFirewallRuleList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFirewallRuleList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFirewallRuleList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFirewallRuleList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedFirewallRuleList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedFirewallRuleList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedFirewallRuleList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedFirewallRuleList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedFirewallRuleList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedFirewallRuleList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedFirewallRuleList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedFirewallRuleList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedFirewallRuleList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedFirewallRuleList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedFirewallRuleList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedFirewallRuleList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedFirewallRuleList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedFirewallRuleList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedFirewallRuleList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedFirewallRuleList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedFirewallRuleList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedFirewallRuleList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedFirewallRuleList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedFirewallRuleList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedFirewallRuleList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedFirewallRuleList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedFirewallRuleList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedFirewallRuleList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedFirewallRuleList) GetResults() []FirewallRule` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFirewallRuleList) GetResultsOk() (*[]FirewallRule, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFirewallRuleList) SetResults(v []FirewallRule)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFirewallRuleList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFolderList.md b/azion-api/docs/PaginatedFolderList.md new file mode 100644 index 0000000..c9a3644 --- /dev/null +++ b/azion-api/docs/PaginatedFolderList.md @@ -0,0 +1,160 @@ +# PaginatedFolderList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListFolder**](ResponseListFolder.md) | | [optional] + +## Methods + +### NewPaginatedFolderList + +`func NewPaginatedFolderList() *PaginatedFolderList` + +NewPaginatedFolderList instantiates a new PaginatedFolderList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFolderListWithDefaults + +`func NewPaginatedFolderListWithDefaults() *PaginatedFolderList` + +NewPaginatedFolderListWithDefaults instantiates a new PaginatedFolderList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFolderList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFolderList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFolderList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFolderList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedFolderList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedFolderList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedFolderList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedFolderList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedFolderList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedFolderList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedFolderList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedFolderList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedFolderList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedFolderList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedFolderList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedFolderList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedFolderList) GetResults() []ResponseListFolder` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFolderList) GetResultsOk() (*[]ResponseListFolder, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFolderList) SetResults(v []ResponseListFolder)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFolderList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFunctionInstanceList.md b/azion-api/docs/PaginatedFunctionInstanceList.md new file mode 100644 index 0000000..cc5f857 --- /dev/null +++ b/azion-api/docs/PaginatedFunctionInstanceList.md @@ -0,0 +1,232 @@ +# PaginatedFunctionInstanceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]FunctionInstance**](FunctionInstance.md) | | [optional] + +## Methods + +### NewPaginatedFunctionInstanceList + +`func NewPaginatedFunctionInstanceList() *PaginatedFunctionInstanceList` + +NewPaginatedFunctionInstanceList instantiates a new PaginatedFunctionInstanceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFunctionInstanceListWithDefaults + +`func NewPaginatedFunctionInstanceListWithDefaults() *PaginatedFunctionInstanceList` + +NewPaginatedFunctionInstanceListWithDefaults instantiates a new PaginatedFunctionInstanceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFunctionInstanceList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFunctionInstanceList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFunctionInstanceList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFunctionInstanceList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedFunctionInstanceList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedFunctionInstanceList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedFunctionInstanceList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedFunctionInstanceList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedFunctionInstanceList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedFunctionInstanceList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedFunctionInstanceList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedFunctionInstanceList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedFunctionInstanceList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedFunctionInstanceList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedFunctionInstanceList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedFunctionInstanceList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedFunctionInstanceList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedFunctionInstanceList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedFunctionInstanceList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedFunctionInstanceList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedFunctionInstanceList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedFunctionInstanceList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedFunctionInstanceList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedFunctionInstanceList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedFunctionInstanceList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedFunctionInstanceList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedFunctionInstanceList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedFunctionInstanceList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedFunctionInstanceList) GetResults() []FunctionInstance` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFunctionInstanceList) GetResultsOk() (*[]FunctionInstance, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFunctionInstanceList) SetResults(v []FunctionInstance)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFunctionInstanceList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedFunctionsList.md b/azion-api/docs/PaginatedFunctionsList.md new file mode 100644 index 0000000..20b4bea --- /dev/null +++ b/azion-api/docs/PaginatedFunctionsList.md @@ -0,0 +1,232 @@ +# PaginatedFunctionsList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Functions**](Functions.md) | | [optional] + +## Methods + +### NewPaginatedFunctionsList + +`func NewPaginatedFunctionsList() *PaginatedFunctionsList` + +NewPaginatedFunctionsList instantiates a new PaginatedFunctionsList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedFunctionsListWithDefaults + +`func NewPaginatedFunctionsListWithDefaults() *PaginatedFunctionsList` + +NewPaginatedFunctionsListWithDefaults instantiates a new PaginatedFunctionsList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedFunctionsList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedFunctionsList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedFunctionsList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedFunctionsList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedFunctionsList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedFunctionsList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedFunctionsList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedFunctionsList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedFunctionsList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedFunctionsList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedFunctionsList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedFunctionsList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedFunctionsList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedFunctionsList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedFunctionsList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedFunctionsList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedFunctionsList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedFunctionsList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedFunctionsList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedFunctionsList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedFunctionsList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedFunctionsList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedFunctionsList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedFunctionsList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedFunctionsList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedFunctionsList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedFunctionsList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedFunctionsList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedFunctionsList) GetResults() []Functions` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedFunctionsList) GetResultsOk() (*[]Functions, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedFunctionsList) SetResults(v []Functions)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedFunctionsList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedGrantList.md b/azion-api/docs/PaginatedGrantList.md new file mode 100644 index 0000000..b6869c3 --- /dev/null +++ b/azion-api/docs/PaginatedGrantList.md @@ -0,0 +1,82 @@ +# PaginatedGrantList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListGrant**](ResponseListGrant.md) | | [optional] + +## Methods + +### NewPaginatedGrantList + +`func NewPaginatedGrantList() *PaginatedGrantList` + +NewPaginatedGrantList instantiates a new PaginatedGrantList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedGrantListWithDefaults + +`func NewPaginatedGrantListWithDefaults() *PaginatedGrantList` + +NewPaginatedGrantListWithDefaults instantiates a new PaginatedGrantList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedGrantList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedGrantList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedGrantList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedGrantList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedGrantList) GetResults() []ResponseListGrant` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedGrantList) GetResultsOk() (*[]ResponseListGrant, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedGrantList) SetResults(v []ResponseListGrant)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedGrantList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedGroupList.md b/azion-api/docs/PaginatedGroupList.md new file mode 100644 index 0000000..6d55391 --- /dev/null +++ b/azion-api/docs/PaginatedGroupList.md @@ -0,0 +1,82 @@ +# PaginatedGroupList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListGroup**](ResponseListGroup.md) | | [optional] + +## Methods + +### NewPaginatedGroupList + +`func NewPaginatedGroupList() *PaginatedGroupList` + +NewPaginatedGroupList instantiates a new PaginatedGroupList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedGroupListWithDefaults + +`func NewPaginatedGroupListWithDefaults() *PaginatedGroupList` + +NewPaginatedGroupListWithDefaults instantiates a new PaginatedGroupList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedGroupList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedGroupList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedGroupList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedGroupList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedGroupList) GetResults() []ResponseListGroup` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedGroupList) GetResultsOk() (*[]ResponseListGroup, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedGroupList) SetResults(v []ResponseListGroup)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedGroupList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedIntegrationList.md b/azion-api/docs/PaginatedIntegrationList.md new file mode 100644 index 0000000..8b3b303 --- /dev/null +++ b/azion-api/docs/PaginatedIntegrationList.md @@ -0,0 +1,160 @@ +# PaginatedIntegrationList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListIntegration**](ResponseListIntegration.md) | | [optional] + +## Methods + +### NewPaginatedIntegrationList + +`func NewPaginatedIntegrationList() *PaginatedIntegrationList` + +NewPaginatedIntegrationList instantiates a new PaginatedIntegrationList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedIntegrationListWithDefaults + +`func NewPaginatedIntegrationListWithDefaults() *PaginatedIntegrationList` + +NewPaginatedIntegrationListWithDefaults instantiates a new PaginatedIntegrationList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedIntegrationList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedIntegrationList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedIntegrationList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedIntegrationList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedIntegrationList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedIntegrationList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedIntegrationList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedIntegrationList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedIntegrationList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedIntegrationList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedIntegrationList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedIntegrationList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedIntegrationList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedIntegrationList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedIntegrationList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedIntegrationList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedIntegrationList) GetResults() []ResponseListIntegration` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedIntegrationList) GetResultsOk() (*[]ResponseListIntegration, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedIntegrationList) SetResults(v []ResponseListIntegration)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedIntegrationList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedKnowledgeBaseList.md b/azion-api/docs/PaginatedKnowledgeBaseList.md new file mode 100644 index 0000000..684919c --- /dev/null +++ b/azion-api/docs/PaginatedKnowledgeBaseList.md @@ -0,0 +1,82 @@ +# PaginatedKnowledgeBaseList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]KnowledgeBase**](KnowledgeBase.md) | | [optional] + +## Methods + +### NewPaginatedKnowledgeBaseList + +`func NewPaginatedKnowledgeBaseList() *PaginatedKnowledgeBaseList` + +NewPaginatedKnowledgeBaseList instantiates a new PaginatedKnowledgeBaseList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedKnowledgeBaseListWithDefaults + +`func NewPaginatedKnowledgeBaseListWithDefaults() *PaginatedKnowledgeBaseList` + +NewPaginatedKnowledgeBaseListWithDefaults instantiates a new PaginatedKnowledgeBaseList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedKnowledgeBaseList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedKnowledgeBaseList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedKnowledgeBaseList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedKnowledgeBaseList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedKnowledgeBaseList) GetResults() []KnowledgeBase` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedKnowledgeBaseList) GetResultsOk() (*[]KnowledgeBase, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedKnowledgeBaseList) SetResults(v []KnowledgeBase)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedKnowledgeBaseList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedMessageList.md b/azion-api/docs/PaginatedMessageList.md new file mode 100644 index 0000000..af2f528 --- /dev/null +++ b/azion-api/docs/PaginatedMessageList.md @@ -0,0 +1,82 @@ +# PaginatedMessageList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]Message**](Message.md) | | [optional] + +## Methods + +### NewPaginatedMessageList + +`func NewPaginatedMessageList() *PaginatedMessageList` + +NewPaginatedMessageList instantiates a new PaginatedMessageList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedMessageListWithDefaults + +`func NewPaginatedMessageListWithDefaults() *PaginatedMessageList` + +NewPaginatedMessageListWithDefaults instantiates a new PaginatedMessageList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedMessageList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedMessageList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedMessageList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedMessageList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedMessageList) GetResults() []Message` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedMessageList) GetResultsOk() (*[]Message, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedMessageList) SetResults(v []Message)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedMessageList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedNetworkListSummaryList.md b/azion-api/docs/PaginatedNetworkListSummaryList.md new file mode 100644 index 0000000..4547c89 --- /dev/null +++ b/azion-api/docs/PaginatedNetworkListSummaryList.md @@ -0,0 +1,232 @@ +# PaginatedNetworkListSummaryList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]NetworkListSummary**](NetworkListSummary.md) | | [optional] + +## Methods + +### NewPaginatedNetworkListSummaryList + +`func NewPaginatedNetworkListSummaryList() *PaginatedNetworkListSummaryList` + +NewPaginatedNetworkListSummaryList instantiates a new PaginatedNetworkListSummaryList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedNetworkListSummaryListWithDefaults + +`func NewPaginatedNetworkListSummaryListWithDefaults() *PaginatedNetworkListSummaryList` + +NewPaginatedNetworkListSummaryListWithDefaults instantiates a new PaginatedNetworkListSummaryList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedNetworkListSummaryList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedNetworkListSummaryList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedNetworkListSummaryList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedNetworkListSummaryList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedNetworkListSummaryList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedNetworkListSummaryList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedNetworkListSummaryList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedNetworkListSummaryList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedNetworkListSummaryList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedNetworkListSummaryList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedNetworkListSummaryList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedNetworkListSummaryList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedNetworkListSummaryList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedNetworkListSummaryList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedNetworkListSummaryList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedNetworkListSummaryList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedNetworkListSummaryList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedNetworkListSummaryList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedNetworkListSummaryList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedNetworkListSummaryList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedNetworkListSummaryList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedNetworkListSummaryList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedNetworkListSummaryList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedNetworkListSummaryList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedNetworkListSummaryList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedNetworkListSummaryList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedNetworkListSummaryList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedNetworkListSummaryList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedNetworkListSummaryList) GetResults() []NetworkListSummary` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedNetworkListSummaryList) GetResultsOk() (*[]NetworkListSummary, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedNetworkListSummaryList) SetResults(v []NetworkListSummary)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedNetworkListSummaryList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedNodeGroupsByIdList.md b/azion-api/docs/PaginatedNodeGroupsByIdList.md new file mode 100644 index 0000000..6b3098f --- /dev/null +++ b/azion-api/docs/PaginatedNodeGroupsByIdList.md @@ -0,0 +1,82 @@ +# PaginatedNodeGroupsByIdList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListNodeGroupsById**](ResponseListNodeGroupsById.md) | | [optional] + +## Methods + +### NewPaginatedNodeGroupsByIdList + +`func NewPaginatedNodeGroupsByIdList() *PaginatedNodeGroupsByIdList` + +NewPaginatedNodeGroupsByIdList instantiates a new PaginatedNodeGroupsByIdList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedNodeGroupsByIdListWithDefaults + +`func NewPaginatedNodeGroupsByIdListWithDefaults() *PaginatedNodeGroupsByIdList` + +NewPaginatedNodeGroupsByIdListWithDefaults instantiates a new PaginatedNodeGroupsByIdList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedNodeGroupsByIdList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedNodeGroupsByIdList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedNodeGroupsByIdList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedNodeGroupsByIdList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedNodeGroupsByIdList) GetResults() []ResponseListNodeGroupsById` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedNodeGroupsByIdList) GetResultsOk() (*[]ResponseListNodeGroupsById, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedNodeGroupsByIdList) SetResults(v []ResponseListNodeGroupsById)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedNodeGroupsByIdList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedNodeGroupsList.md b/azion-api/docs/PaginatedNodeGroupsList.md new file mode 100644 index 0000000..2119f26 --- /dev/null +++ b/azion-api/docs/PaginatedNodeGroupsList.md @@ -0,0 +1,82 @@ +# PaginatedNodeGroupsList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]NodeGroups**](NodeGroups.md) | | [optional] + +## Methods + +### NewPaginatedNodeGroupsList + +`func NewPaginatedNodeGroupsList() *PaginatedNodeGroupsList` + +NewPaginatedNodeGroupsList instantiates a new PaginatedNodeGroupsList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedNodeGroupsListWithDefaults + +`func NewPaginatedNodeGroupsListWithDefaults() *PaginatedNodeGroupsList` + +NewPaginatedNodeGroupsListWithDefaults instantiates a new PaginatedNodeGroupsList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedNodeGroupsList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedNodeGroupsList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedNodeGroupsList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedNodeGroupsList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedNodeGroupsList) GetResults() []NodeGroups` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedNodeGroupsList) GetResultsOk() (*[]NodeGroups, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedNodeGroupsList) SetResults(v []NodeGroups)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedNodeGroupsList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedNodeServicesList.md b/azion-api/docs/PaginatedNodeServicesList.md new file mode 100644 index 0000000..d802fbc --- /dev/null +++ b/azion-api/docs/PaginatedNodeServicesList.md @@ -0,0 +1,82 @@ +# PaginatedNodeServicesList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListNodeServices**](ResponseListNodeServices.md) | | [optional] + +## Methods + +### NewPaginatedNodeServicesList + +`func NewPaginatedNodeServicesList() *PaginatedNodeServicesList` + +NewPaginatedNodeServicesList instantiates a new PaginatedNodeServicesList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedNodeServicesListWithDefaults + +`func NewPaginatedNodeServicesListWithDefaults() *PaginatedNodeServicesList` + +NewPaginatedNodeServicesListWithDefaults instantiates a new PaginatedNodeServicesList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedNodeServicesList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedNodeServicesList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedNodeServicesList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedNodeServicesList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedNodeServicesList) GetResults() []ResponseListNodeServices` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedNodeServicesList) GetResultsOk() (*[]ResponseListNodeServices, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedNodeServicesList) SetResults(v []ResponseListNodeServices)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedNodeServicesList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedNodesList.md b/azion-api/docs/PaginatedNodesList.md new file mode 100644 index 0000000..a86580f --- /dev/null +++ b/azion-api/docs/PaginatedNodesList.md @@ -0,0 +1,82 @@ +# PaginatedNodesList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListNodes**](ResponseListNodes.md) | | [optional] + +## Methods + +### NewPaginatedNodesList + +`func NewPaginatedNodesList() *PaginatedNodesList` + +NewPaginatedNodesList instantiates a new PaginatedNodesList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedNodesListWithDefaults + +`func NewPaginatedNodesListWithDefaults() *PaginatedNodesList` + +NewPaginatedNodesListWithDefaults instantiates a new PaginatedNodesList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedNodesList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedNodesList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedNodesList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedNodesList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedNodesList) GetResults() []ResponseListNodes` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedNodesList) GetResultsOk() (*[]ResponseListNodes, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedNodesList) SetResults(v []ResponseListNodes)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedNodesList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedPaymentHistoryList.md b/azion-api/docs/PaginatedPaymentHistoryList.md new file mode 100644 index 0000000..3abe9b3 --- /dev/null +++ b/azion-api/docs/PaginatedPaymentHistoryList.md @@ -0,0 +1,82 @@ +# PaginatedPaymentHistoryList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]PaymentHistory**](PaymentHistory.md) | | [optional] + +## Methods + +### NewPaginatedPaymentHistoryList + +`func NewPaginatedPaymentHistoryList() *PaginatedPaymentHistoryList` + +NewPaginatedPaymentHistoryList instantiates a new PaginatedPaymentHistoryList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedPaymentHistoryListWithDefaults + +`func NewPaginatedPaymentHistoryListWithDefaults() *PaginatedPaymentHistoryList` + +NewPaginatedPaymentHistoryListWithDefaults instantiates a new PaginatedPaymentHistoryList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedPaymentHistoryList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedPaymentHistoryList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedPaymentHistoryList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedPaymentHistoryList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedPaymentHistoryList) GetResults() []PaymentHistory` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedPaymentHistoryList) GetResultsOk() (*[]PaymentHistory, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedPaymentHistoryList) SetResults(v []PaymentHistory)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedPaymentHistoryList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedPlatformList.md b/azion-api/docs/PaginatedPlatformList.md new file mode 100644 index 0000000..a92f89a --- /dev/null +++ b/azion-api/docs/PaginatedPlatformList.md @@ -0,0 +1,160 @@ +# PaginatedPlatformList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListPlatform**](ResponseListPlatform.md) | | [optional] + +## Methods + +### NewPaginatedPlatformList + +`func NewPaginatedPlatformList() *PaginatedPlatformList` + +NewPaginatedPlatformList instantiates a new PaginatedPlatformList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedPlatformListWithDefaults + +`func NewPaginatedPlatformListWithDefaults() *PaginatedPlatformList` + +NewPaginatedPlatformListWithDefaults instantiates a new PaginatedPlatformList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedPlatformList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedPlatformList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedPlatformList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedPlatformList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedPlatformList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedPlatformList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedPlatformList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedPlatformList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedPlatformList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedPlatformList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedPlatformList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedPlatformList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedPlatformList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedPlatformList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedPlatformList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedPlatformList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedPlatformList) GetResults() []ResponseListPlatform` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedPlatformList) GetResultsOk() (*[]ResponseListPlatform, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedPlatformList) SetResults(v []ResponseListPlatform)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedPlatformList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedPolicyList.md b/azion-api/docs/PaginatedPolicyList.md new file mode 100644 index 0000000..ba56c3a --- /dev/null +++ b/azion-api/docs/PaginatedPolicyList.md @@ -0,0 +1,160 @@ +# PaginatedPolicyList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]Policy**](Policy.md) | | [optional] + +## Methods + +### NewPaginatedPolicyList + +`func NewPaginatedPolicyList() *PaginatedPolicyList` + +NewPaginatedPolicyList instantiates a new PaginatedPolicyList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedPolicyListWithDefaults + +`func NewPaginatedPolicyListWithDefaults() *PaginatedPolicyList` + +NewPaginatedPolicyListWithDefaults instantiates a new PaginatedPolicyList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedPolicyList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedPolicyList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedPolicyList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedPolicyList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedPolicyList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedPolicyList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedPolicyList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedPolicyList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedPolicyList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedPolicyList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedPolicyList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedPolicyList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedPolicyList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedPolicyList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedPolicyList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedPolicyList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedPolicyList) GetResults() []Policy` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedPolicyList) GetResultsOk() (*[]Policy, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedPolicyList) SetResults(v []Policy)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedPolicyList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedRecordList.md b/azion-api/docs/PaginatedRecordList.md new file mode 100644 index 0000000..fc67157 --- /dev/null +++ b/azion-api/docs/PaginatedRecordList.md @@ -0,0 +1,232 @@ +# PaginatedRecordList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Record**](Record.md) | | [optional] + +## Methods + +### NewPaginatedRecordList + +`func NewPaginatedRecordList() *PaginatedRecordList` + +NewPaginatedRecordList instantiates a new PaginatedRecordList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedRecordListWithDefaults + +`func NewPaginatedRecordListWithDefaults() *PaginatedRecordList` + +NewPaginatedRecordListWithDefaults instantiates a new PaginatedRecordList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedRecordList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedRecordList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedRecordList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedRecordList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedRecordList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedRecordList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedRecordList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedRecordList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedRecordList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedRecordList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedRecordList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedRecordList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedRecordList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedRecordList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedRecordList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedRecordList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedRecordList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedRecordList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedRecordList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedRecordList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedRecordList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedRecordList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedRecordList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedRecordList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedRecordList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedRecordList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedRecordList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedRecordList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedRecordList) GetResults() []Record` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedRecordList) GetResultsOk() (*[]Record, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedRecordList) SetResults(v []Record)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedRecordList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedReportList.md b/azion-api/docs/PaginatedReportList.md new file mode 100644 index 0000000..9003533 --- /dev/null +++ b/azion-api/docs/PaginatedReportList.md @@ -0,0 +1,160 @@ +# PaginatedReportList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListReport**](ResponseListReport.md) | | [optional] + +## Methods + +### NewPaginatedReportList + +`func NewPaginatedReportList() *PaginatedReportList` + +NewPaginatedReportList instantiates a new PaginatedReportList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedReportListWithDefaults + +`func NewPaginatedReportListWithDefaults() *PaginatedReportList` + +NewPaginatedReportListWithDefaults instantiates a new PaginatedReportList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedReportList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedReportList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedReportList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedReportList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedReportList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedReportList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedReportList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedReportList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedReportList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedReportList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedReportList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedReportList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedReportList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedReportList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedReportList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedReportList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedReportList) GetResults() []ResponseListReport` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedReportList) GetResultsOk() (*[]ResponseListReport, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedReportList) SetResults(v []ResponseListReport)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedReportList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedRepositoryList.md b/azion-api/docs/PaginatedRepositoryList.md new file mode 100644 index 0000000..418a443 --- /dev/null +++ b/azion-api/docs/PaginatedRepositoryList.md @@ -0,0 +1,160 @@ +# PaginatedRepositoryList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListRepository**](ResponseListRepository.md) | | [optional] + +## Methods + +### NewPaginatedRepositoryList + +`func NewPaginatedRepositoryList() *PaginatedRepositoryList` + +NewPaginatedRepositoryList instantiates a new PaginatedRepositoryList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedRepositoryListWithDefaults + +`func NewPaginatedRepositoryListWithDefaults() *PaginatedRepositoryList` + +NewPaginatedRepositoryListWithDefaults instantiates a new PaginatedRepositoryList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedRepositoryList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedRepositoryList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedRepositoryList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedRepositoryList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedRepositoryList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedRepositoryList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedRepositoryList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedRepositoryList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedRepositoryList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedRepositoryList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedRepositoryList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedRepositoryList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedRepositoryList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedRepositoryList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedRepositoryList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedRepositoryList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedRepositoryList) GetResults() []ResponseListRepository` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedRepositoryList) GetResultsOk() (*[]ResponseListRepository, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedRepositoryList) SetResults(v []ResponseListRepository)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedRepositoryList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedRequestPhaseRuleList.md b/azion-api/docs/PaginatedRequestPhaseRuleList.md new file mode 100644 index 0000000..33ff10a --- /dev/null +++ b/azion-api/docs/PaginatedRequestPhaseRuleList.md @@ -0,0 +1,232 @@ +# PaginatedRequestPhaseRuleList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]RequestPhaseRule**](RequestPhaseRule.md) | | [optional] + +## Methods + +### NewPaginatedRequestPhaseRuleList + +`func NewPaginatedRequestPhaseRuleList() *PaginatedRequestPhaseRuleList` + +NewPaginatedRequestPhaseRuleList instantiates a new PaginatedRequestPhaseRuleList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedRequestPhaseRuleListWithDefaults + +`func NewPaginatedRequestPhaseRuleListWithDefaults() *PaginatedRequestPhaseRuleList` + +NewPaginatedRequestPhaseRuleListWithDefaults instantiates a new PaginatedRequestPhaseRuleList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedRequestPhaseRuleList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedRequestPhaseRuleList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedRequestPhaseRuleList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedRequestPhaseRuleList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedRequestPhaseRuleList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedRequestPhaseRuleList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedRequestPhaseRuleList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedRequestPhaseRuleList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedRequestPhaseRuleList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedRequestPhaseRuleList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedRequestPhaseRuleList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedRequestPhaseRuleList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedRequestPhaseRuleList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedRequestPhaseRuleList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedRequestPhaseRuleList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedRequestPhaseRuleList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedRequestPhaseRuleList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedRequestPhaseRuleList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedRequestPhaseRuleList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedRequestPhaseRuleList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedRequestPhaseRuleList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedRequestPhaseRuleList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedRequestPhaseRuleList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedRequestPhaseRuleList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedRequestPhaseRuleList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedRequestPhaseRuleList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedRequestPhaseRuleList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedRequestPhaseRuleList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedRequestPhaseRuleList) GetResults() []RequestPhaseRule` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedRequestPhaseRuleList) GetResultsOk() (*[]RequestPhaseRule, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedRequestPhaseRuleList) SetResults(v []RequestPhaseRule)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedRequestPhaseRuleList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedResponsePaymentMethodList.md b/azion-api/docs/PaginatedResponsePaymentMethodList.md new file mode 100644 index 0000000..ecd5f52 --- /dev/null +++ b/azion-api/docs/PaginatedResponsePaymentMethodList.md @@ -0,0 +1,82 @@ +# PaginatedResponsePaymentMethodList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponsePaymentMethod**](ResponsePaymentMethod.md) | | [optional] + +## Methods + +### NewPaginatedResponsePaymentMethodList + +`func NewPaginatedResponsePaymentMethodList() *PaginatedResponsePaymentMethodList` + +NewPaginatedResponsePaymentMethodList instantiates a new PaginatedResponsePaymentMethodList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedResponsePaymentMethodListWithDefaults + +`func NewPaginatedResponsePaymentMethodListWithDefaults() *PaginatedResponsePaymentMethodList` + +NewPaginatedResponsePaymentMethodListWithDefaults instantiates a new PaginatedResponsePaymentMethodList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedResponsePaymentMethodList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedResponsePaymentMethodList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedResponsePaymentMethodList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedResponsePaymentMethodList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedResponsePaymentMethodList) GetResults() []ResponsePaymentMethod` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedResponsePaymentMethodList) GetResultsOk() (*[]ResponsePaymentMethod, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedResponsePaymentMethodList) SetResults(v []ResponsePaymentMethod)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedResponsePaymentMethodList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedResponsePhaseRuleList.md b/azion-api/docs/PaginatedResponsePhaseRuleList.md new file mode 100644 index 0000000..c8c11d2 --- /dev/null +++ b/azion-api/docs/PaginatedResponsePhaseRuleList.md @@ -0,0 +1,232 @@ +# PaginatedResponsePhaseRuleList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]ResponsePhaseRule**](ResponsePhaseRule.md) | | [optional] + +## Methods + +### NewPaginatedResponsePhaseRuleList + +`func NewPaginatedResponsePhaseRuleList() *PaginatedResponsePhaseRuleList` + +NewPaginatedResponsePhaseRuleList instantiates a new PaginatedResponsePhaseRuleList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedResponsePhaseRuleListWithDefaults + +`func NewPaginatedResponsePhaseRuleListWithDefaults() *PaginatedResponsePhaseRuleList` + +NewPaginatedResponsePhaseRuleListWithDefaults instantiates a new PaginatedResponsePhaseRuleList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedResponsePhaseRuleList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedResponsePhaseRuleList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedResponsePhaseRuleList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedResponsePhaseRuleList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedResponsePhaseRuleList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedResponsePhaseRuleList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedResponsePhaseRuleList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedResponsePhaseRuleList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedResponsePhaseRuleList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedResponsePhaseRuleList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedResponsePhaseRuleList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedResponsePhaseRuleList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedResponsePhaseRuleList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedResponsePhaseRuleList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedResponsePhaseRuleList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedResponsePhaseRuleList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedResponsePhaseRuleList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedResponsePhaseRuleList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedResponsePhaseRuleList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedResponsePhaseRuleList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedResponsePhaseRuleList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedResponsePhaseRuleList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedResponsePhaseRuleList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedResponsePhaseRuleList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedResponsePhaseRuleList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedResponsePhaseRuleList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedResponsePhaseRuleList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedResponsePhaseRuleList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedResponsePhaseRuleList) GetResults() []ResponsePhaseRule` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedResponsePhaseRuleList) GetResultsOk() (*[]ResponsePhaseRule, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedResponsePhaseRuleList) SetResults(v []ResponsePhaseRule)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedResponsePhaseRuleList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedRowList.md b/azion-api/docs/PaginatedRowList.md new file mode 100644 index 0000000..f63cbf3 --- /dev/null +++ b/azion-api/docs/PaginatedRowList.md @@ -0,0 +1,160 @@ +# PaginatedRowList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]ResponseListRow**](ResponseListRow.md) | | [optional] + +## Methods + +### NewPaginatedRowList + +`func NewPaginatedRowList() *PaginatedRowList` + +NewPaginatedRowList instantiates a new PaginatedRowList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedRowListWithDefaults + +`func NewPaginatedRowListWithDefaults() *PaginatedRowList` + +NewPaginatedRowListWithDefaults instantiates a new PaginatedRowList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedRowList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedRowList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedRowList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedRowList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedRowList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedRowList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedRowList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedRowList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedRowList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedRowList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedRowList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedRowList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedRowList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedRowList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedRowList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedRowList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedRowList) GetResults() []ResponseListRow` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedRowList) GetResultsOk() (*[]ResponseListRow, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedRowList) SetResults(v []ResponseListRow)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedRowList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedServiceResourceList.md b/azion-api/docs/PaginatedServiceResourceList.md new file mode 100644 index 0000000..17d439e --- /dev/null +++ b/azion-api/docs/PaginatedServiceResourceList.md @@ -0,0 +1,82 @@ +# PaginatedServiceResourceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ServiceResource**](ServiceResource.md) | | [optional] + +## Methods + +### NewPaginatedServiceResourceList + +`func NewPaginatedServiceResourceList() *PaginatedServiceResourceList` + +NewPaginatedServiceResourceList instantiates a new PaginatedServiceResourceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedServiceResourceListWithDefaults + +`func NewPaginatedServiceResourceListWithDefaults() *PaginatedServiceResourceList` + +NewPaginatedServiceResourceListWithDefaults instantiates a new PaginatedServiceResourceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedServiceResourceList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedServiceResourceList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedServiceResourceList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedServiceResourceList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedServiceResourceList) GetResults() []ServiceResource` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedServiceResourceList) GetResultsOk() (*[]ServiceResource, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedServiceResourceList) SetResults(v []ServiceResource)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedServiceResourceList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedServiceTokenList.md b/azion-api/docs/PaginatedServiceTokenList.md new file mode 100644 index 0000000..33f21f9 --- /dev/null +++ b/azion-api/docs/PaginatedServiceTokenList.md @@ -0,0 +1,82 @@ +# PaginatedServiceTokenList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListServiceToken**](ResponseListServiceToken.md) | | [optional] + +## Methods + +### NewPaginatedServiceTokenList + +`func NewPaginatedServiceTokenList() *PaginatedServiceTokenList` + +NewPaginatedServiceTokenList instantiates a new PaginatedServiceTokenList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedServiceTokenListWithDefaults + +`func NewPaginatedServiceTokenListWithDefaults() *PaginatedServiceTokenList` + +NewPaginatedServiceTokenListWithDefaults instantiates a new PaginatedServiceTokenList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedServiceTokenList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedServiceTokenList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedServiceTokenList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedServiceTokenList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedServiceTokenList) GetResults() []ResponseListServiceToken` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedServiceTokenList) GetResultsOk() (*[]ResponseListServiceToken, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedServiceTokenList) SetResults(v []ResponseListServiceToken)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedServiceTokenList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedServicesList.md b/azion-api/docs/PaginatedServicesList.md new file mode 100644 index 0000000..a279d92 --- /dev/null +++ b/azion-api/docs/PaginatedServicesList.md @@ -0,0 +1,82 @@ +# PaginatedServicesList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListServices**](ResponseListServices.md) | | [optional] + +## Methods + +### NewPaginatedServicesList + +`func NewPaginatedServicesList() *PaginatedServicesList` + +NewPaginatedServicesList instantiates a new PaginatedServicesList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedServicesListWithDefaults + +`func NewPaginatedServicesListWithDefaults() *PaginatedServicesList` + +NewPaginatedServicesListWithDefaults instantiates a new PaginatedServicesList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedServicesList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedServicesList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedServicesList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedServicesList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedServicesList) GetResults() []ResponseListServices` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedServicesList) GetResultsOk() (*[]ResponseListServices, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedServicesList) SetResults(v []ResponseListServices)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedServicesList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedTOTPDeviceList.md b/azion-api/docs/PaginatedTOTPDeviceList.md new file mode 100644 index 0000000..d7490ea --- /dev/null +++ b/azion-api/docs/PaginatedTOTPDeviceList.md @@ -0,0 +1,160 @@ +# PaginatedTOTPDeviceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Results** | Pointer to [**[]TOTPDeviceList**](TOTPDeviceList.md) | | [optional] + +## Methods + +### NewPaginatedTOTPDeviceList + +`func NewPaginatedTOTPDeviceList() *PaginatedTOTPDeviceList` + +NewPaginatedTOTPDeviceList instantiates a new PaginatedTOTPDeviceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedTOTPDeviceListWithDefaults + +`func NewPaginatedTOTPDeviceListWithDefaults() *PaginatedTOTPDeviceList` + +NewPaginatedTOTPDeviceListWithDefaults instantiates a new PaginatedTOTPDeviceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedTOTPDeviceList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedTOTPDeviceList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedTOTPDeviceList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedTOTPDeviceList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedTOTPDeviceList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedTOTPDeviceList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedTOTPDeviceList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedTOTPDeviceList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedTOTPDeviceList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedTOTPDeviceList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedTOTPDeviceList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedTOTPDeviceList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedTOTPDeviceList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedTOTPDeviceList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedTOTPDeviceList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedTOTPDeviceList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedTOTPDeviceList) GetResults() []TOTPDeviceList` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedTOTPDeviceList) GetResultsOk() (*[]TOTPDeviceList, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedTOTPDeviceList) SetResults(v []TOTPDeviceList)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedTOTPDeviceList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedTemplateList.md b/azion-api/docs/PaginatedTemplateList.md new file mode 100644 index 0000000..a9fc00d --- /dev/null +++ b/azion-api/docs/PaginatedTemplateList.md @@ -0,0 +1,232 @@ +# PaginatedTemplateList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Template**](Template.md) | | [optional] + +## Methods + +### NewPaginatedTemplateList + +`func NewPaginatedTemplateList() *PaginatedTemplateList` + +NewPaginatedTemplateList instantiates a new PaginatedTemplateList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedTemplateListWithDefaults + +`func NewPaginatedTemplateListWithDefaults() *PaginatedTemplateList` + +NewPaginatedTemplateListWithDefaults instantiates a new PaginatedTemplateList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedTemplateList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedTemplateList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedTemplateList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedTemplateList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedTemplateList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedTemplateList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedTemplateList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedTemplateList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedTemplateList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedTemplateList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedTemplateList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedTemplateList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedTemplateList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedTemplateList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedTemplateList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedTemplateList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedTemplateList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedTemplateList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedTemplateList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedTemplateList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedTemplateList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedTemplateList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedTemplateList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedTemplateList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedTemplateList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedTemplateList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedTemplateList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedTemplateList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedTemplateList) GetResults() []Template` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedTemplateList) GetResultsOk() (*[]Template, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedTemplateList) SetResults(v []Template)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedTemplateList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedToolList.md b/azion-api/docs/PaginatedToolList.md new file mode 100644 index 0000000..5222f8c --- /dev/null +++ b/azion-api/docs/PaginatedToolList.md @@ -0,0 +1,82 @@ +# PaginatedToolList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]Tool**](Tool.md) | | [optional] + +## Methods + +### NewPaginatedToolList + +`func NewPaginatedToolList() *PaginatedToolList` + +NewPaginatedToolList instantiates a new PaginatedToolList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedToolListWithDefaults + +`func NewPaginatedToolListWithDefaults() *PaginatedToolList` + +NewPaginatedToolListWithDefaults instantiates a new PaginatedToolList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedToolList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedToolList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedToolList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedToolList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedToolList) GetResults() []Tool` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedToolList) GetResultsOk() (*[]Tool, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedToolList) SetResults(v []Tool)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedToolList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedUserList.md b/azion-api/docs/PaginatedUserList.md new file mode 100644 index 0000000..d416253 --- /dev/null +++ b/azion-api/docs/PaginatedUserList.md @@ -0,0 +1,82 @@ +# PaginatedUserList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | | [optional] +**Results** | Pointer to [**[]ResponseListUser**](ResponseListUser.md) | | [optional] + +## Methods + +### NewPaginatedUserList + +`func NewPaginatedUserList() *PaginatedUserList` + +NewPaginatedUserList instantiates a new PaginatedUserList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedUserListWithDefaults + +`func NewPaginatedUserListWithDefaults() *PaginatedUserList` + +NewPaginatedUserListWithDefaults instantiates a new PaginatedUserList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedUserList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedUserList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedUserList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedUserList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetResults + +`func (o *PaginatedUserList) GetResults() []ResponseListUser` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedUserList) GetResultsOk() (*[]ResponseListUser, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedUserList) SetResults(v []ResponseListUser)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedUserList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedWAFList.md b/azion-api/docs/PaginatedWAFList.md new file mode 100644 index 0000000..3ccffde --- /dev/null +++ b/azion-api/docs/PaginatedWAFList.md @@ -0,0 +1,232 @@ +# PaginatedWAFList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]WAF**](WAF.md) | | [optional] + +## Methods + +### NewPaginatedWAFList + +`func NewPaginatedWAFList() *PaginatedWAFList` + +NewPaginatedWAFList instantiates a new PaginatedWAFList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedWAFListWithDefaults + +`func NewPaginatedWAFListWithDefaults() *PaginatedWAFList` + +NewPaginatedWAFListWithDefaults instantiates a new PaginatedWAFList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedWAFList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedWAFList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedWAFList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedWAFList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedWAFList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedWAFList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedWAFList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedWAFList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedWAFList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedWAFList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedWAFList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedWAFList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedWAFList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedWAFList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedWAFList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedWAFList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedWAFList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedWAFList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedWAFList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedWAFList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedWAFList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedWAFList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedWAFList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedWAFList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedWAFList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedWAFList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedWAFList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedWAFList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedWAFList) GetResults() []WAF` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedWAFList) GetResultsOk() (*[]WAF, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedWAFList) SetResults(v []WAF)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedWAFList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedWAFRuleList.md b/azion-api/docs/PaginatedWAFRuleList.md new file mode 100644 index 0000000..d497585 --- /dev/null +++ b/azion-api/docs/PaginatedWAFRuleList.md @@ -0,0 +1,232 @@ +# PaginatedWAFRuleList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]WAFRule**](WAFRule.md) | | [optional] + +## Methods + +### NewPaginatedWAFRuleList + +`func NewPaginatedWAFRuleList() *PaginatedWAFRuleList` + +NewPaginatedWAFRuleList instantiates a new PaginatedWAFRuleList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedWAFRuleListWithDefaults + +`func NewPaginatedWAFRuleListWithDefaults() *PaginatedWAFRuleList` + +NewPaginatedWAFRuleListWithDefaults instantiates a new PaginatedWAFRuleList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedWAFRuleList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedWAFRuleList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedWAFRuleList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedWAFRuleList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedWAFRuleList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedWAFRuleList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedWAFRuleList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedWAFRuleList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedWAFRuleList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedWAFRuleList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedWAFRuleList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedWAFRuleList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedWAFRuleList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedWAFRuleList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedWAFRuleList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedWAFRuleList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedWAFRuleList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedWAFRuleList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedWAFRuleList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedWAFRuleList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedWAFRuleList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedWAFRuleList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedWAFRuleList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedWAFRuleList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedWAFRuleList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedWAFRuleList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedWAFRuleList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedWAFRuleList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedWAFRuleList) GetResults() []WAFRule` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedWAFRuleList) GetResultsOk() (*[]WAFRule, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedWAFRuleList) SetResults(v []WAFRule)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedWAFRuleList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedWorkloadDeploymentList.md b/azion-api/docs/PaginatedWorkloadDeploymentList.md new file mode 100644 index 0000000..bc7541b --- /dev/null +++ b/azion-api/docs/PaginatedWorkloadDeploymentList.md @@ -0,0 +1,232 @@ +# PaginatedWorkloadDeploymentList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]WorkloadDeployment**](WorkloadDeployment.md) | | [optional] + +## Methods + +### NewPaginatedWorkloadDeploymentList + +`func NewPaginatedWorkloadDeploymentList() *PaginatedWorkloadDeploymentList` + +NewPaginatedWorkloadDeploymentList instantiates a new PaginatedWorkloadDeploymentList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedWorkloadDeploymentListWithDefaults + +`func NewPaginatedWorkloadDeploymentListWithDefaults() *PaginatedWorkloadDeploymentList` + +NewPaginatedWorkloadDeploymentListWithDefaults instantiates a new PaginatedWorkloadDeploymentList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedWorkloadDeploymentList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedWorkloadDeploymentList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedWorkloadDeploymentList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedWorkloadDeploymentList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedWorkloadDeploymentList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedWorkloadDeploymentList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedWorkloadDeploymentList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedWorkloadDeploymentList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedWorkloadDeploymentList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedWorkloadDeploymentList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedWorkloadDeploymentList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedWorkloadDeploymentList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedWorkloadDeploymentList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedWorkloadDeploymentList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedWorkloadDeploymentList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedWorkloadDeploymentList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedWorkloadDeploymentList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedWorkloadDeploymentList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedWorkloadDeploymentList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedWorkloadDeploymentList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedWorkloadDeploymentList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedWorkloadDeploymentList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedWorkloadDeploymentList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedWorkloadDeploymentList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedWorkloadDeploymentList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedWorkloadDeploymentList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedWorkloadDeploymentList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedWorkloadDeploymentList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedWorkloadDeploymentList) GetResults() []WorkloadDeployment` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedWorkloadDeploymentList) GetResultsOk() (*[]WorkloadDeployment, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedWorkloadDeploymentList) SetResults(v []WorkloadDeployment)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedWorkloadDeploymentList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedWorkloadList.md b/azion-api/docs/PaginatedWorkloadList.md new file mode 100644 index 0000000..81136fa --- /dev/null +++ b/azion-api/docs/PaginatedWorkloadList.md @@ -0,0 +1,232 @@ +# PaginatedWorkloadList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Workload**](Workload.md) | | [optional] + +## Methods + +### NewPaginatedWorkloadList + +`func NewPaginatedWorkloadList() *PaginatedWorkloadList` + +NewPaginatedWorkloadList instantiates a new PaginatedWorkloadList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedWorkloadListWithDefaults + +`func NewPaginatedWorkloadListWithDefaults() *PaginatedWorkloadList` + +NewPaginatedWorkloadListWithDefaults instantiates a new PaginatedWorkloadList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedWorkloadList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedWorkloadList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedWorkloadList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedWorkloadList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedWorkloadList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedWorkloadList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedWorkloadList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedWorkloadList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedWorkloadList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedWorkloadList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedWorkloadList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedWorkloadList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedWorkloadList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedWorkloadList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedWorkloadList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedWorkloadList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedWorkloadList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedWorkloadList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedWorkloadList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedWorkloadList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedWorkloadList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedWorkloadList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedWorkloadList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedWorkloadList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedWorkloadList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedWorkloadList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedWorkloadList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedWorkloadList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedWorkloadList) GetResults() []Workload` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedWorkloadList) GetResultsOk() (*[]Workload, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedWorkloadList) SetResults(v []Workload)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedWorkloadList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaginatedZoneList.md b/azion-api/docs/PaginatedZoneList.md new file mode 100644 index 0000000..66b8de2 --- /dev/null +++ b/azion-api/docs/PaginatedZoneList.md @@ -0,0 +1,232 @@ +# PaginatedZoneList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | Pointer to **int64** | Total number of items | [optional] +**TotalPages** | Pointer to **int64** | Total number of pages | [optional] +**Page** | Pointer to **int64** | Current page number | [optional] +**PageSize** | Pointer to **int64** | Number of items per page | [optional] +**Next** | Pointer to **NullableString** | URL to the next page of results | [optional] +**Previous** | Pointer to **NullableString** | URL to the previous page of results | [optional] +**Results** | Pointer to [**[]Zone**](Zone.md) | | [optional] + +## Methods + +### NewPaginatedZoneList + +`func NewPaginatedZoneList() *PaginatedZoneList` + +NewPaginatedZoneList instantiates a new PaginatedZoneList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginatedZoneListWithDefaults + +`func NewPaginatedZoneListWithDefaults() *PaginatedZoneList` + +NewPaginatedZoneListWithDefaults instantiates a new PaginatedZoneList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCount + +`func (o *PaginatedZoneList) GetCount() int64` + +GetCount returns the Count field if non-nil, zero value otherwise. + +### GetCountOk + +`func (o *PaginatedZoneList) GetCountOk() (*int64, bool)` + +GetCountOk returns a tuple with the Count field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCount + +`func (o *PaginatedZoneList) SetCount(v int64)` + +SetCount sets Count field to given value. + +### HasCount + +`func (o *PaginatedZoneList) HasCount() bool` + +HasCount returns a boolean if a field has been set. + +### GetTotalPages + +`func (o *PaginatedZoneList) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *PaginatedZoneList) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *PaginatedZoneList) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + +### HasTotalPages + +`func (o *PaginatedZoneList) HasTotalPages() bool` + +HasTotalPages returns a boolean if a field has been set. + +### GetPage + +`func (o *PaginatedZoneList) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *PaginatedZoneList) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *PaginatedZoneList) SetPage(v int64)` + +SetPage sets Page field to given value. + +### HasPage + +`func (o *PaginatedZoneList) HasPage() bool` + +HasPage returns a boolean if a field has been set. + +### GetPageSize + +`func (o *PaginatedZoneList) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *PaginatedZoneList) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *PaginatedZoneList) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + +### HasPageSize + +`func (o *PaginatedZoneList) HasPageSize() bool` + +HasPageSize returns a boolean if a field has been set. + +### GetNext + +`func (o *PaginatedZoneList) GetNext() string` + +GetNext returns the Next field if non-nil, zero value otherwise. + +### GetNextOk + +`func (o *PaginatedZoneList) GetNextOk() (*string, bool)` + +GetNextOk returns a tuple with the Next field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNext + +`func (o *PaginatedZoneList) SetNext(v string)` + +SetNext sets Next field to given value. + +### HasNext + +`func (o *PaginatedZoneList) HasNext() bool` + +HasNext returns a boolean if a field has been set. + +### SetNextNil + +`func (o *PaginatedZoneList) SetNextNil(b bool)` + + SetNextNil sets the value for Next to be an explicit nil + +### UnsetNext +`func (o *PaginatedZoneList) UnsetNext()` + +UnsetNext ensures that no value is present for Next, not even an explicit nil +### GetPrevious + +`func (o *PaginatedZoneList) GetPrevious() string` + +GetPrevious returns the Previous field if non-nil, zero value otherwise. + +### GetPreviousOk + +`func (o *PaginatedZoneList) GetPreviousOk() (*string, bool)` + +GetPreviousOk returns a tuple with the Previous field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrevious + +`func (o *PaginatedZoneList) SetPrevious(v string)` + +SetPrevious sets Previous field to given value. + +### HasPrevious + +`func (o *PaginatedZoneList) HasPrevious() bool` + +HasPrevious returns a boolean if a field has been set. + +### SetPreviousNil + +`func (o *PaginatedZoneList) SetPreviousNil(b bool)` + + SetPreviousNil sets the value for Previous to be an explicit nil + +### UnsetPrevious +`func (o *PaginatedZoneList) UnsetPrevious()` + +UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +### GetResults + +`func (o *PaginatedZoneList) GetResults() []Zone` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *PaginatedZoneList) GetResultsOk() (*[]Zone, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *PaginatedZoneList) SetResults(v []Zone)` + +SetResults sets Results field to given value. + +### HasResults + +`func (o *PaginatedZoneList) HasResults() bool` + +HasResults returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Pagination.md b/azion-api/docs/Pagination.md new file mode 100644 index 0000000..9db7bbd --- /dev/null +++ b/azion-api/docs/Pagination.md @@ -0,0 +1,156 @@ +# Pagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Page** | **int64** | | +**PageSize** | **int64** | | +**TotalCount** | **int64** | | +**TotalPages** | **int64** | | +**HasNext** | **bool** | | +**HasPrevious** | **bool** | | + +## Methods + +### NewPagination + +`func NewPagination(page int64, pageSize int64, totalCount int64, totalPages int64, hasNext bool, hasPrevious bool, ) *Pagination` + +NewPagination instantiates a new Pagination object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaginationWithDefaults + +`func NewPaginationWithDefaults() *Pagination` + +NewPaginationWithDefaults instantiates a new Pagination object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetPage + +`func (o *Pagination) GetPage() int64` + +GetPage returns the Page field if non-nil, zero value otherwise. + +### GetPageOk + +`func (o *Pagination) GetPageOk() (*int64, bool)` + +GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPage + +`func (o *Pagination) SetPage(v int64)` + +SetPage sets Page field to given value. + + +### GetPageSize + +`func (o *Pagination) GetPageSize() int64` + +GetPageSize returns the PageSize field if non-nil, zero value otherwise. + +### GetPageSizeOk + +`func (o *Pagination) GetPageSizeOk() (*int64, bool)` + +GetPageSizeOk returns a tuple with the PageSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPageSize + +`func (o *Pagination) SetPageSize(v int64)` + +SetPageSize sets PageSize field to given value. + + +### GetTotalCount + +`func (o *Pagination) GetTotalCount() int64` + +GetTotalCount returns the TotalCount field if non-nil, zero value otherwise. + +### GetTotalCountOk + +`func (o *Pagination) GetTotalCountOk() (*int64, bool)` + +GetTotalCountOk returns a tuple with the TotalCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalCount + +`func (o *Pagination) SetTotalCount(v int64)` + +SetTotalCount sets TotalCount field to given value. + + +### GetTotalPages + +`func (o *Pagination) GetTotalPages() int64` + +GetTotalPages returns the TotalPages field if non-nil, zero value otherwise. + +### GetTotalPagesOk + +`func (o *Pagination) GetTotalPagesOk() (*int64, bool)` + +GetTotalPagesOk returns a tuple with the TotalPages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTotalPages + +`func (o *Pagination) SetTotalPages(v int64)` + +SetTotalPages sets TotalPages field to given value. + + +### GetHasNext + +`func (o *Pagination) GetHasNext() bool` + +GetHasNext returns the HasNext field if non-nil, zero value otherwise. + +### GetHasNextOk + +`func (o *Pagination) GetHasNextOk() (*bool, bool)` + +GetHasNextOk returns a tuple with the HasNext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasNext + +`func (o *Pagination) SetHasNext(v bool)` + +SetHasNext sets HasNext field to given value. + + +### GetHasPrevious + +`func (o *Pagination) GetHasPrevious() bool` + +GetHasPrevious returns the HasPrevious field if non-nil, zero value otherwise. + +### GetHasPreviousOk + +`func (o *Pagination) GetHasPreviousOk() (*bool, bool)` + +GetHasPreviousOk returns a tuple with the HasPrevious field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasPrevious + +`func (o *Pagination) SetHasPrevious(v bool)` + +SetHasPrevious sets HasPrevious field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchContinuousDeploymentRequest.md b/azion-api/docs/PatchContinuousDeploymentRequest.md new file mode 100644 index 0000000..7df0587 --- /dev/null +++ b/azion-api/docs/PatchContinuousDeploymentRequest.md @@ -0,0 +1,212 @@ +# PatchContinuousDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Repository** | Pointer to **string** | | [optional] +**Branch** | Pointer to **string** | | [optional] +**BuildContext** | Pointer to [**[]BuildContextFieldRequest**](BuildContextFieldRequest.md) | | [optional] +**DeployContext** | Pointer to **map[string]interface{}** | | [optional] +**IntegrationId** | Pointer to **int64** | | [optional] +**ExecutionScriptId** | Pointer to **int64** | | [optional] + +## Methods + +### NewPatchContinuousDeploymentRequest + +`func NewPatchContinuousDeploymentRequest() *PatchContinuousDeploymentRequest` + +NewPatchContinuousDeploymentRequest instantiates a new PatchContinuousDeploymentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchContinuousDeploymentRequestWithDefaults + +`func NewPatchContinuousDeploymentRequestWithDefaults() *PatchContinuousDeploymentRequest` + +NewPatchContinuousDeploymentRequestWithDefaults instantiates a new PatchContinuousDeploymentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchContinuousDeploymentRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchContinuousDeploymentRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchContinuousDeploymentRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchContinuousDeploymentRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetRepository + +`func (o *PatchContinuousDeploymentRequest) GetRepository() string` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *PatchContinuousDeploymentRequest) GetRepositoryOk() (*string, bool)` + +GetRepositoryOk returns a tuple with the Repository field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepository + +`func (o *PatchContinuousDeploymentRequest) SetRepository(v string)` + +SetRepository sets Repository field to given value. + +### HasRepository + +`func (o *PatchContinuousDeploymentRequest) HasRepository() bool` + +HasRepository returns a boolean if a field has been set. + +### GetBranch + +`func (o *PatchContinuousDeploymentRequest) GetBranch() string` + +GetBranch returns the Branch field if non-nil, zero value otherwise. + +### GetBranchOk + +`func (o *PatchContinuousDeploymentRequest) GetBranchOk() (*string, bool)` + +GetBranchOk returns a tuple with the Branch field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranch + +`func (o *PatchContinuousDeploymentRequest) SetBranch(v string)` + +SetBranch sets Branch field to given value. + +### HasBranch + +`func (o *PatchContinuousDeploymentRequest) HasBranch() bool` + +HasBranch returns a boolean if a field has been set. + +### GetBuildContext + +`func (o *PatchContinuousDeploymentRequest) GetBuildContext() []BuildContextFieldRequest` + +GetBuildContext returns the BuildContext field if non-nil, zero value otherwise. + +### GetBuildContextOk + +`func (o *PatchContinuousDeploymentRequest) GetBuildContextOk() (*[]BuildContextFieldRequest, bool)` + +GetBuildContextOk returns a tuple with the BuildContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuildContext + +`func (o *PatchContinuousDeploymentRequest) SetBuildContext(v []BuildContextFieldRequest)` + +SetBuildContext sets BuildContext field to given value. + +### HasBuildContext + +`func (o *PatchContinuousDeploymentRequest) HasBuildContext() bool` + +HasBuildContext returns a boolean if a field has been set. + +### GetDeployContext + +`func (o *PatchContinuousDeploymentRequest) GetDeployContext() map[string]interface{}` + +GetDeployContext returns the DeployContext field if non-nil, zero value otherwise. + +### GetDeployContextOk + +`func (o *PatchContinuousDeploymentRequest) GetDeployContextOk() (*map[string]interface{}, bool)` + +GetDeployContextOk returns a tuple with the DeployContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployContext + +`func (o *PatchContinuousDeploymentRequest) SetDeployContext(v map[string]interface{})` + +SetDeployContext sets DeployContext field to given value. + +### HasDeployContext + +`func (o *PatchContinuousDeploymentRequest) HasDeployContext() bool` + +HasDeployContext returns a boolean if a field has been set. + +### GetIntegrationId + +`func (o *PatchContinuousDeploymentRequest) GetIntegrationId() int64` + +GetIntegrationId returns the IntegrationId field if non-nil, zero value otherwise. + +### GetIntegrationIdOk + +`func (o *PatchContinuousDeploymentRequest) GetIntegrationIdOk() (*int64, bool)` + +GetIntegrationIdOk returns a tuple with the IntegrationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegrationId + +`func (o *PatchContinuousDeploymentRequest) SetIntegrationId(v int64)` + +SetIntegrationId sets IntegrationId field to given value. + +### HasIntegrationId + +`func (o *PatchContinuousDeploymentRequest) HasIntegrationId() bool` + +HasIntegrationId returns a boolean if a field has been set. + +### GetExecutionScriptId + +`func (o *PatchContinuousDeploymentRequest) GetExecutionScriptId() int64` + +GetExecutionScriptId returns the ExecutionScriptId field if non-nil, zero value otherwise. + +### GetExecutionScriptIdOk + +`func (o *PatchContinuousDeploymentRequest) GetExecutionScriptIdOk() (*int64, bool)` + +GetExecutionScriptIdOk returns a tuple with the ExecutionScriptId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionScriptId + +`func (o *PatchContinuousDeploymentRequest) SetExecutionScriptId(v int64)` + +SetExecutionScriptId sets ExecutionScriptId field to given value. + +### HasExecutionScriptId + +`func (o *PatchContinuousDeploymentRequest) HasExecutionScriptId() bool` + +HasExecutionScriptId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedAccountRequest.md b/azion-api/docs/PatchedAccountRequest.md new file mode 100644 index 0000000..827c1d6 --- /dev/null +++ b/azion-api/docs/PatchedAccountRequest.md @@ -0,0 +1,129 @@ +# PatchedAccountRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | +**CurrencyIsoCode** | Pointer to **string** | * `USD` - USD * `BRL` - BRL | [optional] +**TermsOfServiceUrl** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedAccountRequest + +`func NewPatchedAccountRequest(type_ string, ) *PatchedAccountRequest` + +NewPatchedAccountRequest instantiates a new PatchedAccountRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedAccountRequestWithDefaults + +`func NewPatchedAccountRequestWithDefaults() *PatchedAccountRequest` + +NewPatchedAccountRequestWithDefaults instantiates a new PatchedAccountRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedAccountRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedAccountRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedAccountRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedAccountRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedAccountRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedAccountRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedAccountRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetCurrencyIsoCode + +`func (o *PatchedAccountRequest) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *PatchedAccountRequest) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *PatchedAccountRequest) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + +### HasCurrencyIsoCode + +`func (o *PatchedAccountRequest) HasCurrencyIsoCode() bool` + +HasCurrencyIsoCode returns a boolean if a field has been set. + +### GetTermsOfServiceUrl + +`func (o *PatchedAccountRequest) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *PatchedAccountRequest) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *PatchedAccountRequest) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *PatchedAccountRequest) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedApplicationRequest.md b/azion-api/docs/PatchedApplicationRequest.md new file mode 100644 index 0000000..09b8b5a --- /dev/null +++ b/azion-api/docs/PatchedApplicationRequest.md @@ -0,0 +1,134 @@ +# PatchedApplicationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Modules** | Pointer to [**ApplicationModulesRequest**](ApplicationModulesRequest.md) | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Debug** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedApplicationRequest + +`func NewPatchedApplicationRequest() *PatchedApplicationRequest` + +NewPatchedApplicationRequest instantiates a new PatchedApplicationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedApplicationRequestWithDefaults + +`func NewPatchedApplicationRequestWithDefaults() *PatchedApplicationRequest` + +NewPatchedApplicationRequestWithDefaults instantiates a new PatchedApplicationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedApplicationRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedApplicationRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedApplicationRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedApplicationRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetModules + +`func (o *PatchedApplicationRequest) GetModules() ApplicationModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *PatchedApplicationRequest) GetModulesOk() (*ApplicationModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *PatchedApplicationRequest) SetModules(v ApplicationModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *PatchedApplicationRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedApplicationRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedApplicationRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedApplicationRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedApplicationRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDebug + +`func (o *PatchedApplicationRequest) GetDebug() bool` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *PatchedApplicationRequest) GetDebugOk() (*bool, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *PatchedApplicationRequest) SetDebug(v bool)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *PatchedApplicationRequest) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedBrandRequest.md b/azion-api/docs/PatchedBrandRequest.md new file mode 100644 index 0000000..60b1b32 --- /dev/null +++ b/azion-api/docs/PatchedBrandRequest.md @@ -0,0 +1,77 @@ +# PatchedBrandRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewPatchedBrandRequest + +`func NewPatchedBrandRequest(type_ string, ) *PatchedBrandRequest` + +NewPatchedBrandRequest instantiates a new PatchedBrandRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedBrandRequestWithDefaults + +`func NewPatchedBrandRequestWithDefaults() *PatchedBrandRequest` + +NewPatchedBrandRequestWithDefaults instantiates a new PatchedBrandRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedBrandRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedBrandRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedBrandRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedBrandRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedBrandRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedBrandRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedBrandRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedBucketRequest.md b/azion-api/docs/PatchedBucketRequest.md new file mode 100644 index 0000000..1d7764c --- /dev/null +++ b/azion-api/docs/PatchedBucketRequest.md @@ -0,0 +1,56 @@ +# PatchedBucketRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WorkloadsAccess** | Pointer to **string** | * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted | [optional] + +## Methods + +### NewPatchedBucketRequest + +`func NewPatchedBucketRequest() *PatchedBucketRequest` + +NewPatchedBucketRequest instantiates a new PatchedBucketRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedBucketRequestWithDefaults + +`func NewPatchedBucketRequestWithDefaults() *PatchedBucketRequest` + +NewPatchedBucketRequestWithDefaults instantiates a new PatchedBucketRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWorkloadsAccess + +`func (o *PatchedBucketRequest) GetWorkloadsAccess() string` + +GetWorkloadsAccess returns the WorkloadsAccess field if non-nil, zero value otherwise. + +### GetWorkloadsAccessOk + +`func (o *PatchedBucketRequest) GetWorkloadsAccessOk() (*string, bool)` + +GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadsAccess + +`func (o *PatchedBucketRequest) SetWorkloadsAccess(v string)` + +SetWorkloadsAccess sets WorkloadsAccess field to given value. + +### HasWorkloadsAccess + +`func (o *PatchedBucketRequest) HasWorkloadsAccess() bool` + +HasWorkloadsAccess returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedCacheSettingRequest.md b/azion-api/docs/PatchedCacheSettingRequest.md new file mode 100644 index 0000000..7d1fa60 --- /dev/null +++ b/azion-api/docs/PatchedCacheSettingRequest.md @@ -0,0 +1,108 @@ +# PatchedCacheSettingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**BrowserCache** | Pointer to [**BrowserCacheModuleRequest**](BrowserCacheModuleRequest.md) | | [optional] +**Modules** | Pointer to [**CacheSettingsModulesRequest**](CacheSettingsModulesRequest.md) | | [optional] + +## Methods + +### NewPatchedCacheSettingRequest + +`func NewPatchedCacheSettingRequest() *PatchedCacheSettingRequest` + +NewPatchedCacheSettingRequest instantiates a new PatchedCacheSettingRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedCacheSettingRequestWithDefaults + +`func NewPatchedCacheSettingRequestWithDefaults() *PatchedCacheSettingRequest` + +NewPatchedCacheSettingRequestWithDefaults instantiates a new PatchedCacheSettingRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedCacheSettingRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedCacheSettingRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedCacheSettingRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedCacheSettingRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetBrowserCache + +`func (o *PatchedCacheSettingRequest) GetBrowserCache() BrowserCacheModuleRequest` + +GetBrowserCache returns the BrowserCache field if non-nil, zero value otherwise. + +### GetBrowserCacheOk + +`func (o *PatchedCacheSettingRequest) GetBrowserCacheOk() (*BrowserCacheModuleRequest, bool)` + +GetBrowserCacheOk returns a tuple with the BrowserCache field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBrowserCache + +`func (o *PatchedCacheSettingRequest) SetBrowserCache(v BrowserCacheModuleRequest)` + +SetBrowserCache sets BrowserCache field to given value. + +### HasBrowserCache + +`func (o *PatchedCacheSettingRequest) HasBrowserCache() bool` + +HasBrowserCache returns a boolean if a field has been set. + +### GetModules + +`func (o *PatchedCacheSettingRequest) GetModules() CacheSettingsModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *PatchedCacheSettingRequest) GetModulesOk() (*CacheSettingsModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *PatchedCacheSettingRequest) SetModules(v CacheSettingsModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *PatchedCacheSettingRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedCertificate.md b/azion-api/docs/PatchedCertificate.md new file mode 100644 index 0000000..57ea600 --- /dev/null +++ b/azion-api/docs/PatchedCertificate.md @@ -0,0 +1,610 @@ +# PatchedCertificate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Certificate** | Pointer to **NullableString** | | [optional] +**PrivateKey** | Pointer to **NullableString** | | [optional] +**Issuer** | Pointer to **NullableString** | | [optional] +**SubjectName** | Pointer to **[]string** | | [optional] +**Validity** | Pointer to **NullableString** | | [optional] +**Type** | Pointer to **string** | The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate | [optional] +**Managed** | Pointer to **bool** | | [optional] +**Status** | Pointer to **string** | * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed | [optional] +**StatusDetail** | Pointer to **string** | | [optional] +**Csr** | Pointer to **NullableString** | | [optional] +**Challenge** | Pointer to **string** | * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. | [optional] +**Authority** | Pointer to **string** | * `lets_encrypt` - lets_encrypt | [optional] +**KeyAlgorithm** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**ProductVersion** | Pointer to **string** | | [optional] +**LastEditor** | Pointer to **string** | | [optional] +**LastModified** | Pointer to **time.Time** | Timestamp of the last modification made to the certificate content on the platform. | [optional] +**RenewedAt** | Pointer to **NullableTime** | Timestamp indicating when the managed certificate was renewed on our platform. | [optional] + +## Methods + +### NewPatchedCertificate + +`func NewPatchedCertificate() *PatchedCertificate` + +NewPatchedCertificate instantiates a new PatchedCertificate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedCertificateWithDefaults + +`func NewPatchedCertificateWithDefaults() *PatchedCertificate` + +NewPatchedCertificateWithDefaults instantiates a new PatchedCertificate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *PatchedCertificate) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PatchedCertificate) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PatchedCertificate) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *PatchedCertificate) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *PatchedCertificate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedCertificate) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedCertificate) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedCertificate) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCertificate + +`func (o *PatchedCertificate) GetCertificate() string` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *PatchedCertificate) GetCertificateOk() (*string, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *PatchedCertificate) SetCertificate(v string)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *PatchedCertificate) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *PatchedCertificate) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *PatchedCertificate) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetPrivateKey + +`func (o *PatchedCertificate) GetPrivateKey() string` + +GetPrivateKey returns the PrivateKey field if non-nil, zero value otherwise. + +### GetPrivateKeyOk + +`func (o *PatchedCertificate) GetPrivateKeyOk() (*string, bool)` + +GetPrivateKeyOk returns a tuple with the PrivateKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrivateKey + +`func (o *PatchedCertificate) SetPrivateKey(v string)` + +SetPrivateKey sets PrivateKey field to given value. + +### HasPrivateKey + +`func (o *PatchedCertificate) HasPrivateKey() bool` + +HasPrivateKey returns a boolean if a field has been set. + +### SetPrivateKeyNil + +`func (o *PatchedCertificate) SetPrivateKeyNil(b bool)` + + SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil + +### UnsetPrivateKey +`func (o *PatchedCertificate) UnsetPrivateKey()` + +UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +### GetIssuer + +`func (o *PatchedCertificate) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *PatchedCertificate) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *PatchedCertificate) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *PatchedCertificate) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### SetIssuerNil + +`func (o *PatchedCertificate) SetIssuerNil(b bool)` + + SetIssuerNil sets the value for Issuer to be an explicit nil + +### UnsetIssuer +`func (o *PatchedCertificate) UnsetIssuer()` + +UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +### GetSubjectName + +`func (o *PatchedCertificate) GetSubjectName() []string` + +GetSubjectName returns the SubjectName field if non-nil, zero value otherwise. + +### GetSubjectNameOk + +`func (o *PatchedCertificate) GetSubjectNameOk() (*[]string, bool)` + +GetSubjectNameOk returns a tuple with the SubjectName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSubjectName + +`func (o *PatchedCertificate) SetSubjectName(v []string)` + +SetSubjectName sets SubjectName field to given value. + +### HasSubjectName + +`func (o *PatchedCertificate) HasSubjectName() bool` + +HasSubjectName returns a boolean if a field has been set. + +### GetValidity + +`func (o *PatchedCertificate) GetValidity() string` + +GetValidity returns the Validity field if non-nil, zero value otherwise. + +### GetValidityOk + +`func (o *PatchedCertificate) GetValidityOk() (*string, bool)` + +GetValidityOk returns a tuple with the Validity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValidity + +`func (o *PatchedCertificate) SetValidity(v string)` + +SetValidity sets Validity field to given value. + +### HasValidity + +`func (o *PatchedCertificate) HasValidity() bool` + +HasValidity returns a boolean if a field has been set. + +### SetValidityNil + +`func (o *PatchedCertificate) SetValidityNil(b bool)` + + SetValidityNil sets the value for Validity to be an explicit nil + +### UnsetValidity +`func (o *PatchedCertificate) UnsetValidity()` + +UnsetValidity ensures that no value is present for Validity, not even an explicit nil +### GetType + +`func (o *PatchedCertificate) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedCertificate) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedCertificate) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PatchedCertificate) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetManaged + +`func (o *PatchedCertificate) GetManaged() bool` + +GetManaged returns the Managed field if non-nil, zero value otherwise. + +### GetManagedOk + +`func (o *PatchedCertificate) GetManagedOk() (*bool, bool)` + +GetManagedOk returns a tuple with the Managed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetManaged + +`func (o *PatchedCertificate) SetManaged(v bool)` + +SetManaged sets Managed field to given value. + +### HasManaged + +`func (o *PatchedCertificate) HasManaged() bool` + +HasManaged returns a boolean if a field has been set. + +### GetStatus + +`func (o *PatchedCertificate) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PatchedCertificate) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *PatchedCertificate) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PatchedCertificate) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetStatusDetail + +`func (o *PatchedCertificate) GetStatusDetail() string` + +GetStatusDetail returns the StatusDetail field if non-nil, zero value otherwise. + +### GetStatusDetailOk + +`func (o *PatchedCertificate) GetStatusDetailOk() (*string, bool)` + +GetStatusDetailOk returns a tuple with the StatusDetail field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatusDetail + +`func (o *PatchedCertificate) SetStatusDetail(v string)` + +SetStatusDetail sets StatusDetail field to given value. + +### HasStatusDetail + +`func (o *PatchedCertificate) HasStatusDetail() bool` + +HasStatusDetail returns a boolean if a field has been set. + +### GetCsr + +`func (o *PatchedCertificate) GetCsr() string` + +GetCsr returns the Csr field if non-nil, zero value otherwise. + +### GetCsrOk + +`func (o *PatchedCertificate) GetCsrOk() (*string, bool)` + +GetCsrOk returns a tuple with the Csr field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCsr + +`func (o *PatchedCertificate) SetCsr(v string)` + +SetCsr sets Csr field to given value. + +### HasCsr + +`func (o *PatchedCertificate) HasCsr() bool` + +HasCsr returns a boolean if a field has been set. + +### SetCsrNil + +`func (o *PatchedCertificate) SetCsrNil(b bool)` + + SetCsrNil sets the value for Csr to be an explicit nil + +### UnsetCsr +`func (o *PatchedCertificate) UnsetCsr()` + +UnsetCsr ensures that no value is present for Csr, not even an explicit nil +### GetChallenge + +`func (o *PatchedCertificate) GetChallenge() string` + +GetChallenge returns the Challenge field if non-nil, zero value otherwise. + +### GetChallengeOk + +`func (o *PatchedCertificate) GetChallengeOk() (*string, bool)` + +GetChallengeOk returns a tuple with the Challenge field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChallenge + +`func (o *PatchedCertificate) SetChallenge(v string)` + +SetChallenge sets Challenge field to given value. + +### HasChallenge + +`func (o *PatchedCertificate) HasChallenge() bool` + +HasChallenge returns a boolean if a field has been set. + +### GetAuthority + +`func (o *PatchedCertificate) GetAuthority() string` + +GetAuthority returns the Authority field if non-nil, zero value otherwise. + +### GetAuthorityOk + +`func (o *PatchedCertificate) GetAuthorityOk() (*string, bool)` + +GetAuthorityOk returns a tuple with the Authority field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAuthority + +`func (o *PatchedCertificate) SetAuthority(v string)` + +SetAuthority sets Authority field to given value. + +### HasAuthority + +`func (o *PatchedCertificate) HasAuthority() bool` + +HasAuthority returns a boolean if a field has been set. + +### GetKeyAlgorithm + +`func (o *PatchedCertificate) GetKeyAlgorithm() string` + +GetKeyAlgorithm returns the KeyAlgorithm field if non-nil, zero value otherwise. + +### GetKeyAlgorithmOk + +`func (o *PatchedCertificate) GetKeyAlgorithmOk() (*string, bool)` + +GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKeyAlgorithm + +`func (o *PatchedCertificate) SetKeyAlgorithm(v string)` + +SetKeyAlgorithm sets KeyAlgorithm field to given value. + +### HasKeyAlgorithm + +`func (o *PatchedCertificate) HasKeyAlgorithm() bool` + +HasKeyAlgorithm returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedCertificate) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedCertificate) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedCertificate) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedCertificate) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *PatchedCertificate) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *PatchedCertificate) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *PatchedCertificate) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *PatchedCertificate) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *PatchedCertificate) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *PatchedCertificate) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *PatchedCertificate) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + +### HasLastEditor + +`func (o *PatchedCertificate) HasLastEditor() bool` + +HasLastEditor returns a boolean if a field has been set. + +### GetLastModified + +`func (o *PatchedCertificate) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *PatchedCertificate) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *PatchedCertificate) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + +### HasLastModified + +`func (o *PatchedCertificate) HasLastModified() bool` + +HasLastModified returns a boolean if a field has been set. + +### GetRenewedAt + +`func (o *PatchedCertificate) GetRenewedAt() time.Time` + +GetRenewedAt returns the RenewedAt field if non-nil, zero value otherwise. + +### GetRenewedAtOk + +`func (o *PatchedCertificate) GetRenewedAtOk() (*time.Time, bool)` + +GetRenewedAtOk returns a tuple with the RenewedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRenewedAt + +`func (o *PatchedCertificate) SetRenewedAt(v time.Time)` + +SetRenewedAt sets RenewedAt field to given value. + +### HasRenewedAt + +`func (o *PatchedCertificate) HasRenewedAt() bool` + +HasRenewedAt returns a boolean if a field has been set. + +### SetRenewedAtNil + +`func (o *PatchedCertificate) SetRenewedAtNil(b bool)` + + SetRenewedAtNil sets the value for RenewedAt to be an explicit nil + +### UnsetRenewedAt +`func (o *PatchedCertificate) UnsetRenewedAt()` + +UnsetRenewedAt ensures that no value is present for RenewedAt, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedCertificateRevocationList.md b/azion-api/docs/PatchedCertificateRevocationList.md new file mode 100644 index 0000000..e61aaf8 --- /dev/null +++ b/azion-api/docs/PatchedCertificateRevocationList.md @@ -0,0 +1,290 @@ +# PatchedCertificateRevocationList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | Indicates if the certificate revocation list is active. This field cannot be set to false. | [optional] +**LastEditor** | Pointer to **string** | | [optional] +**LastModified** | Pointer to **time.Time** | Timestamp of the last modification made to the certificate content on the platform. | [optional] +**ProductVersion** | Pointer to **string** | | [optional] +**Issuer** | Pointer to **string** | | [optional] +**LastUpdate** | Pointer to **time.Time** | Timestamp of the last update issued by the certification revocation list issuer. | [optional] +**NextUpdate** | Pointer to **time.Time** | Timestamp of the next scheduled update from the certification revocation list issuer. | [optional] +**Crl** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedCertificateRevocationList + +`func NewPatchedCertificateRevocationList() *PatchedCertificateRevocationList` + +NewPatchedCertificateRevocationList instantiates a new PatchedCertificateRevocationList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedCertificateRevocationListWithDefaults + +`func NewPatchedCertificateRevocationListWithDefaults() *PatchedCertificateRevocationList` + +NewPatchedCertificateRevocationListWithDefaults instantiates a new PatchedCertificateRevocationList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *PatchedCertificateRevocationList) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PatchedCertificateRevocationList) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PatchedCertificateRevocationList) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *PatchedCertificateRevocationList) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetName + +`func (o *PatchedCertificateRevocationList) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedCertificateRevocationList) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedCertificateRevocationList) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedCertificateRevocationList) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedCertificateRevocationList) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedCertificateRevocationList) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedCertificateRevocationList) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedCertificateRevocationList) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *PatchedCertificateRevocationList) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *PatchedCertificateRevocationList) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *PatchedCertificateRevocationList) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + +### HasLastEditor + +`func (o *PatchedCertificateRevocationList) HasLastEditor() bool` + +HasLastEditor returns a boolean if a field has been set. + +### GetLastModified + +`func (o *PatchedCertificateRevocationList) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *PatchedCertificateRevocationList) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *PatchedCertificateRevocationList) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + +### HasLastModified + +`func (o *PatchedCertificateRevocationList) HasLastModified() bool` + +HasLastModified returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *PatchedCertificateRevocationList) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *PatchedCertificateRevocationList) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *PatchedCertificateRevocationList) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *PatchedCertificateRevocationList) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### GetIssuer + +`func (o *PatchedCertificateRevocationList) GetIssuer() string` + +GetIssuer returns the Issuer field if non-nil, zero value otherwise. + +### GetIssuerOk + +`func (o *PatchedCertificateRevocationList) GetIssuerOk() (*string, bool)` + +GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIssuer + +`func (o *PatchedCertificateRevocationList) SetIssuer(v string)` + +SetIssuer sets Issuer field to given value. + +### HasIssuer + +`func (o *PatchedCertificateRevocationList) HasIssuer() bool` + +HasIssuer returns a boolean if a field has been set. + +### GetLastUpdate + +`func (o *PatchedCertificateRevocationList) GetLastUpdate() time.Time` + +GetLastUpdate returns the LastUpdate field if non-nil, zero value otherwise. + +### GetLastUpdateOk + +`func (o *PatchedCertificateRevocationList) GetLastUpdateOk() (*time.Time, bool)` + +GetLastUpdateOk returns a tuple with the LastUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUpdate + +`func (o *PatchedCertificateRevocationList) SetLastUpdate(v time.Time)` + +SetLastUpdate sets LastUpdate field to given value. + +### HasLastUpdate + +`func (o *PatchedCertificateRevocationList) HasLastUpdate() bool` + +HasLastUpdate returns a boolean if a field has been set. + +### GetNextUpdate + +`func (o *PatchedCertificateRevocationList) GetNextUpdate() time.Time` + +GetNextUpdate returns the NextUpdate field if non-nil, zero value otherwise. + +### GetNextUpdateOk + +`func (o *PatchedCertificateRevocationList) GetNextUpdateOk() (*time.Time, bool)` + +GetNextUpdateOk returns a tuple with the NextUpdate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextUpdate + +`func (o *PatchedCertificateRevocationList) SetNextUpdate(v time.Time)` + +SetNextUpdate sets NextUpdate field to given value. + +### HasNextUpdate + +`func (o *PatchedCertificateRevocationList) HasNextUpdate() bool` + +HasNextUpdate returns a boolean if a field has been set. + +### GetCrl + +`func (o *PatchedCertificateRevocationList) GetCrl() string` + +GetCrl returns the Crl field if non-nil, zero value otherwise. + +### GetCrlOk + +`func (o *PatchedCertificateRevocationList) GetCrlOk() (*string, bool)` + +GetCrlOk returns a tuple with the Crl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCrl + +`func (o *PatchedCertificateRevocationList) SetCrl(v string)` + +SetCrl sets Crl field to given value. + +### HasCrl + +`func (o *PatchedCertificateRevocationList) HasCrl() bool` + +HasCrl returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedChatThreadRequest.md b/azion-api/docs/PatchedChatThreadRequest.md new file mode 100644 index 0000000..8492250 --- /dev/null +++ b/azion-api/docs/PatchedChatThreadRequest.md @@ -0,0 +1,82 @@ +# PatchedChatThreadRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedChatThreadRequest + +`func NewPatchedChatThreadRequest() *PatchedChatThreadRequest` + +NewPatchedChatThreadRequest instantiates a new PatchedChatThreadRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedChatThreadRequestWithDefaults + +`func NewPatchedChatThreadRequestWithDefaults() *PatchedChatThreadRequest` + +NewPatchedChatThreadRequestWithDefaults instantiates a new PatchedChatThreadRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedChatThreadRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedChatThreadRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedChatThreadRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedChatThreadRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedChatThreadRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedChatThreadRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedChatThreadRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedChatThreadRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedConnectorHTTPRequest.md b/azion-api/docs/PatchedConnectorHTTPRequest.md new file mode 100644 index 0000000..c6403e1 --- /dev/null +++ b/azion-api/docs/PatchedConnectorHTTPRequest.md @@ -0,0 +1,129 @@ +# PatchedConnectorHTTPRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | Pointer to [**ConnectorHTTPAttributesRequest**](ConnectorHTTPAttributesRequest.md) | | [optional] + +## Methods + +### NewPatchedConnectorHTTPRequest + +`func NewPatchedConnectorHTTPRequest(type_ string, ) *PatchedConnectorHTTPRequest` + +NewPatchedConnectorHTTPRequest instantiates a new PatchedConnectorHTTPRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedConnectorHTTPRequestWithDefaults + +`func NewPatchedConnectorHTTPRequestWithDefaults() *PatchedConnectorHTTPRequest` + +NewPatchedConnectorHTTPRequestWithDefaults instantiates a new PatchedConnectorHTTPRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedConnectorHTTPRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedConnectorHTTPRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedConnectorHTTPRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedConnectorHTTPRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedConnectorHTTPRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedConnectorHTTPRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedConnectorHTTPRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedConnectorHTTPRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedConnectorHTTPRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedConnectorHTTPRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedConnectorHTTPRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *PatchedConnectorHTTPRequest) GetAttributes() ConnectorHTTPAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *PatchedConnectorHTTPRequest) GetAttributesOk() (*ConnectorHTTPAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *PatchedConnectorHTTPRequest) SetAttributes(v ConnectorHTTPAttributesRequest)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *PatchedConnectorHTTPRequest) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedConnectorRequest.md b/azion-api/docs/PatchedConnectorRequest.md new file mode 100644 index 0000000..871c80a --- /dev/null +++ b/azion-api/docs/PatchedConnectorRequest.md @@ -0,0 +1,129 @@ +# PatchedConnectorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | Pointer to [**ConnectorStorageAttributesRequest**](ConnectorStorageAttributesRequest.md) | | [optional] + +## Methods + +### NewPatchedConnectorRequest + +`func NewPatchedConnectorRequest(type_ string, ) *PatchedConnectorRequest` + +NewPatchedConnectorRequest instantiates a new PatchedConnectorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedConnectorRequestWithDefaults + +`func NewPatchedConnectorRequestWithDefaults() *PatchedConnectorRequest` + +NewPatchedConnectorRequestWithDefaults instantiates a new PatchedConnectorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedConnectorRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedConnectorRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedConnectorRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedConnectorRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedConnectorRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedConnectorRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedConnectorRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedConnectorRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedConnectorRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedConnectorRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedConnectorRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *PatchedConnectorRequest) GetAttributes() ConnectorStorageAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *PatchedConnectorRequest) GetAttributesOk() (*ConnectorStorageAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *PatchedConnectorRequest) SetAttributes(v ConnectorStorageAttributesRequest)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *PatchedConnectorRequest) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedConnectorRequest2.md b/azion-api/docs/PatchedConnectorRequest2.md new file mode 100644 index 0000000..973577b --- /dev/null +++ b/azion-api/docs/PatchedConnectorRequest2.md @@ -0,0 +1,129 @@ +# PatchedConnectorRequest2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Type** | **string** | Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest | +**Attributes** | Pointer to [**ConnectorStorageAttributesRequest**](ConnectorStorageAttributesRequest.md) | | [optional] + +## Methods + +### NewPatchedConnectorRequest2 + +`func NewPatchedConnectorRequest2(type_ string, ) *PatchedConnectorRequest2` + +NewPatchedConnectorRequest2 instantiates a new PatchedConnectorRequest2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedConnectorRequest2WithDefaults + +`func NewPatchedConnectorRequest2WithDefaults() *PatchedConnectorRequest2` + +NewPatchedConnectorRequest2WithDefaults instantiates a new PatchedConnectorRequest2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedConnectorRequest2) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedConnectorRequest2) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedConnectorRequest2) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedConnectorRequest2) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedConnectorRequest2) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedConnectorRequest2) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedConnectorRequest2) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedConnectorRequest2) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedConnectorRequest2) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedConnectorRequest2) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedConnectorRequest2) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *PatchedConnectorRequest2) GetAttributes() ConnectorStorageAttributesRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *PatchedConnectorRequest2) GetAttributesOk() (*ConnectorStorageAttributesRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *PatchedConnectorRequest2) SetAttributes(v ConnectorStorageAttributesRequest)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *PatchedConnectorRequest2) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedCustomPageRequest.md b/azion-api/docs/PatchedCustomPageRequest.md new file mode 100644 index 0000000..fae2729 --- /dev/null +++ b/azion-api/docs/PatchedCustomPageRequest.md @@ -0,0 +1,108 @@ +# PatchedCustomPageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Pages** | Pointer to [**[]PageRequest**](PageRequest.md) | | [optional] + +## Methods + +### NewPatchedCustomPageRequest + +`func NewPatchedCustomPageRequest() *PatchedCustomPageRequest` + +NewPatchedCustomPageRequest instantiates a new PatchedCustomPageRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedCustomPageRequestWithDefaults + +`func NewPatchedCustomPageRequestWithDefaults() *PatchedCustomPageRequest` + +NewPatchedCustomPageRequestWithDefaults instantiates a new PatchedCustomPageRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedCustomPageRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedCustomPageRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedCustomPageRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedCustomPageRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedCustomPageRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedCustomPageRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedCustomPageRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedCustomPageRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetPages + +`func (o *PatchedCustomPageRequest) GetPages() []PageRequest` + +GetPages returns the Pages field if non-nil, zero value otherwise. + +### GetPagesOk + +`func (o *PatchedCustomPageRequest) GetPagesOk() (*[]PageRequest, bool)` + +GetPagesOk returns a tuple with the Pages field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPages + +`func (o *PatchedCustomPageRequest) SetPages(v []PageRequest)` + +SetPages sets Pages field to given value. + +### HasPages + +`func (o *PatchedCustomPageRequest) HasPages() bool` + +HasPages returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedDNSSECRequest.md b/azion-api/docs/PatchedDNSSECRequest.md new file mode 100644 index 0000000..113c502 --- /dev/null +++ b/azion-api/docs/PatchedDNSSECRequest.md @@ -0,0 +1,56 @@ +# PatchedDNSSECRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedDNSSECRequest + +`func NewPatchedDNSSECRequest() *PatchedDNSSECRequest` + +NewPatchedDNSSECRequest instantiates a new PatchedDNSSECRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedDNSSECRequestWithDefaults + +`func NewPatchedDNSSECRequestWithDefaults() *PatchedDNSSECRequest` + +NewPatchedDNSSECRequestWithDefaults instantiates a new PatchedDNSSECRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *PatchedDNSSECRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *PatchedDNSSECRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *PatchedDNSSECRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *PatchedDNSSECRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedDashboardRequest.md b/azion-api/docs/PatchedDashboardRequest.md new file mode 100644 index 0000000..e38d62a --- /dev/null +++ b/azion-api/docs/PatchedDashboardRequest.md @@ -0,0 +1,82 @@ +# PatchedDashboardRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Scope** | Pointer to **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | [optional] + +## Methods + +### NewPatchedDashboardRequest + +`func NewPatchedDashboardRequest() *PatchedDashboardRequest` + +NewPatchedDashboardRequest instantiates a new PatchedDashboardRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedDashboardRequestWithDefaults + +`func NewPatchedDashboardRequestWithDefaults() *PatchedDashboardRequest` + +NewPatchedDashboardRequestWithDefaults instantiates a new PatchedDashboardRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedDashboardRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedDashboardRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedDashboardRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedDashboardRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetScope + +`func (o *PatchedDashboardRequest) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *PatchedDashboardRequest) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *PatchedDashboardRequest) SetScope(v string)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *PatchedDashboardRequest) HasScope() bool` + +HasScope returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedDataStreamRequest.md b/azion-api/docs/PatchedDataStreamRequest.md new file mode 100644 index 0000000..118d3bf --- /dev/null +++ b/azion-api/docs/PatchedDataStreamRequest.md @@ -0,0 +1,134 @@ +# PatchedDataStreamRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Inputs** | Pointer to [**[]InputInputDataSourceAttributesRequest**](InputInputDataSourceAttributesRequest.md) | | [optional] +**Transform** | Pointer to [**[]TransformRequest**](TransformRequest.md) | | [optional] + +## Methods + +### NewPatchedDataStreamRequest + +`func NewPatchedDataStreamRequest() *PatchedDataStreamRequest` + +NewPatchedDataStreamRequest instantiates a new PatchedDataStreamRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedDataStreamRequestWithDefaults + +`func NewPatchedDataStreamRequestWithDefaults() *PatchedDataStreamRequest` + +NewPatchedDataStreamRequestWithDefaults instantiates a new PatchedDataStreamRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedDataStreamRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedDataStreamRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedDataStreamRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedDataStreamRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedDataStreamRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedDataStreamRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedDataStreamRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedDataStreamRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetInputs + +`func (o *PatchedDataStreamRequest) GetInputs() []InputInputDataSourceAttributesRequest` + +GetInputs returns the Inputs field if non-nil, zero value otherwise. + +### GetInputsOk + +`func (o *PatchedDataStreamRequest) GetInputsOk() (*[]InputInputDataSourceAttributesRequest, bool)` + +GetInputsOk returns a tuple with the Inputs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInputs + +`func (o *PatchedDataStreamRequest) SetInputs(v []InputInputDataSourceAttributesRequest)` + +SetInputs sets Inputs field to given value. + +### HasInputs + +`func (o *PatchedDataStreamRequest) HasInputs() bool` + +HasInputs returns a boolean if a field has been set. + +### GetTransform + +`func (o *PatchedDataStreamRequest) GetTransform() []TransformRequest` + +GetTransform returns the Transform field if non-nil, zero value otherwise. + +### GetTransformOk + +`func (o *PatchedDataStreamRequest) GetTransformOk() (*[]TransformRequest, bool)` + +GetTransformOk returns a tuple with the Transform field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTransform + +`func (o *PatchedDataStreamRequest) SetTransform(v []TransformRequest)` + +SetTransform sets Transform field to given value. + +### HasTransform + +`func (o *PatchedDataStreamRequest) HasTransform() bool` + +HasTransform returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedDeviceGroupRequest.md b/azion-api/docs/PatchedDeviceGroupRequest.md new file mode 100644 index 0000000..69b9d3c --- /dev/null +++ b/azion-api/docs/PatchedDeviceGroupRequest.md @@ -0,0 +1,82 @@ +# PatchedDeviceGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**UserAgent** | Pointer to **string** | Enter a valid regular expression pattern to identify user agents. | [optional] + +## Methods + +### NewPatchedDeviceGroupRequest + +`func NewPatchedDeviceGroupRequest() *PatchedDeviceGroupRequest` + +NewPatchedDeviceGroupRequest instantiates a new PatchedDeviceGroupRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedDeviceGroupRequestWithDefaults + +`func NewPatchedDeviceGroupRequestWithDefaults() *PatchedDeviceGroupRequest` + +NewPatchedDeviceGroupRequestWithDefaults instantiates a new PatchedDeviceGroupRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedDeviceGroupRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedDeviceGroupRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedDeviceGroupRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedDeviceGroupRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetUserAgent + +`func (o *PatchedDeviceGroupRequest) GetUserAgent() string` + +GetUserAgent returns the UserAgent field if non-nil, zero value otherwise. + +### GetUserAgentOk + +`func (o *PatchedDeviceGroupRequest) GetUserAgentOk() (*string, bool)` + +GetUserAgentOk returns a tuple with the UserAgent field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserAgent + +`func (o *PatchedDeviceGroupRequest) SetUserAgent(v string)` + +SetUserAgent sets UserAgent field to given value. + +### HasUserAgent + +`func (o *PatchedDeviceGroupRequest) HasUserAgent() bool` + +HasUserAgent returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedFirewallFunctionInstanceRequest.md b/azion-api/docs/PatchedFirewallFunctionInstanceRequest.md new file mode 100644 index 0000000..e4af2e9 --- /dev/null +++ b/azion-api/docs/PatchedFirewallFunctionInstanceRequest.md @@ -0,0 +1,170 @@ +# PatchedFirewallFunctionInstanceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Args** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**Function** | Pointer to **int64** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedFirewallFunctionInstanceRequest + +`func NewPatchedFirewallFunctionInstanceRequest() *PatchedFirewallFunctionInstanceRequest` + +NewPatchedFirewallFunctionInstanceRequest instantiates a new PatchedFirewallFunctionInstanceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedFirewallFunctionInstanceRequestWithDefaults + +`func NewPatchedFirewallFunctionInstanceRequestWithDefaults() *PatchedFirewallFunctionInstanceRequest` + +NewPatchedFirewallFunctionInstanceRequestWithDefaults instantiates a new PatchedFirewallFunctionInstanceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedFirewallFunctionInstanceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedFirewallFunctionInstanceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedFirewallFunctionInstanceRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedFirewallFunctionInstanceRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetArgs + +`func (o *PatchedFirewallFunctionInstanceRequest) GetArgs() interface{}` + +GetArgs returns the Args field if non-nil, zero value otherwise. + +### GetArgsOk + +`func (o *PatchedFirewallFunctionInstanceRequest) GetArgsOk() (*interface{}, bool)` + +GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgs + +`func (o *PatchedFirewallFunctionInstanceRequest) SetArgs(v interface{})` + +SetArgs sets Args field to given value. + +### HasArgs + +`func (o *PatchedFirewallFunctionInstanceRequest) HasArgs() bool` + +HasArgs returns a boolean if a field has been set. + +### SetArgsNil + +`func (o *PatchedFirewallFunctionInstanceRequest) SetArgsNil(b bool)` + + SetArgsNil sets the value for Args to be an explicit nil + +### UnsetArgs +`func (o *PatchedFirewallFunctionInstanceRequest) UnsetArgs()` + +UnsetArgs ensures that no value is present for Args, not even an explicit nil +### GetAzionForm + +`func (o *PatchedFirewallFunctionInstanceRequest) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *PatchedFirewallFunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *PatchedFirewallFunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *PatchedFirewallFunctionInstanceRequest) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetFunction + +`func (o *PatchedFirewallFunctionInstanceRequest) GetFunction() int64` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *PatchedFirewallFunctionInstanceRequest) GetFunctionOk() (*int64, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *PatchedFirewallFunctionInstanceRequest) SetFunction(v int64)` + +SetFunction sets Function field to given value. + +### HasFunction + +`func (o *PatchedFirewallFunctionInstanceRequest) HasFunction() bool` + +HasFunction returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedFirewallFunctionInstanceRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedFirewallFunctionInstanceRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedFirewallFunctionInstanceRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedFirewallFunctionInstanceRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedFirewallRequest.md b/azion-api/docs/PatchedFirewallRequest.md new file mode 100644 index 0000000..474659a --- /dev/null +++ b/azion-api/docs/PatchedFirewallRequest.md @@ -0,0 +1,134 @@ +# PatchedFirewallRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Modules** | Pointer to [**FirewallModulesRequest**](FirewallModulesRequest.md) | | [optional] +**Debug** | Pointer to **bool** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedFirewallRequest + +`func NewPatchedFirewallRequest() *PatchedFirewallRequest` + +NewPatchedFirewallRequest instantiates a new PatchedFirewallRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedFirewallRequestWithDefaults + +`func NewPatchedFirewallRequestWithDefaults() *PatchedFirewallRequest` + +NewPatchedFirewallRequestWithDefaults instantiates a new PatchedFirewallRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedFirewallRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedFirewallRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedFirewallRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedFirewallRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetModules + +`func (o *PatchedFirewallRequest) GetModules() FirewallModulesRequest` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *PatchedFirewallRequest) GetModulesOk() (*FirewallModulesRequest, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *PatchedFirewallRequest) SetModules(v FirewallModulesRequest)` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *PatchedFirewallRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### GetDebug + +`func (o *PatchedFirewallRequest) GetDebug() bool` + +GetDebug returns the Debug field if non-nil, zero value otherwise. + +### GetDebugOk + +`func (o *PatchedFirewallRequest) GetDebugOk() (*bool, bool)` + +GetDebugOk returns a tuple with the Debug field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDebug + +`func (o *PatchedFirewallRequest) SetDebug(v bool)` + +SetDebug sets Debug field to given value. + +### HasDebug + +`func (o *PatchedFirewallRequest) HasDebug() bool` + +HasDebug returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedFirewallRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedFirewallRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedFirewallRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedFirewallRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedFirewallRuleRequest.md b/azion-api/docs/PatchedFirewallRuleRequest.md new file mode 100644 index 0000000..3d6be95 --- /dev/null +++ b/azion-api/docs/PatchedFirewallRuleRequest.md @@ -0,0 +1,160 @@ +# PatchedFirewallRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Criteria** | Pointer to [**[][]FirewallCriterionFieldRequest**]([]FirewallCriterionFieldRequest.md) | | [optional] +**Behaviors** | Pointer to [**[]FirewallBehaviorRequest**](FirewallBehaviorRequest.md) | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedFirewallRuleRequest + +`func NewPatchedFirewallRuleRequest() *PatchedFirewallRuleRequest` + +NewPatchedFirewallRuleRequest instantiates a new PatchedFirewallRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedFirewallRuleRequestWithDefaults + +`func NewPatchedFirewallRuleRequestWithDefaults() *PatchedFirewallRuleRequest` + +NewPatchedFirewallRuleRequestWithDefaults instantiates a new PatchedFirewallRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedFirewallRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedFirewallRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedFirewallRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedFirewallRuleRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedFirewallRuleRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedFirewallRuleRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedFirewallRuleRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedFirewallRuleRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *PatchedFirewallRuleRequest) GetCriteria() [][]FirewallCriterionFieldRequest` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *PatchedFirewallRuleRequest) GetCriteriaOk() (*[][]FirewallCriterionFieldRequest, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *PatchedFirewallRuleRequest) SetCriteria(v [][]FirewallCriterionFieldRequest)` + +SetCriteria sets Criteria field to given value. + +### HasCriteria + +`func (o *PatchedFirewallRuleRequest) HasCriteria() bool` + +HasCriteria returns a boolean if a field has been set. + +### GetBehaviors + +`func (o *PatchedFirewallRuleRequest) GetBehaviors() []FirewallBehaviorRequest` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *PatchedFirewallRuleRequest) GetBehaviorsOk() (*[]FirewallBehaviorRequest, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *PatchedFirewallRuleRequest) SetBehaviors(v []FirewallBehaviorRequest)` + +SetBehaviors sets Behaviors field to given value. + +### HasBehaviors + +`func (o *PatchedFirewallRuleRequest) HasBehaviors() bool` + +HasBehaviors returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedFirewallRuleRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedFirewallRuleRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedFirewallRuleRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedFirewallRuleRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedFolderRequest.md b/azion-api/docs/PatchedFolderRequest.md new file mode 100644 index 0000000..6f96954 --- /dev/null +++ b/azion-api/docs/PatchedFolderRequest.md @@ -0,0 +1,82 @@ +# PatchedFolderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Scope** | Pointer to **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | [optional] + +## Methods + +### NewPatchedFolderRequest + +`func NewPatchedFolderRequest() *PatchedFolderRequest` + +NewPatchedFolderRequest instantiates a new PatchedFolderRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedFolderRequestWithDefaults + +`func NewPatchedFolderRequestWithDefaults() *PatchedFolderRequest` + +NewPatchedFolderRequestWithDefaults instantiates a new PatchedFolderRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedFolderRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedFolderRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedFolderRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedFolderRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetScope + +`func (o *PatchedFolderRequest) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *PatchedFolderRequest) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *PatchedFolderRequest) SetScope(v string)` + +SetScope sets Scope field to given value. + +### HasScope + +`func (o *PatchedFolderRequest) HasScope() bool` + +HasScope returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedFunctionInstanceRequest.md b/azion-api/docs/PatchedFunctionInstanceRequest.md new file mode 100644 index 0000000..aa73703 --- /dev/null +++ b/azion-api/docs/PatchedFunctionInstanceRequest.md @@ -0,0 +1,170 @@ +# PatchedFunctionInstanceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Args** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] +**Function** | Pointer to **int64** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedFunctionInstanceRequest + +`func NewPatchedFunctionInstanceRequest() *PatchedFunctionInstanceRequest` + +NewPatchedFunctionInstanceRequest instantiates a new PatchedFunctionInstanceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedFunctionInstanceRequestWithDefaults + +`func NewPatchedFunctionInstanceRequestWithDefaults() *PatchedFunctionInstanceRequest` + +NewPatchedFunctionInstanceRequestWithDefaults instantiates a new PatchedFunctionInstanceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedFunctionInstanceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedFunctionInstanceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedFunctionInstanceRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedFunctionInstanceRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetArgs + +`func (o *PatchedFunctionInstanceRequest) GetArgs() interface{}` + +GetArgs returns the Args field if non-nil, zero value otherwise. + +### GetArgsOk + +`func (o *PatchedFunctionInstanceRequest) GetArgsOk() (*interface{}, bool)` + +GetArgsOk returns a tuple with the Args field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArgs + +`func (o *PatchedFunctionInstanceRequest) SetArgs(v interface{})` + +SetArgs sets Args field to given value. + +### HasArgs + +`func (o *PatchedFunctionInstanceRequest) HasArgs() bool` + +HasArgs returns a boolean if a field has been set. + +### SetArgsNil + +`func (o *PatchedFunctionInstanceRequest) SetArgsNil(b bool)` + + SetArgsNil sets the value for Args to be an explicit nil + +### UnsetArgs +`func (o *PatchedFunctionInstanceRequest) UnsetArgs()` + +UnsetArgs ensures that no value is present for Args, not even an explicit nil +### GetAzionForm + +`func (o *PatchedFunctionInstanceRequest) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *PatchedFunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *PatchedFunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *PatchedFunctionInstanceRequest) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + +### GetFunction + +`func (o *PatchedFunctionInstanceRequest) GetFunction() int64` + +GetFunction returns the Function field if non-nil, zero value otherwise. + +### GetFunctionOk + +`func (o *PatchedFunctionInstanceRequest) GetFunctionOk() (*int64, bool)` + +GetFunctionOk returns a tuple with the Function field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFunction + +`func (o *PatchedFunctionInstanceRequest) SetFunction(v int64)` + +SetFunction sets Function field to given value. + +### HasFunction + +`func (o *PatchedFunctionInstanceRequest) HasFunction() bool` + +HasFunction returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedFunctionInstanceRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedFunctionInstanceRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedFunctionInstanceRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedFunctionInstanceRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedFunctionsRequest.md b/azion-api/docs/PatchedFunctionsRequest.md new file mode 100644 index 0000000..65d2c09 --- /dev/null +++ b/azion-api/docs/PatchedFunctionsRequest.md @@ -0,0 +1,222 @@ +# PatchedFunctionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Runtime** | Pointer to **string** | * `azion_js` - Azion JavaScript | [optional] +**ExecutionEnvironment** | Pointer to **string** | * `firewall` - Firewall * `application` - Application | [optional] +**Code** | Pointer to **string** | String containing the function code. Maximum size: 20MB. | [optional] +**DefaultArgs** | Pointer to **interface{}** | | [optional] +**AzionForm** | Pointer to [**FunctionsAzionForm**](FunctionsAzionForm.md) | | [optional] + +## Methods + +### NewPatchedFunctionsRequest + +`func NewPatchedFunctionsRequest() *PatchedFunctionsRequest` + +NewPatchedFunctionsRequest instantiates a new PatchedFunctionsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedFunctionsRequestWithDefaults + +`func NewPatchedFunctionsRequestWithDefaults() *PatchedFunctionsRequest` + +NewPatchedFunctionsRequestWithDefaults instantiates a new PatchedFunctionsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedFunctionsRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedFunctionsRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedFunctionsRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedFunctionsRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedFunctionsRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedFunctionsRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedFunctionsRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedFunctionsRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetRuntime + +`func (o *PatchedFunctionsRequest) GetRuntime() string` + +GetRuntime returns the Runtime field if non-nil, zero value otherwise. + +### GetRuntimeOk + +`func (o *PatchedFunctionsRequest) GetRuntimeOk() (*string, bool)` + +GetRuntimeOk returns a tuple with the Runtime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuntime + +`func (o *PatchedFunctionsRequest) SetRuntime(v string)` + +SetRuntime sets Runtime field to given value. + +### HasRuntime + +`func (o *PatchedFunctionsRequest) HasRuntime() bool` + +HasRuntime returns a boolean if a field has been set. + +### GetExecutionEnvironment + +`func (o *PatchedFunctionsRequest) GetExecutionEnvironment() string` + +GetExecutionEnvironment returns the ExecutionEnvironment field if non-nil, zero value otherwise. + +### GetExecutionEnvironmentOk + +`func (o *PatchedFunctionsRequest) GetExecutionEnvironmentOk() (*string, bool)` + +GetExecutionEnvironmentOk returns a tuple with the ExecutionEnvironment field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionEnvironment + +`func (o *PatchedFunctionsRequest) SetExecutionEnvironment(v string)` + +SetExecutionEnvironment sets ExecutionEnvironment field to given value. + +### HasExecutionEnvironment + +`func (o *PatchedFunctionsRequest) HasExecutionEnvironment() bool` + +HasExecutionEnvironment returns a boolean if a field has been set. + +### GetCode + +`func (o *PatchedFunctionsRequest) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *PatchedFunctionsRequest) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *PatchedFunctionsRequest) SetCode(v string)` + +SetCode sets Code field to given value. + +### HasCode + +`func (o *PatchedFunctionsRequest) HasCode() bool` + +HasCode returns a boolean if a field has been set. + +### GetDefaultArgs + +`func (o *PatchedFunctionsRequest) GetDefaultArgs() interface{}` + +GetDefaultArgs returns the DefaultArgs field if non-nil, zero value otherwise. + +### GetDefaultArgsOk + +`func (o *PatchedFunctionsRequest) GetDefaultArgsOk() (*interface{}, bool)` + +GetDefaultArgsOk returns a tuple with the DefaultArgs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDefaultArgs + +`func (o *PatchedFunctionsRequest) SetDefaultArgs(v interface{})` + +SetDefaultArgs sets DefaultArgs field to given value. + +### HasDefaultArgs + +`func (o *PatchedFunctionsRequest) HasDefaultArgs() bool` + +HasDefaultArgs returns a boolean if a field has been set. + +### SetDefaultArgsNil + +`func (o *PatchedFunctionsRequest) SetDefaultArgsNil(b bool)` + + SetDefaultArgsNil sets the value for DefaultArgs to be an explicit nil + +### UnsetDefaultArgs +`func (o *PatchedFunctionsRequest) UnsetDefaultArgs()` + +UnsetDefaultArgs ensures that no value is present for DefaultArgs, not even an explicit nil +### GetAzionForm + +`func (o *PatchedFunctionsRequest) GetAzionForm() FunctionsAzionForm` + +GetAzionForm returns the AzionForm field if non-nil, zero value otherwise. + +### GetAzionFormOk + +`func (o *PatchedFunctionsRequest) GetAzionFormOk() (*FunctionsAzionForm, bool)` + +GetAzionFormOk returns a tuple with the AzionForm field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAzionForm + +`func (o *PatchedFunctionsRequest) SetAzionForm(v FunctionsAzionForm)` + +SetAzionForm sets AzionForm field to given value. + +### HasAzionForm + +`func (o *PatchedFunctionsRequest) HasAzionForm() bool` + +HasAzionForm returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedGrantRequest.md b/azion-api/docs/PatchedGrantRequest.md new file mode 100644 index 0000000..15cf52d --- /dev/null +++ b/azion-api/docs/PatchedGrantRequest.md @@ -0,0 +1,196 @@ +# PatchedGrantRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identity** | Pointer to **NullableInt64** | | [optional] +**Roles** | Pointer to **[]int64** | | [optional] +**Policies** | Pointer to **[]int64** | | [optional] +**Expires** | Pointer to **time.Time** | | [optional] +**Owner** | Pointer to **bool** | | [optional] +**AccountId** | Pointer to **int64** | | [optional] + +## Methods + +### NewPatchedGrantRequest + +`func NewPatchedGrantRequest() *PatchedGrantRequest` + +NewPatchedGrantRequest instantiates a new PatchedGrantRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedGrantRequestWithDefaults + +`func NewPatchedGrantRequestWithDefaults() *PatchedGrantRequest` + +NewPatchedGrantRequestWithDefaults instantiates a new PatchedGrantRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIdentity + +`func (o *PatchedGrantRequest) GetIdentity() int64` + +GetIdentity returns the Identity field if non-nil, zero value otherwise. + +### GetIdentityOk + +`func (o *PatchedGrantRequest) GetIdentityOk() (*int64, bool)` + +GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentity + +`func (o *PatchedGrantRequest) SetIdentity(v int64)` + +SetIdentity sets Identity field to given value. + +### HasIdentity + +`func (o *PatchedGrantRequest) HasIdentity() bool` + +HasIdentity returns a boolean if a field has been set. + +### SetIdentityNil + +`func (o *PatchedGrantRequest) SetIdentityNil(b bool)` + + SetIdentityNil sets the value for Identity to be an explicit nil + +### UnsetIdentity +`func (o *PatchedGrantRequest) UnsetIdentity()` + +UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +### GetRoles + +`func (o *PatchedGrantRequest) GetRoles() []int64` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *PatchedGrantRequest) GetRolesOk() (*[]int64, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *PatchedGrantRequest) SetRoles(v []int64)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *PatchedGrantRequest) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetPolicies + +`func (o *PatchedGrantRequest) GetPolicies() []int64` + +GetPolicies returns the Policies field if non-nil, zero value otherwise. + +### GetPoliciesOk + +`func (o *PatchedGrantRequest) GetPoliciesOk() (*[]int64, bool)` + +GetPoliciesOk returns a tuple with the Policies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicies + +`func (o *PatchedGrantRequest) SetPolicies(v []int64)` + +SetPolicies sets Policies field to given value. + +### HasPolicies + +`func (o *PatchedGrantRequest) HasPolicies() bool` + +HasPolicies returns a boolean if a field has been set. + +### GetExpires + +`func (o *PatchedGrantRequest) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *PatchedGrantRequest) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *PatchedGrantRequest) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *PatchedGrantRequest) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### GetOwner + +`func (o *PatchedGrantRequest) GetOwner() bool` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *PatchedGrantRequest) GetOwnerOk() (*bool, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *PatchedGrantRequest) SetOwner(v bool)` + +SetOwner sets Owner field to given value. + +### HasOwner + +`func (o *PatchedGrantRequest) HasOwner() bool` + +HasOwner returns a boolean if a field has been set. + +### GetAccountId + +`func (o *PatchedGrantRequest) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *PatchedGrantRequest) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *PatchedGrantRequest) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *PatchedGrantRequest) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedGroupRequest.md b/azion-api/docs/PatchedGroupRequest.md new file mode 100644 index 0000000..c89d72a --- /dev/null +++ b/azion-api/docs/PatchedGroupRequest.md @@ -0,0 +1,82 @@ +# PatchedGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedGroupRequest + +`func NewPatchedGroupRequest() *PatchedGroupRequest` + +NewPatchedGroupRequest instantiates a new PatchedGroupRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedGroupRequestWithDefaults + +`func NewPatchedGroupRequestWithDefaults() *PatchedGroupRequest` + +NewPatchedGroupRequestWithDefaults instantiates a new PatchedGroupRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedGroupRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedGroupRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedGroupRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedGroupRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedGroupRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedGroupRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedGroupRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedGroupRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedKnowledgeBaseRequest.md b/azion-api/docs/PatchedKnowledgeBaseRequest.md new file mode 100644 index 0000000..ae93a73 --- /dev/null +++ b/azion-api/docs/PatchedKnowledgeBaseRequest.md @@ -0,0 +1,108 @@ +# PatchedKnowledgeBaseRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**EmbeddingModel** | Pointer to **string** | * `text-embedding-3-small` - text-embedding-3-small | [optional] + +## Methods + +### NewPatchedKnowledgeBaseRequest + +`func NewPatchedKnowledgeBaseRequest() *PatchedKnowledgeBaseRequest` + +NewPatchedKnowledgeBaseRequest instantiates a new PatchedKnowledgeBaseRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedKnowledgeBaseRequestWithDefaults + +`func NewPatchedKnowledgeBaseRequestWithDefaults() *PatchedKnowledgeBaseRequest` + +NewPatchedKnowledgeBaseRequestWithDefaults instantiates a new PatchedKnowledgeBaseRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedKnowledgeBaseRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedKnowledgeBaseRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedKnowledgeBaseRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedKnowledgeBaseRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedKnowledgeBaseRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedKnowledgeBaseRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedKnowledgeBaseRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedKnowledgeBaseRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetEmbeddingModel + +`func (o *PatchedKnowledgeBaseRequest) GetEmbeddingModel() string` + +GetEmbeddingModel returns the EmbeddingModel field if non-nil, zero value otherwise. + +### GetEmbeddingModelOk + +`func (o *PatchedKnowledgeBaseRequest) GetEmbeddingModelOk() (*string, bool)` + +GetEmbeddingModelOk returns a tuple with the EmbeddingModel field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmbeddingModel + +`func (o *PatchedKnowledgeBaseRequest) SetEmbeddingModel(v string)` + +SetEmbeddingModel sets EmbeddingModel field to given value. + +### HasEmbeddingModel + +`func (o *PatchedKnowledgeBaseRequest) HasEmbeddingModel() bool` + +HasEmbeddingModel returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedNetworkListRequest.md b/azion-api/docs/PatchedNetworkListRequest.md new file mode 100644 index 0000000..cfcfe51 --- /dev/null +++ b/azion-api/docs/PatchedNetworkListRequest.md @@ -0,0 +1,134 @@ +# PatchedNetworkListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR | [optional] +**Items** | Pointer to **[]string** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedNetworkListRequest + +`func NewPatchedNetworkListRequest() *PatchedNetworkListRequest` + +NewPatchedNetworkListRequest instantiates a new PatchedNetworkListRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedNetworkListRequestWithDefaults + +`func NewPatchedNetworkListRequestWithDefaults() *PatchedNetworkListRequest` + +NewPatchedNetworkListRequestWithDefaults instantiates a new PatchedNetworkListRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedNetworkListRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedNetworkListRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedNetworkListRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedNetworkListRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedNetworkListRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedNetworkListRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedNetworkListRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PatchedNetworkListRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetItems + +`func (o *PatchedNetworkListRequest) GetItems() []string` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *PatchedNetworkListRequest) GetItemsOk() (*[]string, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *PatchedNetworkListRequest) SetItems(v []string)` + +SetItems sets Items field to given value. + +### HasItems + +`func (o *PatchedNetworkListRequest) HasItems() bool` + +HasItems returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedNetworkListRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedNetworkListRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedNetworkListRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedNetworkListRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedNodesRequest.md b/azion-api/docs/PatchedNodesRequest.md new file mode 100644 index 0000000..d5c9374 --- /dev/null +++ b/azion-api/docs/PatchedNodesRequest.md @@ -0,0 +1,118 @@ +# PatchedNodesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Status** | Pointer to **string** | * `waiting_authorization` - waiting_authorization * `authorized` - authorized | [optional] +**Modules** | Pointer to **interface{}** | | [optional] + +## Methods + +### NewPatchedNodesRequest + +`func NewPatchedNodesRequest() *PatchedNodesRequest` + +NewPatchedNodesRequest instantiates a new PatchedNodesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedNodesRequestWithDefaults + +`func NewPatchedNodesRequestWithDefaults() *PatchedNodesRequest` + +NewPatchedNodesRequestWithDefaults instantiates a new PatchedNodesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedNodesRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedNodesRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedNodesRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedNodesRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetStatus + +`func (o *PatchedNodesRequest) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PatchedNodesRequest) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *PatchedNodesRequest) SetStatus(v string)` + +SetStatus sets Status field to given value. + +### HasStatus + +`func (o *PatchedNodesRequest) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### GetModules + +`func (o *PatchedNodesRequest) GetModules() interface{}` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *PatchedNodesRequest) GetModulesOk() (*interface{}, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *PatchedNodesRequest) SetModules(v interface{})` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *PatchedNodesRequest) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### SetModulesNil + +`func (o *PatchedNodesRequest) SetModulesNil(b bool)` + + SetModulesNil sets the value for Modules to be an explicit nil + +### UnsetModules +`func (o *PatchedNodesRequest) UnsetModules()` + +UnsetModules ensures that no value is present for Modules, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedOrganizationRequest.md b/azion-api/docs/PatchedOrganizationRequest.md new file mode 100644 index 0000000..dabb736 --- /dev/null +++ b/azion-api/docs/PatchedOrganizationRequest.md @@ -0,0 +1,77 @@ +# PatchedOrganizationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewPatchedOrganizationRequest + +`func NewPatchedOrganizationRequest(type_ string, ) *PatchedOrganizationRequest` + +NewPatchedOrganizationRequest instantiates a new PatchedOrganizationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedOrganizationRequestWithDefaults + +`func NewPatchedOrganizationRequestWithDefaults() *PatchedOrganizationRequest` + +NewPatchedOrganizationRequestWithDefaults instantiates a new PatchedOrganizationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedOrganizationRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedOrganizationRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedOrganizationRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedOrganizationRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedOrganizationRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedOrganizationRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedOrganizationRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedPartialUpdateRequest.md b/azion-api/docs/PatchedPartialUpdateRequest.md new file mode 100644 index 0000000..dfb235f --- /dev/null +++ b/azion-api/docs/PatchedPartialUpdateRequest.md @@ -0,0 +1,56 @@ +# PatchedPartialUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsDefault** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedPartialUpdateRequest + +`func NewPatchedPartialUpdateRequest() *PatchedPartialUpdateRequest` + +NewPatchedPartialUpdateRequest instantiates a new PatchedPartialUpdateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedPartialUpdateRequestWithDefaults + +`func NewPatchedPartialUpdateRequestWithDefaults() *PatchedPartialUpdateRequest` + +NewPatchedPartialUpdateRequestWithDefaults instantiates a new PatchedPartialUpdateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIsDefault + +`func (o *PatchedPartialUpdateRequest) GetIsDefault() bool` + +GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. + +### GetIsDefaultOk + +`func (o *PatchedPartialUpdateRequest) GetIsDefaultOk() (*bool, bool)` + +GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDefault + +`func (o *PatchedPartialUpdateRequest) SetIsDefault(v bool)` + +SetIsDefault sets IsDefault field to given value. + +### HasIsDefault + +`func (o *PatchedPartialUpdateRequest) HasIsDefault() bool` + +HasIsDefault returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedPolicyRequest.md b/azion-api/docs/PatchedPolicyRequest.md new file mode 100644 index 0000000..33c0ed1 --- /dev/null +++ b/azion-api/docs/PatchedPolicyRequest.md @@ -0,0 +1,108 @@ +# PatchedPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Rules** | Pointer to [**[]PolicyRuleRequest**](PolicyRuleRequest.md) | | [optional] + +## Methods + +### NewPatchedPolicyRequest + +`func NewPatchedPolicyRequest() *PatchedPolicyRequest` + +NewPatchedPolicyRequest instantiates a new PatchedPolicyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedPolicyRequestWithDefaults + +`func NewPatchedPolicyRequestWithDefaults() *PatchedPolicyRequest` + +NewPatchedPolicyRequestWithDefaults instantiates a new PatchedPolicyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedPolicyRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedPolicyRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedPolicyRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedPolicyRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedPolicyRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedPolicyRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedPolicyRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedPolicyRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetRules + +`func (o *PatchedPolicyRequest) GetRules() []PolicyRuleRequest` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *PatchedPolicyRequest) GetRulesOk() (*[]PolicyRuleRequest, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *PatchedPolicyRequest) SetRules(v []PolicyRuleRequest)` + +SetRules sets Rules field to given value. + +### HasRules + +`func (o *PatchedPolicyRequest) HasRules() bool` + +HasRules returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedRecordRequest.md b/azion-api/docs/PatchedRecordRequest.md new file mode 100644 index 0000000..1679465 --- /dev/null +++ b/azion-api/docs/PatchedRecordRequest.md @@ -0,0 +1,212 @@ +# PatchedRecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Name** | Pointer to **string** | | [optional] +**Ttl** | Pointer to **int64** | | [optional] +**Type** | Pointer to **string** | * `A` - A * `AAAA` - AAAA * `ANAME` - ANAME * `CNAME` - CNAME * `MX` - MX * `NS` - NS * `PTR` - PTR * `SRV` - SRV * `TXT` - TXT * `CAA` - CAA * `DS` - DS | [optional] +**Rdata** | Pointer to **[]string** | | [optional] +**Policy** | Pointer to **string** | * `simple` - simple * `weighted` - weighted | [optional] +**Weight** | Pointer to **int64** | | [optional] + +## Methods + +### NewPatchedRecordRequest + +`func NewPatchedRecordRequest() *PatchedRecordRequest` + +NewPatchedRecordRequest instantiates a new PatchedRecordRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedRecordRequestWithDefaults + +`func NewPatchedRecordRequestWithDefaults() *PatchedRecordRequest` + +NewPatchedRecordRequestWithDefaults instantiates a new PatchedRecordRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *PatchedRecordRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedRecordRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedRecordRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedRecordRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *PatchedRecordRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedRecordRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedRecordRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedRecordRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetTtl + +`func (o *PatchedRecordRequest) GetTtl() int64` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *PatchedRecordRequest) GetTtlOk() (*int64, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *PatchedRecordRequest) SetTtl(v int64)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *PatchedRecordRequest) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedRecordRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedRecordRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedRecordRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PatchedRecordRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetRdata + +`func (o *PatchedRecordRequest) GetRdata() []string` + +GetRdata returns the Rdata field if non-nil, zero value otherwise. + +### GetRdataOk + +`func (o *PatchedRecordRequest) GetRdataOk() (*[]string, bool)` + +GetRdataOk returns a tuple with the Rdata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRdata + +`func (o *PatchedRecordRequest) SetRdata(v []string)` + +SetRdata sets Rdata field to given value. + +### HasRdata + +`func (o *PatchedRecordRequest) HasRdata() bool` + +HasRdata returns a boolean if a field has been set. + +### GetPolicy + +`func (o *PatchedRecordRequest) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *PatchedRecordRequest) GetPolicyOk() (*string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *PatchedRecordRequest) SetPolicy(v string)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *PatchedRecordRequest) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetWeight + +`func (o *PatchedRecordRequest) GetWeight() int64` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *PatchedRecordRequest) GetWeightOk() (*int64, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *PatchedRecordRequest) SetWeight(v int64)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *PatchedRecordRequest) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedRequestPhaseRule.md b/azion-api/docs/PatchedRequestPhaseRule.md new file mode 100644 index 0000000..79ed352 --- /dev/null +++ b/azion-api/docs/PatchedRequestPhaseRule.md @@ -0,0 +1,160 @@ +# PatchedRequestPhaseRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Criteria** | Pointer to [**[][]ApplicationCriterionFieldRequest**]([]ApplicationCriterionFieldRequest.md) | | [optional] +**Behaviors** | Pointer to [**[]RequestPhaseBehavior2**](RequestPhaseBehavior2.md) | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedRequestPhaseRule + +`func NewPatchedRequestPhaseRule() *PatchedRequestPhaseRule` + +NewPatchedRequestPhaseRule instantiates a new PatchedRequestPhaseRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedRequestPhaseRuleWithDefaults + +`func NewPatchedRequestPhaseRuleWithDefaults() *PatchedRequestPhaseRule` + +NewPatchedRequestPhaseRuleWithDefaults instantiates a new PatchedRequestPhaseRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedRequestPhaseRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedRequestPhaseRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedRequestPhaseRule) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedRequestPhaseRule) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedRequestPhaseRule) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedRequestPhaseRule) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedRequestPhaseRule) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedRequestPhaseRule) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *PatchedRequestPhaseRule) GetCriteria() [][]ApplicationCriterionFieldRequest` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *PatchedRequestPhaseRule) GetCriteriaOk() (*[][]ApplicationCriterionFieldRequest, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *PatchedRequestPhaseRule) SetCriteria(v [][]ApplicationCriterionFieldRequest)` + +SetCriteria sets Criteria field to given value. + +### HasCriteria + +`func (o *PatchedRequestPhaseRule) HasCriteria() bool` + +HasCriteria returns a boolean if a field has been set. + +### GetBehaviors + +`func (o *PatchedRequestPhaseRule) GetBehaviors() []RequestPhaseBehavior2` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *PatchedRequestPhaseRule) GetBehaviorsOk() (*[]RequestPhaseBehavior2, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *PatchedRequestPhaseRule) SetBehaviors(v []RequestPhaseBehavior2)` + +SetBehaviors sets Behaviors field to given value. + +### HasBehaviors + +`func (o *PatchedRequestPhaseRule) HasBehaviors() bool` + +HasBehaviors returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedRequestPhaseRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedRequestPhaseRule) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedRequestPhaseRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedRequestPhaseRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedResellerRequest.md b/azion-api/docs/PatchedResellerRequest.md new file mode 100644 index 0000000..27b779f --- /dev/null +++ b/azion-api/docs/PatchedResellerRequest.md @@ -0,0 +1,129 @@ +# PatchedResellerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**CurrencyIsoCode** | Pointer to **string** | * `USD` - USD * `BRL` - BRL | [optional] +**TermsOfServiceUrl** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewPatchedResellerRequest + +`func NewPatchedResellerRequest(type_ string, ) *PatchedResellerRequest` + +NewPatchedResellerRequest instantiates a new PatchedResellerRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedResellerRequestWithDefaults + +`func NewPatchedResellerRequestWithDefaults() *PatchedResellerRequest` + +NewPatchedResellerRequestWithDefaults instantiates a new PatchedResellerRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedResellerRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedResellerRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedResellerRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedResellerRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCurrencyIsoCode + +`func (o *PatchedResellerRequest) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *PatchedResellerRequest) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *PatchedResellerRequest) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + +### HasCurrencyIsoCode + +`func (o *PatchedResellerRequest) HasCurrencyIsoCode() bool` + +HasCurrencyIsoCode returns a boolean if a field has been set. + +### GetTermsOfServiceUrl + +`func (o *PatchedResellerRequest) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *PatchedResellerRequest) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *PatchedResellerRequest) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *PatchedResellerRequest) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedResellerRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedResellerRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedResellerRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedResponsePhaseRuleRequest.md b/azion-api/docs/PatchedResponsePhaseRuleRequest.md new file mode 100644 index 0000000..834ced0 --- /dev/null +++ b/azion-api/docs/PatchedResponsePhaseRuleRequest.md @@ -0,0 +1,160 @@ +# PatchedResponsePhaseRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Criteria** | Pointer to [**[][]ApplicationCriterionFieldRequest**]([]ApplicationCriterionFieldRequest.md) | | [optional] +**Behaviors** | Pointer to [**[]ResponsePhaseBehaviorRequest**](ResponsePhaseBehaviorRequest.md) | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedResponsePhaseRuleRequest + +`func NewPatchedResponsePhaseRuleRequest() *PatchedResponsePhaseRuleRequest` + +NewPatchedResponsePhaseRuleRequest instantiates a new PatchedResponsePhaseRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedResponsePhaseRuleRequestWithDefaults + +`func NewPatchedResponsePhaseRuleRequestWithDefaults() *PatchedResponsePhaseRuleRequest` + +NewPatchedResponsePhaseRuleRequestWithDefaults instantiates a new PatchedResponsePhaseRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedResponsePhaseRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedResponsePhaseRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedResponsePhaseRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedResponsePhaseRuleRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedResponsePhaseRuleRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedResponsePhaseRuleRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedResponsePhaseRuleRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedResponsePhaseRuleRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *PatchedResponsePhaseRuleRequest) GetCriteria() [][]ApplicationCriterionFieldRequest` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *PatchedResponsePhaseRuleRequest) GetCriteriaOk() (*[][]ApplicationCriterionFieldRequest, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *PatchedResponsePhaseRuleRequest) SetCriteria(v [][]ApplicationCriterionFieldRequest)` + +SetCriteria sets Criteria field to given value. + +### HasCriteria + +`func (o *PatchedResponsePhaseRuleRequest) HasCriteria() bool` + +HasCriteria returns a boolean if a field has been set. + +### GetBehaviors + +`func (o *PatchedResponsePhaseRuleRequest) GetBehaviors() []ResponsePhaseBehaviorRequest` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *PatchedResponsePhaseRuleRequest) GetBehaviorsOk() (*[]ResponsePhaseBehaviorRequest, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *PatchedResponsePhaseRuleRequest) SetBehaviors(v []ResponsePhaseBehaviorRequest)` + +SetBehaviors sets Behaviors field to given value. + +### HasBehaviors + +`func (o *PatchedResponsePhaseRuleRequest) HasBehaviors() bool` + +HasBehaviors returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedResponsePhaseRuleRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedResponsePhaseRuleRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedResponsePhaseRuleRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedResponsePhaseRuleRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedServiceTokenUpdateRequest.md b/azion-api/docs/PatchedServiceTokenUpdateRequest.md new file mode 100644 index 0000000..42ae0cc --- /dev/null +++ b/azion-api/docs/PatchedServiceTokenUpdateRequest.md @@ -0,0 +1,108 @@ +# PatchedServiceTokenUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedServiceTokenUpdateRequest + +`func NewPatchedServiceTokenUpdateRequest() *PatchedServiceTokenUpdateRequest` + +NewPatchedServiceTokenUpdateRequest instantiates a new PatchedServiceTokenUpdateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedServiceTokenUpdateRequestWithDefaults + +`func NewPatchedServiceTokenUpdateRequestWithDefaults() *PatchedServiceTokenUpdateRequest` + +NewPatchedServiceTokenUpdateRequestWithDefaults instantiates a new PatchedServiceTokenUpdateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedServiceTokenUpdateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedServiceTokenUpdateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedServiceTokenUpdateRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedServiceTokenUpdateRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedServiceTokenUpdateRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedServiceTokenUpdateRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedServiceTokenUpdateRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedServiceTokenUpdateRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedServiceTokenUpdateRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedServiceTokenUpdateRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedServiceTokenUpdateRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedServiceTokenUpdateRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedServicesRequest.md b/azion-api/docs/PatchedServicesRequest.md new file mode 100644 index 0000000..1a1b503 --- /dev/null +++ b/azion-api/docs/PatchedServicesRequest.md @@ -0,0 +1,134 @@ +# PatchedServicesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**MinVersion** | Pointer to **string** | | [optional] +**Permissions** | Pointer to **int64** | | [optional] + +## Methods + +### NewPatchedServicesRequest + +`func NewPatchedServicesRequest() *PatchedServicesRequest` + +NewPatchedServicesRequest instantiates a new PatchedServicesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedServicesRequestWithDefaults + +`func NewPatchedServicesRequestWithDefaults() *PatchedServicesRequest` + +NewPatchedServicesRequestWithDefaults instantiates a new PatchedServicesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedServicesRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedServicesRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedServicesRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedServicesRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedServicesRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedServicesRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedServicesRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedServicesRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetMinVersion + +`func (o *PatchedServicesRequest) GetMinVersion() string` + +GetMinVersion returns the MinVersion field if non-nil, zero value otherwise. + +### GetMinVersionOk + +`func (o *PatchedServicesRequest) GetMinVersionOk() (*string, bool)` + +GetMinVersionOk returns a tuple with the MinVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinVersion + +`func (o *PatchedServicesRequest) SetMinVersion(v string)` + +SetMinVersion sets MinVersion field to given value. + +### HasMinVersion + +`func (o *PatchedServicesRequest) HasMinVersion() bool` + +HasMinVersion returns a boolean if a field has been set. + +### GetPermissions + +`func (o *PatchedServicesRequest) GetPermissions() int64` + +GetPermissions returns the Permissions field if non-nil, zero value otherwise. + +### GetPermissionsOk + +`func (o *PatchedServicesRequest) GetPermissionsOk() (*int64, bool)` + +GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermissions + +`func (o *PatchedServicesRequest) SetPermissions(v int64)` + +SetPermissions sets Permissions field to given value. + +### HasPermissions + +`func (o *PatchedServicesRequest) HasPermissions() bool` + +HasPermissions returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedTemplateRequest.md b/azion-api/docs/PatchedTemplateRequest.md new file mode 100644 index 0000000..41e93c1 --- /dev/null +++ b/azion-api/docs/PatchedTemplateRequest.md @@ -0,0 +1,108 @@ +# PatchedTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**DataSet** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedTemplateRequest + +`func NewPatchedTemplateRequest() *PatchedTemplateRequest` + +NewPatchedTemplateRequest instantiates a new PatchedTemplateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedTemplateRequestWithDefaults + +`func NewPatchedTemplateRequestWithDefaults() *PatchedTemplateRequest` + +NewPatchedTemplateRequestWithDefaults instantiates a new PatchedTemplateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedTemplateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedTemplateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedTemplateRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedTemplateRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedTemplateRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedTemplateRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedTemplateRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedTemplateRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDataSet + +`func (o *PatchedTemplateRequest) GetDataSet() string` + +GetDataSet returns the DataSet field if non-nil, zero value otherwise. + +### GetDataSetOk + +`func (o *PatchedTemplateRequest) GetDataSetOk() (*string, bool)` + +GetDataSetOk returns a tuple with the DataSet field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSet + +`func (o *PatchedTemplateRequest) SetDataSet(v string)` + +SetDataSet sets DataSet field to given value. + +### HasDataSet + +`func (o *PatchedTemplateRequest) HasDataSet() bool` + +HasDataSet returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedToolRequest.md b/azion-api/docs/PatchedToolRequest.md new file mode 100644 index 0000000..9363da6 --- /dev/null +++ b/azion-api/docs/PatchedToolRequest.md @@ -0,0 +1,160 @@ +# PatchedToolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Type** | Pointer to **string** | | [optional] +**JsonSchema** | Pointer to **map[string]interface{}** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedToolRequest + +`func NewPatchedToolRequest() *PatchedToolRequest` + +NewPatchedToolRequest instantiates a new PatchedToolRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedToolRequestWithDefaults + +`func NewPatchedToolRequestWithDefaults() *PatchedToolRequest` + +NewPatchedToolRequestWithDefaults instantiates a new PatchedToolRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedToolRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedToolRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedToolRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedToolRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetDescription + +`func (o *PatchedToolRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *PatchedToolRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *PatchedToolRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *PatchedToolRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedToolRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedToolRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedToolRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *PatchedToolRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetJsonSchema + +`func (o *PatchedToolRequest) GetJsonSchema() map[string]interface{}` + +GetJsonSchema returns the JsonSchema field if non-nil, zero value otherwise. + +### GetJsonSchemaOk + +`func (o *PatchedToolRequest) GetJsonSchemaOk() (*map[string]interface{}, bool)` + +GetJsonSchemaOk returns a tuple with the JsonSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJsonSchema + +`func (o *PatchedToolRequest) SetJsonSchema(v map[string]interface{})` + +SetJsonSchema sets JsonSchema field to given value. + +### HasJsonSchema + +`func (o *PatchedToolRequest) HasJsonSchema() bool` + +HasJsonSchema returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedToolRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedToolRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedToolRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedToolRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedUpdateZoneRequest.md b/azion-api/docs/PatchedUpdateZoneRequest.md new file mode 100644 index 0000000..c1553db --- /dev/null +++ b/azion-api/docs/PatchedUpdateZoneRequest.md @@ -0,0 +1,82 @@ +# PatchedUpdateZoneRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedUpdateZoneRequest + +`func NewPatchedUpdateZoneRequest() *PatchedUpdateZoneRequest` + +NewPatchedUpdateZoneRequest instantiates a new PatchedUpdateZoneRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedUpdateZoneRequestWithDefaults + +`func NewPatchedUpdateZoneRequestWithDefaults() *PatchedUpdateZoneRequest` + +NewPatchedUpdateZoneRequestWithDefaults instantiates a new PatchedUpdateZoneRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedUpdateZoneRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedUpdateZoneRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedUpdateZoneRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedUpdateZoneRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedUpdateZoneRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedUpdateZoneRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedUpdateZoneRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedUpdateZoneRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedUserRequest.md b/azion-api/docs/PatchedUserRequest.md new file mode 100644 index 0000000..81aa836 --- /dev/null +++ b/azion-api/docs/PatchedUserRequest.md @@ -0,0 +1,186 @@ +# PatchedUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**TwoFactorEnabled** | Pointer to **bool** | | [optional] +**Preferences** | Pointer to **map[string]interface{}** | User-specific preferences in JSON format. | [optional] +**Phone** | Pointer to **string** | | [optional] + +## Methods + +### NewPatchedUserRequest + +`func NewPatchedUserRequest() *PatchedUserRequest` + +NewPatchedUserRequest instantiates a new PatchedUserRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedUserRequestWithDefaults + +`func NewPatchedUserRequestWithDefaults() *PatchedUserRequest` + +NewPatchedUserRequestWithDefaults instantiates a new PatchedUserRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedUserRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedUserRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedUserRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedUserRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetEmail + +`func (o *PatchedUserRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *PatchedUserRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *PatchedUserRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *PatchedUserRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedUserRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedUserRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedUserRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedUserRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetTwoFactorEnabled + +`func (o *PatchedUserRequest) GetTwoFactorEnabled() bool` + +GetTwoFactorEnabled returns the TwoFactorEnabled field if non-nil, zero value otherwise. + +### GetTwoFactorEnabledOk + +`func (o *PatchedUserRequest) GetTwoFactorEnabledOk() (*bool, bool)` + +GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorEnabled + +`func (o *PatchedUserRequest) SetTwoFactorEnabled(v bool)` + +SetTwoFactorEnabled sets TwoFactorEnabled field to given value. + +### HasTwoFactorEnabled + +`func (o *PatchedUserRequest) HasTwoFactorEnabled() bool` + +HasTwoFactorEnabled returns a boolean if a field has been set. + +### GetPreferences + +`func (o *PatchedUserRequest) GetPreferences() map[string]interface{}` + +GetPreferences returns the Preferences field if non-nil, zero value otherwise. + +### GetPreferencesOk + +`func (o *PatchedUserRequest) GetPreferencesOk() (*map[string]interface{}, bool)` + +GetPreferencesOk returns a tuple with the Preferences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferences + +`func (o *PatchedUserRequest) SetPreferences(v map[string]interface{})` + +SetPreferences sets Preferences field to given value. + +### HasPreferences + +`func (o *PatchedUserRequest) HasPreferences() bool` + +HasPreferences returns a boolean if a field has been set. + +### GetPhone + +`func (o *PatchedUserRequest) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *PatchedUserRequest) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *PatchedUserRequest) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *PatchedUserRequest) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedWAFRequest.md b/azion-api/docs/PatchedWAFRequest.md new file mode 100644 index 0000000..a865415 --- /dev/null +++ b/azion-api/docs/PatchedWAFRequest.md @@ -0,0 +1,144 @@ +# PatchedWAFRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | Pointer to **bool** | | [optional] +**Name** | Pointer to **string** | | [optional] +**ProductVersion** | Pointer to **NullableString** | | [optional] +**EngineSettings** | Pointer to [**WAFEngineSettingsFieldRequest**](WAFEngineSettingsFieldRequest.md) | | [optional] + +## Methods + +### NewPatchedWAFRequest + +`func NewPatchedWAFRequest() *PatchedWAFRequest` + +NewPatchedWAFRequest instantiates a new PatchedWAFRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedWAFRequestWithDefaults + +`func NewPatchedWAFRequestWithDefaults() *PatchedWAFRequest` + +NewPatchedWAFRequestWithDefaults instantiates a new PatchedWAFRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActive + +`func (o *PatchedWAFRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedWAFRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedWAFRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedWAFRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetName + +`func (o *PatchedWAFRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedWAFRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedWAFRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedWAFRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetProductVersion + +`func (o *PatchedWAFRequest) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *PatchedWAFRequest) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *PatchedWAFRequest) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *PatchedWAFRequest) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### SetProductVersionNil + +`func (o *PatchedWAFRequest) SetProductVersionNil(b bool)` + + SetProductVersionNil sets the value for ProductVersion to be an explicit nil + +### UnsetProductVersion +`func (o *PatchedWAFRequest) UnsetProductVersion()` + +UnsetProductVersion ensures that no value is present for ProductVersion, not even an explicit nil +### GetEngineSettings + +`func (o *PatchedWAFRequest) GetEngineSettings() WAFEngineSettingsFieldRequest` + +GetEngineSettings returns the EngineSettings field if non-nil, zero value otherwise. + +### GetEngineSettingsOk + +`func (o *PatchedWAFRequest) GetEngineSettingsOk() (*WAFEngineSettingsFieldRequest, bool)` + +GetEngineSettingsOk returns a tuple with the EngineSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEngineSettings + +`func (o *PatchedWAFRequest) SetEngineSettings(v WAFEngineSettingsFieldRequest)` + +SetEngineSettings sets EngineSettings field to given value. + +### HasEngineSettings + +`func (o *PatchedWAFRequest) HasEngineSettings() bool` + +HasEngineSettings returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedWAFRuleRequest.md b/azion-api/docs/PatchedWAFRuleRequest.md new file mode 100644 index 0000000..459f5e9 --- /dev/null +++ b/azion-api/docs/PatchedWAFRuleRequest.md @@ -0,0 +1,196 @@ +# PatchedWAFRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RuleId** | Pointer to **int64** | 0 - All Rules<br> 1 - Validation of protocol compliance: weird request, unable to parse<br> 2 - Request too big, stored on disk and not parsed<br> 10 - Validation of protocol compliance: invalid HEX encoding (null bytes)<br> 11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)<br> 12 - Validation of protocol compliance: invalid formatted URL<br> 13 - Validation of protocol compliance: invalid POST format<br> 14 - Validation of protocol compliance: invalid POST boundary<br> 15 - Validation of protocol compliance: invalid JSON<br> 16 - Validation of protocol compliance: POST with no body<br> 17 - Possible SQL Injection attack: validation with libinjection_sql<br> 18 - Possible XSS attack: validation with libinjection_xss<br> 1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies<br> 1001 - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies<br> 1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies<br> 1003 - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies<br> 1004 - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies<br> 1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies<br> 1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies<br> 1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies<br> 1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String<br> 1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String<br> 1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies<br> 1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies<br> 1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies<br> 1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies<br> 1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies<br> 1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies<br> 1100 - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies<br> 1101 - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies<br> 1102 - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies<br> 1103 - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies<br> 1104 - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies<br> 1105 - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies<br> 1106 - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies<br> 1107 - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies<br> 1108 - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies<br> 1109 - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies<br> 1110 - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies<br> 1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR<br> 1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies<br> 1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies<br> 1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies<br> 1203 - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies<br> 1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies<br> 1205 - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies<br> 1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies<br> 1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies<br> 1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies<br> 1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies<br> 1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies<br> 1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies<br> 1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies<br> 1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies<br> 1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies<br> 1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies<br> 1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies<br> 1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies<br> 1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies<br> 1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies<br> 1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies<br> 1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file<br> 2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering * `0` - All Rules * `1` - Validation of protocol compliance: weird request, unable to parse * `2` - Request too big, stored on disk and not parsed * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) * `12` - Validation of protocol compliance: invalid formatted URL * `13` - Validation of protocol compliance: invalid POST format * `14` - Validation of protocol compliance: invalid POST boundary * `15` - Validation of protocol compliance: invalid JSON * `16` - Validation of protocol compliance: POST with no body * `17` - Possible SQL Injection attack: validation with libinjection_sql * `18` - Possible XSS attack: validation with libinjection_xss * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies * `1001` - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies * `1003` - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies * `1004` - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies * `1100` - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies * `1101` - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies * `1102` - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies * `1103` - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies * `1104` - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies * `1105` - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies * `1106` - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies * `1107` - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies * `1108` - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies * `1109` - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies * `1110` - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies * `1203` - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies * `1205` - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering | [optional] +**Name** | Pointer to **string** | | [optional] +**Path** | Pointer to **NullableString** | | [optional] +**Conditions** | Pointer to [**[]WAFExceptionConditionRequest**](WAFExceptionConditionRequest.md) | | [optional] +**Operator** | Pointer to **string** | * `regex` - regex * `contains` - contains | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedWAFRuleRequest + +`func NewPatchedWAFRuleRequest() *PatchedWAFRuleRequest` + +NewPatchedWAFRuleRequest instantiates a new PatchedWAFRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedWAFRuleRequestWithDefaults + +`func NewPatchedWAFRuleRequestWithDefaults() *PatchedWAFRuleRequest` + +NewPatchedWAFRuleRequestWithDefaults instantiates a new PatchedWAFRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRuleId + +`func (o *PatchedWAFRuleRequest) GetRuleId() int64` + +GetRuleId returns the RuleId field if non-nil, zero value otherwise. + +### GetRuleIdOk + +`func (o *PatchedWAFRuleRequest) GetRuleIdOk() (*int64, bool)` + +GetRuleIdOk returns a tuple with the RuleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuleId + +`func (o *PatchedWAFRuleRequest) SetRuleId(v int64)` + +SetRuleId sets RuleId field to given value. + +### HasRuleId + +`func (o *PatchedWAFRuleRequest) HasRuleId() bool` + +HasRuleId returns a boolean if a field has been set. + +### GetName + +`func (o *PatchedWAFRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedWAFRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedWAFRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedWAFRuleRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetPath + +`func (o *PatchedWAFRuleRequest) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *PatchedWAFRuleRequest) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *PatchedWAFRuleRequest) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *PatchedWAFRuleRequest) HasPath() bool` + +HasPath returns a boolean if a field has been set. + +### SetPathNil + +`func (o *PatchedWAFRuleRequest) SetPathNil(b bool)` + + SetPathNil sets the value for Path to be an explicit nil + +### UnsetPath +`func (o *PatchedWAFRuleRequest) UnsetPath()` + +UnsetPath ensures that no value is present for Path, not even an explicit nil +### GetConditions + +`func (o *PatchedWAFRuleRequest) GetConditions() []WAFExceptionConditionRequest` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *PatchedWAFRuleRequest) GetConditionsOk() (*[]WAFExceptionConditionRequest, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *PatchedWAFRuleRequest) SetConditions(v []WAFExceptionConditionRequest)` + +SetConditions sets Conditions field to given value. + +### HasConditions + +`func (o *PatchedWAFRuleRequest) HasConditions() bool` + +HasConditions returns a boolean if a field has been set. + +### GetOperator + +`func (o *PatchedWAFRuleRequest) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *PatchedWAFRuleRequest) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *PatchedWAFRuleRequest) SetOperator(v string)` + +SetOperator sets Operator field to given value. + +### HasOperator + +`func (o *PatchedWAFRuleRequest) HasOperator() bool` + +HasOperator returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedWAFRuleRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedWAFRuleRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedWAFRuleRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedWAFRuleRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedWorkloadDeploymentRequest.md b/azion-api/docs/PatchedWorkloadDeploymentRequest.md new file mode 100644 index 0000000..38ece2e --- /dev/null +++ b/azion-api/docs/PatchedWorkloadDeploymentRequest.md @@ -0,0 +1,134 @@ +# PatchedWorkloadDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Current** | Pointer to **bool** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Strategy** | Pointer to [**DeploymentStrategyDefaultDeploymentStrategyRequest**](DeploymentStrategyDefaultDeploymentStrategyRequest.md) | | [optional] + +## Methods + +### NewPatchedWorkloadDeploymentRequest + +`func NewPatchedWorkloadDeploymentRequest() *PatchedWorkloadDeploymentRequest` + +NewPatchedWorkloadDeploymentRequest instantiates a new PatchedWorkloadDeploymentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedWorkloadDeploymentRequestWithDefaults + +`func NewPatchedWorkloadDeploymentRequestWithDefaults() *PatchedWorkloadDeploymentRequest` + +NewPatchedWorkloadDeploymentRequestWithDefaults instantiates a new PatchedWorkloadDeploymentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedWorkloadDeploymentRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedWorkloadDeploymentRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedWorkloadDeploymentRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedWorkloadDeploymentRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetCurrent + +`func (o *PatchedWorkloadDeploymentRequest) GetCurrent() bool` + +GetCurrent returns the Current field if non-nil, zero value otherwise. + +### GetCurrentOk + +`func (o *PatchedWorkloadDeploymentRequest) GetCurrentOk() (*bool, bool)` + +GetCurrentOk returns a tuple with the Current field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrent + +`func (o *PatchedWorkloadDeploymentRequest) SetCurrent(v bool)` + +SetCurrent sets Current field to given value. + +### HasCurrent + +`func (o *PatchedWorkloadDeploymentRequest) HasCurrent() bool` + +HasCurrent returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedWorkloadDeploymentRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedWorkloadDeploymentRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedWorkloadDeploymentRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedWorkloadDeploymentRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetStrategy + +`func (o *PatchedWorkloadDeploymentRequest) GetStrategy() DeploymentStrategyDefaultDeploymentStrategyRequest` + +GetStrategy returns the Strategy field if non-nil, zero value otherwise. + +### GetStrategyOk + +`func (o *PatchedWorkloadDeploymentRequest) GetStrategyOk() (*DeploymentStrategyDefaultDeploymentStrategyRequest, bool)` + +GetStrategyOk returns a tuple with the Strategy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrategy + +`func (o *PatchedWorkloadDeploymentRequest) SetStrategy(v DeploymentStrategyDefaultDeploymentStrategyRequest)` + +SetStrategy sets Strategy field to given value. + +### HasStrategy + +`func (o *PatchedWorkloadDeploymentRequest) HasStrategy() bool` + +HasStrategy returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedWorkloadRequest.md b/azion-api/docs/PatchedWorkloadRequest.md new file mode 100644 index 0000000..cec0802 --- /dev/null +++ b/azion-api/docs/PatchedWorkloadRequest.md @@ -0,0 +1,238 @@ +# PatchedWorkloadRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Infrastructure** | Pointer to **int64** | * `1` - Production Infrastructure (All Locations) * `2` - Staging Infrastructure | [optional] +**Tls** | Pointer to [**TLSWorkloadRequest**](TLSWorkloadRequest.md) | | [optional] +**Protocols** | Pointer to [**ProtocolsRequest**](ProtocolsRequest.md) | | [optional] +**Mtls** | Pointer to [**MTLSRequest**](MTLSRequest.md) | | [optional] +**Domains** | Pointer to **[]string** | | [optional] +**WorkloadDomainAllowAccess** | Pointer to **bool** | | [optional] + +## Methods + +### NewPatchedWorkloadRequest + +`func NewPatchedWorkloadRequest() *PatchedWorkloadRequest` + +NewPatchedWorkloadRequest instantiates a new PatchedWorkloadRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedWorkloadRequestWithDefaults + +`func NewPatchedWorkloadRequestWithDefaults() *PatchedWorkloadRequest` + +NewPatchedWorkloadRequestWithDefaults instantiates a new PatchedWorkloadRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedWorkloadRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedWorkloadRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedWorkloadRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedWorkloadRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *PatchedWorkloadRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PatchedWorkloadRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PatchedWorkloadRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *PatchedWorkloadRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetInfrastructure + +`func (o *PatchedWorkloadRequest) GetInfrastructure() int64` + +GetInfrastructure returns the Infrastructure field if non-nil, zero value otherwise. + +### GetInfrastructureOk + +`func (o *PatchedWorkloadRequest) GetInfrastructureOk() (*int64, bool)` + +GetInfrastructureOk returns a tuple with the Infrastructure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfrastructure + +`func (o *PatchedWorkloadRequest) SetInfrastructure(v int64)` + +SetInfrastructure sets Infrastructure field to given value. + +### HasInfrastructure + +`func (o *PatchedWorkloadRequest) HasInfrastructure() bool` + +HasInfrastructure returns a boolean if a field has been set. + +### GetTls + +`func (o *PatchedWorkloadRequest) GetTls() TLSWorkloadRequest` + +GetTls returns the Tls field if non-nil, zero value otherwise. + +### GetTlsOk + +`func (o *PatchedWorkloadRequest) GetTlsOk() (*TLSWorkloadRequest, bool)` + +GetTlsOk returns a tuple with the Tls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTls + +`func (o *PatchedWorkloadRequest) SetTls(v TLSWorkloadRequest)` + +SetTls sets Tls field to given value. + +### HasTls + +`func (o *PatchedWorkloadRequest) HasTls() bool` + +HasTls returns a boolean if a field has been set. + +### GetProtocols + +`func (o *PatchedWorkloadRequest) GetProtocols() ProtocolsRequest` + +GetProtocols returns the Protocols field if non-nil, zero value otherwise. + +### GetProtocolsOk + +`func (o *PatchedWorkloadRequest) GetProtocolsOk() (*ProtocolsRequest, bool)` + +GetProtocolsOk returns a tuple with the Protocols field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocols + +`func (o *PatchedWorkloadRequest) SetProtocols(v ProtocolsRequest)` + +SetProtocols sets Protocols field to given value. + +### HasProtocols + +`func (o *PatchedWorkloadRequest) HasProtocols() bool` + +HasProtocols returns a boolean if a field has been set. + +### GetMtls + +`func (o *PatchedWorkloadRequest) GetMtls() MTLSRequest` + +GetMtls returns the Mtls field if non-nil, zero value otherwise. + +### GetMtlsOk + +`func (o *PatchedWorkloadRequest) GetMtlsOk() (*MTLSRequest, bool)` + +GetMtlsOk returns a tuple with the Mtls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMtls + +`func (o *PatchedWorkloadRequest) SetMtls(v MTLSRequest)` + +SetMtls sets Mtls field to given value. + +### HasMtls + +`func (o *PatchedWorkloadRequest) HasMtls() bool` + +HasMtls returns a boolean if a field has been set. + +### GetDomains + +`func (o *PatchedWorkloadRequest) GetDomains() []string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *PatchedWorkloadRequest) GetDomainsOk() (*[]string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *PatchedWorkloadRequest) SetDomains(v []string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *PatchedWorkloadRequest) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetWorkloadDomainAllowAccess + +`func (o *PatchedWorkloadRequest) GetWorkloadDomainAllowAccess() bool` + +GetWorkloadDomainAllowAccess returns the WorkloadDomainAllowAccess field if non-nil, zero value otherwise. + +### GetWorkloadDomainAllowAccessOk + +`func (o *PatchedWorkloadRequest) GetWorkloadDomainAllowAccessOk() (*bool, bool)` + +GetWorkloadDomainAllowAccessOk returns a tuple with the WorkloadDomainAllowAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadDomainAllowAccess + +`func (o *PatchedWorkloadRequest) SetWorkloadDomainAllowAccess(v bool)` + +SetWorkloadDomainAllowAccess sets WorkloadDomainAllowAccess field to given value. + +### HasWorkloadDomainAllowAccess + +`func (o *PatchedWorkloadRequest) HasWorkloadDomainAllowAccess() bool` + +HasWorkloadDomainAllowAccess returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PatchedWorkspaceRequest.md b/azion-api/docs/PatchedWorkspaceRequest.md new file mode 100644 index 0000000..ba394aa --- /dev/null +++ b/azion-api/docs/PatchedWorkspaceRequest.md @@ -0,0 +1,77 @@ +# PatchedWorkspaceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewPatchedWorkspaceRequest + +`func NewPatchedWorkspaceRequest(type_ string, ) *PatchedWorkspaceRequest` + +NewPatchedWorkspaceRequest instantiates a new PatchedWorkspaceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPatchedWorkspaceRequestWithDefaults + +`func NewPatchedWorkspaceRequestWithDefaults() *PatchedWorkspaceRequest` + +NewPatchedWorkspaceRequestWithDefaults instantiates a new PatchedWorkspaceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PatchedWorkspaceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PatchedWorkspaceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PatchedWorkspaceRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *PatchedWorkspaceRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetType + +`func (o *PatchedWorkspaceRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *PatchedWorkspaceRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *PatchedWorkspaceRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaymentHistory.md b/azion-api/docs/PaymentHistory.md new file mode 100644 index 0000000..27c8cb2 --- /dev/null +++ b/azion-api/docs/PaymentHistory.md @@ -0,0 +1,217 @@ +# PaymentHistory + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AmountWithCurrency** | **string** | | +**InvoiceNumber** | **NullableString** | | +**InvoiceUrl** | **NullableString** | | +**Status** | **string** | | +**PaymentDue** | **string** | | +**CardBrand** | **NullableString** | | +**PaymentMethodDetails** | **NullableString** | | + +## Methods + +### NewPaymentHistory + +`func NewPaymentHistory(amountWithCurrency string, invoiceNumber NullableString, invoiceUrl NullableString, status string, paymentDue string, cardBrand NullableString, paymentMethodDetails NullableString, ) *PaymentHistory` + +NewPaymentHistory instantiates a new PaymentHistory object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaymentHistoryWithDefaults + +`func NewPaymentHistoryWithDefaults() *PaymentHistory` + +NewPaymentHistoryWithDefaults instantiates a new PaymentHistory object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAmountWithCurrency + +`func (o *PaymentHistory) GetAmountWithCurrency() string` + +GetAmountWithCurrency returns the AmountWithCurrency field if non-nil, zero value otherwise. + +### GetAmountWithCurrencyOk + +`func (o *PaymentHistory) GetAmountWithCurrencyOk() (*string, bool)` + +GetAmountWithCurrencyOk returns a tuple with the AmountWithCurrency field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAmountWithCurrency + +`func (o *PaymentHistory) SetAmountWithCurrency(v string)` + +SetAmountWithCurrency sets AmountWithCurrency field to given value. + + +### GetInvoiceNumber + +`func (o *PaymentHistory) GetInvoiceNumber() string` + +GetInvoiceNumber returns the InvoiceNumber field if non-nil, zero value otherwise. + +### GetInvoiceNumberOk + +`func (o *PaymentHistory) GetInvoiceNumberOk() (*string, bool)` + +GetInvoiceNumberOk returns a tuple with the InvoiceNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvoiceNumber + +`func (o *PaymentHistory) SetInvoiceNumber(v string)` + +SetInvoiceNumber sets InvoiceNumber field to given value. + + +### SetInvoiceNumberNil + +`func (o *PaymentHistory) SetInvoiceNumberNil(b bool)` + + SetInvoiceNumberNil sets the value for InvoiceNumber to be an explicit nil + +### UnsetInvoiceNumber +`func (o *PaymentHistory) UnsetInvoiceNumber()` + +UnsetInvoiceNumber ensures that no value is present for InvoiceNumber, not even an explicit nil +### GetInvoiceUrl + +`func (o *PaymentHistory) GetInvoiceUrl() string` + +GetInvoiceUrl returns the InvoiceUrl field if non-nil, zero value otherwise. + +### GetInvoiceUrlOk + +`func (o *PaymentHistory) GetInvoiceUrlOk() (*string, bool)` + +GetInvoiceUrlOk returns a tuple with the InvoiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInvoiceUrl + +`func (o *PaymentHistory) SetInvoiceUrl(v string)` + +SetInvoiceUrl sets InvoiceUrl field to given value. + + +### SetInvoiceUrlNil + +`func (o *PaymentHistory) SetInvoiceUrlNil(b bool)` + + SetInvoiceUrlNil sets the value for InvoiceUrl to be an explicit nil + +### UnsetInvoiceUrl +`func (o *PaymentHistory) UnsetInvoiceUrl()` + +UnsetInvoiceUrl ensures that no value is present for InvoiceUrl, not even an explicit nil +### GetStatus + +`func (o *PaymentHistory) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *PaymentHistory) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *PaymentHistory) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetPaymentDue + +`func (o *PaymentHistory) GetPaymentDue() string` + +GetPaymentDue returns the PaymentDue field if non-nil, zero value otherwise. + +### GetPaymentDueOk + +`func (o *PaymentHistory) GetPaymentDueOk() (*string, bool)` + +GetPaymentDueOk returns a tuple with the PaymentDue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentDue + +`func (o *PaymentHistory) SetPaymentDue(v string)` + +SetPaymentDue sets PaymentDue field to given value. + + +### GetCardBrand + +`func (o *PaymentHistory) GetCardBrand() string` + +GetCardBrand returns the CardBrand field if non-nil, zero value otherwise. + +### GetCardBrandOk + +`func (o *PaymentHistory) GetCardBrandOk() (*string, bool)` + +GetCardBrandOk returns a tuple with the CardBrand field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardBrand + +`func (o *PaymentHistory) SetCardBrand(v string)` + +SetCardBrand sets CardBrand field to given value. + + +### SetCardBrandNil + +`func (o *PaymentHistory) SetCardBrandNil(b bool)` + + SetCardBrandNil sets the value for CardBrand to be an explicit nil + +### UnsetCardBrand +`func (o *PaymentHistory) UnsetCardBrand()` + +UnsetCardBrand ensures that no value is present for CardBrand, not even an explicit nil +### GetPaymentMethodDetails + +`func (o *PaymentHistory) GetPaymentMethodDetails() string` + +GetPaymentMethodDetails returns the PaymentMethodDetails field if non-nil, zero value otherwise. + +### GetPaymentMethodDetailsOk + +`func (o *PaymentHistory) GetPaymentMethodDetailsOk() (*string, bool)` + +GetPaymentMethodDetailsOk returns a tuple with the PaymentMethodDetails field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPaymentMethodDetails + +`func (o *PaymentHistory) SetPaymentMethodDetails(v string)` + +SetPaymentMethodDetails sets PaymentMethodDetails field to given value. + + +### SetPaymentMethodDetailsNil + +`func (o *PaymentHistory) SetPaymentMethodDetailsNil(b bool)` + + SetPaymentMethodDetailsNil sets the value for PaymentMethodDetails to be an explicit nil + +### UnsetPaymentMethodDetails +`func (o *PaymentHistory) UnsetPaymentMethodDetails()` + +UnsetPaymentMethodDetails ensures that no value is present for PaymentMethodDetails, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaymentMethod.md b/azion-api/docs/PaymentMethod.md new file mode 100644 index 0000000..f14d080 --- /dev/null +++ b/azion-api/docs/PaymentMethod.md @@ -0,0 +1,297 @@ +# PaymentMethod + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**CardHolder** | **string** | | +**CardBrand** | **string** | | +**CardExpirationMonth** | **int64** | | +**CardExpirationYear** | **int64** | | +**CardLast4Digits** | **string** | | +**CardAddressZip** | **string** | | +**CardCountry** | **string** | | +**CardAddressLine1** | Pointer to **string** | | [optional] +**CardAddressLine2** | Pointer to **string** | | [optional] +**CardId** | **string** | | +**IsDefault** | Pointer to **bool** | | [optional] + +## Methods + +### NewPaymentMethod + +`func NewPaymentMethod(id int64, cardHolder string, cardBrand string, cardExpirationMonth int64, cardExpirationYear int64, cardLast4Digits string, cardAddressZip string, cardCountry string, cardId string, ) *PaymentMethod` + +NewPaymentMethod instantiates a new PaymentMethod object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaymentMethodWithDefaults + +`func NewPaymentMethodWithDefaults() *PaymentMethod` + +NewPaymentMethodWithDefaults instantiates a new PaymentMethod object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *PaymentMethod) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *PaymentMethod) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *PaymentMethod) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetCardHolder + +`func (o *PaymentMethod) GetCardHolder() string` + +GetCardHolder returns the CardHolder field if non-nil, zero value otherwise. + +### GetCardHolderOk + +`func (o *PaymentMethod) GetCardHolderOk() (*string, bool)` + +GetCardHolderOk returns a tuple with the CardHolder field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardHolder + +`func (o *PaymentMethod) SetCardHolder(v string)` + +SetCardHolder sets CardHolder field to given value. + + +### GetCardBrand + +`func (o *PaymentMethod) GetCardBrand() string` + +GetCardBrand returns the CardBrand field if non-nil, zero value otherwise. + +### GetCardBrandOk + +`func (o *PaymentMethod) GetCardBrandOk() (*string, bool)` + +GetCardBrandOk returns a tuple with the CardBrand field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardBrand + +`func (o *PaymentMethod) SetCardBrand(v string)` + +SetCardBrand sets CardBrand field to given value. + + +### GetCardExpirationMonth + +`func (o *PaymentMethod) GetCardExpirationMonth() int64` + +GetCardExpirationMonth returns the CardExpirationMonth field if non-nil, zero value otherwise. + +### GetCardExpirationMonthOk + +`func (o *PaymentMethod) GetCardExpirationMonthOk() (*int64, bool)` + +GetCardExpirationMonthOk returns a tuple with the CardExpirationMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardExpirationMonth + +`func (o *PaymentMethod) SetCardExpirationMonth(v int64)` + +SetCardExpirationMonth sets CardExpirationMonth field to given value. + + +### GetCardExpirationYear + +`func (o *PaymentMethod) GetCardExpirationYear() int64` + +GetCardExpirationYear returns the CardExpirationYear field if non-nil, zero value otherwise. + +### GetCardExpirationYearOk + +`func (o *PaymentMethod) GetCardExpirationYearOk() (*int64, bool)` + +GetCardExpirationYearOk returns a tuple with the CardExpirationYear field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardExpirationYear + +`func (o *PaymentMethod) SetCardExpirationYear(v int64)` + +SetCardExpirationYear sets CardExpirationYear field to given value. + + +### GetCardLast4Digits + +`func (o *PaymentMethod) GetCardLast4Digits() string` + +GetCardLast4Digits returns the CardLast4Digits field if non-nil, zero value otherwise. + +### GetCardLast4DigitsOk + +`func (o *PaymentMethod) GetCardLast4DigitsOk() (*string, bool)` + +GetCardLast4DigitsOk returns a tuple with the CardLast4Digits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardLast4Digits + +`func (o *PaymentMethod) SetCardLast4Digits(v string)` + +SetCardLast4Digits sets CardLast4Digits field to given value. + + +### GetCardAddressZip + +`func (o *PaymentMethod) GetCardAddressZip() string` + +GetCardAddressZip returns the CardAddressZip field if non-nil, zero value otherwise. + +### GetCardAddressZipOk + +`func (o *PaymentMethod) GetCardAddressZipOk() (*string, bool)` + +GetCardAddressZipOk returns a tuple with the CardAddressZip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardAddressZip + +`func (o *PaymentMethod) SetCardAddressZip(v string)` + +SetCardAddressZip sets CardAddressZip field to given value. + + +### GetCardCountry + +`func (o *PaymentMethod) GetCardCountry() string` + +GetCardCountry returns the CardCountry field if non-nil, zero value otherwise. + +### GetCardCountryOk + +`func (o *PaymentMethod) GetCardCountryOk() (*string, bool)` + +GetCardCountryOk returns a tuple with the CardCountry field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardCountry + +`func (o *PaymentMethod) SetCardCountry(v string)` + +SetCardCountry sets CardCountry field to given value. + + +### GetCardAddressLine1 + +`func (o *PaymentMethod) GetCardAddressLine1() string` + +GetCardAddressLine1 returns the CardAddressLine1 field if non-nil, zero value otherwise. + +### GetCardAddressLine1Ok + +`func (o *PaymentMethod) GetCardAddressLine1Ok() (*string, bool)` + +GetCardAddressLine1Ok returns a tuple with the CardAddressLine1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardAddressLine1 + +`func (o *PaymentMethod) SetCardAddressLine1(v string)` + +SetCardAddressLine1 sets CardAddressLine1 field to given value. + +### HasCardAddressLine1 + +`func (o *PaymentMethod) HasCardAddressLine1() bool` + +HasCardAddressLine1 returns a boolean if a field has been set. + +### GetCardAddressLine2 + +`func (o *PaymentMethod) GetCardAddressLine2() string` + +GetCardAddressLine2 returns the CardAddressLine2 field if non-nil, zero value otherwise. + +### GetCardAddressLine2Ok + +`func (o *PaymentMethod) GetCardAddressLine2Ok() (*string, bool)` + +GetCardAddressLine2Ok returns a tuple with the CardAddressLine2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardAddressLine2 + +`func (o *PaymentMethod) SetCardAddressLine2(v string)` + +SetCardAddressLine2 sets CardAddressLine2 field to given value. + +### HasCardAddressLine2 + +`func (o *PaymentMethod) HasCardAddressLine2() bool` + +HasCardAddressLine2 returns a boolean if a field has been set. + +### GetCardId + +`func (o *PaymentMethod) GetCardId() string` + +GetCardId returns the CardId field if non-nil, zero value otherwise. + +### GetCardIdOk + +`func (o *PaymentMethod) GetCardIdOk() (*string, bool)` + +GetCardIdOk returns a tuple with the CardId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardId + +`func (o *PaymentMethod) SetCardId(v string)` + +SetCardId sets CardId field to given value. + + +### GetIsDefault + +`func (o *PaymentMethod) GetIsDefault() bool` + +GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. + +### GetIsDefaultOk + +`func (o *PaymentMethod) GetIsDefaultOk() (*bool, bool)` + +GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDefault + +`func (o *PaymentMethod) SetIsDefault(v bool)` + +SetIsDefault sets IsDefault field to given value. + +### HasIsDefault + +`func (o *PaymentMethod) HasIsDefault() bool` + +HasIsDefault returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PaymentMethodRequest.md b/azion-api/docs/PaymentMethodRequest.md new file mode 100644 index 0000000..1a11a99 --- /dev/null +++ b/azion-api/docs/PaymentMethodRequest.md @@ -0,0 +1,297 @@ +# PaymentMethodRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CardHolder** | **string** | | +**CardBrand** | **string** | | +**CardExpirationMonth** | **int64** | | +**CardExpirationYear** | **int64** | | +**CardLast4Digits** | **string** | | +**CardAddressZip** | **string** | | +**CardCountry** | **string** | | +**CardAddressLine1** | Pointer to **string** | | [optional] +**CardAddressLine2** | Pointer to **string** | | [optional] +**StripeToken** | **string** | | +**CardId** | **string** | | +**IsDefault** | Pointer to **bool** | | [optional] + +## Methods + +### NewPaymentMethodRequest + +`func NewPaymentMethodRequest(cardHolder string, cardBrand string, cardExpirationMonth int64, cardExpirationYear int64, cardLast4Digits string, cardAddressZip string, cardCountry string, stripeToken string, cardId string, ) *PaymentMethodRequest` + +NewPaymentMethodRequest instantiates a new PaymentMethodRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPaymentMethodRequestWithDefaults + +`func NewPaymentMethodRequestWithDefaults() *PaymentMethodRequest` + +NewPaymentMethodRequestWithDefaults instantiates a new PaymentMethodRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCardHolder + +`func (o *PaymentMethodRequest) GetCardHolder() string` + +GetCardHolder returns the CardHolder field if non-nil, zero value otherwise. + +### GetCardHolderOk + +`func (o *PaymentMethodRequest) GetCardHolderOk() (*string, bool)` + +GetCardHolderOk returns a tuple with the CardHolder field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardHolder + +`func (o *PaymentMethodRequest) SetCardHolder(v string)` + +SetCardHolder sets CardHolder field to given value. + + +### GetCardBrand + +`func (o *PaymentMethodRequest) GetCardBrand() string` + +GetCardBrand returns the CardBrand field if non-nil, zero value otherwise. + +### GetCardBrandOk + +`func (o *PaymentMethodRequest) GetCardBrandOk() (*string, bool)` + +GetCardBrandOk returns a tuple with the CardBrand field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardBrand + +`func (o *PaymentMethodRequest) SetCardBrand(v string)` + +SetCardBrand sets CardBrand field to given value. + + +### GetCardExpirationMonth + +`func (o *PaymentMethodRequest) GetCardExpirationMonth() int64` + +GetCardExpirationMonth returns the CardExpirationMonth field if non-nil, zero value otherwise. + +### GetCardExpirationMonthOk + +`func (o *PaymentMethodRequest) GetCardExpirationMonthOk() (*int64, bool)` + +GetCardExpirationMonthOk returns a tuple with the CardExpirationMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardExpirationMonth + +`func (o *PaymentMethodRequest) SetCardExpirationMonth(v int64)` + +SetCardExpirationMonth sets CardExpirationMonth field to given value. + + +### GetCardExpirationYear + +`func (o *PaymentMethodRequest) GetCardExpirationYear() int64` + +GetCardExpirationYear returns the CardExpirationYear field if non-nil, zero value otherwise. + +### GetCardExpirationYearOk + +`func (o *PaymentMethodRequest) GetCardExpirationYearOk() (*int64, bool)` + +GetCardExpirationYearOk returns a tuple with the CardExpirationYear field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardExpirationYear + +`func (o *PaymentMethodRequest) SetCardExpirationYear(v int64)` + +SetCardExpirationYear sets CardExpirationYear field to given value. + + +### GetCardLast4Digits + +`func (o *PaymentMethodRequest) GetCardLast4Digits() string` + +GetCardLast4Digits returns the CardLast4Digits field if non-nil, zero value otherwise. + +### GetCardLast4DigitsOk + +`func (o *PaymentMethodRequest) GetCardLast4DigitsOk() (*string, bool)` + +GetCardLast4DigitsOk returns a tuple with the CardLast4Digits field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardLast4Digits + +`func (o *PaymentMethodRequest) SetCardLast4Digits(v string)` + +SetCardLast4Digits sets CardLast4Digits field to given value. + + +### GetCardAddressZip + +`func (o *PaymentMethodRequest) GetCardAddressZip() string` + +GetCardAddressZip returns the CardAddressZip field if non-nil, zero value otherwise. + +### GetCardAddressZipOk + +`func (o *PaymentMethodRequest) GetCardAddressZipOk() (*string, bool)` + +GetCardAddressZipOk returns a tuple with the CardAddressZip field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardAddressZip + +`func (o *PaymentMethodRequest) SetCardAddressZip(v string)` + +SetCardAddressZip sets CardAddressZip field to given value. + + +### GetCardCountry + +`func (o *PaymentMethodRequest) GetCardCountry() string` + +GetCardCountry returns the CardCountry field if non-nil, zero value otherwise. + +### GetCardCountryOk + +`func (o *PaymentMethodRequest) GetCardCountryOk() (*string, bool)` + +GetCardCountryOk returns a tuple with the CardCountry field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardCountry + +`func (o *PaymentMethodRequest) SetCardCountry(v string)` + +SetCardCountry sets CardCountry field to given value. + + +### GetCardAddressLine1 + +`func (o *PaymentMethodRequest) GetCardAddressLine1() string` + +GetCardAddressLine1 returns the CardAddressLine1 field if non-nil, zero value otherwise. + +### GetCardAddressLine1Ok + +`func (o *PaymentMethodRequest) GetCardAddressLine1Ok() (*string, bool)` + +GetCardAddressLine1Ok returns a tuple with the CardAddressLine1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardAddressLine1 + +`func (o *PaymentMethodRequest) SetCardAddressLine1(v string)` + +SetCardAddressLine1 sets CardAddressLine1 field to given value. + +### HasCardAddressLine1 + +`func (o *PaymentMethodRequest) HasCardAddressLine1() bool` + +HasCardAddressLine1 returns a boolean if a field has been set. + +### GetCardAddressLine2 + +`func (o *PaymentMethodRequest) GetCardAddressLine2() string` + +GetCardAddressLine2 returns the CardAddressLine2 field if non-nil, zero value otherwise. + +### GetCardAddressLine2Ok + +`func (o *PaymentMethodRequest) GetCardAddressLine2Ok() (*string, bool)` + +GetCardAddressLine2Ok returns a tuple with the CardAddressLine2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardAddressLine2 + +`func (o *PaymentMethodRequest) SetCardAddressLine2(v string)` + +SetCardAddressLine2 sets CardAddressLine2 field to given value. + +### HasCardAddressLine2 + +`func (o *PaymentMethodRequest) HasCardAddressLine2() bool` + +HasCardAddressLine2 returns a boolean if a field has been set. + +### GetStripeToken + +`func (o *PaymentMethodRequest) GetStripeToken() string` + +GetStripeToken returns the StripeToken field if non-nil, zero value otherwise. + +### GetStripeTokenOk + +`func (o *PaymentMethodRequest) GetStripeTokenOk() (*string, bool)` + +GetStripeTokenOk returns a tuple with the StripeToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStripeToken + +`func (o *PaymentMethodRequest) SetStripeToken(v string)` + +SetStripeToken sets StripeToken field to given value. + + +### GetCardId + +`func (o *PaymentMethodRequest) GetCardId() string` + +GetCardId returns the CardId field if non-nil, zero value otherwise. + +### GetCardIdOk + +`func (o *PaymentMethodRequest) GetCardIdOk() (*string, bool)` + +GetCardIdOk returns a tuple with the CardId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCardId + +`func (o *PaymentMethodRequest) SetCardId(v string)` + +SetCardId sets CardId field to given value. + + +### GetIsDefault + +`func (o *PaymentMethodRequest) GetIsDefault() bool` + +GetIsDefault returns the IsDefault field if non-nil, zero value otherwise. + +### GetIsDefaultOk + +`func (o *PaymentMethodRequest) GetIsDefaultOk() (*bool, bool)` + +GetIsDefaultOk returns a tuple with the IsDefault field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsDefault + +`func (o *PaymentMethodRequest) SetIsDefault(v bool)` + +SetIsDefault sets IsDefault field to given value. + +### HasIsDefault + +`func (o *PaymentMethodRequest) HasIsDefault() bool` + +HasIsDefault returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Platform.md b/azion-api/docs/Platform.md new file mode 100644 index 0000000..2569304 --- /dev/null +++ b/azion-api/docs/Platform.md @@ -0,0 +1,114 @@ +# Platform + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**InstallationUrl** | **string** | | +**CallbackUrl** | **string** | | + +## Methods + +### NewPlatform + +`func NewPlatform(id string, name string, installationUrl string, callbackUrl string, ) *Platform` + +NewPlatform instantiates a new Platform object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPlatformWithDefaults + +`func NewPlatformWithDefaults() *Platform` + +NewPlatformWithDefaults instantiates a new Platform object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Platform) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Platform) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Platform) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Platform) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Platform) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Platform) SetName(v string)` + +SetName sets Name field to given value. + + +### GetInstallationUrl + +`func (o *Platform) GetInstallationUrl() string` + +GetInstallationUrl returns the InstallationUrl field if non-nil, zero value otherwise. + +### GetInstallationUrlOk + +`func (o *Platform) GetInstallationUrlOk() (*string, bool)` + +GetInstallationUrlOk returns a tuple with the InstallationUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstallationUrl + +`func (o *Platform) SetInstallationUrl(v string)` + +SetInstallationUrl sets InstallationUrl field to given value. + + +### GetCallbackUrl + +`func (o *Platform) GetCallbackUrl() string` + +GetCallbackUrl returns the CallbackUrl field if non-nil, zero value otherwise. + +### GetCallbackUrlOk + +`func (o *Platform) GetCallbackUrlOk() (*string, bool)` + +GetCallbackUrlOk returns a tuple with the CallbackUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCallbackUrl + +`func (o *Platform) SetCallbackUrl(v string)` + +SetCallbackUrl sets CallbackUrl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Policy.md b/azion-api/docs/Policy.md new file mode 100644 index 0000000..7d6a1d9 --- /dev/null +++ b/azion-api/docs/Policy.md @@ -0,0 +1,156 @@ +# Policy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | **bool** | | +**Rules** | [**[]PolicyRule**](PolicyRule.md) | | + +## Methods + +### NewPolicy + +`func NewPolicy(id int64, name string, lastEditor string, lastModified time.Time, active bool, rules []PolicyRule, ) *Policy` + +NewPolicy instantiates a new Policy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyWithDefaults + +`func NewPolicyWithDefaults() *Policy` + +NewPolicyWithDefaults instantiates a new Policy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Policy) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Policy) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Policy) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Policy) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Policy) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Policy) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *Policy) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Policy) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Policy) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Policy) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Policy) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Policy) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *Policy) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Policy) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Policy) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetRules + +`func (o *Policy) GetRules() []PolicyRule` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *Policy) GetRulesOk() (*[]PolicyRule, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *Policy) SetRules(v []PolicyRule)` + +SetRules sets Rules field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicyLockoutPolicyAPI.md b/azion-api/docs/PolicyLockoutPolicyAPI.md new file mode 100644 index 0000000..e0bcae8 --- /dev/null +++ b/azion-api/docs/PolicyLockoutPolicyAPI.md @@ -0,0 +1,142 @@ +# \PolicyLockoutPolicyAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveLockoutPolicy**](PolicyLockoutPolicyAPI.md#RetrieveLockoutPolicy) | **Get** /auth/policies/lockout | Get Lockout Policy +[**UpdateLockoutPolicy**](PolicyLockoutPolicyAPI.md#UpdateLockoutPolicy) | **Put** /auth/policies/lockout | Put Lockout Policy + + + +## RetrieveLockoutPolicy + +> LockoutPolicyResponse RetrieveLockoutPolicy(ctx).Fields(fields).Execute() + +Get Lockout Policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyLockoutPolicyAPI.RetrieveLockoutPolicy(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyLockoutPolicyAPI.RetrieveLockoutPolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveLockoutPolicy`: LockoutPolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyLockoutPolicyAPI.RetrieveLockoutPolicy`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveLockoutPolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**LockoutPolicyResponse**](LockoutPolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateLockoutPolicy + +> LockoutPolicyResponse UpdateLockoutPolicy(ctx).LockoutPolicyRequest(lockoutPolicyRequest).Execute() + +Put Lockout Policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + lockoutPolicyRequest := *openapiclient.NewLockoutPolicyRequest(false, int64(123), int64(123)) // LockoutPolicyRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyLockoutPolicyAPI.UpdateLockoutPolicy(context.Background()).LockoutPolicyRequest(lockoutPolicyRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyLockoutPolicyAPI.UpdateLockoutPolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateLockoutPolicy`: LockoutPolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyLockoutPolicyAPI.UpdateLockoutPolicy`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateLockoutPolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **lockoutPolicyRequest** | [**LockoutPolicyRequest**](LockoutPolicyRequest.md) | | + +### Return type + +[**LockoutPolicyResponse**](LockoutPolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/PolicyPoliciesAPI.md b/azion-api/docs/PolicyPoliciesAPI.md new file mode 100644 index 0000000..e7b1bb3 --- /dev/null +++ b/azion-api/docs/PolicyPoliciesAPI.md @@ -0,0 +1,440 @@ +# \PolicyPoliciesAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePolicy**](PolicyPoliciesAPI.md#CreatePolicy) | **Post** /auth/policies | Create a new policy +[**DeletePolicy**](PolicyPoliciesAPI.md#DeletePolicy) | **Delete** /auth/policies/{policy_id} | Delete a policy +[**ListPolicy**](PolicyPoliciesAPI.md#ListPolicy) | **Get** /auth/policies | List of account policies +[**PartialUpdatePolicy**](PolicyPoliciesAPI.md#PartialUpdatePolicy) | **Patch** /auth/policies/{policy_id} | Partially update a policy +[**RetrievePolicy**](PolicyPoliciesAPI.md#RetrievePolicy) | **Get** /auth/policies/{policy_id} | Retrieve details from a policy +[**UpdatePolicy**](PolicyPoliciesAPI.md#UpdatePolicy) | **Put** /auth/policies/{policy_id} | Update a policy + + + +## CreatePolicy + +> PolicyResponse CreatePolicy(ctx).PolicyRequest(policyRequest).Execute() + +Create a new policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + policyRequest := *openapiclient.NewPolicyRequest("Name_example", false, []openapiclient.PolicyRuleRequest{*openapiclient.NewPolicyRuleRequest("Name_example", "Effect_example", "Resource_example", []string{"Actions_example"}, *openapiclient.NewPolicyRuleConditionRequest([]string{"IpAddress_example"}))}) // PolicyRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyPoliciesAPI.CreatePolicy(context.Background()).PolicyRequest(policyRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyPoliciesAPI.CreatePolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreatePolicy`: PolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyPoliciesAPI.CreatePolicy`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreatePolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **policyRequest** | [**PolicyRequest**](PolicyRequest.md) | | + +### Return type + +[**PolicyResponse**](PolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeletePolicy + +> DeleteResponse DeletePolicy(ctx, policyId).Execute() + +Delete a policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + policyId := int64(789) // int64 | A unique integer value identifying the policy. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyPoliciesAPI.DeletePolicy(context.Background(), policyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyPoliciesAPI.DeletePolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeletePolicy`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyPoliciesAPI.DeletePolicy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**policyId** | **int64** | A unique integer value identifying the policy. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeletePolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListPolicy + +> PaginatedPolicyList ListPolicy(ctx).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List of account policies + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyPoliciesAPI.ListPolicy(context.Background()).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyPoliciesAPI.ListPolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListPolicy`: PaginatedPolicyList + fmt.Fprintf(os.Stdout, "Response from `PolicyPoliciesAPI.ListPolicy`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListPolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedPolicyList**](PaginatedPolicyList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdatePolicy + +> PolicyResponse PartialUpdatePolicy(ctx, policyId).PatchedPolicyRequest(patchedPolicyRequest).Execute() + +Partially update a policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + policyId := int64(789) // int64 | A unique integer value identifying the policy. + patchedPolicyRequest := *openapiclient.NewPatchedPolicyRequest() // PatchedPolicyRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyPoliciesAPI.PartialUpdatePolicy(context.Background(), policyId).PatchedPolicyRequest(patchedPolicyRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyPoliciesAPI.PartialUpdatePolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdatePolicy`: PolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyPoliciesAPI.PartialUpdatePolicy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**policyId** | **int64** | A unique integer value identifying the policy. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdatePolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedPolicyRequest** | [**PatchedPolicyRequest**](PatchedPolicyRequest.md) | | + +### Return type + +[**PolicyResponse**](PolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrievePolicy + +> PolicyResponse RetrievePolicy(ctx, policyId).Fields(fields).Execute() + +Retrieve details from a policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + policyId := int64(789) // int64 | A unique integer value identifying the policy. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyPoliciesAPI.RetrievePolicy(context.Background(), policyId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyPoliciesAPI.RetrievePolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrievePolicy`: PolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyPoliciesAPI.RetrievePolicy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**policyId** | **int64** | A unique integer value identifying the policy. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrievePolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**PolicyResponse**](PolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePolicy + +> PolicyResponse UpdatePolicy(ctx, policyId).PolicyRequest(policyRequest).Execute() + +Update a policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + policyId := int64(789) // int64 | A unique integer value identifying the policy. + policyRequest := *openapiclient.NewPolicyRequest("Name_example", false, []openapiclient.PolicyRuleRequest{*openapiclient.NewPolicyRuleRequest("Name_example", "Effect_example", "Resource_example", []string{"Actions_example"}, *openapiclient.NewPolicyRuleConditionRequest([]string{"IpAddress_example"}))}) // PolicyRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicyPoliciesAPI.UpdatePolicy(context.Background(), policyId).PolicyRequest(policyRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicyPoliciesAPI.UpdatePolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdatePolicy`: PolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicyPoliciesAPI.UpdatePolicy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**policyId** | **int64** | A unique integer value identifying the policy. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **policyRequest** | [**PolicyRequest**](PolicyRequest.md) | | + +### Return type + +[**PolicyResponse**](PolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/PolicyRequest.md b/azion-api/docs/PolicyRequest.md new file mode 100644 index 0000000..7fbf0fa --- /dev/null +++ b/azion-api/docs/PolicyRequest.md @@ -0,0 +1,93 @@ +# PolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | **bool** | | +**Rules** | [**[]PolicyRuleRequest**](PolicyRuleRequest.md) | | + +## Methods + +### NewPolicyRequest + +`func NewPolicyRequest(name string, active bool, rules []PolicyRuleRequest, ) *PolicyRequest` + +NewPolicyRequest instantiates a new PolicyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyRequestWithDefaults + +`func NewPolicyRequestWithDefaults() *PolicyRequest` + +NewPolicyRequestWithDefaults instantiates a new PolicyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PolicyRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PolicyRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PolicyRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *PolicyRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *PolicyRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *PolicyRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetRules + +`func (o *PolicyRequest) GetRules() []PolicyRuleRequest` + +GetRules returns the Rules field if non-nil, zero value otherwise. + +### GetRulesOk + +`func (o *PolicyRequest) GetRulesOk() (*[]PolicyRuleRequest, bool)` + +GetRulesOk returns a tuple with the Rules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRules + +`func (o *PolicyRequest) SetRules(v []PolicyRuleRequest)` + +SetRules sets Rules field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicyResponse.md b/azion-api/docs/PolicyResponse.md new file mode 100644 index 0000000..b877d73 --- /dev/null +++ b/azion-api/docs/PolicyResponse.md @@ -0,0 +1,77 @@ +# PolicyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Policy**](Policy.md) | | + +## Methods + +### NewPolicyResponse + +`func NewPolicyResponse(data Policy, ) *PolicyResponse` + +NewPolicyResponse instantiates a new PolicyResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyResponseWithDefaults + +`func NewPolicyResponseWithDefaults() *PolicyResponse` + +NewPolicyResponseWithDefaults instantiates a new PolicyResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *PolicyResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *PolicyResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *PolicyResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *PolicyResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *PolicyResponse) GetData() Policy` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PolicyResponse) GetDataOk() (*Policy, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *PolicyResponse) SetData(v Policy)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicyRule.md b/azion-api/docs/PolicyRule.md new file mode 100644 index 0000000..8e13a7a --- /dev/null +++ b/azion-api/docs/PolicyRule.md @@ -0,0 +1,135 @@ +# PolicyRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Effect** | **string** | * `allow` - allow * `deny` - deny | +**Resource** | **string** | Resource pattern (regex supported) | +**Actions** | **[]string** | | +**Condition** | [**PolicyRuleCondition**](PolicyRuleCondition.md) | | + +## Methods + +### NewPolicyRule + +`func NewPolicyRule(name string, effect string, resource string, actions []string, condition PolicyRuleCondition, ) *PolicyRule` + +NewPolicyRule instantiates a new PolicyRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyRuleWithDefaults + +`func NewPolicyRuleWithDefaults() *PolicyRule` + +NewPolicyRuleWithDefaults instantiates a new PolicyRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PolicyRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PolicyRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PolicyRule) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEffect + +`func (o *PolicyRule) GetEffect() string` + +GetEffect returns the Effect field if non-nil, zero value otherwise. + +### GetEffectOk + +`func (o *PolicyRule) GetEffectOk() (*string, bool)` + +GetEffectOk returns a tuple with the Effect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEffect + +`func (o *PolicyRule) SetEffect(v string)` + +SetEffect sets Effect field to given value. + + +### GetResource + +`func (o *PolicyRule) GetResource() string` + +GetResource returns the Resource field if non-nil, zero value otherwise. + +### GetResourceOk + +`func (o *PolicyRule) GetResourceOk() (*string, bool)` + +GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResource + +`func (o *PolicyRule) SetResource(v string)` + +SetResource sets Resource field to given value. + + +### GetActions + +`func (o *PolicyRule) GetActions() []string` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *PolicyRule) GetActionsOk() (*[]string, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *PolicyRule) SetActions(v []string)` + +SetActions sets Actions field to given value. + + +### GetCondition + +`func (o *PolicyRule) GetCondition() PolicyRuleCondition` + +GetCondition returns the Condition field if non-nil, zero value otherwise. + +### GetConditionOk + +`func (o *PolicyRule) GetConditionOk() (*PolicyRuleCondition, bool)` + +GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCondition + +`func (o *PolicyRule) SetCondition(v PolicyRuleCondition)` + +SetCondition sets Condition field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicyRuleCondition.md b/azion-api/docs/PolicyRuleCondition.md new file mode 100644 index 0000000..5c98f03 --- /dev/null +++ b/azion-api/docs/PolicyRuleCondition.md @@ -0,0 +1,51 @@ +# PolicyRuleCondition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAddress** | **[]string** | | + +## Methods + +### NewPolicyRuleCondition + +`func NewPolicyRuleCondition(ipAddress []string, ) *PolicyRuleCondition` + +NewPolicyRuleCondition instantiates a new PolicyRuleCondition object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyRuleConditionWithDefaults + +`func NewPolicyRuleConditionWithDefaults() *PolicyRuleCondition` + +NewPolicyRuleConditionWithDefaults instantiates a new PolicyRuleCondition object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIpAddress + +`func (o *PolicyRuleCondition) GetIpAddress() []string` + +GetIpAddress returns the IpAddress field if non-nil, zero value otherwise. + +### GetIpAddressOk + +`func (o *PolicyRuleCondition) GetIpAddressOk() (*[]string, bool)` + +GetIpAddressOk returns a tuple with the IpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpAddress + +`func (o *PolicyRuleCondition) SetIpAddress(v []string)` + +SetIpAddress sets IpAddress field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicyRuleConditionRequest.md b/azion-api/docs/PolicyRuleConditionRequest.md new file mode 100644 index 0000000..5e49169 --- /dev/null +++ b/azion-api/docs/PolicyRuleConditionRequest.md @@ -0,0 +1,51 @@ +# PolicyRuleConditionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IpAddress** | **[]string** | | + +## Methods + +### NewPolicyRuleConditionRequest + +`func NewPolicyRuleConditionRequest(ipAddress []string, ) *PolicyRuleConditionRequest` + +NewPolicyRuleConditionRequest instantiates a new PolicyRuleConditionRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyRuleConditionRequestWithDefaults + +`func NewPolicyRuleConditionRequestWithDefaults() *PolicyRuleConditionRequest` + +NewPolicyRuleConditionRequestWithDefaults instantiates a new PolicyRuleConditionRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIpAddress + +`func (o *PolicyRuleConditionRequest) GetIpAddress() []string` + +GetIpAddress returns the IpAddress field if non-nil, zero value otherwise. + +### GetIpAddressOk + +`func (o *PolicyRuleConditionRequest) GetIpAddressOk() (*[]string, bool)` + +GetIpAddressOk returns a tuple with the IpAddress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIpAddress + +`func (o *PolicyRuleConditionRequest) SetIpAddress(v []string)` + +SetIpAddress sets IpAddress field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicyRuleRequest.md b/azion-api/docs/PolicyRuleRequest.md new file mode 100644 index 0000000..2d2b539 --- /dev/null +++ b/azion-api/docs/PolicyRuleRequest.md @@ -0,0 +1,135 @@ +# PolicyRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Effect** | **string** | * `allow` - allow * `deny` - deny | +**Resource** | **string** | Resource pattern (regex supported) | +**Actions** | **[]string** | | +**Condition** | [**PolicyRuleConditionRequest**](PolicyRuleConditionRequest.md) | | + +## Methods + +### NewPolicyRuleRequest + +`func NewPolicyRuleRequest(name string, effect string, resource string, actions []string, condition PolicyRuleConditionRequest, ) *PolicyRuleRequest` + +NewPolicyRuleRequest instantiates a new PolicyRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPolicyRuleRequestWithDefaults + +`func NewPolicyRuleRequestWithDefaults() *PolicyRuleRequest` + +NewPolicyRuleRequestWithDefaults instantiates a new PolicyRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *PolicyRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *PolicyRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *PolicyRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEffect + +`func (o *PolicyRuleRequest) GetEffect() string` + +GetEffect returns the Effect field if non-nil, zero value otherwise. + +### GetEffectOk + +`func (o *PolicyRuleRequest) GetEffectOk() (*string, bool)` + +GetEffectOk returns a tuple with the Effect field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEffect + +`func (o *PolicyRuleRequest) SetEffect(v string)` + +SetEffect sets Effect field to given value. + + +### GetResource + +`func (o *PolicyRuleRequest) GetResource() string` + +GetResource returns the Resource field if non-nil, zero value otherwise. + +### GetResourceOk + +`func (o *PolicyRuleRequest) GetResourceOk() (*string, bool)` + +GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResource + +`func (o *PolicyRuleRequest) SetResource(v string)` + +SetResource sets Resource field to given value. + + +### GetActions + +`func (o *PolicyRuleRequest) GetActions() []string` + +GetActions returns the Actions field if non-nil, zero value otherwise. + +### GetActionsOk + +`func (o *PolicyRuleRequest) GetActionsOk() (*[]string, bool)` + +GetActionsOk returns a tuple with the Actions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActions + +`func (o *PolicyRuleRequest) SetActions(v []string)` + +SetActions sets Actions field to given value. + + +### GetCondition + +`func (o *PolicyRuleRequest) GetCondition() PolicyRuleConditionRequest` + +GetCondition returns the Condition field if non-nil, zero value otherwise. + +### GetConditionOk + +`func (o *PolicyRuleRequest) GetConditionOk() (*PolicyRuleConditionRequest, bool)` + +GetConditionOk returns a tuple with the Condition field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCondition + +`func (o *PolicyRuleRequest) SetCondition(v PolicyRuleConditionRequest)` + +SetCondition sets Condition field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PolicySessionTimeoutPolicyAPI.md b/azion-api/docs/PolicySessionTimeoutPolicyAPI.md new file mode 100644 index 0000000..f81e133 --- /dev/null +++ b/azion-api/docs/PolicySessionTimeoutPolicyAPI.md @@ -0,0 +1,142 @@ +# \PolicySessionTimeoutPolicyAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveSessionTimeoutPolicy**](PolicySessionTimeoutPolicyAPI.md#RetrieveSessionTimeoutPolicy) | **Get** /auth/policies/session | Get Session Timeout Policy +[**UpdateSessionTimeoutPolicy**](PolicySessionTimeoutPolicyAPI.md#UpdateSessionTimeoutPolicy) | **Put** /auth/policies/session | Put Session Timeout Policy + + + +## RetrieveSessionTimeoutPolicy + +> SessionTimeoutPolicyResponse RetrieveSessionTimeoutPolicy(ctx).Fields(fields).Execute() + +Get Session Timeout Policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicySessionTimeoutPolicyAPI.RetrieveSessionTimeoutPolicy(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicySessionTimeoutPolicyAPI.RetrieveSessionTimeoutPolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveSessionTimeoutPolicy`: SessionTimeoutPolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicySessionTimeoutPolicyAPI.RetrieveSessionTimeoutPolicy`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveSessionTimeoutPolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**SessionTimeoutPolicyResponse**](SessionTimeoutPolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateSessionTimeoutPolicy + +> SessionTimeoutPolicyResponse UpdateSessionTimeoutPolicy(ctx).SessionTimeoutPolicyRequest(sessionTimeoutPolicyRequest).Execute() + +Put Session Timeout Policy + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + sessionTimeoutPolicyRequest := *openapiclient.NewSessionTimeoutPolicyRequest(int64(123), int64(123)) // SessionTimeoutPolicyRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PolicySessionTimeoutPolicyAPI.UpdateSessionTimeoutPolicy(context.Background()).SessionTimeoutPolicyRequest(sessionTimeoutPolicyRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PolicySessionTimeoutPolicyAPI.UpdateSessionTimeoutPolicy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateSessionTimeoutPolicy`: SessionTimeoutPolicyResponse + fmt.Fprintf(os.Stdout, "Response from `PolicySessionTimeoutPolicyAPI.UpdateSessionTimeoutPolicy`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateSessionTimeoutPolicyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sessionTimeoutPolicyRequest** | [**SessionTimeoutPolicyRequest**](SessionTimeoutPolicyRequest.md) | | + +### Return type + +[**SessionTimeoutPolicyResponse**](SessionTimeoutPolicyResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Protocols.md b/azion-api/docs/Protocols.md new file mode 100644 index 0000000..26abf48 --- /dev/null +++ b/azion-api/docs/Protocols.md @@ -0,0 +1,56 @@ +# Protocols + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Http** | Pointer to [**HttpProtocol**](HttpProtocol.md) | | [optional] + +## Methods + +### NewProtocols + +`func NewProtocols() *Protocols` + +NewProtocols instantiates a new Protocols object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewProtocolsWithDefaults + +`func NewProtocolsWithDefaults() *Protocols` + +NewProtocolsWithDefaults instantiates a new Protocols object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHttp + +`func (o *Protocols) GetHttp() HttpProtocol` + +GetHttp returns the Http field if non-nil, zero value otherwise. + +### GetHttpOk + +`func (o *Protocols) GetHttpOk() (*HttpProtocol, bool)` + +GetHttpOk returns a tuple with the Http field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttp + +`func (o *Protocols) SetHttp(v HttpProtocol)` + +SetHttp sets Http field to given value. + +### HasHttp + +`func (o *Protocols) HasHttp() bool` + +HasHttp returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ProtocolsRequest.md b/azion-api/docs/ProtocolsRequest.md new file mode 100644 index 0000000..1cf4f60 --- /dev/null +++ b/azion-api/docs/ProtocolsRequest.md @@ -0,0 +1,56 @@ +# ProtocolsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Http** | Pointer to [**HttpProtocolRequest**](HttpProtocolRequest.md) | | [optional] + +## Methods + +### NewProtocolsRequest + +`func NewProtocolsRequest() *ProtocolsRequest` + +NewProtocolsRequest instantiates a new ProtocolsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewProtocolsRequestWithDefaults + +`func NewProtocolsRequestWithDefaults() *ProtocolsRequest` + +NewProtocolsRequestWithDefaults instantiates a new ProtocolsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHttp + +`func (o *ProtocolsRequest) GetHttp() HttpProtocolRequest` + +GetHttp returns the Http field if non-nil, zero value otherwise. + +### GetHttpOk + +`func (o *ProtocolsRequest) GetHttpOk() (*HttpProtocolRequest, bool)` + +GetHttpOk returns a tuple with the Http field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHttp + +`func (o *ProtocolsRequest) SetHttp(v HttpProtocolRequest)` + +SetHttp sets Http field to given value. + +### HasHttp + +`func (o *ProtocolsRequest) HasHttp() bool` + +HasHttp returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Publisher.md b/azion-api/docs/Publisher.md new file mode 100644 index 0000000..242d6a4 --- /dev/null +++ b/azion-api/docs/Publisher.md @@ -0,0 +1,177 @@ +# Publisher + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Icon** | **string** | | +**OrganizationId** | **int64** | | +**Created** | **time.Time** | | +**LastModified** | **time.Time** | | +**LastEditor** | **string** | | +**Vendor** | **bool** | | + +## Methods + +### NewPublisher + +`func NewPublisher(id int64, icon string, organizationId int64, created time.Time, lastModified time.Time, lastEditor string, vendor bool, ) *Publisher` + +NewPublisher instantiates a new Publisher object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPublisherWithDefaults + +`func NewPublisherWithDefaults() *Publisher` + +NewPublisherWithDefaults instantiates a new Publisher object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Publisher) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Publisher) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Publisher) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetIcon + +`func (o *Publisher) GetIcon() string` + +GetIcon returns the Icon field if non-nil, zero value otherwise. + +### GetIconOk + +`func (o *Publisher) GetIconOk() (*string, bool)` + +GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIcon + +`func (o *Publisher) SetIcon(v string)` + +SetIcon sets Icon field to given value. + + +### GetOrganizationId + +`func (o *Publisher) GetOrganizationId() int64` + +GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. + +### GetOrganizationIdOk + +`func (o *Publisher) GetOrganizationIdOk() (*int64, bool)` + +GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrganizationId + +`func (o *Publisher) SetOrganizationId(v int64)` + +SetOrganizationId sets OrganizationId field to given value. + + +### GetCreated + +`func (o *Publisher) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Publisher) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Publisher) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastModified + +`func (o *Publisher) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Publisher) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Publisher) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetLastEditor + +`func (o *Publisher) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Publisher) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Publisher) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetVendor + +`func (o *Publisher) GetVendor() bool` + +GetVendor returns the Vendor field if non-nil, zero value otherwise. + +### GetVendorOk + +`func (o *Publisher) GetVendorOk() (*bool, bool)` + +GetVendorOk returns a tuple with the Vendor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVendor + +`func (o *Publisher) SetVendor(v bool)` + +SetVendor sets Vendor field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PublisherManagementAPI.md b/azion-api/docs/PublisherManagementAPI.md new file mode 100644 index 0000000..d0f7394 --- /dev/null +++ b/azion-api/docs/PublisherManagementAPI.md @@ -0,0 +1,142 @@ +# \PublisherManagementAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetPublisherDetails**](PublisherManagementAPI.md#GetPublisherDetails) | **Get** /marketplace/publisher | Get publisher details +[**UpdatePublisherDetails**](PublisherManagementAPI.md#UpdatePublisherDetails) | **Put** /marketplace/publisher | Update publisher details + + + +## GetPublisherDetails + +> ResponseRetrievePublisher GetPublisherDetails(ctx).Fields(fields).Execute() + +Get publisher details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PublisherManagementAPI.GetPublisherDetails(context.Background()).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublisherManagementAPI.GetPublisherDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GetPublisherDetails`: ResponseRetrievePublisher + fmt.Fprintf(os.Stdout, "Response from `PublisherManagementAPI.GetPublisherDetails`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetPublisherDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrievePublisher**](ResponseRetrievePublisher.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdatePublisherDetails + +> ResponsePublisher UpdatePublisherDetails(ctx).PublisherRequest(publisherRequest).Execute() + +Update publisher details + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + publisherRequest := *openapiclient.NewPublisherRequest("Icon_example") // PublisherRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PublisherManagementAPI.UpdatePublisherDetails(context.Background()).PublisherRequest(publisherRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PublisherManagementAPI.UpdatePublisherDetails``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdatePublisherDetails`: ResponsePublisher + fmt.Fprintf(os.Stdout, "Response from `PublisherManagementAPI.UpdatePublisherDetails`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdatePublisherDetailsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **publisherRequest** | [**PublisherRequest**](PublisherRequest.md) | | + +### Return type + +[**ResponsePublisher**](ResponsePublisher.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/PublisherRequest.md b/azion-api/docs/PublisherRequest.md new file mode 100644 index 0000000..51e0a9f --- /dev/null +++ b/azion-api/docs/PublisherRequest.md @@ -0,0 +1,51 @@ +# PublisherRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Icon** | **string** | | + +## Methods + +### NewPublisherRequest + +`func NewPublisherRequest(icon string, ) *PublisherRequest` + +NewPublisherRequest instantiates a new PublisherRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPublisherRequestWithDefaults + +`func NewPublisherRequestWithDefaults() *PublisherRequest` + +NewPublisherRequestWithDefaults instantiates a new PublisherRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetIcon + +`func (o *PublisherRequest) GetIcon() string` + +GetIcon returns the Icon field if non-nil, zero value otherwise. + +### GetIconOk + +`func (o *PublisherRequest) GetIconOk() (*string, bool)` + +GetIconOk returns a tuple with the Icon field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIcon + +`func (o *PublisherRequest) SetIcon(v string)` + +SetIcon sets Icon field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Purge.md b/azion-api/docs/Purge.md new file mode 100644 index 0000000..a7c79f9 --- /dev/null +++ b/azion-api/docs/Purge.md @@ -0,0 +1,77 @@ +# Purge + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | **[]string** | | +**Layer** | Pointer to **string** | * `cache` - Cache * `tiered_cache` - Tiered Cache | [optional] + +## Methods + +### NewPurge + +`func NewPurge(items []string, ) *Purge` + +NewPurge instantiates a new Purge object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPurgeWithDefaults + +`func NewPurgeWithDefaults() *Purge` + +NewPurgeWithDefaults instantiates a new Purge object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *Purge) GetItems() []string` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *Purge) GetItemsOk() (*[]string, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *Purge) SetItems(v []string)` + +SetItems sets Items field to given value. + + +### GetLayer + +`func (o *Purge) GetLayer() string` + +GetLayer returns the Layer field if non-nil, zero value otherwise. + +### GetLayerOk + +`func (o *Purge) GetLayerOk() (*string, bool)` + +GetLayerOk returns a tuple with the Layer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLayer + +`func (o *Purge) SetLayer(v string)` + +SetLayer sets Layer field to given value. + +### HasLayer + +`func (o *Purge) HasLayer() bool` + +HasLayer returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PurgeAPI.md b/azion-api/docs/PurgeAPI.md new file mode 100644 index 0000000..1d1f1a4 --- /dev/null +++ b/azion-api/docs/PurgeAPI.md @@ -0,0 +1,81 @@ +# \PurgeAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatePurgeRequest**](PurgeAPI.md#CreatePurgeRequest) | **Post** /workspace/purge/{purge_type} | Create a Purge Request + + + +## CreatePurgeRequest + +> PurgeResponse CreatePurgeRequest(ctx, purgeType).PurgeRequest(purgeRequest).Execute() + +Create a Purge Request + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + purgeType := "purgeType_example" // string | type of purge: URL, Wildcard or Cachekey + purgeRequest := *openapiclient.NewPurgeRequest([]string{"Items_example"}) // PurgeRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.PurgeAPI.CreatePurgeRequest(context.Background(), purgeType).PurgeRequest(purgeRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `PurgeAPI.CreatePurgeRequest``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreatePurgeRequest`: PurgeResponse + fmt.Fprintf(os.Stdout, "Response from `PurgeAPI.CreatePurgeRequest`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**purgeType** | **string** | type of purge: URL, Wildcard or Cachekey | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreatePurgeRequestRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **purgeRequest** | [**PurgeRequest**](PurgeRequest.md) | | + +### Return type + +[**PurgeResponse**](PurgeResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/PurgeRequest.md b/azion-api/docs/PurgeRequest.md new file mode 100644 index 0000000..af9da43 --- /dev/null +++ b/azion-api/docs/PurgeRequest.md @@ -0,0 +1,77 @@ +# PurgeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | **[]string** | | +**Layer** | Pointer to **string** | * `cache` - Cache * `tiered_cache` - Tiered Cache | [optional] + +## Methods + +### NewPurgeRequest + +`func NewPurgeRequest(items []string, ) *PurgeRequest` + +NewPurgeRequest instantiates a new PurgeRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPurgeRequestWithDefaults + +`func NewPurgeRequestWithDefaults() *PurgeRequest` + +NewPurgeRequestWithDefaults instantiates a new PurgeRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *PurgeRequest) GetItems() []string` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *PurgeRequest) GetItemsOk() (*[]string, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *PurgeRequest) SetItems(v []string)` + +SetItems sets Items field to given value. + + +### GetLayer + +`func (o *PurgeRequest) GetLayer() string` + +GetLayer returns the Layer field if non-nil, zero value otherwise. + +### GetLayerOk + +`func (o *PurgeRequest) GetLayerOk() (*string, bool)` + +GetLayerOk returns a tuple with the Layer field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLayer + +`func (o *PurgeRequest) SetLayer(v string)` + +SetLayer sets Layer field to given value. + +### HasLayer + +`func (o *PurgeRequest) HasLayer() bool` + +HasLayer returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/PurgeResponse.md b/azion-api/docs/PurgeResponse.md new file mode 100644 index 0000000..2d44e34 --- /dev/null +++ b/azion-api/docs/PurgeResponse.md @@ -0,0 +1,77 @@ +# PurgeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Purge**](Purge.md) | | + +## Methods + +### NewPurgeResponse + +`func NewPurgeResponse(data Purge, ) *PurgeResponse` + +NewPurgeResponse instantiates a new PurgeResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewPurgeResponseWithDefaults + +`func NewPurgeResponseWithDefaults() *PurgeResponse` + +NewPurgeResponseWithDefaults instantiates a new PurgeResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *PurgeResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *PurgeResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *PurgeResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *PurgeResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *PurgeResponse) GetData() Purge` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *PurgeResponse) GetDataOk() (*Purge, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *PurgeResponse) SetData(v Purge)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/QRadarEndpoint.md b/azion-api/docs/QRadarEndpoint.md new file mode 100644 index 0000000..c37ba2b --- /dev/null +++ b/azion-api/docs/QRadarEndpoint.md @@ -0,0 +1,72 @@ +# QRadarEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**Type** | **string** | Type identifier for this endpoint (qradar) | + +## Methods + +### NewQRadarEndpoint + +`func NewQRadarEndpoint(url string, type_ string, ) *QRadarEndpoint` + +NewQRadarEndpoint instantiates a new QRadarEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQRadarEndpointWithDefaults + +`func NewQRadarEndpointWithDefaults() *QRadarEndpoint` + +NewQRadarEndpointWithDefaults instantiates a new QRadarEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *QRadarEndpoint) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *QRadarEndpoint) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *QRadarEndpoint) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetType + +`func (o *QRadarEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *QRadarEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *QRadarEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/QRadarEndpointRequest.md b/azion-api/docs/QRadarEndpointRequest.md new file mode 100644 index 0000000..3fed665 --- /dev/null +++ b/azion-api/docs/QRadarEndpointRequest.md @@ -0,0 +1,72 @@ +# QRadarEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**Type** | **string** | Type identifier for this endpoint (qradar) | + +## Methods + +### NewQRadarEndpointRequest + +`func NewQRadarEndpointRequest(url string, type_ string, ) *QRadarEndpointRequest` + +NewQRadarEndpointRequest instantiates a new QRadarEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewQRadarEndpointRequestWithDefaults + +`func NewQRadarEndpointRequestWithDefaults() *QRadarEndpointRequest` + +NewQRadarEndpointRequestWithDefaults instantiates a new QRadarEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *QRadarEndpointRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *QRadarEndpointRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *QRadarEndpointRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetType + +`func (o *QRadarEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *QRadarEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *QRadarEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RecommendationRequest.md b/azion-api/docs/RecommendationRequest.md new file mode 100644 index 0000000..0a2b9ae --- /dev/null +++ b/azion-api/docs/RecommendationRequest.md @@ -0,0 +1,51 @@ +# RecommendationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DashboardId** | **int64** | | + +## Methods + +### NewRecommendationRequest + +`func NewRecommendationRequest(dashboardId int64, ) *RecommendationRequest` + +NewRecommendationRequest instantiates a new RecommendationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRecommendationRequestWithDefaults + +`func NewRecommendationRequestWithDefaults() *RecommendationRequest` + +NewRecommendationRequestWithDefaults instantiates a new RecommendationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDashboardId + +`func (o *RecommendationRequest) GetDashboardId() int64` + +GetDashboardId returns the DashboardId field if non-nil, zero value otherwise. + +### GetDashboardIdOk + +`func (o *RecommendationRequest) GetDashboardIdOk() (*int64, bool)` + +GetDashboardIdOk returns a tuple with the DashboardId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDashboardId + +`func (o *RecommendationRequest) SetDashboardId(v int64)` + +SetDashboardId sets DashboardId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Record.md b/azion-api/docs/Record.md new file mode 100644 index 0000000..828d811 --- /dev/null +++ b/azion-api/docs/Record.md @@ -0,0 +1,218 @@ +# Record + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Description** | Pointer to **string** | | [optional] +**Name** | **string** | | +**Ttl** | Pointer to **int64** | | [optional] +**Type** | **string** | * `A` - A * `AAAA` - AAAA * `ANAME` - ANAME * `CNAME` - CNAME * `MX` - MX * `NS` - NS * `PTR` - PTR * `SRV` - SRV * `TXT` - TXT * `CAA` - CAA * `DS` - DS | +**Rdata** | **[]string** | | +**Policy** | Pointer to **string** | * `simple` - simple * `weighted` - weighted | [optional] +**Weight** | Pointer to **int64** | | [optional] + +## Methods + +### NewRecord + +`func NewRecord(id int64, name string, type_ string, rdata []string, ) *Record` + +NewRecord instantiates a new Record object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRecordWithDefaults + +`func NewRecordWithDefaults() *Record` + +NewRecordWithDefaults instantiates a new Record object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Record) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Record) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Record) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetDescription + +`func (o *Record) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Record) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Record) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Record) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *Record) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Record) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Record) SetName(v string)` + +SetName sets Name field to given value. + + +### GetTtl + +`func (o *Record) GetTtl() int64` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *Record) GetTtlOk() (*int64, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *Record) SetTtl(v int64)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *Record) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetType + +`func (o *Record) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Record) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Record) SetType(v string)` + +SetType sets Type field to given value. + + +### GetRdata + +`func (o *Record) GetRdata() []string` + +GetRdata returns the Rdata field if non-nil, zero value otherwise. + +### GetRdataOk + +`func (o *Record) GetRdataOk() (*[]string, bool)` + +GetRdataOk returns a tuple with the Rdata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRdata + +`func (o *Record) SetRdata(v []string)` + +SetRdata sets Rdata field to given value. + + +### GetPolicy + +`func (o *Record) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *Record) GetPolicyOk() (*string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *Record) SetPolicy(v string)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *Record) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetWeight + +`func (o *Record) GetWeight() int64` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *Record) GetWeightOk() (*int64, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *Record) SetWeight(v int64)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *Record) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RecordRequest.md b/azion-api/docs/RecordRequest.md new file mode 100644 index 0000000..a2f0214 --- /dev/null +++ b/azion-api/docs/RecordRequest.md @@ -0,0 +1,197 @@ +# RecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | Pointer to **string** | | [optional] +**Name** | **string** | | +**Ttl** | Pointer to **int64** | | [optional] +**Type** | **string** | * `A` - A * `AAAA` - AAAA * `ANAME` - ANAME * `CNAME` - CNAME * `MX` - MX * `NS` - NS * `PTR` - PTR * `SRV` - SRV * `TXT` - TXT * `CAA` - CAA * `DS` - DS | +**Rdata** | **[]string** | | +**Policy** | Pointer to **string** | * `simple` - simple * `weighted` - weighted | [optional] +**Weight** | Pointer to **int64** | | [optional] + +## Methods + +### NewRecordRequest + +`func NewRecordRequest(name string, type_ string, rdata []string, ) *RecordRequest` + +NewRecordRequest instantiates a new RecordRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRecordRequestWithDefaults + +`func NewRecordRequestWithDefaults() *RecordRequest` + +NewRecordRequestWithDefaults instantiates a new RecordRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *RecordRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RecordRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RecordRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RecordRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetName + +`func (o *RecordRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RecordRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RecordRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetTtl + +`func (o *RecordRequest) GetTtl() int64` + +GetTtl returns the Ttl field if non-nil, zero value otherwise. + +### GetTtlOk + +`func (o *RecordRequest) GetTtlOk() (*int64, bool)` + +GetTtlOk returns a tuple with the Ttl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTtl + +`func (o *RecordRequest) SetTtl(v int64)` + +SetTtl sets Ttl field to given value. + +### HasTtl + +`func (o *RecordRequest) HasTtl() bool` + +HasTtl returns a boolean if a field has been set. + +### GetType + +`func (o *RecordRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RecordRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RecordRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetRdata + +`func (o *RecordRequest) GetRdata() []string` + +GetRdata returns the Rdata field if non-nil, zero value otherwise. + +### GetRdataOk + +`func (o *RecordRequest) GetRdataOk() (*[]string, bool)` + +GetRdataOk returns a tuple with the Rdata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRdata + +`func (o *RecordRequest) SetRdata(v []string)` + +SetRdata sets Rdata field to given value. + + +### GetPolicy + +`func (o *RecordRequest) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *RecordRequest) GetPolicyOk() (*string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicy + +`func (o *RecordRequest) SetPolicy(v string)` + +SetPolicy sets Policy field to given value. + +### HasPolicy + +`func (o *RecordRequest) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### GetWeight + +`func (o *RecordRequest) GetWeight() int64` + +GetWeight returns the Weight field if non-nil, zero value otherwise. + +### GetWeightOk + +`func (o *RecordRequest) GetWeightOk() (*int64, bool)` + +GetWeightOk returns a tuple with the Weight field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWeight + +`func (o *RecordRequest) SetWeight(v int64)` + +SetWeight sets Weight field to given value. + +### HasWeight + +`func (o *RecordRequest) HasWeight() bool` + +HasWeight returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RecordResponse.md b/azion-api/docs/RecordResponse.md new file mode 100644 index 0000000..ffa88f2 --- /dev/null +++ b/azion-api/docs/RecordResponse.md @@ -0,0 +1,77 @@ +# RecordResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Record**](Record.md) | | + +## Methods + +### NewRecordResponse + +`func NewRecordResponse(data Record, ) *RecordResponse` + +NewRecordResponse instantiates a new RecordResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRecordResponseWithDefaults + +`func NewRecordResponseWithDefaults() *RecordResponse` + +NewRecordResponseWithDefaults instantiates a new RecordResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *RecordResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *RecordResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *RecordResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *RecordResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *RecordResponse) GetData() Record` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RecordResponse) GetDataOk() (*Record, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RecordResponse) SetData(v Record)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Report.md b/azion-api/docs/Report.md new file mode 100644 index 0000000..931e9b3 --- /dev/null +++ b/azion-api/docs/Report.md @@ -0,0 +1,338 @@ +# Report + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Description** | **string** | | +**Type** | **string** | * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. | +**XAxis** | Pointer to **string** | | [optional] +**AggregationType** | **string** | * `avg` - Aggregation by average. * `sum` - Aggregation by sum. | +**DataUnit** | **string** | * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. | +**Queries** | [**[]BaseQuery**](BaseQuery.md) | | +**Order** | **string** | | +**Name** | **string** | | +**Rotated** | Pointer to **bool** | | [optional] +**ComparisonType** | Pointer to **string** | * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. | [optional] +**HelpCenterPath** | Pointer to **NullableString** | | [optional] +**Library** | Pointer to **bool** | | [optional] + +## Methods + +### NewReport + +`func NewReport(id int64, description string, type_ string, aggregationType string, dataUnit string, queries []BaseQuery, order string, name string, ) *Report` + +NewReport instantiates a new Report object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportWithDefaults + +`func NewReportWithDefaults() *Report` + +NewReportWithDefaults instantiates a new Report object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Report) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Report) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Report) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetDescription + +`func (o *Report) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Report) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Report) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *Report) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Report) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Report) SetType(v string)` + +SetType sets Type field to given value. + + +### GetXAxis + +`func (o *Report) GetXAxis() string` + +GetXAxis returns the XAxis field if non-nil, zero value otherwise. + +### GetXAxisOk + +`func (o *Report) GetXAxisOk() (*string, bool)` + +GetXAxisOk returns a tuple with the XAxis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXAxis + +`func (o *Report) SetXAxis(v string)` + +SetXAxis sets XAxis field to given value. + +### HasXAxis + +`func (o *Report) HasXAxis() bool` + +HasXAxis returns a boolean if a field has been set. + +### GetAggregationType + +`func (o *Report) GetAggregationType() string` + +GetAggregationType returns the AggregationType field if non-nil, zero value otherwise. + +### GetAggregationTypeOk + +`func (o *Report) GetAggregationTypeOk() (*string, bool)` + +GetAggregationTypeOk returns a tuple with the AggregationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregationType + +`func (o *Report) SetAggregationType(v string)` + +SetAggregationType sets AggregationType field to given value. + + +### GetDataUnit + +`func (o *Report) GetDataUnit() string` + +GetDataUnit returns the DataUnit field if non-nil, zero value otherwise. + +### GetDataUnitOk + +`func (o *Report) GetDataUnitOk() (*string, bool)` + +GetDataUnitOk returns a tuple with the DataUnit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataUnit + +`func (o *Report) SetDataUnit(v string)` + +SetDataUnit sets DataUnit field to given value. + + +### GetQueries + +`func (o *Report) GetQueries() []BaseQuery` + +GetQueries returns the Queries field if non-nil, zero value otherwise. + +### GetQueriesOk + +`func (o *Report) GetQueriesOk() (*[]BaseQuery, bool)` + +GetQueriesOk returns a tuple with the Queries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueries + +`func (o *Report) SetQueries(v []BaseQuery)` + +SetQueries sets Queries field to given value. + + +### GetOrder + +`func (o *Report) GetOrder() string` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *Report) GetOrderOk() (*string, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *Report) SetOrder(v string)` + +SetOrder sets Order field to given value. + + +### GetName + +`func (o *Report) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Report) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Report) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRotated + +`func (o *Report) GetRotated() bool` + +GetRotated returns the Rotated field if non-nil, zero value otherwise. + +### GetRotatedOk + +`func (o *Report) GetRotatedOk() (*bool, bool)` + +GetRotatedOk returns a tuple with the Rotated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRotated + +`func (o *Report) SetRotated(v bool)` + +SetRotated sets Rotated field to given value. + +### HasRotated + +`func (o *Report) HasRotated() bool` + +HasRotated returns a boolean if a field has been set. + +### GetComparisonType + +`func (o *Report) GetComparisonType() string` + +GetComparisonType returns the ComparisonType field if non-nil, zero value otherwise. + +### GetComparisonTypeOk + +`func (o *Report) GetComparisonTypeOk() (*string, bool)` + +GetComparisonTypeOk returns a tuple with the ComparisonType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComparisonType + +`func (o *Report) SetComparisonType(v string)` + +SetComparisonType sets ComparisonType field to given value. + +### HasComparisonType + +`func (o *Report) HasComparisonType() bool` + +HasComparisonType returns a boolean if a field has been set. + +### GetHelpCenterPath + +`func (o *Report) GetHelpCenterPath() string` + +GetHelpCenterPath returns the HelpCenterPath field if non-nil, zero value otherwise. + +### GetHelpCenterPathOk + +`func (o *Report) GetHelpCenterPathOk() (*string, bool)` + +GetHelpCenterPathOk returns a tuple with the HelpCenterPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHelpCenterPath + +`func (o *Report) SetHelpCenterPath(v string)` + +SetHelpCenterPath sets HelpCenterPath field to given value. + +### HasHelpCenterPath + +`func (o *Report) HasHelpCenterPath() bool` + +HasHelpCenterPath returns a boolean if a field has been set. + +### SetHelpCenterPathNil + +`func (o *Report) SetHelpCenterPathNil(b bool)` + + SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil + +### UnsetHelpCenterPath +`func (o *Report) UnsetHelpCenterPath()` + +UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +### GetLibrary + +`func (o *Report) GetLibrary() bool` + +GetLibrary returns the Library field if non-nil, zero value otherwise. + +### GetLibraryOk + +`func (o *Report) GetLibraryOk() (*bool, bool)` + +GetLibraryOk returns a tuple with the Library field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibrary + +`func (o *Report) SetLibrary(v bool)` + +SetLibrary sets Library field to given value. + +### HasLibrary + +`func (o *Report) HasLibrary() bool` + +HasLibrary returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ReportRequest.md b/azion-api/docs/ReportRequest.md new file mode 100644 index 0000000..3c0a629 --- /dev/null +++ b/azion-api/docs/ReportRequest.md @@ -0,0 +1,317 @@ +# ReportRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | | +**Type** | **string** | * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. | +**XAxis** | Pointer to **string** | | [optional] +**AggregationType** | **string** | * `avg` - Aggregation by average. * `sum` - Aggregation by sum. | +**DataUnit** | **string** | * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. | +**Queries** | [**[]BaseQueryRequest**](BaseQueryRequest.md) | | +**Columns** | **int64** | | +**Name** | **string** | | +**Rotated** | Pointer to **bool** | | [optional] +**ComparisonType** | Pointer to **string** | * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. | [optional] +**HelpCenterPath** | Pointer to **NullableString** | | [optional] +**Library** | Pointer to **bool** | | [optional] + +## Methods + +### NewReportRequest + +`func NewReportRequest(description string, type_ string, aggregationType string, dataUnit string, queries []BaseQueryRequest, columns int64, name string, ) *ReportRequest` + +NewReportRequest instantiates a new ReportRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewReportRequestWithDefaults + +`func NewReportRequestWithDefaults() *ReportRequest` + +NewReportRequestWithDefaults instantiates a new ReportRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDescription + +`func (o *ReportRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ReportRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ReportRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *ReportRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ReportRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ReportRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetXAxis + +`func (o *ReportRequest) GetXAxis() string` + +GetXAxis returns the XAxis field if non-nil, zero value otherwise. + +### GetXAxisOk + +`func (o *ReportRequest) GetXAxisOk() (*string, bool)` + +GetXAxisOk returns a tuple with the XAxis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXAxis + +`func (o *ReportRequest) SetXAxis(v string)` + +SetXAxis sets XAxis field to given value. + +### HasXAxis + +`func (o *ReportRequest) HasXAxis() bool` + +HasXAxis returns a boolean if a field has been set. + +### GetAggregationType + +`func (o *ReportRequest) GetAggregationType() string` + +GetAggregationType returns the AggregationType field if non-nil, zero value otherwise. + +### GetAggregationTypeOk + +`func (o *ReportRequest) GetAggregationTypeOk() (*string, bool)` + +GetAggregationTypeOk returns a tuple with the AggregationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregationType + +`func (o *ReportRequest) SetAggregationType(v string)` + +SetAggregationType sets AggregationType field to given value. + + +### GetDataUnit + +`func (o *ReportRequest) GetDataUnit() string` + +GetDataUnit returns the DataUnit field if non-nil, zero value otherwise. + +### GetDataUnitOk + +`func (o *ReportRequest) GetDataUnitOk() (*string, bool)` + +GetDataUnitOk returns a tuple with the DataUnit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataUnit + +`func (o *ReportRequest) SetDataUnit(v string)` + +SetDataUnit sets DataUnit field to given value. + + +### GetQueries + +`func (o *ReportRequest) GetQueries() []BaseQueryRequest` + +GetQueries returns the Queries field if non-nil, zero value otherwise. + +### GetQueriesOk + +`func (o *ReportRequest) GetQueriesOk() (*[]BaseQueryRequest, bool)` + +GetQueriesOk returns a tuple with the Queries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueries + +`func (o *ReportRequest) SetQueries(v []BaseQueryRequest)` + +SetQueries sets Queries field to given value. + + +### GetColumns + +`func (o *ReportRequest) GetColumns() int64` + +GetColumns returns the Columns field if non-nil, zero value otherwise. + +### GetColumnsOk + +`func (o *ReportRequest) GetColumnsOk() (*int64, bool)` + +GetColumnsOk returns a tuple with the Columns field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetColumns + +`func (o *ReportRequest) SetColumns(v int64)` + +SetColumns sets Columns field to given value. + + +### GetName + +`func (o *ReportRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ReportRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ReportRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRotated + +`func (o *ReportRequest) GetRotated() bool` + +GetRotated returns the Rotated field if non-nil, zero value otherwise. + +### GetRotatedOk + +`func (o *ReportRequest) GetRotatedOk() (*bool, bool)` + +GetRotatedOk returns a tuple with the Rotated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRotated + +`func (o *ReportRequest) SetRotated(v bool)` + +SetRotated sets Rotated field to given value. + +### HasRotated + +`func (o *ReportRequest) HasRotated() bool` + +HasRotated returns a boolean if a field has been set. + +### GetComparisonType + +`func (o *ReportRequest) GetComparisonType() string` + +GetComparisonType returns the ComparisonType field if non-nil, zero value otherwise. + +### GetComparisonTypeOk + +`func (o *ReportRequest) GetComparisonTypeOk() (*string, bool)` + +GetComparisonTypeOk returns a tuple with the ComparisonType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComparisonType + +`func (o *ReportRequest) SetComparisonType(v string)` + +SetComparisonType sets ComparisonType field to given value. + +### HasComparisonType + +`func (o *ReportRequest) HasComparisonType() bool` + +HasComparisonType returns a boolean if a field has been set. + +### GetHelpCenterPath + +`func (o *ReportRequest) GetHelpCenterPath() string` + +GetHelpCenterPath returns the HelpCenterPath field if non-nil, zero value otherwise. + +### GetHelpCenterPathOk + +`func (o *ReportRequest) GetHelpCenterPathOk() (*string, bool)` + +GetHelpCenterPathOk returns a tuple with the HelpCenterPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHelpCenterPath + +`func (o *ReportRequest) SetHelpCenterPath(v string)` + +SetHelpCenterPath sets HelpCenterPath field to given value. + +### HasHelpCenterPath + +`func (o *ReportRequest) HasHelpCenterPath() bool` + +HasHelpCenterPath returns a boolean if a field has been set. + +### SetHelpCenterPathNil + +`func (o *ReportRequest) SetHelpCenterPathNil(b bool)` + + SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil + +### UnsetHelpCenterPath +`func (o *ReportRequest) UnsetHelpCenterPath()` + +UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +### GetLibrary + +`func (o *ReportRequest) GetLibrary() bool` + +GetLibrary returns the Library field if non-nil, zero value otherwise. + +### GetLibraryOk + +`func (o *ReportRequest) GetLibraryOk() (*bool, bool)` + +GetLibraryOk returns a tuple with the Library field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibrary + +`func (o *ReportRequest) SetLibrary(v bool)` + +SetLibrary sets Library field to given value. + +### HasLibrary + +`func (o *ReportRequest) HasLibrary() bool` + +HasLibrary returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RequestPhaseBehavior.md b/azion-api/docs/RequestPhaseBehavior.md new file mode 100644 index 0000000..531c0b4 --- /dev/null +++ b/azion-api/docs/RequestPhaseBehavior.md @@ -0,0 +1,72 @@ +# RequestPhaseBehavior + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**BehaviorCaptureMatchGroupsAttributes**](BehaviorCaptureMatchGroupsAttributes.md) | | + +## Methods + +### NewRequestPhaseBehavior + +`func NewRequestPhaseBehavior(type_ string, attributes BehaviorCaptureMatchGroupsAttributes, ) *RequestPhaseBehavior` + +NewRequestPhaseBehavior instantiates a new RequestPhaseBehavior object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRequestPhaseBehaviorWithDefaults + +`func NewRequestPhaseBehaviorWithDefaults() *RequestPhaseBehavior` + +NewRequestPhaseBehaviorWithDefaults instantiates a new RequestPhaseBehavior object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RequestPhaseBehavior) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RequestPhaseBehavior) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RequestPhaseBehavior) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *RequestPhaseBehavior) GetAttributes() BehaviorCaptureMatchGroupsAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *RequestPhaseBehavior) GetAttributesOk() (*BehaviorCaptureMatchGroupsAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *RequestPhaseBehavior) SetAttributes(v BehaviorCaptureMatchGroupsAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RequestPhaseBehavior2.md b/azion-api/docs/RequestPhaseBehavior2.md new file mode 100644 index 0000000..105aebf --- /dev/null +++ b/azion-api/docs/RequestPhaseBehavior2.md @@ -0,0 +1,72 @@ +# RequestPhaseBehavior2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**BehaviorCaptureMatchGroupsAttributes**](BehaviorCaptureMatchGroupsAttributes.md) | | + +## Methods + +### NewRequestPhaseBehavior2 + +`func NewRequestPhaseBehavior2(type_ string, attributes BehaviorCaptureMatchGroupsAttributes, ) *RequestPhaseBehavior2` + +NewRequestPhaseBehavior2 instantiates a new RequestPhaseBehavior2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRequestPhaseBehavior2WithDefaults + +`func NewRequestPhaseBehavior2WithDefaults() *RequestPhaseBehavior2` + +NewRequestPhaseBehavior2WithDefaults instantiates a new RequestPhaseBehavior2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *RequestPhaseBehavior2) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *RequestPhaseBehavior2) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *RequestPhaseBehavior2) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *RequestPhaseBehavior2) GetAttributes() BehaviorCaptureMatchGroupsAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *RequestPhaseBehavior2) GetAttributesOk() (*BehaviorCaptureMatchGroupsAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *RequestPhaseBehavior2) SetAttributes(v BehaviorCaptureMatchGroupsAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RequestPhaseRule.md b/azion-api/docs/RequestPhaseRule.md new file mode 100644 index 0000000..a8d6438 --- /dev/null +++ b/azion-api/docs/RequestPhaseRule.md @@ -0,0 +1,249 @@ +# RequestPhaseRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Criteria** | [**[][]ApplicationCriterionField**]([]ApplicationCriterionField.md) | | +**Behaviors** | [**[]RequestPhaseBehavior**](RequestPhaseBehavior.md) | | +**Description** | Pointer to **string** | | [optional] +**Order** | **int64** | | +**LastEditor** | **NullableString** | | +**LastModified** | **NullableTime** | | + +## Methods + +### NewRequestPhaseRule + +`func NewRequestPhaseRule(id int64, name string, criteria [][]ApplicationCriterionField, behaviors []RequestPhaseBehavior, order int64, lastEditor NullableString, lastModified NullableTime, ) *RequestPhaseRule` + +NewRequestPhaseRule instantiates a new RequestPhaseRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRequestPhaseRuleWithDefaults + +`func NewRequestPhaseRuleWithDefaults() *RequestPhaseRule` + +NewRequestPhaseRuleWithDefaults instantiates a new RequestPhaseRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *RequestPhaseRule) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *RequestPhaseRule) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *RequestPhaseRule) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *RequestPhaseRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RequestPhaseRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RequestPhaseRule) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *RequestPhaseRule) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *RequestPhaseRule) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *RequestPhaseRule) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *RequestPhaseRule) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *RequestPhaseRule) GetCriteria() [][]ApplicationCriterionField` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *RequestPhaseRule) GetCriteriaOk() (*[][]ApplicationCriterionField, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *RequestPhaseRule) SetCriteria(v [][]ApplicationCriterionField)` + +SetCriteria sets Criteria field to given value. + + +### GetBehaviors + +`func (o *RequestPhaseRule) GetBehaviors() []RequestPhaseBehavior` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *RequestPhaseRule) GetBehaviorsOk() (*[]RequestPhaseBehavior, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *RequestPhaseRule) SetBehaviors(v []RequestPhaseBehavior)` + +SetBehaviors sets Behaviors field to given value. + + +### GetDescription + +`func (o *RequestPhaseRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RequestPhaseRule) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RequestPhaseRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RequestPhaseRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrder + +`func (o *RequestPhaseRule) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *RequestPhaseRule) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *RequestPhaseRule) SetOrder(v int64)` + +SetOrder sets Order field to given value. + + +### GetLastEditor + +`func (o *RequestPhaseRule) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *RequestPhaseRule) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *RequestPhaseRule) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### SetLastEditorNil + +`func (o *RequestPhaseRule) SetLastEditorNil(b bool)` + + SetLastEditorNil sets the value for LastEditor to be an explicit nil + +### UnsetLastEditor +`func (o *RequestPhaseRule) UnsetLastEditor()` + +UnsetLastEditor ensures that no value is present for LastEditor, not even an explicit nil +### GetLastModified + +`func (o *RequestPhaseRule) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *RequestPhaseRule) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *RequestPhaseRule) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### SetLastModifiedNil + +`func (o *RequestPhaseRule) SetLastModifiedNil(b bool)` + + SetLastModifiedNil sets the value for LastModified to be an explicit nil + +### UnsetLastModified +`func (o *RequestPhaseRule) UnsetLastModified()` + +UnsetLastModified ensures that no value is present for LastModified, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RequestPhaseRule2.md b/azion-api/docs/RequestPhaseRule2.md new file mode 100644 index 0000000..2ca7b43 --- /dev/null +++ b/azion-api/docs/RequestPhaseRule2.md @@ -0,0 +1,145 @@ +# RequestPhaseRule2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Criteria** | [**[][]ApplicationCriterionFieldRequest**]([]ApplicationCriterionFieldRequest.md) | | +**Behaviors** | [**[]RequestPhaseBehavior2**](RequestPhaseBehavior2.md) | | +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewRequestPhaseRule2 + +`func NewRequestPhaseRule2(name string, criteria [][]ApplicationCriterionFieldRequest, behaviors []RequestPhaseBehavior2, ) *RequestPhaseRule2` + +NewRequestPhaseRule2 instantiates a new RequestPhaseRule2 object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRequestPhaseRule2WithDefaults + +`func NewRequestPhaseRule2WithDefaults() *RequestPhaseRule2` + +NewRequestPhaseRule2WithDefaults instantiates a new RequestPhaseRule2 object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *RequestPhaseRule2) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *RequestPhaseRule2) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *RequestPhaseRule2) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *RequestPhaseRule2) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *RequestPhaseRule2) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *RequestPhaseRule2) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *RequestPhaseRule2) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *RequestPhaseRule2) GetCriteria() [][]ApplicationCriterionFieldRequest` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *RequestPhaseRule2) GetCriteriaOk() (*[][]ApplicationCriterionFieldRequest, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *RequestPhaseRule2) SetCriteria(v [][]ApplicationCriterionFieldRequest)` + +SetCriteria sets Criteria field to given value. + + +### GetBehaviors + +`func (o *RequestPhaseRule2) GetBehaviors() []RequestPhaseBehavior2` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *RequestPhaseRule2) GetBehaviorsOk() (*[]RequestPhaseBehavior2, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *RequestPhaseRule2) SetBehaviors(v []RequestPhaseBehavior2)` + +SetBehaviors sets Behaviors field to given value. + + +### GetDescription + +`func (o *RequestPhaseRule2) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *RequestPhaseRule2) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *RequestPhaseRule2) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *RequestPhaseRule2) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RequestPhaseRuleResponse.md b/azion-api/docs/RequestPhaseRuleResponse.md new file mode 100644 index 0000000..09c5d6e --- /dev/null +++ b/azion-api/docs/RequestPhaseRuleResponse.md @@ -0,0 +1,77 @@ +# RequestPhaseRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**RequestPhaseRule**](RequestPhaseRule.md) | | + +## Methods + +### NewRequestPhaseRuleResponse + +`func NewRequestPhaseRuleResponse(data RequestPhaseRule, ) *RequestPhaseRuleResponse` + +NewRequestPhaseRuleResponse instantiates a new RequestPhaseRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRequestPhaseRuleResponseWithDefaults + +`func NewRequestPhaseRuleResponseWithDefaults() *RequestPhaseRuleResponse` + +NewRequestPhaseRuleResponseWithDefaults instantiates a new RequestPhaseRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *RequestPhaseRuleResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *RequestPhaseRuleResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *RequestPhaseRuleResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *RequestPhaseRuleResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *RequestPhaseRuleResponse) GetData() RequestPhaseRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *RequestPhaseRuleResponse) GetDataOk() (*RequestPhaseRule, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *RequestPhaseRuleResponse) SetData(v RequestPhaseRule)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Reseller.md b/azion-api/docs/Reseller.md new file mode 100644 index 0000000..b021824 --- /dev/null +++ b/azion-api/docs/Reseller.md @@ -0,0 +1,266 @@ +# Reseller + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ParentId** | **int64** | | +**Created** | **time.Time** | | +**Info** | **map[string]interface{}** | | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewReseller + +`func NewReseller(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, currencyIsoCode string, type_ string, ) *Reseller` + +NewReseller instantiates a new Reseller object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResellerWithDefaults + +`func NewResellerWithDefaults() *Reseller` + +NewResellerWithDefaults instantiates a new Reseller object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Reseller) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Reseller) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Reseller) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Reseller) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Reseller) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Reseller) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *Reseller) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Reseller) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Reseller) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *Reseller) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Reseller) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Reseller) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Reseller) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Reseller) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Reseller) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetParentId + +`func (o *Reseller) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *Reseller) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *Reseller) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCreated + +`func (o *Reseller) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Reseller) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Reseller) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetInfo + +`func (o *Reseller) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *Reseller) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *Reseller) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetCurrencyIsoCode + +`func (o *Reseller) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *Reseller) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *Reseller) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *Reseller) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *Reseller) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *Reseller) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *Reseller) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + +### GetType + +`func (o *Reseller) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Reseller) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Reseller) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResellerRequest.md b/azion-api/docs/ResellerRequest.md new file mode 100644 index 0000000..88c375f --- /dev/null +++ b/azion-api/docs/ResellerRequest.md @@ -0,0 +1,119 @@ +# ResellerRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewResellerRequest + +`func NewResellerRequest(name string, currencyIsoCode string, type_ string, ) *ResellerRequest` + +NewResellerRequest instantiates a new ResellerRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResellerRequestWithDefaults + +`func NewResellerRequestWithDefaults() *ResellerRequest` + +NewResellerRequestWithDefaults instantiates a new ResellerRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResellerRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResellerRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResellerRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCurrencyIsoCode + +`func (o *ResellerRequest) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *ResellerRequest) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *ResellerRequest) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *ResellerRequest) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *ResellerRequest) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *ResellerRequest) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *ResellerRequest) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + +### GetType + +`func (o *ResellerRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResellerRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResellerRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAccount.md b/azion-api/docs/ResponseAccount.md new file mode 100644 index 0000000..0d29687 --- /dev/null +++ b/azion-api/docs/ResponseAccount.md @@ -0,0 +1,77 @@ +# ResponseAccount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Account**](Account.md) | | + +## Methods + +### NewResponseAccount + +`func NewResponseAccount(data Account, ) *ResponseAccount` + +NewResponseAccount instantiates a new ResponseAccount object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAccountWithDefaults + +`func NewResponseAccountWithDefaults() *ResponseAccount` + +NewResponseAccountWithDefaults instantiates a new ResponseAccount object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAccount) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAccount) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAccount) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAccount) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAccount) GetData() Account` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAccount) GetDataOk() (*Account, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAccount) SetData(v Account)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAccountInfo.md b/azion-api/docs/ResponseAccountInfo.md new file mode 100644 index 0000000..d2d311b --- /dev/null +++ b/azion-api/docs/ResponseAccountInfo.md @@ -0,0 +1,77 @@ +# ResponseAccountInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**AccountInfo**](AccountInfo.md) | | + +## Methods + +### NewResponseAccountInfo + +`func NewResponseAccountInfo(data AccountInfo, ) *ResponseAccountInfo` + +NewResponseAccountInfo instantiates a new ResponseAccountInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAccountInfoWithDefaults + +`func NewResponseAccountInfoWithDefaults() *ResponseAccountInfo` + +NewResponseAccountInfoWithDefaults instantiates a new ResponseAccountInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAccountInfo) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAccountInfo) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAccountInfo) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAccountInfo) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAccountInfo) GetData() AccountInfo` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAccountInfo) GetDataOk() (*AccountInfo, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAccountInfo) SetData(v AccountInfo)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncAccount.md b/azion-api/docs/ResponseAsyncAccount.md new file mode 100644 index 0000000..71ddb31 --- /dev/null +++ b/azion-api/docs/ResponseAsyncAccount.md @@ -0,0 +1,77 @@ +# ResponseAsyncAccount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Account**](Account.md) | | + +## Methods + +### NewResponseAsyncAccount + +`func NewResponseAsyncAccount(data Account, ) *ResponseAsyncAccount` + +NewResponseAsyncAccount instantiates a new ResponseAsyncAccount object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncAccountWithDefaults + +`func NewResponseAsyncAccountWithDefaults() *ResponseAsyncAccount` + +NewResponseAsyncAccountWithDefaults instantiates a new ResponseAsyncAccount object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncAccount) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncAccount) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncAccount) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncAccount) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncAccount) GetData() Account` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncAccount) GetDataOk() (*Account, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncAccount) SetData(v Account)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncAccountInfo.md b/azion-api/docs/ResponseAsyncAccountInfo.md new file mode 100644 index 0000000..c47fdc1 --- /dev/null +++ b/azion-api/docs/ResponseAsyncAccountInfo.md @@ -0,0 +1,77 @@ +# ResponseAsyncAccountInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**AccountInfo**](AccountInfo.md) | | + +## Methods + +### NewResponseAsyncAccountInfo + +`func NewResponseAsyncAccountInfo(data AccountInfo, ) *ResponseAsyncAccountInfo` + +NewResponseAsyncAccountInfo instantiates a new ResponseAsyncAccountInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncAccountInfoWithDefaults + +`func NewResponseAsyncAccountInfoWithDefaults() *ResponseAsyncAccountInfo` + +NewResponseAsyncAccountInfoWithDefaults instantiates a new ResponseAsyncAccountInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncAccountInfo) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncAccountInfo) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncAccountInfo) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncAccountInfo) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncAccountInfo) GetData() AccountInfo` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncAccountInfo) GetDataOk() (*AccountInfo, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncAccountInfo) SetData(v AccountInfo)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncChatThread.md b/azion-api/docs/ResponseAsyncChatThread.md new file mode 100644 index 0000000..6b55b7e --- /dev/null +++ b/azion-api/docs/ResponseAsyncChatThread.md @@ -0,0 +1,77 @@ +# ResponseAsyncChatThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ChatThread**](ChatThread.md) | | + +## Methods + +### NewResponseAsyncChatThread + +`func NewResponseAsyncChatThread(data ChatThread, ) *ResponseAsyncChatThread` + +NewResponseAsyncChatThread instantiates a new ResponseAsyncChatThread object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncChatThreadWithDefaults + +`func NewResponseAsyncChatThreadWithDefaults() *ResponseAsyncChatThread` + +NewResponseAsyncChatThreadWithDefaults instantiates a new ResponseAsyncChatThread object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncChatThread) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncChatThread) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncChatThread) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncChatThread) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncChatThread) GetData() ChatThread` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncChatThread) GetDataOk() (*ChatThread, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncChatThread) SetData(v ChatThread)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncContinuousDeployment.md b/azion-api/docs/ResponseAsyncContinuousDeployment.md new file mode 100644 index 0000000..cd471ae --- /dev/null +++ b/azion-api/docs/ResponseAsyncContinuousDeployment.md @@ -0,0 +1,77 @@ +# ResponseAsyncContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ContinuousDeployment**](ContinuousDeployment.md) | | + +## Methods + +### NewResponseAsyncContinuousDeployment + +`func NewResponseAsyncContinuousDeployment(data ContinuousDeployment, ) *ResponseAsyncContinuousDeployment` + +NewResponseAsyncContinuousDeployment instantiates a new ResponseAsyncContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncContinuousDeploymentWithDefaults + +`func NewResponseAsyncContinuousDeploymentWithDefaults() *ResponseAsyncContinuousDeployment` + +NewResponseAsyncContinuousDeploymentWithDefaults instantiates a new ResponseAsyncContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncContinuousDeployment) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncContinuousDeployment) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncContinuousDeployment) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncContinuousDeployment) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncContinuousDeployment) GetData() ContinuousDeployment` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncContinuousDeployment) GetDataOk() (*ContinuousDeployment, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncContinuousDeployment) SetData(v ContinuousDeployment)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncCredit.md b/azion-api/docs/ResponseAsyncCredit.md new file mode 100644 index 0000000..b6c6e99 --- /dev/null +++ b/azion-api/docs/ResponseAsyncCredit.md @@ -0,0 +1,77 @@ +# ResponseAsyncCredit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Credit**](Credit.md) | | + +## Methods + +### NewResponseAsyncCredit + +`func NewResponseAsyncCredit(data Credit, ) *ResponseAsyncCredit` + +NewResponseAsyncCredit instantiates a new ResponseAsyncCredit object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncCreditWithDefaults + +`func NewResponseAsyncCreditWithDefaults() *ResponseAsyncCredit` + +NewResponseAsyncCreditWithDefaults instantiates a new ResponseAsyncCredit object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncCredit) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncCredit) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncCredit) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncCredit) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncCredit) GetData() Credit` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncCredit) GetDataOk() (*Credit, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncCredit) SetData(v Credit)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDashboard.md b/azion-api/docs/ResponseAsyncDashboard.md new file mode 100644 index 0000000..51086d7 --- /dev/null +++ b/azion-api/docs/ResponseAsyncDashboard.md @@ -0,0 +1,77 @@ +# ResponseAsyncDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Dashboard**](Dashboard.md) | | + +## Methods + +### NewResponseAsyncDashboard + +`func NewResponseAsyncDashboard(data Dashboard, ) *ResponseAsyncDashboard` + +NewResponseAsyncDashboard instantiates a new ResponseAsyncDashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDashboardWithDefaults + +`func NewResponseAsyncDashboardWithDefaults() *ResponseAsyncDashboard` + +NewResponseAsyncDashboardWithDefaults instantiates a new ResponseAsyncDashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDashboard) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDashboard) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDashboard) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDashboard) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncDashboard) GetData() Dashboard` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncDashboard) GetDataOk() (*Dashboard, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncDashboard) SetData(v Dashboard)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteChatThread.md b/azion-api/docs/ResponseAsyncDeleteChatThread.md new file mode 100644 index 0000000..007a32a --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteChatThread.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteChatThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteChatThread + +`func NewResponseAsyncDeleteChatThread() *ResponseAsyncDeleteChatThread` + +NewResponseAsyncDeleteChatThread instantiates a new ResponseAsyncDeleteChatThread object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteChatThreadWithDefaults + +`func NewResponseAsyncDeleteChatThreadWithDefaults() *ResponseAsyncDeleteChatThread` + +NewResponseAsyncDeleteChatThreadWithDefaults instantiates a new ResponseAsyncDeleteChatThread object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteChatThread) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteChatThread) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteChatThread) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteChatThread) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteContinuousDeployment.md b/azion-api/docs/ResponseAsyncDeleteContinuousDeployment.md new file mode 100644 index 0000000..bda3a8b --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteContinuousDeployment.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteContinuousDeployment + +`func NewResponseAsyncDeleteContinuousDeployment() *ResponseAsyncDeleteContinuousDeployment` + +NewResponseAsyncDeleteContinuousDeployment instantiates a new ResponseAsyncDeleteContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteContinuousDeploymentWithDefaults + +`func NewResponseAsyncDeleteContinuousDeploymentWithDefaults() *ResponseAsyncDeleteContinuousDeployment` + +NewResponseAsyncDeleteContinuousDeploymentWithDefaults instantiates a new ResponseAsyncDeleteContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteContinuousDeployment) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteContinuousDeployment) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteContinuousDeployment) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteContinuousDeployment) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteDocument.md b/azion-api/docs/ResponseAsyncDeleteDocument.md new file mode 100644 index 0000000..3b3bab7 --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteDocument.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteDocument + +`func NewResponseAsyncDeleteDocument() *ResponseAsyncDeleteDocument` + +NewResponseAsyncDeleteDocument instantiates a new ResponseAsyncDeleteDocument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteDocumentWithDefaults + +`func NewResponseAsyncDeleteDocumentWithDefaults() *ResponseAsyncDeleteDocument` + +NewResponseAsyncDeleteDocumentWithDefaults instantiates a new ResponseAsyncDeleteDocument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteDocument) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteDocument) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteDocument) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteDocument) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteIntegration.md b/azion-api/docs/ResponseAsyncDeleteIntegration.md new file mode 100644 index 0000000..6786b6d --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteIntegration.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteIntegration + +`func NewResponseAsyncDeleteIntegration() *ResponseAsyncDeleteIntegration` + +NewResponseAsyncDeleteIntegration instantiates a new ResponseAsyncDeleteIntegration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteIntegrationWithDefaults + +`func NewResponseAsyncDeleteIntegrationWithDefaults() *ResponseAsyncDeleteIntegration` + +NewResponseAsyncDeleteIntegrationWithDefaults instantiates a new ResponseAsyncDeleteIntegration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteIntegration) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteIntegration) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteIntegration) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteIntegration) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteKnowledgeBase.md b/azion-api/docs/ResponseAsyncDeleteKnowledgeBase.md new file mode 100644 index 0000000..a2c27ff --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteKnowledgeBase.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteKnowledgeBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteKnowledgeBase + +`func NewResponseAsyncDeleteKnowledgeBase() *ResponseAsyncDeleteKnowledgeBase` + +NewResponseAsyncDeleteKnowledgeBase instantiates a new ResponseAsyncDeleteKnowledgeBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteKnowledgeBaseWithDefaults + +`func NewResponseAsyncDeleteKnowledgeBaseWithDefaults() *ResponseAsyncDeleteKnowledgeBase` + +NewResponseAsyncDeleteKnowledgeBaseWithDefaults instantiates a new ResponseAsyncDeleteKnowledgeBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteKnowledgeBase) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteKnowledgeBase) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteKnowledgeBase) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteKnowledgeBase) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteMessage.md b/azion-api/docs/ResponseAsyncDeleteMessage.md new file mode 100644 index 0000000..ee27e93 --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteMessage.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteMessage + +`func NewResponseAsyncDeleteMessage() *ResponseAsyncDeleteMessage` + +NewResponseAsyncDeleteMessage instantiates a new ResponseAsyncDeleteMessage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteMessageWithDefaults + +`func NewResponseAsyncDeleteMessageWithDefaults() *ResponseAsyncDeleteMessage` + +NewResponseAsyncDeleteMessageWithDefaults instantiates a new ResponseAsyncDeleteMessage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteMessage) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteMessage) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteMessage) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteMessage) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteNodeServiceBind.md b/azion-api/docs/ResponseAsyncDeleteNodeServiceBind.md new file mode 100644 index 0000000..9e333a7 --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteNodeServiceBind.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteNodeServiceBind + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteNodeServiceBind + +`func NewResponseAsyncDeleteNodeServiceBind() *ResponseAsyncDeleteNodeServiceBind` + +NewResponseAsyncDeleteNodeServiceBind instantiates a new ResponseAsyncDeleteNodeServiceBind object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteNodeServiceBindWithDefaults + +`func NewResponseAsyncDeleteNodeServiceBindWithDefaults() *ResponseAsyncDeleteNodeServiceBind` + +NewResponseAsyncDeleteNodeServiceBindWithDefaults instantiates a new ResponseAsyncDeleteNodeServiceBind object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteNodeServiceBind) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteNodeServiceBind) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteNodeServiceBind) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteNodeServiceBind) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteNodes.md b/azion-api/docs/ResponseAsyncDeleteNodes.md new file mode 100644 index 0000000..b29d85b --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteNodes.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteNodes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteNodes + +`func NewResponseAsyncDeleteNodes() *ResponseAsyncDeleteNodes` + +NewResponseAsyncDeleteNodes instantiates a new ResponseAsyncDeleteNodes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteNodesWithDefaults + +`func NewResponseAsyncDeleteNodesWithDefaults() *ResponseAsyncDeleteNodes` + +NewResponseAsyncDeleteNodesWithDefaults instantiates a new ResponseAsyncDeleteNodes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteNodes) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteNodes) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteNodes) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteNodes) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeletePaymentMethod.md b/azion-api/docs/ResponseAsyncDeletePaymentMethod.md new file mode 100644 index 0000000..cb696ea --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeletePaymentMethod.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeletePaymentMethod + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeletePaymentMethod + +`func NewResponseAsyncDeletePaymentMethod() *ResponseAsyncDeletePaymentMethod` + +NewResponseAsyncDeletePaymentMethod instantiates a new ResponseAsyncDeletePaymentMethod object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeletePaymentMethodWithDefaults + +`func NewResponseAsyncDeletePaymentMethodWithDefaults() *ResponseAsyncDeletePaymentMethod` + +NewResponseAsyncDeletePaymentMethodWithDefaults instantiates a new ResponseAsyncDeletePaymentMethod object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeletePaymentMethod) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeletePaymentMethod) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeletePaymentMethod) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeletePaymentMethod) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteServices.md b/azion-api/docs/ResponseAsyncDeleteServices.md new file mode 100644 index 0000000..2574203 --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteServices.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteServices + +`func NewResponseAsyncDeleteServices() *ResponseAsyncDeleteServices` + +NewResponseAsyncDeleteServices instantiates a new ResponseAsyncDeleteServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteServicesWithDefaults + +`func NewResponseAsyncDeleteServicesWithDefaults() *ResponseAsyncDeleteServices` + +NewResponseAsyncDeleteServicesWithDefaults instantiates a new ResponseAsyncDeleteServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteServices) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteServices) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteServices) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteServices) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDeleteTool.md b/azion-api/docs/ResponseAsyncDeleteTool.md new file mode 100644 index 0000000..9673e76 --- /dev/null +++ b/azion-api/docs/ResponseAsyncDeleteTool.md @@ -0,0 +1,56 @@ +# ResponseAsyncDeleteTool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseAsyncDeleteTool + +`func NewResponseAsyncDeleteTool() *ResponseAsyncDeleteTool` + +NewResponseAsyncDeleteTool instantiates a new ResponseAsyncDeleteTool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDeleteToolWithDefaults + +`func NewResponseAsyncDeleteToolWithDefaults() *ResponseAsyncDeleteTool` + +NewResponseAsyncDeleteToolWithDefaults instantiates a new ResponseAsyncDeleteTool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDeleteTool) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDeleteTool) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDeleteTool) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDeleteTool) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncDocument.md b/azion-api/docs/ResponseAsyncDocument.md new file mode 100644 index 0000000..029509d --- /dev/null +++ b/azion-api/docs/ResponseAsyncDocument.md @@ -0,0 +1,77 @@ +# ResponseAsyncDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Document**](Document.md) | | + +## Methods + +### NewResponseAsyncDocument + +`func NewResponseAsyncDocument(data Document, ) *ResponseAsyncDocument` + +NewResponseAsyncDocument instantiates a new ResponseAsyncDocument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncDocumentWithDefaults + +`func NewResponseAsyncDocumentWithDefaults() *ResponseAsyncDocument` + +NewResponseAsyncDocumentWithDefaults instantiates a new ResponseAsyncDocument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncDocument) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncDocument) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncDocument) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncDocument) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncDocument) GetData() Document` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncDocument) GetDataOk() (*Document, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncDocument) SetData(v Document)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncExecution.md b/azion-api/docs/ResponseAsyncExecution.md new file mode 100644 index 0000000..3080dd4 --- /dev/null +++ b/azion-api/docs/ResponseAsyncExecution.md @@ -0,0 +1,77 @@ +# ResponseAsyncExecution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Execution**](Execution.md) | | + +## Methods + +### NewResponseAsyncExecution + +`func NewResponseAsyncExecution(data Execution, ) *ResponseAsyncExecution` + +NewResponseAsyncExecution instantiates a new ResponseAsyncExecution object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncExecutionWithDefaults + +`func NewResponseAsyncExecutionWithDefaults() *ResponseAsyncExecution` + +NewResponseAsyncExecutionWithDefaults instantiates a new ResponseAsyncExecution object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncExecution) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncExecution) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncExecution) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncExecution) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncExecution) GetData() Execution` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncExecution) GetDataOk() (*Execution, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncExecution) SetData(v Execution)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncExecutor.md b/azion-api/docs/ResponseAsyncExecutor.md new file mode 100644 index 0000000..e01fb2c --- /dev/null +++ b/azion-api/docs/ResponseAsyncExecutor.md @@ -0,0 +1,77 @@ +# ResponseAsyncExecutor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Executor**](Executor.md) | | + +## Methods + +### NewResponseAsyncExecutor + +`func NewResponseAsyncExecutor(data Executor, ) *ResponseAsyncExecutor` + +NewResponseAsyncExecutor instantiates a new ResponseAsyncExecutor object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncExecutorWithDefaults + +`func NewResponseAsyncExecutorWithDefaults() *ResponseAsyncExecutor` + +NewResponseAsyncExecutorWithDefaults instantiates a new ResponseAsyncExecutor object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncExecutor) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncExecutor) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncExecutor) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncExecutor) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncExecutor) GetData() Executor` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncExecutor) GetDataOk() (*Executor, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncExecutor) SetData(v Executor)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncFolder.md b/azion-api/docs/ResponseAsyncFolder.md new file mode 100644 index 0000000..8a960ec --- /dev/null +++ b/azion-api/docs/ResponseAsyncFolder.md @@ -0,0 +1,77 @@ +# ResponseAsyncFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Folder**](Folder.md) | | + +## Methods + +### NewResponseAsyncFolder + +`func NewResponseAsyncFolder(data Folder, ) *ResponseAsyncFolder` + +NewResponseAsyncFolder instantiates a new ResponseAsyncFolder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncFolderWithDefaults + +`func NewResponseAsyncFolderWithDefaults() *ResponseAsyncFolder` + +NewResponseAsyncFolderWithDefaults instantiates a new ResponseAsyncFolder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncFolder) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncFolder) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncFolder) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncFolder) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncFolder) GetData() Folder` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncFolder) GetDataOk() (*Folder, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncFolder) SetData(v Folder)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncKnowledgeBase.md b/azion-api/docs/ResponseAsyncKnowledgeBase.md new file mode 100644 index 0000000..742a12a --- /dev/null +++ b/azion-api/docs/ResponseAsyncKnowledgeBase.md @@ -0,0 +1,77 @@ +# ResponseAsyncKnowledgeBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**KnowledgeBase**](KnowledgeBase.md) | | + +## Methods + +### NewResponseAsyncKnowledgeBase + +`func NewResponseAsyncKnowledgeBase(data KnowledgeBase, ) *ResponseAsyncKnowledgeBase` + +NewResponseAsyncKnowledgeBase instantiates a new ResponseAsyncKnowledgeBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncKnowledgeBaseWithDefaults + +`func NewResponseAsyncKnowledgeBaseWithDefaults() *ResponseAsyncKnowledgeBase` + +NewResponseAsyncKnowledgeBaseWithDefaults instantiates a new ResponseAsyncKnowledgeBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncKnowledgeBase) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncKnowledgeBase) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncKnowledgeBase) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncKnowledgeBase) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncKnowledgeBase) GetData() KnowledgeBase` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncKnowledgeBase) GetDataOk() (*KnowledgeBase, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncKnowledgeBase) SetData(v KnowledgeBase)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncMessage.md b/azion-api/docs/ResponseAsyncMessage.md new file mode 100644 index 0000000..08fe531 --- /dev/null +++ b/azion-api/docs/ResponseAsyncMessage.md @@ -0,0 +1,77 @@ +# ResponseAsyncMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Message**](Message.md) | | + +## Methods + +### NewResponseAsyncMessage + +`func NewResponseAsyncMessage(data Message, ) *ResponseAsyncMessage` + +NewResponseAsyncMessage instantiates a new ResponseAsyncMessage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncMessageWithDefaults + +`func NewResponseAsyncMessageWithDefaults() *ResponseAsyncMessage` + +NewResponseAsyncMessageWithDefaults instantiates a new ResponseAsyncMessage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncMessage) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncMessage) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncMessage) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncMessage) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncMessage) GetData() Message` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncMessage) GetDataOk() (*Message, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncMessage) SetData(v Message)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncNodeGroupsById.md b/azion-api/docs/ResponseAsyncNodeGroupsById.md new file mode 100644 index 0000000..cbf529c --- /dev/null +++ b/azion-api/docs/ResponseAsyncNodeGroupsById.md @@ -0,0 +1,77 @@ +# ResponseAsyncNodeGroupsById + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**NodeGroupsById**](NodeGroupsById.md) | | + +## Methods + +### NewResponseAsyncNodeGroupsById + +`func NewResponseAsyncNodeGroupsById(data NodeGroupsById, ) *ResponseAsyncNodeGroupsById` + +NewResponseAsyncNodeGroupsById instantiates a new ResponseAsyncNodeGroupsById object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncNodeGroupsByIdWithDefaults + +`func NewResponseAsyncNodeGroupsByIdWithDefaults() *ResponseAsyncNodeGroupsById` + +NewResponseAsyncNodeGroupsByIdWithDefaults instantiates a new ResponseAsyncNodeGroupsById object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncNodeGroupsById) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncNodeGroupsById) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncNodeGroupsById) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncNodeGroupsById) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncNodeGroupsById) GetData() NodeGroupsById` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncNodeGroupsById) GetDataOk() (*NodeGroupsById, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncNodeGroupsById) SetData(v NodeGroupsById)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncNodeServices.md b/azion-api/docs/ResponseAsyncNodeServices.md new file mode 100644 index 0000000..c1bb586 --- /dev/null +++ b/azion-api/docs/ResponseAsyncNodeServices.md @@ -0,0 +1,77 @@ +# ResponseAsyncNodeServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**NodeServices**](NodeServices.md) | | + +## Methods + +### NewResponseAsyncNodeServices + +`func NewResponseAsyncNodeServices(data NodeServices, ) *ResponseAsyncNodeServices` + +NewResponseAsyncNodeServices instantiates a new ResponseAsyncNodeServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncNodeServicesWithDefaults + +`func NewResponseAsyncNodeServicesWithDefaults() *ResponseAsyncNodeServices` + +NewResponseAsyncNodeServicesWithDefaults instantiates a new ResponseAsyncNodeServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncNodeServices) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncNodeServices) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncNodeServices) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncNodeServices) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncNodeServices) GetData() NodeServices` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncNodeServices) GetDataOk() (*NodeServices, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncNodeServices) SetData(v NodeServices)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncNodes.md b/azion-api/docs/ResponseAsyncNodes.md new file mode 100644 index 0000000..fb86d7c --- /dev/null +++ b/azion-api/docs/ResponseAsyncNodes.md @@ -0,0 +1,77 @@ +# ResponseAsyncNodes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Nodes**](Nodes.md) | | + +## Methods + +### NewResponseAsyncNodes + +`func NewResponseAsyncNodes(data Nodes, ) *ResponseAsyncNodes` + +NewResponseAsyncNodes instantiates a new ResponseAsyncNodes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncNodesWithDefaults + +`func NewResponseAsyncNodesWithDefaults() *ResponseAsyncNodes` + +NewResponseAsyncNodesWithDefaults instantiates a new ResponseAsyncNodes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncNodes) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncNodes) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncNodes) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncNodes) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncNodes) GetData() Nodes` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncNodes) GetDataOk() (*Nodes, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncNodes) SetData(v Nodes)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncOrder.md b/azion-api/docs/ResponseAsyncOrder.md new file mode 100644 index 0000000..3efc7cf --- /dev/null +++ b/azion-api/docs/ResponseAsyncOrder.md @@ -0,0 +1,77 @@ +# ResponseAsyncOrder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Order**](Order.md) | | + +## Methods + +### NewResponseAsyncOrder + +`func NewResponseAsyncOrder(data Order, ) *ResponseAsyncOrder` + +NewResponseAsyncOrder instantiates a new ResponseAsyncOrder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncOrderWithDefaults + +`func NewResponseAsyncOrderWithDefaults() *ResponseAsyncOrder` + +NewResponseAsyncOrderWithDefaults instantiates a new ResponseAsyncOrder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncOrder) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncOrder) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncOrder) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncOrder) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncOrder) GetData() Order` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncOrder) GetDataOk() (*Order, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncOrder) SetData(v Order)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncPaymentMethod.md b/azion-api/docs/ResponseAsyncPaymentMethod.md new file mode 100644 index 0000000..495824e --- /dev/null +++ b/azion-api/docs/ResponseAsyncPaymentMethod.md @@ -0,0 +1,77 @@ +# ResponseAsyncPaymentMethod + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**PaymentMethod**](PaymentMethod.md) | | + +## Methods + +### NewResponseAsyncPaymentMethod + +`func NewResponseAsyncPaymentMethod(data PaymentMethod, ) *ResponseAsyncPaymentMethod` + +NewResponseAsyncPaymentMethod instantiates a new ResponseAsyncPaymentMethod object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncPaymentMethodWithDefaults + +`func NewResponseAsyncPaymentMethodWithDefaults() *ResponseAsyncPaymentMethod` + +NewResponseAsyncPaymentMethodWithDefaults instantiates a new ResponseAsyncPaymentMethod object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncPaymentMethod) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncPaymentMethod) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncPaymentMethod) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncPaymentMethod) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncPaymentMethod) GetData() PaymentMethod` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncPaymentMethod) GetDataOk() (*PaymentMethod, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncPaymentMethod) SetData(v PaymentMethod)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncReport.md b/azion-api/docs/ResponseAsyncReport.md new file mode 100644 index 0000000..c5f0f4f --- /dev/null +++ b/azion-api/docs/ResponseAsyncReport.md @@ -0,0 +1,77 @@ +# ResponseAsyncReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Report**](Report.md) | | + +## Methods + +### NewResponseAsyncReport + +`func NewResponseAsyncReport(data Report, ) *ResponseAsyncReport` + +NewResponseAsyncReport instantiates a new ResponseAsyncReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncReportWithDefaults + +`func NewResponseAsyncReportWithDefaults() *ResponseAsyncReport` + +NewResponseAsyncReportWithDefaults instantiates a new ResponseAsyncReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncReport) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncReport) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncReport) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncReport) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncReport) GetData() Report` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncReport) GetDataOk() (*Report, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncReport) SetData(v Report)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncRow.md b/azion-api/docs/ResponseAsyncRow.md new file mode 100644 index 0000000..2dbaf5e --- /dev/null +++ b/azion-api/docs/ResponseAsyncRow.md @@ -0,0 +1,77 @@ +# ResponseAsyncRow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Row**](Row.md) | | + +## Methods + +### NewResponseAsyncRow + +`func NewResponseAsyncRow(data Row, ) *ResponseAsyncRow` + +NewResponseAsyncRow instantiates a new ResponseAsyncRow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncRowWithDefaults + +`func NewResponseAsyncRowWithDefaults() *ResponseAsyncRow` + +NewResponseAsyncRowWithDefaults instantiates a new ResponseAsyncRow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncRow) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncRow) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncRow) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncRow) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncRow) GetData() Row` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncRow) GetDataOk() (*Row, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncRow) SetData(v Row)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncServices.md b/azion-api/docs/ResponseAsyncServices.md new file mode 100644 index 0000000..74875e9 --- /dev/null +++ b/azion-api/docs/ResponseAsyncServices.md @@ -0,0 +1,77 @@ +# ResponseAsyncServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Services**](Services.md) | | + +## Methods + +### NewResponseAsyncServices + +`func NewResponseAsyncServices(data Services, ) *ResponseAsyncServices` + +NewResponseAsyncServices instantiates a new ResponseAsyncServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncServicesWithDefaults + +`func NewResponseAsyncServicesWithDefaults() *ResponseAsyncServices` + +NewResponseAsyncServicesWithDefaults instantiates a new ResponseAsyncServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncServices) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncServices) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncServices) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncServices) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncServices) GetData() Services` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncServices) GetDataOk() (*Services, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncServices) SetData(v Services)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseAsyncTool.md b/azion-api/docs/ResponseAsyncTool.md new file mode 100644 index 0000000..976d132 --- /dev/null +++ b/azion-api/docs/ResponseAsyncTool.md @@ -0,0 +1,77 @@ +# ResponseAsyncTool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Tool**](Tool.md) | | + +## Methods + +### NewResponseAsyncTool + +`func NewResponseAsyncTool(data Tool, ) *ResponseAsyncTool` + +NewResponseAsyncTool instantiates a new ResponseAsyncTool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseAsyncToolWithDefaults + +`func NewResponseAsyncToolWithDefaults() *ResponseAsyncTool` + +NewResponseAsyncToolWithDefaults instantiates a new ResponseAsyncTool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseAsyncTool) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseAsyncTool) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseAsyncTool) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseAsyncTool) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseAsyncTool) GetData() Tool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseAsyncTool) GetDataOk() (*Tool, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseAsyncTool) SetData(v Tool)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseBucketObject.md b/azion-api/docs/ResponseBucketObject.md new file mode 100644 index 0000000..d97efa1 --- /dev/null +++ b/azion-api/docs/ResponseBucketObject.md @@ -0,0 +1,82 @@ +# ResponseBucketObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContinuationToken** | **NullableString** | | +**Results** | [**[]BucketObject**](BucketObject.md) | | + +## Methods + +### NewResponseBucketObject + +`func NewResponseBucketObject(continuationToken NullableString, results []BucketObject, ) *ResponseBucketObject` + +NewResponseBucketObject instantiates a new ResponseBucketObject object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseBucketObjectWithDefaults + +`func NewResponseBucketObjectWithDefaults() *ResponseBucketObject` + +NewResponseBucketObjectWithDefaults instantiates a new ResponseBucketObject object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetContinuationToken + +`func (o *ResponseBucketObject) GetContinuationToken() string` + +GetContinuationToken returns the ContinuationToken field if non-nil, zero value otherwise. + +### GetContinuationTokenOk + +`func (o *ResponseBucketObject) GetContinuationTokenOk() (*string, bool)` + +GetContinuationTokenOk returns a tuple with the ContinuationToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContinuationToken + +`func (o *ResponseBucketObject) SetContinuationToken(v string)` + +SetContinuationToken sets ContinuationToken field to given value. + + +### SetContinuationTokenNil + +`func (o *ResponseBucketObject) SetContinuationTokenNil(b bool)` + + SetContinuationTokenNil sets the value for ContinuationToken to be an explicit nil + +### UnsetContinuationToken +`func (o *ResponseBucketObject) UnsetContinuationToken()` + +UnsetContinuationToken ensures that no value is present for ContinuationToken, not even an explicit nil +### GetResults + +`func (o *ResponseBucketObject) GetResults() []BucketObject` + +GetResults returns the Results field if non-nil, zero value otherwise. + +### GetResultsOk + +`func (o *ResponseBucketObject) GetResultsOk() (*[]BucketObject, bool)` + +GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResults + +`func (o *ResponseBucketObject) SetResults(v []BucketObject)` + +SetResults sets Results field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseChatThread.md b/azion-api/docs/ResponseChatThread.md new file mode 100644 index 0000000..40ffdcf --- /dev/null +++ b/azion-api/docs/ResponseChatThread.md @@ -0,0 +1,77 @@ +# ResponseChatThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ChatThread**](ChatThread.md) | | + +## Methods + +### NewResponseChatThread + +`func NewResponseChatThread(data ChatThread, ) *ResponseChatThread` + +NewResponseChatThread instantiates a new ResponseChatThread object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseChatThreadWithDefaults + +`func NewResponseChatThreadWithDefaults() *ResponseChatThread` + +NewResponseChatThreadWithDefaults instantiates a new ResponseChatThread object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseChatThread) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseChatThread) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseChatThread) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseChatThread) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseChatThread) GetData() ChatThread` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseChatThread) GetDataOk() (*ChatThread, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseChatThread) SetData(v ChatThread)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseContinuousDeployment.md b/azion-api/docs/ResponseContinuousDeployment.md new file mode 100644 index 0000000..7ed2db3 --- /dev/null +++ b/azion-api/docs/ResponseContinuousDeployment.md @@ -0,0 +1,77 @@ +# ResponseContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ContinuousDeployment**](ContinuousDeployment.md) | | + +## Methods + +### NewResponseContinuousDeployment + +`func NewResponseContinuousDeployment(data ContinuousDeployment, ) *ResponseContinuousDeployment` + +NewResponseContinuousDeployment instantiates a new ResponseContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseContinuousDeploymentWithDefaults + +`func NewResponseContinuousDeploymentWithDefaults() *ResponseContinuousDeployment` + +NewResponseContinuousDeploymentWithDefaults instantiates a new ResponseContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseContinuousDeployment) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseContinuousDeployment) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseContinuousDeployment) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseContinuousDeployment) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseContinuousDeployment) GetData() ContinuousDeployment` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseContinuousDeployment) GetDataOk() (*ContinuousDeployment, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseContinuousDeployment) SetData(v ContinuousDeployment)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseCredit.md b/azion-api/docs/ResponseCredit.md new file mode 100644 index 0000000..145d8f8 --- /dev/null +++ b/azion-api/docs/ResponseCredit.md @@ -0,0 +1,77 @@ +# ResponseCredit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Credit**](Credit.md) | | + +## Methods + +### NewResponseCredit + +`func NewResponseCredit(data Credit, ) *ResponseCredit` + +NewResponseCredit instantiates a new ResponseCredit object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseCreditWithDefaults + +`func NewResponseCreditWithDefaults() *ResponseCredit` + +NewResponseCreditWithDefaults instantiates a new ResponseCredit object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseCredit) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseCredit) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseCredit) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseCredit) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseCredit) GetData() Credit` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseCredit) GetDataOk() (*Credit, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseCredit) SetData(v Credit)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDashboard.md b/azion-api/docs/ResponseDashboard.md new file mode 100644 index 0000000..512ca4c --- /dev/null +++ b/azion-api/docs/ResponseDashboard.md @@ -0,0 +1,77 @@ +# ResponseDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Dashboard**](Dashboard.md) | | + +## Methods + +### NewResponseDashboard + +`func NewResponseDashboard(data Dashboard, ) *ResponseDashboard` + +NewResponseDashboard instantiates a new ResponseDashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDashboardWithDefaults + +`func NewResponseDashboardWithDefaults() *ResponseDashboard` + +NewResponseDashboardWithDefaults instantiates a new ResponseDashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDashboard) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDashboard) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDashboard) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDashboard) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseDashboard) GetData() Dashboard` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDashboard) GetDataOk() (*Dashboard, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDashboard) SetData(v Dashboard)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteChatThread.md b/azion-api/docs/ResponseDeleteChatThread.md new file mode 100644 index 0000000..02c2adc --- /dev/null +++ b/azion-api/docs/ResponseDeleteChatThread.md @@ -0,0 +1,56 @@ +# ResponseDeleteChatThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteChatThread + +`func NewResponseDeleteChatThread() *ResponseDeleteChatThread` + +NewResponseDeleteChatThread instantiates a new ResponseDeleteChatThread object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteChatThreadWithDefaults + +`func NewResponseDeleteChatThreadWithDefaults() *ResponseDeleteChatThread` + +NewResponseDeleteChatThreadWithDefaults instantiates a new ResponseDeleteChatThread object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteChatThread) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteChatThread) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteChatThread) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteChatThread) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteContinuousDeployment.md b/azion-api/docs/ResponseDeleteContinuousDeployment.md new file mode 100644 index 0000000..2ce4dd8 --- /dev/null +++ b/azion-api/docs/ResponseDeleteContinuousDeployment.md @@ -0,0 +1,56 @@ +# ResponseDeleteContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteContinuousDeployment + +`func NewResponseDeleteContinuousDeployment() *ResponseDeleteContinuousDeployment` + +NewResponseDeleteContinuousDeployment instantiates a new ResponseDeleteContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteContinuousDeploymentWithDefaults + +`func NewResponseDeleteContinuousDeploymentWithDefaults() *ResponseDeleteContinuousDeployment` + +NewResponseDeleteContinuousDeploymentWithDefaults instantiates a new ResponseDeleteContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteContinuousDeployment) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteContinuousDeployment) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteContinuousDeployment) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteContinuousDeployment) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteDashboard.md b/azion-api/docs/ResponseDeleteDashboard.md new file mode 100644 index 0000000..dfcb3b7 --- /dev/null +++ b/azion-api/docs/ResponseDeleteDashboard.md @@ -0,0 +1,56 @@ +# ResponseDeleteDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteDashboard + +`func NewResponseDeleteDashboard() *ResponseDeleteDashboard` + +NewResponseDeleteDashboard instantiates a new ResponseDeleteDashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteDashboardWithDefaults + +`func NewResponseDeleteDashboardWithDefaults() *ResponseDeleteDashboard` + +NewResponseDeleteDashboardWithDefaults instantiates a new ResponseDeleteDashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteDashboard) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteDashboard) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteDashboard) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteDashboard) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteDocument.md b/azion-api/docs/ResponseDeleteDocument.md new file mode 100644 index 0000000..09746a2 --- /dev/null +++ b/azion-api/docs/ResponseDeleteDocument.md @@ -0,0 +1,56 @@ +# ResponseDeleteDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteDocument + +`func NewResponseDeleteDocument() *ResponseDeleteDocument` + +NewResponseDeleteDocument instantiates a new ResponseDeleteDocument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteDocumentWithDefaults + +`func NewResponseDeleteDocumentWithDefaults() *ResponseDeleteDocument` + +NewResponseDeleteDocumentWithDefaults instantiates a new ResponseDeleteDocument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteDocument) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteDocument) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteDocument) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteDocument) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteFavorite.md b/azion-api/docs/ResponseDeleteFavorite.md new file mode 100644 index 0000000..57aa351 --- /dev/null +++ b/azion-api/docs/ResponseDeleteFavorite.md @@ -0,0 +1,82 @@ +# ResponseDeleteFavorite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**NullableFavorite**](Favorite.md) | | + +## Methods + +### NewResponseDeleteFavorite + +`func NewResponseDeleteFavorite(state string, data NullableFavorite, ) *ResponseDeleteFavorite` + +NewResponseDeleteFavorite instantiates a new ResponseDeleteFavorite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteFavoriteWithDefaults + +`func NewResponseDeleteFavoriteWithDefaults() *ResponseDeleteFavorite` + +NewResponseDeleteFavoriteWithDefaults instantiates a new ResponseDeleteFavorite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteFavorite) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteFavorite) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteFavorite) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseDeleteFavorite) GetData() Favorite` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDeleteFavorite) GetDataOk() (*Favorite, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDeleteFavorite) SetData(v Favorite)` + +SetData sets Data field to given value. + + +### SetDataNil + +`func (o *ResponseDeleteFavorite) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *ResponseDeleteFavorite) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteFolder.md b/azion-api/docs/ResponseDeleteFolder.md new file mode 100644 index 0000000..e3ccf5b --- /dev/null +++ b/azion-api/docs/ResponseDeleteFolder.md @@ -0,0 +1,56 @@ +# ResponseDeleteFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteFolder + +`func NewResponseDeleteFolder() *ResponseDeleteFolder` + +NewResponseDeleteFolder instantiates a new ResponseDeleteFolder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteFolderWithDefaults + +`func NewResponseDeleteFolderWithDefaults() *ResponseDeleteFolder` + +NewResponseDeleteFolderWithDefaults instantiates a new ResponseDeleteFolder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteFolder) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteFolder) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteFolder) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteFolder) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteGrant.md b/azion-api/docs/ResponseDeleteGrant.md new file mode 100644 index 0000000..2717b40 --- /dev/null +++ b/azion-api/docs/ResponseDeleteGrant.md @@ -0,0 +1,82 @@ +# ResponseDeleteGrant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**NullableGrant**](Grant.md) | | + +## Methods + +### NewResponseDeleteGrant + +`func NewResponseDeleteGrant(state string, data NullableGrant, ) *ResponseDeleteGrant` + +NewResponseDeleteGrant instantiates a new ResponseDeleteGrant object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteGrantWithDefaults + +`func NewResponseDeleteGrantWithDefaults() *ResponseDeleteGrant` + +NewResponseDeleteGrantWithDefaults instantiates a new ResponseDeleteGrant object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteGrant) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteGrant) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteGrant) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseDeleteGrant) GetData() Grant` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDeleteGrant) GetDataOk() (*Grant, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDeleteGrant) SetData(v Grant)` + +SetData sets Data field to given value. + + +### SetDataNil + +`func (o *ResponseDeleteGrant) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *ResponseDeleteGrant) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteGroup.md b/azion-api/docs/ResponseDeleteGroup.md new file mode 100644 index 0000000..3675910 --- /dev/null +++ b/azion-api/docs/ResponseDeleteGroup.md @@ -0,0 +1,82 @@ +# ResponseDeleteGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**NullableGroup**](Group.md) | | + +## Methods + +### NewResponseDeleteGroup + +`func NewResponseDeleteGroup(state string, data NullableGroup, ) *ResponseDeleteGroup` + +NewResponseDeleteGroup instantiates a new ResponseDeleteGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteGroupWithDefaults + +`func NewResponseDeleteGroupWithDefaults() *ResponseDeleteGroup` + +NewResponseDeleteGroupWithDefaults instantiates a new ResponseDeleteGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteGroup) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteGroup) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteGroup) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseDeleteGroup) GetData() Group` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDeleteGroup) GetDataOk() (*Group, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDeleteGroup) SetData(v Group)` + +SetData sets Data field to given value. + + +### SetDataNil + +`func (o *ResponseDeleteGroup) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *ResponseDeleteGroup) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteIntegration.md b/azion-api/docs/ResponseDeleteIntegration.md new file mode 100644 index 0000000..3548631 --- /dev/null +++ b/azion-api/docs/ResponseDeleteIntegration.md @@ -0,0 +1,56 @@ +# ResponseDeleteIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteIntegration + +`func NewResponseDeleteIntegration() *ResponseDeleteIntegration` + +NewResponseDeleteIntegration instantiates a new ResponseDeleteIntegration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteIntegrationWithDefaults + +`func NewResponseDeleteIntegrationWithDefaults() *ResponseDeleteIntegration` + +NewResponseDeleteIntegrationWithDefaults instantiates a new ResponseDeleteIntegration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteIntegration) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteIntegration) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteIntegration) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteIntegration) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteKnowledgeBase.md b/azion-api/docs/ResponseDeleteKnowledgeBase.md new file mode 100644 index 0000000..37c0e80 --- /dev/null +++ b/azion-api/docs/ResponseDeleteKnowledgeBase.md @@ -0,0 +1,56 @@ +# ResponseDeleteKnowledgeBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteKnowledgeBase + +`func NewResponseDeleteKnowledgeBase() *ResponseDeleteKnowledgeBase` + +NewResponseDeleteKnowledgeBase instantiates a new ResponseDeleteKnowledgeBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteKnowledgeBaseWithDefaults + +`func NewResponseDeleteKnowledgeBaseWithDefaults() *ResponseDeleteKnowledgeBase` + +NewResponseDeleteKnowledgeBaseWithDefaults instantiates a new ResponseDeleteKnowledgeBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteKnowledgeBase) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteKnowledgeBase) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteKnowledgeBase) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteKnowledgeBase) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteMessage.md b/azion-api/docs/ResponseDeleteMessage.md new file mode 100644 index 0000000..949b80f --- /dev/null +++ b/azion-api/docs/ResponseDeleteMessage.md @@ -0,0 +1,56 @@ +# ResponseDeleteMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteMessage + +`func NewResponseDeleteMessage() *ResponseDeleteMessage` + +NewResponseDeleteMessage instantiates a new ResponseDeleteMessage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteMessageWithDefaults + +`func NewResponseDeleteMessageWithDefaults() *ResponseDeleteMessage` + +NewResponseDeleteMessageWithDefaults instantiates a new ResponseDeleteMessage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteMessage) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteMessage) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteMessage) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteMessage) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeletePaymentMethod.md b/azion-api/docs/ResponseDeletePaymentMethod.md new file mode 100644 index 0000000..7b90ce5 --- /dev/null +++ b/azion-api/docs/ResponseDeletePaymentMethod.md @@ -0,0 +1,56 @@ +# ResponseDeletePaymentMethod + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeletePaymentMethod + +`func NewResponseDeletePaymentMethod() *ResponseDeletePaymentMethod` + +NewResponseDeletePaymentMethod instantiates a new ResponseDeletePaymentMethod object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeletePaymentMethodWithDefaults + +`func NewResponseDeletePaymentMethodWithDefaults() *ResponseDeletePaymentMethod` + +NewResponseDeletePaymentMethodWithDefaults instantiates a new ResponseDeletePaymentMethod object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeletePaymentMethod) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeletePaymentMethod) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeletePaymentMethod) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeletePaymentMethod) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteRecommendation.md b/azion-api/docs/ResponseDeleteRecommendation.md new file mode 100644 index 0000000..ba036a3 --- /dev/null +++ b/azion-api/docs/ResponseDeleteRecommendation.md @@ -0,0 +1,56 @@ +# ResponseDeleteRecommendation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteRecommendation + +`func NewResponseDeleteRecommendation() *ResponseDeleteRecommendation` + +NewResponseDeleteRecommendation instantiates a new ResponseDeleteRecommendation object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteRecommendationWithDefaults + +`func NewResponseDeleteRecommendationWithDefaults() *ResponseDeleteRecommendation` + +NewResponseDeleteRecommendationWithDefaults instantiates a new ResponseDeleteRecommendation object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteRecommendation) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteRecommendation) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteRecommendation) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteRecommendation) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteReport.md b/azion-api/docs/ResponseDeleteReport.md new file mode 100644 index 0000000..b68ec4e --- /dev/null +++ b/azion-api/docs/ResponseDeleteReport.md @@ -0,0 +1,56 @@ +# ResponseDeleteReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteReport + +`func NewResponseDeleteReport() *ResponseDeleteReport` + +NewResponseDeleteReport instantiates a new ResponseDeleteReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteReportWithDefaults + +`func NewResponseDeleteReportWithDefaults() *ResponseDeleteReport` + +NewResponseDeleteReportWithDefaults instantiates a new ResponseDeleteReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteReport) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteReport) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteReport) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteReport) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteRow.md b/azion-api/docs/ResponseDeleteRow.md new file mode 100644 index 0000000..f764df8 --- /dev/null +++ b/azion-api/docs/ResponseDeleteRow.md @@ -0,0 +1,56 @@ +# ResponseDeleteRow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteRow + +`func NewResponseDeleteRow() *ResponseDeleteRow` + +NewResponseDeleteRow instantiates a new ResponseDeleteRow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteRowWithDefaults + +`func NewResponseDeleteRowWithDefaults() *ResponseDeleteRow` + +NewResponseDeleteRowWithDefaults instantiates a new ResponseDeleteRow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteRow) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteRow) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteRow) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteRow) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteServiceToken.md b/azion-api/docs/ResponseDeleteServiceToken.md new file mode 100644 index 0000000..68880d1 --- /dev/null +++ b/azion-api/docs/ResponseDeleteServiceToken.md @@ -0,0 +1,82 @@ +# ResponseDeleteServiceToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**NullableServiceToken**](ServiceToken.md) | | + +## Methods + +### NewResponseDeleteServiceToken + +`func NewResponseDeleteServiceToken(state string, data NullableServiceToken, ) *ResponseDeleteServiceToken` + +NewResponseDeleteServiceToken instantiates a new ResponseDeleteServiceToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteServiceTokenWithDefaults + +`func NewResponseDeleteServiceTokenWithDefaults() *ResponseDeleteServiceToken` + +NewResponseDeleteServiceTokenWithDefaults instantiates a new ResponseDeleteServiceToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteServiceToken) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteServiceToken) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteServiceToken) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseDeleteServiceToken) GetData() ServiceToken` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDeleteServiceToken) GetDataOk() (*ServiceToken, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDeleteServiceToken) SetData(v ServiceToken)` + +SetData sets Data field to given value. + + +### SetDataNil + +`func (o *ResponseDeleteServiceToken) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *ResponseDeleteServiceToken) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteTool.md b/azion-api/docs/ResponseDeleteTool.md new file mode 100644 index 0000000..82aec70 --- /dev/null +++ b/azion-api/docs/ResponseDeleteTool.md @@ -0,0 +1,56 @@ +# ResponseDeleteTool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseDeleteTool + +`func NewResponseDeleteTool() *ResponseDeleteTool` + +NewResponseDeleteTool instantiates a new ResponseDeleteTool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteToolWithDefaults + +`func NewResponseDeleteToolWithDefaults() *ResponseDeleteTool` + +NewResponseDeleteToolWithDefaults instantiates a new ResponseDeleteTool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteTool) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteTool) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteTool) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDeleteTool) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDeleteUser.md b/azion-api/docs/ResponseDeleteUser.md new file mode 100644 index 0000000..bb32947 --- /dev/null +++ b/azion-api/docs/ResponseDeleteUser.md @@ -0,0 +1,82 @@ +# ResponseDeleteUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**NullableUser**](User.md) | | + +## Methods + +### NewResponseDeleteUser + +`func NewResponseDeleteUser(state string, data NullableUser, ) *ResponseDeleteUser` + +NewResponseDeleteUser instantiates a new ResponseDeleteUser object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDeleteUserWithDefaults + +`func NewResponseDeleteUserWithDefaults() *ResponseDeleteUser` + +NewResponseDeleteUserWithDefaults instantiates a new ResponseDeleteUser object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDeleteUser) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDeleteUser) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDeleteUser) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseDeleteUser) GetData() User` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDeleteUser) GetDataOk() (*User, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDeleteUser) SetData(v User)` + +SetData sets Data field to given value. + + +### SetDataNil + +`func (o *ResponseDeleteUser) SetDataNil(b bool)` + + SetDataNil sets the value for Data to be an explicit nil + +### UnsetData +`func (o *ResponseDeleteUser) UnsetData()` + +UnsetData ensures that no value is present for Data, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseDocument.md b/azion-api/docs/ResponseDocument.md new file mode 100644 index 0000000..a79f135 --- /dev/null +++ b/azion-api/docs/ResponseDocument.md @@ -0,0 +1,77 @@ +# ResponseDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Document**](Document.md) | | + +## Methods + +### NewResponseDocument + +`func NewResponseDocument(data Document, ) *ResponseDocument` + +NewResponseDocument instantiates a new ResponseDocument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseDocumentWithDefaults + +`func NewResponseDocumentWithDefaults() *ResponseDocument` + +NewResponseDocumentWithDefaults instantiates a new ResponseDocument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseDocument) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseDocument) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseDocument) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseDocument) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseDocument) GetData() Document` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseDocument) GetDataOk() (*Document, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseDocument) SetData(v Document)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseExecution.md b/azion-api/docs/ResponseExecution.md new file mode 100644 index 0000000..3f6a4a8 --- /dev/null +++ b/azion-api/docs/ResponseExecution.md @@ -0,0 +1,77 @@ +# ResponseExecution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Execution**](Execution.md) | | + +## Methods + +### NewResponseExecution + +`func NewResponseExecution(data Execution, ) *ResponseExecution` + +NewResponseExecution instantiates a new ResponseExecution object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseExecutionWithDefaults + +`func NewResponseExecutionWithDefaults() *ResponseExecution` + +NewResponseExecutionWithDefaults instantiates a new ResponseExecution object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseExecution) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseExecution) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseExecution) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseExecution) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseExecution) GetData() Execution` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseExecution) GetDataOk() (*Execution, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseExecution) SetData(v Execution)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseExecutor.md b/azion-api/docs/ResponseExecutor.md new file mode 100644 index 0000000..dd30c8e --- /dev/null +++ b/azion-api/docs/ResponseExecutor.md @@ -0,0 +1,77 @@ +# ResponseExecutor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Executor**](Executor.md) | | + +## Methods + +### NewResponseExecutor + +`func NewResponseExecutor(data Executor, ) *ResponseExecutor` + +NewResponseExecutor instantiates a new ResponseExecutor object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseExecutorWithDefaults + +`func NewResponseExecutorWithDefaults() *ResponseExecutor` + +NewResponseExecutorWithDefaults instantiates a new ResponseExecutor object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseExecutor) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseExecutor) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseExecutor) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseExecutor) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseExecutor) GetData() Executor` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseExecutor) GetDataOk() (*Executor, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseExecutor) SetData(v Executor)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseFavorite.md b/azion-api/docs/ResponseFavorite.md new file mode 100644 index 0000000..01d7817 --- /dev/null +++ b/azion-api/docs/ResponseFavorite.md @@ -0,0 +1,72 @@ +# ResponseFavorite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**Favorite**](Favorite.md) | | + +## Methods + +### NewResponseFavorite + +`func NewResponseFavorite(state string, data Favorite, ) *ResponseFavorite` + +NewResponseFavorite instantiates a new ResponseFavorite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseFavoriteWithDefaults + +`func NewResponseFavoriteWithDefaults() *ResponseFavorite` + +NewResponseFavoriteWithDefaults instantiates a new ResponseFavorite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseFavorite) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseFavorite) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseFavorite) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseFavorite) GetData() Favorite` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseFavorite) GetDataOk() (*Favorite, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseFavorite) SetData(v Favorite)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseFolder.md b/azion-api/docs/ResponseFolder.md new file mode 100644 index 0000000..5aecb50 --- /dev/null +++ b/azion-api/docs/ResponseFolder.md @@ -0,0 +1,77 @@ +# ResponseFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Folder**](Folder.md) | | + +## Methods + +### NewResponseFolder + +`func NewResponseFolder(data Folder, ) *ResponseFolder` + +NewResponseFolder instantiates a new ResponseFolder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseFolderWithDefaults + +`func NewResponseFolderWithDefaults() *ResponseFolder` + +NewResponseFolderWithDefaults instantiates a new ResponseFolder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseFolder) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseFolder) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseFolder) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseFolder) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseFolder) GetData() Folder` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseFolder) GetDataOk() (*Folder, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseFolder) SetData(v Folder)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseGrant.md b/azion-api/docs/ResponseGrant.md new file mode 100644 index 0000000..c6cc569 --- /dev/null +++ b/azion-api/docs/ResponseGrant.md @@ -0,0 +1,72 @@ +# ResponseGrant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**Grant**](Grant.md) | | + +## Methods + +### NewResponseGrant + +`func NewResponseGrant(state string, data Grant, ) *ResponseGrant` + +NewResponseGrant instantiates a new ResponseGrant object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseGrantWithDefaults + +`func NewResponseGrantWithDefaults() *ResponseGrant` + +NewResponseGrantWithDefaults instantiates a new ResponseGrant object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseGrant) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseGrant) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseGrant) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseGrant) GetData() Grant` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseGrant) GetDataOk() (*Grant, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseGrant) SetData(v Grant)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseGroup.md b/azion-api/docs/ResponseGroup.md new file mode 100644 index 0000000..cfdaaae --- /dev/null +++ b/azion-api/docs/ResponseGroup.md @@ -0,0 +1,72 @@ +# ResponseGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**Group**](Group.md) | | + +## Methods + +### NewResponseGroup + +`func NewResponseGroup(state string, data Group, ) *ResponseGroup` + +NewResponseGroup instantiates a new ResponseGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseGroupWithDefaults + +`func NewResponseGroupWithDefaults() *ResponseGroup` + +NewResponseGroupWithDefaults instantiates a new ResponseGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseGroup) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseGroup) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseGroup) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseGroup) GetData() Group` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseGroup) GetDataOk() (*Group, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseGroup) SetData(v Group)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseGroupMembers.md b/azion-api/docs/ResponseGroupMembers.md new file mode 100644 index 0000000..51fe931 --- /dev/null +++ b/azion-api/docs/ResponseGroupMembers.md @@ -0,0 +1,72 @@ +# ResponseGroupMembers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**GroupMembers**](GroupMembers.md) | | + +## Methods + +### NewResponseGroupMembers + +`func NewResponseGroupMembers(state string, data GroupMembers, ) *ResponseGroupMembers` + +NewResponseGroupMembers instantiates a new ResponseGroupMembers object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseGroupMembersWithDefaults + +`func NewResponseGroupMembersWithDefaults() *ResponseGroupMembers` + +NewResponseGroupMembersWithDefaults instantiates a new ResponseGroupMembers object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseGroupMembers) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseGroupMembers) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseGroupMembers) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseGroupMembers) GetData() GroupMembers` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseGroupMembers) GetDataOk() (*GroupMembers, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseGroupMembers) SetData(v GroupMembers)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseKnowledgeBase.md b/azion-api/docs/ResponseKnowledgeBase.md new file mode 100644 index 0000000..e132481 --- /dev/null +++ b/azion-api/docs/ResponseKnowledgeBase.md @@ -0,0 +1,77 @@ +# ResponseKnowledgeBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**KnowledgeBase**](KnowledgeBase.md) | | + +## Methods + +### NewResponseKnowledgeBase + +`func NewResponseKnowledgeBase(data KnowledgeBase, ) *ResponseKnowledgeBase` + +NewResponseKnowledgeBase instantiates a new ResponseKnowledgeBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseKnowledgeBaseWithDefaults + +`func NewResponseKnowledgeBaseWithDefaults() *ResponseKnowledgeBase` + +NewResponseKnowledgeBaseWithDefaults instantiates a new ResponseKnowledgeBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseKnowledgeBase) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseKnowledgeBase) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseKnowledgeBase) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseKnowledgeBase) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseKnowledgeBase) GetData() KnowledgeBase` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseKnowledgeBase) GetDataOk() (*KnowledgeBase, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseKnowledgeBase) SetData(v KnowledgeBase)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListAccount.md b/azion-api/docs/ResponseListAccount.md new file mode 100644 index 0000000..b61299c --- /dev/null +++ b/azion-api/docs/ResponseListAccount.md @@ -0,0 +1,329 @@ +# ResponseListAccount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ParentId** | **int64** | | +**Created** | **time.Time** | | +**Info** | **map[string]map[string]interface{}** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | +**Status** | **string** | * `active` - Active account status, can be used for regular operations. * `suspended` - Suspended account status, for accounts with limited access to support and payments only. * `disabled` - Disabled account status, services are offline, user can only access support. * `closed` - Closed account status, services are offline but can be reactivated. | +**Reason** | **string** | * `trial` - Trial account status, currently on a trial period. * `online` - Online account status, used for online sales operations. * `regular` - Regular account status, indicates the customer has an active contract. * `overdue` - Overdue status, the account failed necessary payments after retries. * `quarantine` - Quarantine status, the account is suspended due to suspected misuse or security breach. * `violation` - Violation status, temporarily suspended due to administrative, technical, security, or policy violations. * `idle` - Idle status, the account was removed due to inactivity. * `terminated` - Terminated status, the account was shut down by the service provider. * `voluntary` - Voluntary status, the account was canceled by its owner. | +**CurrencyIsoCode** | **string** | * `USD` - USD * `BRL` - BRL | +**TermsOfServiceUrl** | Pointer to **string** | | [optional] +**WorkspaceId** | **string** | | + +## Methods + +### NewResponseListAccount + +`func NewResponseListAccount(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]map[string]interface{}, type_ string, status string, reason string, currencyIsoCode string, workspaceId string, ) *ResponseListAccount` + +NewResponseListAccount instantiates a new ResponseListAccount object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListAccountWithDefaults + +`func NewResponseListAccountWithDefaults() *ResponseListAccount` + +NewResponseListAccountWithDefaults instantiates a new ResponseListAccount object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListAccount) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListAccount) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListAccount) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListAccount) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListAccount) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListAccount) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ResponseListAccount) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListAccount) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListAccount) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *ResponseListAccount) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListAccount) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListAccount) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListAccount) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListAccount) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListAccount) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetParentId + +`func (o *ResponseListAccount) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *ResponseListAccount) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *ResponseListAccount) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCreated + +`func (o *ResponseListAccount) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseListAccount) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseListAccount) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetInfo + +`func (o *ResponseListAccount) GetInfo() map[string]map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *ResponseListAccount) GetInfoOk() (*map[string]map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *ResponseListAccount) SetInfo(v map[string]map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetType + +`func (o *ResponseListAccount) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseListAccount) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseListAccount) SetType(v string)` + +SetType sets Type field to given value. + + +### GetStatus + +`func (o *ResponseListAccount) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ResponseListAccount) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ResponseListAccount) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetReason + +`func (o *ResponseListAccount) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *ResponseListAccount) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *ResponseListAccount) SetReason(v string)` + +SetReason sets Reason field to given value. + + +### GetCurrencyIsoCode + +`func (o *ResponseListAccount) GetCurrencyIsoCode() string` + +GetCurrencyIsoCode returns the CurrencyIsoCode field if non-nil, zero value otherwise. + +### GetCurrencyIsoCodeOk + +`func (o *ResponseListAccount) GetCurrencyIsoCodeOk() (*string, bool)` + +GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrencyIsoCode + +`func (o *ResponseListAccount) SetCurrencyIsoCode(v string)` + +SetCurrencyIsoCode sets CurrencyIsoCode field to given value. + + +### GetTermsOfServiceUrl + +`func (o *ResponseListAccount) GetTermsOfServiceUrl() string` + +GetTermsOfServiceUrl returns the TermsOfServiceUrl field if non-nil, zero value otherwise. + +### GetTermsOfServiceUrlOk + +`func (o *ResponseListAccount) GetTermsOfServiceUrlOk() (*string, bool)` + +GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTermsOfServiceUrl + +`func (o *ResponseListAccount) SetTermsOfServiceUrl(v string)` + +SetTermsOfServiceUrl sets TermsOfServiceUrl field to given value. + +### HasTermsOfServiceUrl + +`func (o *ResponseListAccount) HasTermsOfServiceUrl() bool` + +HasTermsOfServiceUrl returns a boolean if a field has been set. + +### GetWorkspaceId + +`func (o *ResponseListAccount) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *ResponseListAccount) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *ResponseListAccount) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListContinuousDeployment.md b/azion-api/docs/ResponseListContinuousDeployment.md new file mode 100644 index 0000000..719863e --- /dev/null +++ b/azion-api/docs/ResponseListContinuousDeployment.md @@ -0,0 +1,296 @@ +# ResponseListContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Repository** | **string** | | +**Branch** | **string** | | +**BuildContext** | [**[]BuildContextField**](BuildContextField.md) | | +**DeployContext** | Pointer to **map[string]interface{}** | | [optional] +**Integration** | [**Integration**](Integration.md) | | +**ExecutionScript** | [**ExecutionScript**](ExecutionScript.md) | | +**Created** | **NullableTime** | Created date of the continuous deployment. | +**LastEditor** | **NullableString** | Last editor of the continuous deployment. | +**LastModified** | **NullableTime** | Last modified date of the continuous deployment. | + +## Methods + +### NewResponseListContinuousDeployment + +`func NewResponseListContinuousDeployment(id int64, name string, repository string, branch string, buildContext []BuildContextField, integration Integration, executionScript ExecutionScript, created NullableTime, lastEditor NullableString, lastModified NullableTime, ) *ResponseListContinuousDeployment` + +NewResponseListContinuousDeployment instantiates a new ResponseListContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListContinuousDeploymentWithDefaults + +`func NewResponseListContinuousDeploymentWithDefaults() *ResponseListContinuousDeployment` + +NewResponseListContinuousDeploymentWithDefaults instantiates a new ResponseListContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListContinuousDeployment) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListContinuousDeployment) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListContinuousDeployment) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListContinuousDeployment) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListContinuousDeployment) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListContinuousDeployment) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRepository + +`func (o *ResponseListContinuousDeployment) GetRepository() string` + +GetRepository returns the Repository field if non-nil, zero value otherwise. + +### GetRepositoryOk + +`func (o *ResponseListContinuousDeployment) GetRepositoryOk() (*string, bool)` + +GetRepositoryOk returns a tuple with the Repository field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRepository + +`func (o *ResponseListContinuousDeployment) SetRepository(v string)` + +SetRepository sets Repository field to given value. + + +### GetBranch + +`func (o *ResponseListContinuousDeployment) GetBranch() string` + +GetBranch returns the Branch field if non-nil, zero value otherwise. + +### GetBranchOk + +`func (o *ResponseListContinuousDeployment) GetBranchOk() (*string, bool)` + +GetBranchOk returns a tuple with the Branch field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBranch + +`func (o *ResponseListContinuousDeployment) SetBranch(v string)` + +SetBranch sets Branch field to given value. + + +### GetBuildContext + +`func (o *ResponseListContinuousDeployment) GetBuildContext() []BuildContextField` + +GetBuildContext returns the BuildContext field if non-nil, zero value otherwise. + +### GetBuildContextOk + +`func (o *ResponseListContinuousDeployment) GetBuildContextOk() (*[]BuildContextField, bool)` + +GetBuildContextOk returns a tuple with the BuildContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBuildContext + +`func (o *ResponseListContinuousDeployment) SetBuildContext(v []BuildContextField)` + +SetBuildContext sets BuildContext field to given value. + + +### GetDeployContext + +`func (o *ResponseListContinuousDeployment) GetDeployContext() map[string]interface{}` + +GetDeployContext returns the DeployContext field if non-nil, zero value otherwise. + +### GetDeployContextOk + +`func (o *ResponseListContinuousDeployment) GetDeployContextOk() (*map[string]interface{}, bool)` + +GetDeployContextOk returns a tuple with the DeployContext field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeployContext + +`func (o *ResponseListContinuousDeployment) SetDeployContext(v map[string]interface{})` + +SetDeployContext sets DeployContext field to given value. + +### HasDeployContext + +`func (o *ResponseListContinuousDeployment) HasDeployContext() bool` + +HasDeployContext returns a boolean if a field has been set. + +### GetIntegration + +`func (o *ResponseListContinuousDeployment) GetIntegration() Integration` + +GetIntegration returns the Integration field if non-nil, zero value otherwise. + +### GetIntegrationOk + +`func (o *ResponseListContinuousDeployment) GetIntegrationOk() (*Integration, bool)` + +GetIntegrationOk returns a tuple with the Integration field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIntegration + +`func (o *ResponseListContinuousDeployment) SetIntegration(v Integration)` + +SetIntegration sets Integration field to given value. + + +### GetExecutionScript + +`func (o *ResponseListContinuousDeployment) GetExecutionScript() ExecutionScript` + +GetExecutionScript returns the ExecutionScript field if non-nil, zero value otherwise. + +### GetExecutionScriptOk + +`func (o *ResponseListContinuousDeployment) GetExecutionScriptOk() (*ExecutionScript, bool)` + +GetExecutionScriptOk returns a tuple with the ExecutionScript field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExecutionScript + +`func (o *ResponseListContinuousDeployment) SetExecutionScript(v ExecutionScript)` + +SetExecutionScript sets ExecutionScript field to given value. + + +### GetCreated + +`func (o *ResponseListContinuousDeployment) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseListContinuousDeployment) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseListContinuousDeployment) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### SetCreatedNil + +`func (o *ResponseListContinuousDeployment) SetCreatedNil(b bool)` + + SetCreatedNil sets the value for Created to be an explicit nil + +### UnsetCreated +`func (o *ResponseListContinuousDeployment) UnsetCreated()` + +UnsetCreated ensures that no value is present for Created, not even an explicit nil +### GetLastEditor + +`func (o *ResponseListContinuousDeployment) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListContinuousDeployment) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListContinuousDeployment) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### SetLastEditorNil + +`func (o *ResponseListContinuousDeployment) SetLastEditorNil(b bool)` + + SetLastEditorNil sets the value for LastEditor to be an explicit nil + +### UnsetLastEditor +`func (o *ResponseListContinuousDeployment) UnsetLastEditor()` + +UnsetLastEditor ensures that no value is present for LastEditor, not even an explicit nil +### GetLastModified + +`func (o *ResponseListContinuousDeployment) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListContinuousDeployment) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListContinuousDeployment) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### SetLastModifiedNil + +`func (o *ResponseListContinuousDeployment) SetLastModifiedNil(b bool)` + + SetLastModifiedNil sets the value for LastModified to be an explicit nil + +### UnsetLastModified +`func (o *ResponseListContinuousDeployment) UnsetLastModified()` + +UnsetLastModified ensures that no value is present for LastModified, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListDashboard.md b/azion-api/docs/ResponseListDashboard.md new file mode 100644 index 0000000..efc58ee --- /dev/null +++ b/azion-api/docs/ResponseListDashboard.md @@ -0,0 +1,114 @@ +# ResponseListDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | +**FolderId** | **int64** | | + +## Methods + +### NewResponseListDashboard + +`func NewResponseListDashboard(id int64, name string, scope string, folderId int64, ) *ResponseListDashboard` + +NewResponseListDashboard instantiates a new ResponseListDashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListDashboardWithDefaults + +`func NewResponseListDashboardWithDefaults() *ResponseListDashboard` + +NewResponseListDashboardWithDefaults instantiates a new ResponseListDashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListDashboard) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListDashboard) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListDashboard) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListDashboard) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListDashboard) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListDashboard) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *ResponseListDashboard) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *ResponseListDashboard) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *ResponseListDashboard) SetScope(v string)` + +SetScope sets Scope field to given value. + + +### GetFolderId + +`func (o *ResponseListDashboard) GetFolderId() int64` + +GetFolderId returns the FolderId field if non-nil, zero value otherwise. + +### GetFolderIdOk + +`func (o *ResponseListDashboard) GetFolderIdOk() (*int64, bool)` + +GetFolderIdOk returns a tuple with the FolderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFolderId + +`func (o *ResponseListDashboard) SetFolderId(v int64)` + +SetFolderId sets FolderId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListExecution.md b/azion-api/docs/ResponseListExecution.md new file mode 100644 index 0000000..a6b11a5 --- /dev/null +++ b/azion-api/docs/ResponseListExecution.md @@ -0,0 +1,114 @@ +# ResponseListExecution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Status** | **string** | | +**CreatedAt** | **time.Time** | | +**UpdatedAt** | **time.Time** | | + +## Methods + +### NewResponseListExecution + +`func NewResponseListExecution(id int64, status string, createdAt time.Time, updatedAt time.Time, ) *ResponseListExecution` + +NewResponseListExecution instantiates a new ResponseListExecution object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListExecutionWithDefaults + +`func NewResponseListExecutionWithDefaults() *ResponseListExecution` + +NewResponseListExecutionWithDefaults instantiates a new ResponseListExecution object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListExecution) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListExecution) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListExecution) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetStatus + +`func (o *ResponseListExecution) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ResponseListExecution) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ResponseListExecution) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetCreatedAt + +`func (o *ResponseListExecution) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ResponseListExecution) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ResponseListExecution) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetUpdatedAt + +`func (o *ResponseListExecution) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *ResponseListExecution) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *ResponseListExecution) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListExecutionScript.md b/azion-api/docs/ResponseListExecutionScript.md new file mode 100644 index 0000000..e42676e --- /dev/null +++ b/azion-api/docs/ResponseListExecutionScript.md @@ -0,0 +1,93 @@ +# ResponseListExecutionScript + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**TemplateUuid** | **string** | | + +## Methods + +### NewResponseListExecutionScript + +`func NewResponseListExecutionScript(id int64, name string, templateUuid string, ) *ResponseListExecutionScript` + +NewResponseListExecutionScript instantiates a new ResponseListExecutionScript object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListExecutionScriptWithDefaults + +`func NewResponseListExecutionScriptWithDefaults() *ResponseListExecutionScript` + +NewResponseListExecutionScriptWithDefaults instantiates a new ResponseListExecutionScript object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListExecutionScript) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListExecutionScript) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListExecutionScript) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListExecutionScript) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListExecutionScript) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListExecutionScript) SetName(v string)` + +SetName sets Name field to given value. + + +### GetTemplateUuid + +`func (o *ResponseListExecutionScript) GetTemplateUuid() string` + +GetTemplateUuid returns the TemplateUuid field if non-nil, zero value otherwise. + +### GetTemplateUuidOk + +`func (o *ResponseListExecutionScript) GetTemplateUuidOk() (*string, bool)` + +GetTemplateUuidOk returns a tuple with the TemplateUuid field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplateUuid + +`func (o *ResponseListExecutionScript) SetTemplateUuid(v string)` + +SetTemplateUuid sets TemplateUuid field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListFavorite.md b/azion-api/docs/ResponseListFavorite.md new file mode 100644 index 0000000..fed464c --- /dev/null +++ b/azion-api/docs/ResponseListFavorite.md @@ -0,0 +1,114 @@ +# ResponseListFavorite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Uri** | **string** | | +**Type** | **string** | Favorite type | +**Name** | **string** | | + +## Methods + +### NewResponseListFavorite + +`func NewResponseListFavorite(id int64, uri string, type_ string, name string, ) *ResponseListFavorite` + +NewResponseListFavorite instantiates a new ResponseListFavorite object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListFavoriteWithDefaults + +`func NewResponseListFavoriteWithDefaults() *ResponseListFavorite` + +NewResponseListFavoriteWithDefaults instantiates a new ResponseListFavorite object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListFavorite) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListFavorite) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListFavorite) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetUri + +`func (o *ResponseListFavorite) GetUri() string` + +GetUri returns the Uri field if non-nil, zero value otherwise. + +### GetUriOk + +`func (o *ResponseListFavorite) GetUriOk() (*string, bool)` + +GetUriOk returns a tuple with the Uri field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUri + +`func (o *ResponseListFavorite) SetUri(v string)` + +SetUri sets Uri field to given value. + + +### GetType + +`func (o *ResponseListFavorite) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseListFavorite) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseListFavorite) SetType(v string)` + +SetType sets Type field to given value. + + +### GetName + +`func (o *ResponseListFavorite) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListFavorite) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListFavorite) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListFolder.md b/azion-api/docs/ResponseListFolder.md new file mode 100644 index 0000000..660d232 --- /dev/null +++ b/azion-api/docs/ResponseListFolder.md @@ -0,0 +1,93 @@ +# ResponseListFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Scope** | **string** | * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. | + +## Methods + +### NewResponseListFolder + +`func NewResponseListFolder(id int64, name string, scope string, ) *ResponseListFolder` + +NewResponseListFolder instantiates a new ResponseListFolder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListFolderWithDefaults + +`func NewResponseListFolderWithDefaults() *ResponseListFolder` + +NewResponseListFolderWithDefaults instantiates a new ResponseListFolder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListFolder) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListFolder) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListFolder) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListFolder) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListFolder) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListFolder) SetName(v string)` + +SetName sets Name field to given value. + + +### GetScope + +`func (o *ResponseListFolder) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *ResponseListFolder) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *ResponseListFolder) SetScope(v string)` + +SetScope sets Scope field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListGrant.md b/azion-api/docs/ResponseListGrant.md new file mode 100644 index 0000000..c669261 --- /dev/null +++ b/azion-api/docs/ResponseListGrant.md @@ -0,0 +1,207 @@ +# ResponseListGrant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Identity** | Pointer to **NullableInt64** | | [optional] +**Roles** | Pointer to **[]int64** | | [optional] +**Policies** | Pointer to **[]int64** | | [optional] +**Expires** | Pointer to **time.Time** | | [optional] +**Owner** | **bool** | | +**AccountId** | **int64** | | + +## Methods + +### NewResponseListGrant + +`func NewResponseListGrant(id int64, owner bool, accountId int64, ) *ResponseListGrant` + +NewResponseListGrant instantiates a new ResponseListGrant object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListGrantWithDefaults + +`func NewResponseListGrantWithDefaults() *ResponseListGrant` + +NewResponseListGrantWithDefaults instantiates a new ResponseListGrant object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListGrant) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListGrant) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListGrant) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetIdentity + +`func (o *ResponseListGrant) GetIdentity() int64` + +GetIdentity returns the Identity field if non-nil, zero value otherwise. + +### GetIdentityOk + +`func (o *ResponseListGrant) GetIdentityOk() (*int64, bool)` + +GetIdentityOk returns a tuple with the Identity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIdentity + +`func (o *ResponseListGrant) SetIdentity(v int64)` + +SetIdentity sets Identity field to given value. + +### HasIdentity + +`func (o *ResponseListGrant) HasIdentity() bool` + +HasIdentity returns a boolean if a field has been set. + +### SetIdentityNil + +`func (o *ResponseListGrant) SetIdentityNil(b bool)` + + SetIdentityNil sets the value for Identity to be an explicit nil + +### UnsetIdentity +`func (o *ResponseListGrant) UnsetIdentity()` + +UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +### GetRoles + +`func (o *ResponseListGrant) GetRoles() []int64` + +GetRoles returns the Roles field if non-nil, zero value otherwise. + +### GetRolesOk + +`func (o *ResponseListGrant) GetRolesOk() (*[]int64, bool)` + +GetRolesOk returns a tuple with the Roles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRoles + +`func (o *ResponseListGrant) SetRoles(v []int64)` + +SetRoles sets Roles field to given value. + +### HasRoles + +`func (o *ResponseListGrant) HasRoles() bool` + +HasRoles returns a boolean if a field has been set. + +### GetPolicies + +`func (o *ResponseListGrant) GetPolicies() []int64` + +GetPolicies returns the Policies field if non-nil, zero value otherwise. + +### GetPoliciesOk + +`func (o *ResponseListGrant) GetPoliciesOk() (*[]int64, bool)` + +GetPoliciesOk returns a tuple with the Policies field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPolicies + +`func (o *ResponseListGrant) SetPolicies(v []int64)` + +SetPolicies sets Policies field to given value. + +### HasPolicies + +`func (o *ResponseListGrant) HasPolicies() bool` + +HasPolicies returns a boolean if a field has been set. + +### GetExpires + +`func (o *ResponseListGrant) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ResponseListGrant) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ResponseListGrant) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + +### HasExpires + +`func (o *ResponseListGrant) HasExpires() bool` + +HasExpires returns a boolean if a field has been set. + +### GetOwner + +`func (o *ResponseListGrant) GetOwner() bool` + +GetOwner returns the Owner field if non-nil, zero value otherwise. + +### GetOwnerOk + +`func (o *ResponseListGrant) GetOwnerOk() (*bool, bool)` + +GetOwnerOk returns a tuple with the Owner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOwner + +`func (o *ResponseListGrant) SetOwner(v bool)` + +SetOwner sets Owner field to given value. + + +### GetAccountId + +`func (o *ResponseListGrant) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ResponseListGrant) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ResponseListGrant) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListGroup.md b/azion-api/docs/ResponseListGroup.md new file mode 100644 index 0000000..0a176c4 --- /dev/null +++ b/azion-api/docs/ResponseListGroup.md @@ -0,0 +1,203 @@ +# ResponseListGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | + +## Methods + +### NewResponseListGroup + +`func NewResponseListGroup(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, ) *ResponseListGroup` + +NewResponseListGroup instantiates a new ResponseListGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListGroupWithDefaults + +`func NewResponseListGroupWithDefaults() *ResponseListGroup` + +NewResponseListGroupWithDefaults instantiates a new ResponseListGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListGroup) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListGroup) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListGroup) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListGroup) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListGroup) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListGroup) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *ResponseListGroup) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ResponseListGroup) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *ResponseListGroup) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *ResponseListGroup) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseListGroup) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseListGroup) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *ResponseListGroup) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListGroup) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListGroup) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListGroup) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListGroup) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListGroup) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ResponseListGroup) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListGroup) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListGroup) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponseListGroup) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *ResponseListGroup) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ResponseListGroup) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ResponseListGroup) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListIntegration.md b/azion-api/docs/ResponseListIntegration.md new file mode 100644 index 0000000..742821d --- /dev/null +++ b/azion-api/docs/ResponseListIntegration.md @@ -0,0 +1,114 @@ +# ResponseListIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Scope** | **string** | | +**ScopeType** | **string** | | +**Provider** | [**Platform**](Platform.md) | | + +## Methods + +### NewResponseListIntegration + +`func NewResponseListIntegration(id int64, scope string, scopeType string, provider Platform, ) *ResponseListIntegration` + +NewResponseListIntegration instantiates a new ResponseListIntegration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListIntegrationWithDefaults + +`func NewResponseListIntegrationWithDefaults() *ResponseListIntegration` + +NewResponseListIntegrationWithDefaults instantiates a new ResponseListIntegration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListIntegration) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListIntegration) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListIntegration) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetScope + +`func (o *ResponseListIntegration) GetScope() string` + +GetScope returns the Scope field if non-nil, zero value otherwise. + +### GetScopeOk + +`func (o *ResponseListIntegration) GetScopeOk() (*string, bool)` + +GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScope + +`func (o *ResponseListIntegration) SetScope(v string)` + +SetScope sets Scope field to given value. + + +### GetScopeType + +`func (o *ResponseListIntegration) GetScopeType() string` + +GetScopeType returns the ScopeType field if non-nil, zero value otherwise. + +### GetScopeTypeOk + +`func (o *ResponseListIntegration) GetScopeTypeOk() (*string, bool)` + +GetScopeTypeOk returns a tuple with the ScopeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetScopeType + +`func (o *ResponseListIntegration) SetScopeType(v string)` + +SetScopeType sets ScopeType field to given value. + + +### GetProvider + +`func (o *ResponseListIntegration) GetProvider() Platform` + +GetProvider returns the Provider field if non-nil, zero value otherwise. + +### GetProviderOk + +`func (o *ResponseListIntegration) GetProviderOk() (*Platform, bool)` + +GetProviderOk returns a tuple with the Provider field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProvider + +`func (o *ResponseListIntegration) SetProvider(v Platform)` + +SetProvider sets Provider field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListNodeGroupsById.md b/azion-api/docs/ResponseListNodeGroupsById.md new file mode 100644 index 0000000..9aecc2b --- /dev/null +++ b/azion-api/docs/ResponseListNodeGroupsById.md @@ -0,0 +1,77 @@ +# ResponseListNodeGroupsById + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseListNodeGroupsById + +`func NewResponseListNodeGroupsById(id int64, ) *ResponseListNodeGroupsById` + +NewResponseListNodeGroupsById instantiates a new ResponseListNodeGroupsById object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListNodeGroupsByIdWithDefaults + +`func NewResponseListNodeGroupsByIdWithDefaults() *ResponseListNodeGroupsById` + +NewResponseListNodeGroupsByIdWithDefaults instantiates a new ResponseListNodeGroupsById object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListNodeGroupsById) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListNodeGroupsById) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListNodeGroupsById) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListNodeGroupsById) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListNodeGroupsById) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListNodeGroupsById) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseListNodeGroupsById) HasName() bool` + +HasName returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListNodeServices.md b/azion-api/docs/ResponseListNodeServices.md new file mode 100644 index 0000000..8bb94a6 --- /dev/null +++ b/azion-api/docs/ResponseListNodeServices.md @@ -0,0 +1,171 @@ +# ResponseListNodeServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int64** | | [optional] +**ServiceName** | Pointer to **string** | | [optional] +**ServiceId** | **int64** | | +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **string** | | + +## Methods + +### NewResponseListNodeServices + +`func NewResponseListNodeServices(serviceId int64, lastEditor string, lastModified string, ) *ResponseListNodeServices` + +NewResponseListNodeServices instantiates a new ResponseListNodeServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListNodeServicesWithDefaults + +`func NewResponseListNodeServicesWithDefaults() *ResponseListNodeServices` + +NewResponseListNodeServicesWithDefaults instantiates a new ResponseListNodeServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListNodeServices) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListNodeServices) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListNodeServices) SetId(v int64)` + +SetId sets Id field to given value. + +### HasId + +`func (o *ResponseListNodeServices) HasId() bool` + +HasId returns a boolean if a field has been set. + +### GetServiceName + +`func (o *ResponseListNodeServices) GetServiceName() string` + +GetServiceName returns the ServiceName field if non-nil, zero value otherwise. + +### GetServiceNameOk + +`func (o *ResponseListNodeServices) GetServiceNameOk() (*string, bool)` + +GetServiceNameOk returns a tuple with the ServiceName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceName + +`func (o *ResponseListNodeServices) SetServiceName(v string)` + +SetServiceName sets ServiceName field to given value. + +### HasServiceName + +`func (o *ResponseListNodeServices) HasServiceName() bool` + +HasServiceName returns a boolean if a field has been set. + +### GetServiceId + +`func (o *ResponseListNodeServices) GetServiceId() int64` + +GetServiceId returns the ServiceId field if non-nil, zero value otherwise. + +### GetServiceIdOk + +`func (o *ResponseListNodeServices) GetServiceIdOk() (*int64, bool)` + +GetServiceIdOk returns a tuple with the ServiceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetServiceId + +`func (o *ResponseListNodeServices) SetServiceId(v int64)` + +SetServiceId sets ServiceId field to given value. + + +### GetActive + +`func (o *ResponseListNodeServices) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListNodeServices) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListNodeServices) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponseListNodeServices) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *ResponseListNodeServices) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListNodeServices) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListNodeServices) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListNodeServices) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListNodeServices) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListNodeServices) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListNodes.md b/azion-api/docs/ResponseListNodes.md new file mode 100644 index 0000000..044f359 --- /dev/null +++ b/azion-api/docs/ResponseListNodes.md @@ -0,0 +1,234 @@ +# ResponseListNodes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**HashId** | **string** | | +**Name** | **string** | | +**Status** | **string** | * `waiting_authorization` - waiting_authorization * `authorized` - authorized | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **string** | | +**Modules** | Pointer to **interface{}** | | [optional] +**ProductVersion** | **string** | | + +## Methods + +### NewResponseListNodes + +`func NewResponseListNodes(id int64, hashId string, name string, status string, active bool, lastEditor string, lastModified string, productVersion string, ) *ResponseListNodes` + +NewResponseListNodes instantiates a new ResponseListNodes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListNodesWithDefaults + +`func NewResponseListNodesWithDefaults() *ResponseListNodes` + +NewResponseListNodesWithDefaults instantiates a new ResponseListNodes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListNodes) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListNodes) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListNodes) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetHashId + +`func (o *ResponseListNodes) GetHashId() string` + +GetHashId returns the HashId field if non-nil, zero value otherwise. + +### GetHashIdOk + +`func (o *ResponseListNodes) GetHashIdOk() (*string, bool)` + +GetHashIdOk returns a tuple with the HashId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHashId + +`func (o *ResponseListNodes) SetHashId(v string)` + +SetHashId sets HashId field to given value. + + +### GetName + +`func (o *ResponseListNodes) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListNodes) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListNodes) SetName(v string)` + +SetName sets Name field to given value. + + +### GetStatus + +`func (o *ResponseListNodes) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *ResponseListNodes) GetStatusOk() (*string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatus + +`func (o *ResponseListNodes) SetStatus(v string)` + +SetStatus sets Status field to given value. + + +### GetActive + +`func (o *ResponseListNodes) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListNodes) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListNodes) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *ResponseListNodes) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListNodes) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListNodes) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListNodes) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListNodes) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListNodes) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + +### GetModules + +`func (o *ResponseListNodes) GetModules() interface{}` + +GetModules returns the Modules field if non-nil, zero value otherwise. + +### GetModulesOk + +`func (o *ResponseListNodes) GetModulesOk() (*interface{}, bool)` + +GetModulesOk returns a tuple with the Modules field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetModules + +`func (o *ResponseListNodes) SetModules(v interface{})` + +SetModules sets Modules field to given value. + +### HasModules + +`func (o *ResponseListNodes) HasModules() bool` + +HasModules returns a boolean if a field has been set. + +### SetModulesNil + +`func (o *ResponseListNodes) SetModulesNil(b bool)` + + SetModulesNil sets the value for Modules to be an explicit nil + +### UnsetModules +`func (o *ResponseListNodes) UnsetModules()` + +UnsetModules ensures that no value is present for Modules, not even an explicit nil +### GetProductVersion + +`func (o *ResponseListNodes) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *ResponseListNodes) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *ResponseListNodes) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListPlatform.md b/azion-api/docs/ResponseListPlatform.md new file mode 100644 index 0000000..edcd78a --- /dev/null +++ b/azion-api/docs/ResponseListPlatform.md @@ -0,0 +1,114 @@ +# ResponseListPlatform + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**InstallationUrl** | **string** | | +**CallbackUrl** | **string** | | + +## Methods + +### NewResponseListPlatform + +`func NewResponseListPlatform(id string, name string, installationUrl string, callbackUrl string, ) *ResponseListPlatform` + +NewResponseListPlatform instantiates a new ResponseListPlatform object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListPlatformWithDefaults + +`func NewResponseListPlatformWithDefaults() *ResponseListPlatform` + +NewResponseListPlatformWithDefaults instantiates a new ResponseListPlatform object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListPlatform) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListPlatform) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListPlatform) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListPlatform) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListPlatform) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListPlatform) SetName(v string)` + +SetName sets Name field to given value. + + +### GetInstallationUrl + +`func (o *ResponseListPlatform) GetInstallationUrl() string` + +GetInstallationUrl returns the InstallationUrl field if non-nil, zero value otherwise. + +### GetInstallationUrlOk + +`func (o *ResponseListPlatform) GetInstallationUrlOk() (*string, bool)` + +GetInstallationUrlOk returns a tuple with the InstallationUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInstallationUrl + +`func (o *ResponseListPlatform) SetInstallationUrl(v string)` + +SetInstallationUrl sets InstallationUrl field to given value. + + +### GetCallbackUrl + +`func (o *ResponseListPlatform) GetCallbackUrl() string` + +GetCallbackUrl returns the CallbackUrl field if non-nil, zero value otherwise. + +### GetCallbackUrlOk + +`func (o *ResponseListPlatform) GetCallbackUrlOk() (*string, bool)` + +GetCallbackUrlOk returns a tuple with the CallbackUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCallbackUrl + +`func (o *ResponseListPlatform) SetCallbackUrl(v string)` + +SetCallbackUrl sets CallbackUrl field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListReport.md b/azion-api/docs/ResponseListReport.md new file mode 100644 index 0000000..344f695 --- /dev/null +++ b/azion-api/docs/ResponseListReport.md @@ -0,0 +1,338 @@ +# ResponseListReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Description** | **string** | | +**Type** | **string** | * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. | +**XAxis** | Pointer to **string** | | [optional] +**AggregationType** | **string** | * `avg` - Aggregation by average. * `sum` - Aggregation by sum. | +**DataUnit** | **string** | * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. | +**Queries** | [**[]BaseQuery**](BaseQuery.md) | | +**Order** | **string** | | +**Name** | **string** | | +**Rotated** | Pointer to **bool** | | [optional] +**ComparisonType** | Pointer to **string** | * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. | [optional] +**HelpCenterPath** | Pointer to **NullableString** | | [optional] +**Library** | Pointer to **bool** | | [optional] + +## Methods + +### NewResponseListReport + +`func NewResponseListReport(id int64, description string, type_ string, aggregationType string, dataUnit string, queries []BaseQuery, order string, name string, ) *ResponseListReport` + +NewResponseListReport instantiates a new ResponseListReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListReportWithDefaults + +`func NewResponseListReportWithDefaults() *ResponseListReport` + +NewResponseListReportWithDefaults instantiates a new ResponseListReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListReport) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListReport) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListReport) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetDescription + +`func (o *ResponseListReport) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseListReport) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseListReport) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetType + +`func (o *ResponseListReport) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponseListReport) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponseListReport) SetType(v string)` + +SetType sets Type field to given value. + + +### GetXAxis + +`func (o *ResponseListReport) GetXAxis() string` + +GetXAxis returns the XAxis field if non-nil, zero value otherwise. + +### GetXAxisOk + +`func (o *ResponseListReport) GetXAxisOk() (*string, bool)` + +GetXAxisOk returns a tuple with the XAxis field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetXAxis + +`func (o *ResponseListReport) SetXAxis(v string)` + +SetXAxis sets XAxis field to given value. + +### HasXAxis + +`func (o *ResponseListReport) HasXAxis() bool` + +HasXAxis returns a boolean if a field has been set. + +### GetAggregationType + +`func (o *ResponseListReport) GetAggregationType() string` + +GetAggregationType returns the AggregationType field if non-nil, zero value otherwise. + +### GetAggregationTypeOk + +`func (o *ResponseListReport) GetAggregationTypeOk() (*string, bool)` + +GetAggregationTypeOk returns a tuple with the AggregationType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAggregationType + +`func (o *ResponseListReport) SetAggregationType(v string)` + +SetAggregationType sets AggregationType field to given value. + + +### GetDataUnit + +`func (o *ResponseListReport) GetDataUnit() string` + +GetDataUnit returns the DataUnit field if non-nil, zero value otherwise. + +### GetDataUnitOk + +`func (o *ResponseListReport) GetDataUnitOk() (*string, bool)` + +GetDataUnitOk returns a tuple with the DataUnit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataUnit + +`func (o *ResponseListReport) SetDataUnit(v string)` + +SetDataUnit sets DataUnit field to given value. + + +### GetQueries + +`func (o *ResponseListReport) GetQueries() []BaseQuery` + +GetQueries returns the Queries field if non-nil, zero value otherwise. + +### GetQueriesOk + +`func (o *ResponseListReport) GetQueriesOk() (*[]BaseQuery, bool)` + +GetQueriesOk returns a tuple with the Queries field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetQueries + +`func (o *ResponseListReport) SetQueries(v []BaseQuery)` + +SetQueries sets Queries field to given value. + + +### GetOrder + +`func (o *ResponseListReport) GetOrder() string` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ResponseListReport) GetOrderOk() (*string, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ResponseListReport) SetOrder(v string)` + +SetOrder sets Order field to given value. + + +### GetName + +`func (o *ResponseListReport) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListReport) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListReport) SetName(v string)` + +SetName sets Name field to given value. + + +### GetRotated + +`func (o *ResponseListReport) GetRotated() bool` + +GetRotated returns the Rotated field if non-nil, zero value otherwise. + +### GetRotatedOk + +`func (o *ResponseListReport) GetRotatedOk() (*bool, bool)` + +GetRotatedOk returns a tuple with the Rotated field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRotated + +`func (o *ResponseListReport) SetRotated(v bool)` + +SetRotated sets Rotated field to given value. + +### HasRotated + +`func (o *ResponseListReport) HasRotated() bool` + +HasRotated returns a boolean if a field has been set. + +### GetComparisonType + +`func (o *ResponseListReport) GetComparisonType() string` + +GetComparisonType returns the ComparisonType field if non-nil, zero value otherwise. + +### GetComparisonTypeOk + +`func (o *ResponseListReport) GetComparisonTypeOk() (*string, bool)` + +GetComparisonTypeOk returns a tuple with the ComparisonType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetComparisonType + +`func (o *ResponseListReport) SetComparisonType(v string)` + +SetComparisonType sets ComparisonType field to given value. + +### HasComparisonType + +`func (o *ResponseListReport) HasComparisonType() bool` + +HasComparisonType returns a boolean if a field has been set. + +### GetHelpCenterPath + +`func (o *ResponseListReport) GetHelpCenterPath() string` + +GetHelpCenterPath returns the HelpCenterPath field if non-nil, zero value otherwise. + +### GetHelpCenterPathOk + +`func (o *ResponseListReport) GetHelpCenterPathOk() (*string, bool)` + +GetHelpCenterPathOk returns a tuple with the HelpCenterPath field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHelpCenterPath + +`func (o *ResponseListReport) SetHelpCenterPath(v string)` + +SetHelpCenterPath sets HelpCenterPath field to given value. + +### HasHelpCenterPath + +`func (o *ResponseListReport) HasHelpCenterPath() bool` + +HasHelpCenterPath returns a boolean if a field has been set. + +### SetHelpCenterPathNil + +`func (o *ResponseListReport) SetHelpCenterPathNil(b bool)` + + SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil + +### UnsetHelpCenterPath +`func (o *ResponseListReport) UnsetHelpCenterPath()` + +UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +### GetLibrary + +`func (o *ResponseListReport) GetLibrary() bool` + +GetLibrary returns the Library field if non-nil, zero value otherwise. + +### GetLibraryOk + +`func (o *ResponseListReport) GetLibraryOk() (*bool, bool)` + +GetLibraryOk returns a tuple with the Library field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLibrary + +`func (o *ResponseListReport) SetLibrary(v bool)` + +SetLibrary sets Library field to given value. + +### HasLibrary + +`func (o *ResponseListReport) HasLibrary() bool` + +HasLibrary returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListRepository.md b/azion-api/docs/ResponseListRepository.md new file mode 100644 index 0000000..f4fc21c --- /dev/null +++ b/azion-api/docs/ResponseListRepository.md @@ -0,0 +1,114 @@ +# ResponseListRepository + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**Visibility** | **string** | | +**Url** | **string** | | + +## Methods + +### NewResponseListRepository + +`func NewResponseListRepository(id string, name string, visibility string, url string, ) *ResponseListRepository` + +NewResponseListRepository instantiates a new ResponseListRepository object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListRepositoryWithDefaults + +`func NewResponseListRepositoryWithDefaults() *ResponseListRepository` + +NewResponseListRepositoryWithDefaults instantiates a new ResponseListRepository object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListRepository) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListRepository) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListRepository) SetId(v string)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListRepository) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListRepository) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListRepository) SetName(v string)` + +SetName sets Name field to given value. + + +### GetVisibility + +`func (o *ResponseListRepository) GetVisibility() string` + +GetVisibility returns the Visibility field if non-nil, zero value otherwise. + +### GetVisibilityOk + +`func (o *ResponseListRepository) GetVisibilityOk() (*string, bool)` + +GetVisibilityOk returns a tuple with the Visibility field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVisibility + +`func (o *ResponseListRepository) SetVisibility(v string)` + +SetVisibility sets Visibility field to given value. + + +### GetUrl + +`func (o *ResponseListRepository) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *ResponseListRepository) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *ResponseListRepository) SetUrl(v string)` + +SetUrl sets Url field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListRow.md b/azion-api/docs/ResponseListRow.md new file mode 100644 index 0000000..4fce7bb --- /dev/null +++ b/azion-api/docs/ResponseListRow.md @@ -0,0 +1,93 @@ +# ResponseListRow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Title** | **string** | | +**Order** | **int64** | | + +## Methods + +### NewResponseListRow + +`func NewResponseListRow(id int64, title string, order int64, ) *ResponseListRow` + +NewResponseListRow instantiates a new ResponseListRow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListRowWithDefaults + +`func NewResponseListRowWithDefaults() *ResponseListRow` + +NewResponseListRowWithDefaults instantiates a new ResponseListRow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListRow) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListRow) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListRow) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetTitle + +`func (o *ResponseListRow) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *ResponseListRow) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *ResponseListRow) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetOrder + +`func (o *ResponseListRow) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ResponseListRow) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ResponseListRow) SetOrder(v int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListServiceToken.md b/azion-api/docs/ResponseListServiceToken.md new file mode 100644 index 0000000..249c32a --- /dev/null +++ b/azion-api/docs/ResponseListServiceToken.md @@ -0,0 +1,271 @@ +# ResponseListServiceToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | +**Description** | Pointer to **string** | | [optional] +**Expires** | **time.Time** | | +**LastUsed** | **time.Time** | | + +## Methods + +### NewResponseListServiceToken + +`func NewResponseListServiceToken(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, expires time.Time, lastUsed time.Time, ) *ResponseListServiceToken` + +NewResponseListServiceToken instantiates a new ResponseListServiceToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListServiceTokenWithDefaults + +`func NewResponseListServiceTokenWithDefaults() *ResponseListServiceToken` + +NewResponseListServiceTokenWithDefaults instantiates a new ResponseListServiceToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListServiceToken) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListServiceToken) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListServiceToken) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListServiceToken) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListServiceToken) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListServiceToken) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *ResponseListServiceToken) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ResponseListServiceToken) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *ResponseListServiceToken) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *ResponseListServiceToken) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseListServiceToken) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseListServiceToken) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *ResponseListServiceToken) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListServiceToken) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListServiceToken) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListServiceToken) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListServiceToken) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListServiceToken) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ResponseListServiceToken) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListServiceToken) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListServiceToken) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponseListServiceToken) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *ResponseListServiceToken) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ResponseListServiceToken) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ResponseListServiceToken) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### GetDescription + +`func (o *ResponseListServiceToken) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponseListServiceToken) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponseListServiceToken) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponseListServiceToken) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetExpires + +`func (o *ResponseListServiceToken) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ResponseListServiceToken) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ResponseListServiceToken) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + + +### GetLastUsed + +`func (o *ResponseListServiceToken) GetLastUsed() time.Time` + +GetLastUsed returns the LastUsed field if non-nil, zero value otherwise. + +### GetLastUsedOk + +`func (o *ResponseListServiceToken) GetLastUsedOk() (*time.Time, bool)` + +GetLastUsedOk returns a tuple with the LastUsed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsed + +`func (o *ResponseListServiceToken) SetLastUsed(v time.Time)` + +SetLastUsed sets LastUsed field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListServices.md b/azion-api/docs/ResponseListServices.md new file mode 100644 index 0000000..95b1cd3 --- /dev/null +++ b/azion-api/docs/ResponseListServices.md @@ -0,0 +1,239 @@ +# ResponseListServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**MinVersion** | Pointer to **string** | | [optional] +**Permissions** | Pointer to **int64** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **string** | | +**RefCount** | **int64** | | +**ProductVersion** | **string** | | + +## Methods + +### NewResponseListServices + +`func NewResponseListServices(id int64, lastEditor string, lastModified string, refCount int64, productVersion string, ) *ResponseListServices` + +NewResponseListServices instantiates a new ResponseListServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListServicesWithDefaults + +`func NewResponseListServicesWithDefaults() *ResponseListServices` + +NewResponseListServicesWithDefaults instantiates a new ResponseListServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListServices) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListServices) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListServices) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListServices) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListServices) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListServices) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ResponseListServices) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *ResponseListServices) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListServices) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListServices) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponseListServices) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetMinVersion + +`func (o *ResponseListServices) GetMinVersion() string` + +GetMinVersion returns the MinVersion field if non-nil, zero value otherwise. + +### GetMinVersionOk + +`func (o *ResponseListServices) GetMinVersionOk() (*string, bool)` + +GetMinVersionOk returns a tuple with the MinVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinVersion + +`func (o *ResponseListServices) SetMinVersion(v string)` + +SetMinVersion sets MinVersion field to given value. + +### HasMinVersion + +`func (o *ResponseListServices) HasMinVersion() bool` + +HasMinVersion returns a boolean if a field has been set. + +### GetPermissions + +`func (o *ResponseListServices) GetPermissions() int64` + +GetPermissions returns the Permissions field if non-nil, zero value otherwise. + +### GetPermissionsOk + +`func (o *ResponseListServices) GetPermissionsOk() (*int64, bool)` + +GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermissions + +`func (o *ResponseListServices) SetPermissions(v int64)` + +SetPermissions sets Permissions field to given value. + +### HasPermissions + +`func (o *ResponseListServices) HasPermissions() bool` + +HasPermissions returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *ResponseListServices) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListServices) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListServices) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListServices) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListServices) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListServices) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + +### GetRefCount + +`func (o *ResponseListServices) GetRefCount() int64` + +GetRefCount returns the RefCount field if non-nil, zero value otherwise. + +### GetRefCountOk + +`func (o *ResponseListServices) GetRefCountOk() (*int64, bool)` + +GetRefCountOk returns a tuple with the RefCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefCount + +`func (o *ResponseListServices) SetRefCount(v int64)` + +SetRefCount sets RefCount field to given value. + + +### GetProductVersion + +`func (o *ResponseListServices) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *ResponseListServices) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *ResponseListServices) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseListUser.md b/azion-api/docs/ResponseListUser.md new file mode 100644 index 0000000..1962b0d --- /dev/null +++ b/azion-api/docs/ResponseListUser.md @@ -0,0 +1,344 @@ +# ResponseListUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | +**LastLogin** | **time.Time** | | +**TwoFactorEnabled** | Pointer to **bool** | | [optional] +**Preferences** | Pointer to **map[string]interface{}** | User-specific preferences in JSON format. | [optional] +**Phone** | Pointer to **string** | | [optional] +**Info** | **map[string]interface{}** | | +**Lockout** | **string** | | + +## Methods + +### NewResponseListUser + +`func NewResponseListUser(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, lastLogin time.Time, info map[string]interface{}, lockout string, ) *ResponseListUser` + +NewResponseListUser instantiates a new ResponseListUser object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseListUserWithDefaults + +`func NewResponseListUserWithDefaults() *ResponseListUser` + +NewResponseListUserWithDefaults instantiates a new ResponseListUser object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponseListUser) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponseListUser) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponseListUser) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponseListUser) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponseListUser) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponseListUser) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *ResponseListUser) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ResponseListUser) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *ResponseListUser) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *ResponseListUser) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ResponseListUser) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ResponseListUser) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *ResponseListUser) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponseListUser) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponseListUser) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ResponseListUser) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponseListUser) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponseListUser) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ResponseListUser) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponseListUser) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponseListUser) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponseListUser) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *ResponseListUser) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ResponseListUser) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ResponseListUser) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### GetLastLogin + +`func (o *ResponseListUser) GetLastLogin() time.Time` + +GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. + +### GetLastLoginOk + +`func (o *ResponseListUser) GetLastLoginOk() (*time.Time, bool)` + +GetLastLoginOk returns a tuple with the LastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastLogin + +`func (o *ResponseListUser) SetLastLogin(v time.Time)` + +SetLastLogin sets LastLogin field to given value. + + +### GetTwoFactorEnabled + +`func (o *ResponseListUser) GetTwoFactorEnabled() bool` + +GetTwoFactorEnabled returns the TwoFactorEnabled field if non-nil, zero value otherwise. + +### GetTwoFactorEnabledOk + +`func (o *ResponseListUser) GetTwoFactorEnabledOk() (*bool, bool)` + +GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorEnabled + +`func (o *ResponseListUser) SetTwoFactorEnabled(v bool)` + +SetTwoFactorEnabled sets TwoFactorEnabled field to given value. + +### HasTwoFactorEnabled + +`func (o *ResponseListUser) HasTwoFactorEnabled() bool` + +HasTwoFactorEnabled returns a boolean if a field has been set. + +### GetPreferences + +`func (o *ResponseListUser) GetPreferences() map[string]interface{}` + +GetPreferences returns the Preferences field if non-nil, zero value otherwise. + +### GetPreferencesOk + +`func (o *ResponseListUser) GetPreferencesOk() (*map[string]interface{}, bool)` + +GetPreferencesOk returns a tuple with the Preferences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferences + +`func (o *ResponseListUser) SetPreferences(v map[string]interface{})` + +SetPreferences sets Preferences field to given value. + +### HasPreferences + +`func (o *ResponseListUser) HasPreferences() bool` + +HasPreferences returns a boolean if a field has been set. + +### GetPhone + +`func (o *ResponseListUser) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *ResponseListUser) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *ResponseListUser) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *ResponseListUser) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetInfo + +`func (o *ResponseListUser) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *ResponseListUser) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *ResponseListUser) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetLockout + +`func (o *ResponseListUser) GetLockout() string` + +GetLockout returns the Lockout field if non-nil, zero value otherwise. + +### GetLockoutOk + +`func (o *ResponseListUser) GetLockoutOk() (*string, bool)` + +GetLockoutOk returns a tuple with the Lockout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLockout + +`func (o *ResponseListUser) SetLockout(v string)` + +SetLockout sets Lockout field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseLogin.md b/azion-api/docs/ResponseLogin.md new file mode 100644 index 0000000..7197bcc --- /dev/null +++ b/azion-api/docs/ResponseLogin.md @@ -0,0 +1,77 @@ +# ResponseLogin + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**LoginResponse**](LoginResponse.md) | | +**State** | Pointer to **string** | | [optional] + +## Methods + +### NewResponseLogin + +`func NewResponseLogin(data LoginResponse, ) *ResponseLogin` + +NewResponseLogin instantiates a new ResponseLogin object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseLoginWithDefaults + +`func NewResponseLoginWithDefaults() *ResponseLogin` + +NewResponseLoginWithDefaults instantiates a new ResponseLogin object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseLogin) GetData() LoginResponse` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseLogin) GetDataOk() (*LoginResponse, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseLogin) SetData(v LoginResponse)` + +SetData sets Data field to given value. + + +### GetState + +`func (o *ResponseLogin) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseLogin) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseLogin) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseLogin) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseMessage.md b/azion-api/docs/ResponseMessage.md new file mode 100644 index 0000000..d71b31c --- /dev/null +++ b/azion-api/docs/ResponseMessage.md @@ -0,0 +1,77 @@ +# ResponseMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Message**](Message.md) | | + +## Methods + +### NewResponseMessage + +`func NewResponseMessage(data Message, ) *ResponseMessage` + +NewResponseMessage instantiates a new ResponseMessage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseMessageWithDefaults + +`func NewResponseMessageWithDefaults() *ResponseMessage` + +NewResponseMessageWithDefaults instantiates a new ResponseMessage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseMessage) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseMessage) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseMessage) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseMessage) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseMessage) GetData() Message` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseMessage) GetDataOk() (*Message, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseMessage) SetData(v Message)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseOrder.md b/azion-api/docs/ResponseOrder.md new file mode 100644 index 0000000..a787dcf --- /dev/null +++ b/azion-api/docs/ResponseOrder.md @@ -0,0 +1,77 @@ +# ResponseOrder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Order**](Order.md) | | + +## Methods + +### NewResponseOrder + +`func NewResponseOrder(data Order, ) *ResponseOrder` + +NewResponseOrder instantiates a new ResponseOrder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseOrderWithDefaults + +`func NewResponseOrderWithDefaults() *ResponseOrder` + +NewResponseOrderWithDefaults instantiates a new ResponseOrder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseOrder) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseOrder) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseOrder) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseOrder) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseOrder) GetData() Order` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseOrder) GetDataOk() (*Order, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseOrder) SetData(v Order)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePaymentMethod.md b/azion-api/docs/ResponsePaymentMethod.md new file mode 100644 index 0000000..e414cfa --- /dev/null +++ b/azion-api/docs/ResponsePaymentMethod.md @@ -0,0 +1,77 @@ +# ResponsePaymentMethod + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**PaymentMethod**](PaymentMethod.md) | | + +## Methods + +### NewResponsePaymentMethod + +`func NewResponsePaymentMethod(data PaymentMethod, ) *ResponsePaymentMethod` + +NewResponsePaymentMethod instantiates a new ResponsePaymentMethod object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePaymentMethodWithDefaults + +`func NewResponsePaymentMethodWithDefaults() *ResponsePaymentMethod` + +NewResponsePaymentMethodWithDefaults instantiates a new ResponsePaymentMethod object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponsePaymentMethod) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponsePaymentMethod) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponsePaymentMethod) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponsePaymentMethod) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponsePaymentMethod) GetData() PaymentMethod` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponsePaymentMethod) GetDataOk() (*PaymentMethod, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponsePaymentMethod) SetData(v PaymentMethod)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePhaseBehavior.md b/azion-api/docs/ResponsePhaseBehavior.md new file mode 100644 index 0000000..9be7966 --- /dev/null +++ b/azion-api/docs/ResponsePhaseBehavior.md @@ -0,0 +1,72 @@ +# ResponsePhaseBehavior + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**BehaviorCaptureMatchGroupsAttributes**](BehaviorCaptureMatchGroupsAttributes.md) | | + +## Methods + +### NewResponsePhaseBehavior + +`func NewResponsePhaseBehavior(type_ string, attributes BehaviorCaptureMatchGroupsAttributes, ) *ResponsePhaseBehavior` + +NewResponsePhaseBehavior instantiates a new ResponsePhaseBehavior object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePhaseBehaviorWithDefaults + +`func NewResponsePhaseBehaviorWithDefaults() *ResponsePhaseBehavior` + +NewResponsePhaseBehaviorWithDefaults instantiates a new ResponsePhaseBehavior object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ResponsePhaseBehavior) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponsePhaseBehavior) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponsePhaseBehavior) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *ResponsePhaseBehavior) GetAttributes() BehaviorCaptureMatchGroupsAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *ResponsePhaseBehavior) GetAttributesOk() (*BehaviorCaptureMatchGroupsAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *ResponsePhaseBehavior) SetAttributes(v BehaviorCaptureMatchGroupsAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePhaseBehaviorRequest.md b/azion-api/docs/ResponsePhaseBehaviorRequest.md new file mode 100644 index 0000000..78ce2ba --- /dev/null +++ b/azion-api/docs/ResponsePhaseBehaviorRequest.md @@ -0,0 +1,72 @@ +# ResponsePhaseBehaviorRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | +**Attributes** | [**BehaviorCaptureMatchGroupsAttributes**](BehaviorCaptureMatchGroupsAttributes.md) | | + +## Methods + +### NewResponsePhaseBehaviorRequest + +`func NewResponsePhaseBehaviorRequest(type_ string, attributes BehaviorCaptureMatchGroupsAttributes, ) *ResponsePhaseBehaviorRequest` + +NewResponsePhaseBehaviorRequest instantiates a new ResponsePhaseBehaviorRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePhaseBehaviorRequestWithDefaults + +`func NewResponsePhaseBehaviorRequestWithDefaults() *ResponsePhaseBehaviorRequest` + +NewResponsePhaseBehaviorRequestWithDefaults instantiates a new ResponsePhaseBehaviorRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *ResponsePhaseBehaviorRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ResponsePhaseBehaviorRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ResponsePhaseBehaviorRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *ResponsePhaseBehaviorRequest) GetAttributes() BehaviorCaptureMatchGroupsAttributes` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *ResponsePhaseBehaviorRequest) GetAttributesOk() (*BehaviorCaptureMatchGroupsAttributes, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *ResponsePhaseBehaviorRequest) SetAttributes(v BehaviorCaptureMatchGroupsAttributes)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePhaseRule.md b/azion-api/docs/ResponsePhaseRule.md new file mode 100644 index 0000000..22706bc --- /dev/null +++ b/azion-api/docs/ResponsePhaseRule.md @@ -0,0 +1,249 @@ +# ResponsePhaseRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Criteria** | [**[][]ApplicationCriterionField**]([]ApplicationCriterionField.md) | | +**Behaviors** | [**[]ResponsePhaseBehavior**](ResponsePhaseBehavior.md) | | +**Description** | Pointer to **string** | | [optional] +**Order** | **int64** | | +**LastEditor** | **NullableString** | | +**LastModified** | **NullableTime** | | + +## Methods + +### NewResponsePhaseRule + +`func NewResponsePhaseRule(id int64, name string, criteria [][]ApplicationCriterionField, behaviors []ResponsePhaseBehavior, order int64, lastEditor NullableString, lastModified NullableTime, ) *ResponsePhaseRule` + +NewResponsePhaseRule instantiates a new ResponsePhaseRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePhaseRuleWithDefaults + +`func NewResponsePhaseRuleWithDefaults() *ResponsePhaseRule` + +NewResponsePhaseRuleWithDefaults instantiates a new ResponsePhaseRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ResponsePhaseRule) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ResponsePhaseRule) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ResponsePhaseRule) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ResponsePhaseRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponsePhaseRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponsePhaseRule) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ResponsePhaseRule) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponsePhaseRule) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponsePhaseRule) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponsePhaseRule) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *ResponsePhaseRule) GetCriteria() [][]ApplicationCriterionField` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *ResponsePhaseRule) GetCriteriaOk() (*[][]ApplicationCriterionField, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *ResponsePhaseRule) SetCriteria(v [][]ApplicationCriterionField)` + +SetCriteria sets Criteria field to given value. + + +### GetBehaviors + +`func (o *ResponsePhaseRule) GetBehaviors() []ResponsePhaseBehavior` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *ResponsePhaseRule) GetBehaviorsOk() (*[]ResponsePhaseBehavior, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *ResponsePhaseRule) SetBehaviors(v []ResponsePhaseBehavior)` + +SetBehaviors sets Behaviors field to given value. + + +### GetDescription + +`func (o *ResponsePhaseRule) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponsePhaseRule) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponsePhaseRule) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponsePhaseRule) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetOrder + +`func (o *ResponsePhaseRule) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *ResponsePhaseRule) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *ResponsePhaseRule) SetOrder(v int64)` + +SetOrder sets Order field to given value. + + +### GetLastEditor + +`func (o *ResponsePhaseRule) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ResponsePhaseRule) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ResponsePhaseRule) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### SetLastEditorNil + +`func (o *ResponsePhaseRule) SetLastEditorNil(b bool)` + + SetLastEditorNil sets the value for LastEditor to be an explicit nil + +### UnsetLastEditor +`func (o *ResponsePhaseRule) UnsetLastEditor()` + +UnsetLastEditor ensures that no value is present for LastEditor, not even an explicit nil +### GetLastModified + +`func (o *ResponsePhaseRule) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ResponsePhaseRule) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ResponsePhaseRule) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### SetLastModifiedNil + +`func (o *ResponsePhaseRule) SetLastModifiedNil(b bool)` + + SetLastModifiedNil sets the value for LastModified to be an explicit nil + +### UnsetLastModified +`func (o *ResponsePhaseRule) UnsetLastModified()` + +UnsetLastModified ensures that no value is present for LastModified, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePhaseRuleRequest.md b/azion-api/docs/ResponsePhaseRuleRequest.md new file mode 100644 index 0000000..63a46eb --- /dev/null +++ b/azion-api/docs/ResponsePhaseRuleRequest.md @@ -0,0 +1,145 @@ +# ResponsePhaseRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Criteria** | [**[][]ApplicationCriterionFieldRequest**]([]ApplicationCriterionFieldRequest.md) | | +**Behaviors** | [**[]ResponsePhaseBehaviorRequest**](ResponsePhaseBehaviorRequest.md) | | +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewResponsePhaseRuleRequest + +`func NewResponsePhaseRuleRequest(name string, criteria [][]ApplicationCriterionFieldRequest, behaviors []ResponsePhaseBehaviorRequest, ) *ResponsePhaseRuleRequest` + +NewResponsePhaseRuleRequest instantiates a new ResponsePhaseRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePhaseRuleRequestWithDefaults + +`func NewResponsePhaseRuleRequestWithDefaults() *ResponsePhaseRuleRequest` + +NewResponsePhaseRuleRequestWithDefaults instantiates a new ResponsePhaseRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ResponsePhaseRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ResponsePhaseRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ResponsePhaseRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ResponsePhaseRuleRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ResponsePhaseRuleRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ResponsePhaseRuleRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ResponsePhaseRuleRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetCriteria + +`func (o *ResponsePhaseRuleRequest) GetCriteria() [][]ApplicationCriterionFieldRequest` + +GetCriteria returns the Criteria field if non-nil, zero value otherwise. + +### GetCriteriaOk + +`func (o *ResponsePhaseRuleRequest) GetCriteriaOk() (*[][]ApplicationCriterionFieldRequest, bool)` + +GetCriteriaOk returns a tuple with the Criteria field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCriteria + +`func (o *ResponsePhaseRuleRequest) SetCriteria(v [][]ApplicationCriterionFieldRequest)` + +SetCriteria sets Criteria field to given value. + + +### GetBehaviors + +`func (o *ResponsePhaseRuleRequest) GetBehaviors() []ResponsePhaseBehaviorRequest` + +GetBehaviors returns the Behaviors field if non-nil, zero value otherwise. + +### GetBehaviorsOk + +`func (o *ResponsePhaseRuleRequest) GetBehaviorsOk() (*[]ResponsePhaseBehaviorRequest, bool)` + +GetBehaviorsOk returns a tuple with the Behaviors field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBehaviors + +`func (o *ResponsePhaseRuleRequest) SetBehaviors(v []ResponsePhaseBehaviorRequest)` + +SetBehaviors sets Behaviors field to given value. + + +### GetDescription + +`func (o *ResponsePhaseRuleRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ResponsePhaseRuleRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ResponsePhaseRuleRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ResponsePhaseRuleRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePhaseRuleResponse.md b/azion-api/docs/ResponsePhaseRuleResponse.md new file mode 100644 index 0000000..1fb3030 --- /dev/null +++ b/azion-api/docs/ResponsePhaseRuleResponse.md @@ -0,0 +1,77 @@ +# ResponsePhaseRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ResponsePhaseRule**](ResponsePhaseRule.md) | | + +## Methods + +### NewResponsePhaseRuleResponse + +`func NewResponsePhaseRuleResponse(data ResponsePhaseRule, ) *ResponsePhaseRuleResponse` + +NewResponsePhaseRuleResponse instantiates a new ResponsePhaseRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePhaseRuleResponseWithDefaults + +`func NewResponsePhaseRuleResponseWithDefaults() *ResponsePhaseRuleResponse` + +NewResponsePhaseRuleResponseWithDefaults instantiates a new ResponsePhaseRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponsePhaseRuleResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponsePhaseRuleResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponsePhaseRuleResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponsePhaseRuleResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponsePhaseRuleResponse) GetData() ResponsePhaseRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponsePhaseRuleResponse) GetDataOk() (*ResponsePhaseRule, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponsePhaseRuleResponse) SetData(v ResponsePhaseRule)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponsePublisher.md b/azion-api/docs/ResponsePublisher.md new file mode 100644 index 0000000..25c028f --- /dev/null +++ b/azion-api/docs/ResponsePublisher.md @@ -0,0 +1,72 @@ +# ResponsePublisher + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**Publisher**](Publisher.md) | | + +## Methods + +### NewResponsePublisher + +`func NewResponsePublisher(state string, data Publisher, ) *ResponsePublisher` + +NewResponsePublisher instantiates a new ResponsePublisher object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponsePublisherWithDefaults + +`func NewResponsePublisherWithDefaults() *ResponsePublisher` + +NewResponsePublisherWithDefaults instantiates a new ResponsePublisher object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponsePublisher) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponsePublisher) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponsePublisher) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponsePublisher) GetData() Publisher` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponsePublisher) GetDataOk() (*Publisher, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponsePublisher) SetData(v Publisher)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseReport.md b/azion-api/docs/ResponseReport.md new file mode 100644 index 0000000..357c3b4 --- /dev/null +++ b/azion-api/docs/ResponseReport.md @@ -0,0 +1,77 @@ +# ResponseReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Report**](Report.md) | | + +## Methods + +### NewResponseReport + +`func NewResponseReport(data Report, ) *ResponseReport` + +NewResponseReport instantiates a new ResponseReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseReportWithDefaults + +`func NewResponseReportWithDefaults() *ResponseReport` + +NewResponseReportWithDefaults instantiates a new ResponseReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseReport) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseReport) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseReport) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseReport) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseReport) GetData() Report` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseReport) GetDataOk() (*Report, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseReport) SetData(v Report)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveAccount.md b/azion-api/docs/ResponseRetrieveAccount.md new file mode 100644 index 0000000..f11fcd2 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveAccount.md @@ -0,0 +1,51 @@ +# ResponseRetrieveAccount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Account**](Account.md) | | + +## Methods + +### NewResponseRetrieveAccount + +`func NewResponseRetrieveAccount(data Account, ) *ResponseRetrieveAccount` + +NewResponseRetrieveAccount instantiates a new ResponseRetrieveAccount object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveAccountWithDefaults + +`func NewResponseRetrieveAccountWithDefaults() *ResponseRetrieveAccount` + +NewResponseRetrieveAccountWithDefaults instantiates a new ResponseRetrieveAccount object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveAccount) GetData() Account` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveAccount) GetDataOk() (*Account, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveAccount) SetData(v Account)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveAccountInfo.md b/azion-api/docs/ResponseRetrieveAccountInfo.md new file mode 100644 index 0000000..5ad0f0d --- /dev/null +++ b/azion-api/docs/ResponseRetrieveAccountInfo.md @@ -0,0 +1,51 @@ +# ResponseRetrieveAccountInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**AccountInfo**](AccountInfo.md) | | + +## Methods + +### NewResponseRetrieveAccountInfo + +`func NewResponseRetrieveAccountInfo(data AccountInfo, ) *ResponseRetrieveAccountInfo` + +NewResponseRetrieveAccountInfo instantiates a new ResponseRetrieveAccountInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveAccountInfoWithDefaults + +`func NewResponseRetrieveAccountInfoWithDefaults() *ResponseRetrieveAccountInfo` + +NewResponseRetrieveAccountInfoWithDefaults instantiates a new ResponseRetrieveAccountInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveAccountInfo) GetData() AccountInfo` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveAccountInfo) GetDataOk() (*AccountInfo, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveAccountInfo) SetData(v AccountInfo)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveChatThread.md b/azion-api/docs/ResponseRetrieveChatThread.md new file mode 100644 index 0000000..cc8a748 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveChatThread.md @@ -0,0 +1,51 @@ +# ResponseRetrieveChatThread + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ChatThread**](ChatThread.md) | | + +## Methods + +### NewResponseRetrieveChatThread + +`func NewResponseRetrieveChatThread(data ChatThread, ) *ResponseRetrieveChatThread` + +NewResponseRetrieveChatThread instantiates a new ResponseRetrieveChatThread object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveChatThreadWithDefaults + +`func NewResponseRetrieveChatThreadWithDefaults() *ResponseRetrieveChatThread` + +NewResponseRetrieveChatThreadWithDefaults instantiates a new ResponseRetrieveChatThread object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveChatThread) GetData() ChatThread` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveChatThread) GetDataOk() (*ChatThread, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveChatThread) SetData(v ChatThread)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveContinuousDeployment.md b/azion-api/docs/ResponseRetrieveContinuousDeployment.md new file mode 100644 index 0000000..7f26bff --- /dev/null +++ b/azion-api/docs/ResponseRetrieveContinuousDeployment.md @@ -0,0 +1,51 @@ +# ResponseRetrieveContinuousDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ContinuousDeployment**](ContinuousDeployment.md) | | + +## Methods + +### NewResponseRetrieveContinuousDeployment + +`func NewResponseRetrieveContinuousDeployment(data ContinuousDeployment, ) *ResponseRetrieveContinuousDeployment` + +NewResponseRetrieveContinuousDeployment instantiates a new ResponseRetrieveContinuousDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveContinuousDeploymentWithDefaults + +`func NewResponseRetrieveContinuousDeploymentWithDefaults() *ResponseRetrieveContinuousDeployment` + +NewResponseRetrieveContinuousDeploymentWithDefaults instantiates a new ResponseRetrieveContinuousDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveContinuousDeployment) GetData() ContinuousDeployment` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveContinuousDeployment) GetDataOk() (*ContinuousDeployment, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveContinuousDeployment) SetData(v ContinuousDeployment)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveDashboard.md b/azion-api/docs/ResponseRetrieveDashboard.md new file mode 100644 index 0000000..21f698a --- /dev/null +++ b/azion-api/docs/ResponseRetrieveDashboard.md @@ -0,0 +1,51 @@ +# ResponseRetrieveDashboard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Dashboard**](Dashboard.md) | | + +## Methods + +### NewResponseRetrieveDashboard + +`func NewResponseRetrieveDashboard(data Dashboard, ) *ResponseRetrieveDashboard` + +NewResponseRetrieveDashboard instantiates a new ResponseRetrieveDashboard object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveDashboardWithDefaults + +`func NewResponseRetrieveDashboardWithDefaults() *ResponseRetrieveDashboard` + +NewResponseRetrieveDashboardWithDefaults instantiates a new ResponseRetrieveDashboard object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveDashboard) GetData() Dashboard` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveDashboard) GetDataOk() (*Dashboard, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveDashboard) SetData(v Dashboard)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveDocument.md b/azion-api/docs/ResponseRetrieveDocument.md new file mode 100644 index 0000000..c4042dc --- /dev/null +++ b/azion-api/docs/ResponseRetrieveDocument.md @@ -0,0 +1,51 @@ +# ResponseRetrieveDocument + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Document**](Document.md) | | + +## Methods + +### NewResponseRetrieveDocument + +`func NewResponseRetrieveDocument(data Document, ) *ResponseRetrieveDocument` + +NewResponseRetrieveDocument instantiates a new ResponseRetrieveDocument object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveDocumentWithDefaults + +`func NewResponseRetrieveDocumentWithDefaults() *ResponseRetrieveDocument` + +NewResponseRetrieveDocumentWithDefaults instantiates a new ResponseRetrieveDocument object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveDocument) GetData() Document` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveDocument) GetDataOk() (*Document, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveDocument) SetData(v Document)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveExecutionScript.md b/azion-api/docs/ResponseRetrieveExecutionScript.md new file mode 100644 index 0000000..4cb44ac --- /dev/null +++ b/azion-api/docs/ResponseRetrieveExecutionScript.md @@ -0,0 +1,51 @@ +# ResponseRetrieveExecutionScript + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ExecutionScript**](ExecutionScript.md) | | + +## Methods + +### NewResponseRetrieveExecutionScript + +`func NewResponseRetrieveExecutionScript(data ExecutionScript, ) *ResponseRetrieveExecutionScript` + +NewResponseRetrieveExecutionScript instantiates a new ResponseRetrieveExecutionScript object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveExecutionScriptWithDefaults + +`func NewResponseRetrieveExecutionScriptWithDefaults() *ResponseRetrieveExecutionScript` + +NewResponseRetrieveExecutionScriptWithDefaults instantiates a new ResponseRetrieveExecutionScript object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveExecutionScript) GetData() ExecutionScript` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveExecutionScript) GetDataOk() (*ExecutionScript, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveExecutionScript) SetData(v ExecutionScript)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveExecutor.md b/azion-api/docs/ResponseRetrieveExecutor.md new file mode 100644 index 0000000..dde79ce --- /dev/null +++ b/azion-api/docs/ResponseRetrieveExecutor.md @@ -0,0 +1,51 @@ +# ResponseRetrieveExecutor + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Executor**](Executor.md) | | + +## Methods + +### NewResponseRetrieveExecutor + +`func NewResponseRetrieveExecutor(data Executor, ) *ResponseRetrieveExecutor` + +NewResponseRetrieveExecutor instantiates a new ResponseRetrieveExecutor object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveExecutorWithDefaults + +`func NewResponseRetrieveExecutorWithDefaults() *ResponseRetrieveExecutor` + +NewResponseRetrieveExecutorWithDefaults instantiates a new ResponseRetrieveExecutor object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveExecutor) GetData() Executor` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveExecutor) GetDataOk() (*Executor, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveExecutor) SetData(v Executor)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveFolder.md b/azion-api/docs/ResponseRetrieveFolder.md new file mode 100644 index 0000000..0d54dc6 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveFolder.md @@ -0,0 +1,51 @@ +# ResponseRetrieveFolder + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Folder**](Folder.md) | | + +## Methods + +### NewResponseRetrieveFolder + +`func NewResponseRetrieveFolder(data Folder, ) *ResponseRetrieveFolder` + +NewResponseRetrieveFolder instantiates a new ResponseRetrieveFolder object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveFolderWithDefaults + +`func NewResponseRetrieveFolderWithDefaults() *ResponseRetrieveFolder` + +NewResponseRetrieveFolderWithDefaults instantiates a new ResponseRetrieveFolder object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveFolder) GetData() Folder` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveFolder) GetDataOk() (*Folder, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveFolder) SetData(v Folder)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveGrant.md b/azion-api/docs/ResponseRetrieveGrant.md new file mode 100644 index 0000000..c2dc2f9 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveGrant.md @@ -0,0 +1,51 @@ +# ResponseRetrieveGrant + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Grant**](Grant.md) | | + +## Methods + +### NewResponseRetrieveGrant + +`func NewResponseRetrieveGrant(data Grant, ) *ResponseRetrieveGrant` + +NewResponseRetrieveGrant instantiates a new ResponseRetrieveGrant object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveGrantWithDefaults + +`func NewResponseRetrieveGrantWithDefaults() *ResponseRetrieveGrant` + +NewResponseRetrieveGrantWithDefaults instantiates a new ResponseRetrieveGrant object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveGrant) GetData() Grant` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveGrant) GetDataOk() (*Grant, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveGrant) SetData(v Grant)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveGroup.md b/azion-api/docs/ResponseRetrieveGroup.md new file mode 100644 index 0000000..6d30f1b --- /dev/null +++ b/azion-api/docs/ResponseRetrieveGroup.md @@ -0,0 +1,51 @@ +# ResponseRetrieveGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Group**](Group.md) | | + +## Methods + +### NewResponseRetrieveGroup + +`func NewResponseRetrieveGroup(data Group, ) *ResponseRetrieveGroup` + +NewResponseRetrieveGroup instantiates a new ResponseRetrieveGroup object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveGroupWithDefaults + +`func NewResponseRetrieveGroupWithDefaults() *ResponseRetrieveGroup` + +NewResponseRetrieveGroupWithDefaults instantiates a new ResponseRetrieveGroup object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveGroup) GetData() Group` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveGroup) GetDataOk() (*Group, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveGroup) SetData(v Group)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveGroupMembers.md b/azion-api/docs/ResponseRetrieveGroupMembers.md new file mode 100644 index 0000000..08da1c0 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveGroupMembers.md @@ -0,0 +1,51 @@ +# ResponseRetrieveGroupMembers + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**GroupMembers**](GroupMembers.md) | | + +## Methods + +### NewResponseRetrieveGroupMembers + +`func NewResponseRetrieveGroupMembers(data GroupMembers, ) *ResponseRetrieveGroupMembers` + +NewResponseRetrieveGroupMembers instantiates a new ResponseRetrieveGroupMembers object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveGroupMembersWithDefaults + +`func NewResponseRetrieveGroupMembersWithDefaults() *ResponseRetrieveGroupMembers` + +NewResponseRetrieveGroupMembersWithDefaults instantiates a new ResponseRetrieveGroupMembers object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveGroupMembers) GetData() GroupMembers` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveGroupMembers) GetDataOk() (*GroupMembers, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveGroupMembers) SetData(v GroupMembers)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveIntegration.md b/azion-api/docs/ResponseRetrieveIntegration.md new file mode 100644 index 0000000..b8d1985 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveIntegration.md @@ -0,0 +1,51 @@ +# ResponseRetrieveIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Integration**](Integration.md) | | + +## Methods + +### NewResponseRetrieveIntegration + +`func NewResponseRetrieveIntegration(data Integration, ) *ResponseRetrieveIntegration` + +NewResponseRetrieveIntegration instantiates a new ResponseRetrieveIntegration object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveIntegrationWithDefaults + +`func NewResponseRetrieveIntegrationWithDefaults() *ResponseRetrieveIntegration` + +NewResponseRetrieveIntegrationWithDefaults instantiates a new ResponseRetrieveIntegration object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveIntegration) GetData() Integration` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveIntegration) GetDataOk() (*Integration, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveIntegration) SetData(v Integration)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveKnowledgeBase.md b/azion-api/docs/ResponseRetrieveKnowledgeBase.md new file mode 100644 index 0000000..54a1cad --- /dev/null +++ b/azion-api/docs/ResponseRetrieveKnowledgeBase.md @@ -0,0 +1,51 @@ +# ResponseRetrieveKnowledgeBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**KnowledgeBase**](KnowledgeBase.md) | | + +## Methods + +### NewResponseRetrieveKnowledgeBase + +`func NewResponseRetrieveKnowledgeBase(data KnowledgeBase, ) *ResponseRetrieveKnowledgeBase` + +NewResponseRetrieveKnowledgeBase instantiates a new ResponseRetrieveKnowledgeBase object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveKnowledgeBaseWithDefaults + +`func NewResponseRetrieveKnowledgeBaseWithDefaults() *ResponseRetrieveKnowledgeBase` + +NewResponseRetrieveKnowledgeBaseWithDefaults instantiates a new ResponseRetrieveKnowledgeBase object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveKnowledgeBase) GetData() KnowledgeBase` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveKnowledgeBase) GetDataOk() (*KnowledgeBase, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveKnowledgeBase) SetData(v KnowledgeBase)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveMessage.md b/azion-api/docs/ResponseRetrieveMessage.md new file mode 100644 index 0000000..e5ee97c --- /dev/null +++ b/azion-api/docs/ResponseRetrieveMessage.md @@ -0,0 +1,51 @@ +# ResponseRetrieveMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Message**](Message.md) | | + +## Methods + +### NewResponseRetrieveMessage + +`func NewResponseRetrieveMessage(data Message, ) *ResponseRetrieveMessage` + +NewResponseRetrieveMessage instantiates a new ResponseRetrieveMessage object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveMessageWithDefaults + +`func NewResponseRetrieveMessageWithDefaults() *ResponseRetrieveMessage` + +NewResponseRetrieveMessageWithDefaults instantiates a new ResponseRetrieveMessage object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveMessage) GetData() Message` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveMessage) GetDataOk() (*Message, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveMessage) SetData(v Message)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveNodeServiceBind.md b/azion-api/docs/ResponseRetrieveNodeServiceBind.md new file mode 100644 index 0000000..a8c2c91 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveNodeServiceBind.md @@ -0,0 +1,51 @@ +# ResponseRetrieveNodeServiceBind + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**NodeServiceBind**](NodeServiceBind.md) | | + +## Methods + +### NewResponseRetrieveNodeServiceBind + +`func NewResponseRetrieveNodeServiceBind(data NodeServiceBind, ) *ResponseRetrieveNodeServiceBind` + +NewResponseRetrieveNodeServiceBind instantiates a new ResponseRetrieveNodeServiceBind object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveNodeServiceBindWithDefaults + +`func NewResponseRetrieveNodeServiceBindWithDefaults() *ResponseRetrieveNodeServiceBind` + +NewResponseRetrieveNodeServiceBindWithDefaults instantiates a new ResponseRetrieveNodeServiceBind object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveNodeServiceBind) GetData() NodeServiceBind` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveNodeServiceBind) GetDataOk() (*NodeServiceBind, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveNodeServiceBind) SetData(v NodeServiceBind)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveNodes.md b/azion-api/docs/ResponseRetrieveNodes.md new file mode 100644 index 0000000..acf61a9 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveNodes.md @@ -0,0 +1,51 @@ +# ResponseRetrieveNodes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Nodes**](Nodes.md) | | + +## Methods + +### NewResponseRetrieveNodes + +`func NewResponseRetrieveNodes(data Nodes, ) *ResponseRetrieveNodes` + +NewResponseRetrieveNodes instantiates a new ResponseRetrieveNodes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveNodesWithDefaults + +`func NewResponseRetrieveNodesWithDefaults() *ResponseRetrieveNodes` + +NewResponseRetrieveNodesWithDefaults instantiates a new ResponseRetrieveNodes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveNodes) GetData() Nodes` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveNodes) GetDataOk() (*Nodes, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveNodes) SetData(v Nodes)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrievePublisher.md b/azion-api/docs/ResponseRetrievePublisher.md new file mode 100644 index 0000000..13b3fcc --- /dev/null +++ b/azion-api/docs/ResponseRetrievePublisher.md @@ -0,0 +1,51 @@ +# ResponseRetrievePublisher + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Publisher**](Publisher.md) | | + +## Methods + +### NewResponseRetrievePublisher + +`func NewResponseRetrievePublisher(data Publisher, ) *ResponseRetrievePublisher` + +NewResponseRetrievePublisher instantiates a new ResponseRetrievePublisher object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrievePublisherWithDefaults + +`func NewResponseRetrievePublisherWithDefaults() *ResponseRetrievePublisher` + +NewResponseRetrievePublisherWithDefaults instantiates a new ResponseRetrievePublisher object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrievePublisher) GetData() Publisher` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrievePublisher) GetDataOk() (*Publisher, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrievePublisher) SetData(v Publisher)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveReport.md b/azion-api/docs/ResponseRetrieveReport.md new file mode 100644 index 0000000..4b41c52 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveReport.md @@ -0,0 +1,51 @@ +# ResponseRetrieveReport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Report**](Report.md) | | + +## Methods + +### NewResponseRetrieveReport + +`func NewResponseRetrieveReport(data Report, ) *ResponseRetrieveReport` + +NewResponseRetrieveReport instantiates a new ResponseRetrieveReport object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveReportWithDefaults + +`func NewResponseRetrieveReportWithDefaults() *ResponseRetrieveReport` + +NewResponseRetrieveReportWithDefaults instantiates a new ResponseRetrieveReport object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveReport) GetData() Report` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveReport) GetDataOk() (*Report, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveReport) SetData(v Report)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveRow.md b/azion-api/docs/ResponseRetrieveRow.md new file mode 100644 index 0000000..11c2fa4 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveRow.md @@ -0,0 +1,51 @@ +# ResponseRetrieveRow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Row**](Row.md) | | + +## Methods + +### NewResponseRetrieveRow + +`func NewResponseRetrieveRow(data Row, ) *ResponseRetrieveRow` + +NewResponseRetrieveRow instantiates a new ResponseRetrieveRow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveRowWithDefaults + +`func NewResponseRetrieveRowWithDefaults() *ResponseRetrieveRow` + +NewResponseRetrieveRowWithDefaults instantiates a new ResponseRetrieveRow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveRow) GetData() Row` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveRow) GetDataOk() (*Row, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveRow) SetData(v Row)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveServiceToken.md b/azion-api/docs/ResponseRetrieveServiceToken.md new file mode 100644 index 0000000..524f5c1 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveServiceToken.md @@ -0,0 +1,51 @@ +# ResponseRetrieveServiceToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**ServiceToken**](ServiceToken.md) | | + +## Methods + +### NewResponseRetrieveServiceToken + +`func NewResponseRetrieveServiceToken(data ServiceToken, ) *ResponseRetrieveServiceToken` + +NewResponseRetrieveServiceToken instantiates a new ResponseRetrieveServiceToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveServiceTokenWithDefaults + +`func NewResponseRetrieveServiceTokenWithDefaults() *ResponseRetrieveServiceToken` + +NewResponseRetrieveServiceTokenWithDefaults instantiates a new ResponseRetrieveServiceToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveServiceToken) GetData() ServiceToken` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveServiceToken) GetDataOk() (*ServiceToken, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveServiceToken) SetData(v ServiceToken)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveServices.md b/azion-api/docs/ResponseRetrieveServices.md new file mode 100644 index 0000000..afee590 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveServices.md @@ -0,0 +1,51 @@ +# ResponseRetrieveServices + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Services**](Services.md) | | + +## Methods + +### NewResponseRetrieveServices + +`func NewResponseRetrieveServices(data Services, ) *ResponseRetrieveServices` + +NewResponseRetrieveServices instantiates a new ResponseRetrieveServices object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveServicesWithDefaults + +`func NewResponseRetrieveServicesWithDefaults() *ResponseRetrieveServices` + +NewResponseRetrieveServicesWithDefaults instantiates a new ResponseRetrieveServices object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveServices) GetData() Services` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveServices) GetDataOk() (*Services, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveServices) SetData(v Services)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveTool.md b/azion-api/docs/ResponseRetrieveTool.md new file mode 100644 index 0000000..2d16550 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveTool.md @@ -0,0 +1,51 @@ +# ResponseRetrieveTool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**Tool**](Tool.md) | | + +## Methods + +### NewResponseRetrieveTool + +`func NewResponseRetrieveTool(data Tool, ) *ResponseRetrieveTool` + +NewResponseRetrieveTool instantiates a new ResponseRetrieveTool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveToolWithDefaults + +`func NewResponseRetrieveToolWithDefaults() *ResponseRetrieveTool` + +NewResponseRetrieveToolWithDefaults instantiates a new ResponseRetrieveTool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveTool) GetData() Tool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveTool) GetDataOk() (*Tool, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveTool) SetData(v Tool)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveUser.md b/azion-api/docs/ResponseRetrieveUser.md new file mode 100644 index 0000000..44e8b9d --- /dev/null +++ b/azion-api/docs/ResponseRetrieveUser.md @@ -0,0 +1,51 @@ +# ResponseRetrieveUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**User**](User.md) | | + +## Methods + +### NewResponseRetrieveUser + +`func NewResponseRetrieveUser(data User, ) *ResponseRetrieveUser` + +NewResponseRetrieveUser instantiates a new ResponseRetrieveUser object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveUserWithDefaults + +`func NewResponseRetrieveUserWithDefaults() *ResponseRetrieveUser` + +NewResponseRetrieveUserWithDefaults instantiates a new ResponseRetrieveUser object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveUser) GetData() User` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveUser) GetDataOk() (*User, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveUser) SetData(v User)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRetrieveUserInfo.md b/azion-api/docs/ResponseRetrieveUserInfo.md new file mode 100644 index 0000000..bd99d93 --- /dev/null +++ b/azion-api/docs/ResponseRetrieveUserInfo.md @@ -0,0 +1,51 @@ +# ResponseRetrieveUserInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**UserInfo**](UserInfo.md) | | + +## Methods + +### NewResponseRetrieveUserInfo + +`func NewResponseRetrieveUserInfo(data UserInfo, ) *ResponseRetrieveUserInfo` + +NewResponseRetrieveUserInfo instantiates a new ResponseRetrieveUserInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRetrieveUserInfoWithDefaults + +`func NewResponseRetrieveUserInfoWithDefaults() *ResponseRetrieveUserInfo` + +NewResponseRetrieveUserInfoWithDefaults instantiates a new ResponseRetrieveUserInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *ResponseRetrieveUserInfo) GetData() UserInfo` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRetrieveUserInfo) GetDataOk() (*UserInfo, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRetrieveUserInfo) SetData(v UserInfo)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseRow.md b/azion-api/docs/ResponseRow.md new file mode 100644 index 0000000..6411396 --- /dev/null +++ b/azion-api/docs/ResponseRow.md @@ -0,0 +1,77 @@ +# ResponseRow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Row**](Row.md) | | + +## Methods + +### NewResponseRow + +`func NewResponseRow(data Row, ) *ResponseRow` + +NewResponseRow instantiates a new ResponseRow object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseRowWithDefaults + +`func NewResponseRowWithDefaults() *ResponseRow` + +NewResponseRowWithDefaults instantiates a new ResponseRow object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseRow) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseRow) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseRow) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseRow) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseRow) GetData() Row` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseRow) GetDataOk() (*Row, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseRow) SetData(v Row)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseServiceToken.md b/azion-api/docs/ResponseServiceToken.md new file mode 100644 index 0000000..a186d80 --- /dev/null +++ b/azion-api/docs/ResponseServiceToken.md @@ -0,0 +1,72 @@ +# ResponseServiceToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**ServiceToken**](ServiceToken.md) | | + +## Methods + +### NewResponseServiceToken + +`func NewResponseServiceToken(state string, data ServiceToken, ) *ResponseServiceToken` + +NewResponseServiceToken instantiates a new ResponseServiceToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseServiceTokenWithDefaults + +`func NewResponseServiceTokenWithDefaults() *ResponseServiceToken` + +NewResponseServiceTokenWithDefaults instantiates a new ResponseServiceToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseServiceToken) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseServiceToken) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseServiceToken) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseServiceToken) GetData() ServiceToken` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseServiceToken) GetDataOk() (*ServiceToken, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseServiceToken) SetData(v ServiceToken)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseServiceTokenCreate.md b/azion-api/docs/ResponseServiceTokenCreate.md new file mode 100644 index 0000000..c93db02 --- /dev/null +++ b/azion-api/docs/ResponseServiceTokenCreate.md @@ -0,0 +1,72 @@ +# ResponseServiceTokenCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**ServiceTokenCreate**](ServiceTokenCreate.md) | | + +## Methods + +### NewResponseServiceTokenCreate + +`func NewResponseServiceTokenCreate(state string, data ServiceTokenCreate, ) *ResponseServiceTokenCreate` + +NewResponseServiceTokenCreate instantiates a new ResponseServiceTokenCreate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseServiceTokenCreateWithDefaults + +`func NewResponseServiceTokenCreateWithDefaults() *ResponseServiceTokenCreate` + +NewResponseServiceTokenCreateWithDefaults instantiates a new ResponseServiceTokenCreate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseServiceTokenCreate) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseServiceTokenCreate) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseServiceTokenCreate) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseServiceTokenCreate) GetData() ServiceTokenCreate` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseServiceTokenCreate) GetDataOk() (*ServiceTokenCreate, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseServiceTokenCreate) SetData(v ServiceTokenCreate)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseServiceTokenRenew.md b/azion-api/docs/ResponseServiceTokenRenew.md new file mode 100644 index 0000000..8394f5a --- /dev/null +++ b/azion-api/docs/ResponseServiceTokenRenew.md @@ -0,0 +1,72 @@ +# ResponseServiceTokenRenew + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**ServiceTokenRenew**](ServiceTokenRenew.md) | | + +## Methods + +### NewResponseServiceTokenRenew + +`func NewResponseServiceTokenRenew(state string, data ServiceTokenRenew, ) *ResponseServiceTokenRenew` + +NewResponseServiceTokenRenew instantiates a new ResponseServiceTokenRenew object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseServiceTokenRenewWithDefaults + +`func NewResponseServiceTokenRenewWithDefaults() *ResponseServiceTokenRenew` + +NewResponseServiceTokenRenewWithDefaults instantiates a new ResponseServiceTokenRenew object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseServiceTokenRenew) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseServiceTokenRenew) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseServiceTokenRenew) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseServiceTokenRenew) GetData() ServiceTokenRenew` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseServiceTokenRenew) GetDataOk() (*ServiceTokenRenew, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseServiceTokenRenew) SetData(v ServiceTokenRenew)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseTool.md b/azion-api/docs/ResponseTool.md new file mode 100644 index 0000000..310587c --- /dev/null +++ b/azion-api/docs/ResponseTool.md @@ -0,0 +1,77 @@ +# ResponseTool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Tool**](Tool.md) | | + +## Methods + +### NewResponseTool + +`func NewResponseTool(data Tool, ) *ResponseTool` + +NewResponseTool instantiates a new ResponseTool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseToolWithDefaults + +`func NewResponseToolWithDefaults() *ResponseTool` + +NewResponseToolWithDefaults instantiates a new ResponseTool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseTool) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseTool) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseTool) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ResponseTool) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ResponseTool) GetData() Tool` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseTool) GetDataOk() (*Tool, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseTool) SetData(v Tool)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseUser.md b/azion-api/docs/ResponseUser.md new file mode 100644 index 0000000..6b2587f --- /dev/null +++ b/azion-api/docs/ResponseUser.md @@ -0,0 +1,72 @@ +# ResponseUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**User**](User.md) | | + +## Methods + +### NewResponseUser + +`func NewResponseUser(state string, data User, ) *ResponseUser` + +NewResponseUser instantiates a new ResponseUser object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseUserWithDefaults + +`func NewResponseUserWithDefaults() *ResponseUser` + +NewResponseUserWithDefaults instantiates a new ResponseUser object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseUser) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseUser) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseUser) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseUser) GetData() User` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseUser) GetDataOk() (*User, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseUser) SetData(v User)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ResponseUserInfo.md b/azion-api/docs/ResponseUserInfo.md new file mode 100644 index 0000000..e48a52c --- /dev/null +++ b/azion-api/docs/ResponseUserInfo.md @@ -0,0 +1,72 @@ +# ResponseUserInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | **string** | * `pending` - pending * `executed` - executed | +**Data** | [**UserInfo**](UserInfo.md) | | + +## Methods + +### NewResponseUserInfo + +`func NewResponseUserInfo(state string, data UserInfo, ) *ResponseUserInfo` + +NewResponseUserInfo instantiates a new ResponseUserInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewResponseUserInfoWithDefaults + +`func NewResponseUserInfoWithDefaults() *ResponseUserInfo` + +NewResponseUserInfoWithDefaults instantiates a new ResponseUserInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ResponseUserInfo) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ResponseUserInfo) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ResponseUserInfo) SetState(v string)` + +SetState sets State field to given value. + + +### GetData + +`func (o *ResponseUserInfo) GetData() UserInfo` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ResponseUserInfo) GetDataOk() (*UserInfo, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ResponseUserInfo) SetData(v UserInfo)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Row.md b/azion-api/docs/Row.md new file mode 100644 index 0000000..1a32c38 --- /dev/null +++ b/azion-api/docs/Row.md @@ -0,0 +1,93 @@ +# Row + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Title** | **string** | | +**Order** | **int64** | | + +## Methods + +### NewRow + +`func NewRow(id int64, title string, order int64, ) *Row` + +NewRow instantiates a new Row object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRowWithDefaults + +`func NewRowWithDefaults() *Row` + +NewRowWithDefaults instantiates a new Row object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Row) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Row) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Row) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetTitle + +`func (o *Row) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *Row) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *Row) SetTitle(v string)` + +SetTitle sets Title field to given value. + + +### GetOrder + +`func (o *Row) GetOrder() int64` + +GetOrder returns the Order field if non-nil, zero value otherwise. + +### GetOrderOk + +`func (o *Row) GetOrderOk() (*int64, bool)` + +GetOrderOk returns a tuple with the Order field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOrder + +`func (o *Row) SetOrder(v int64)` + +SetOrder sets Order field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/RowRequest.md b/azion-api/docs/RowRequest.md new file mode 100644 index 0000000..caa9e34 --- /dev/null +++ b/azion-api/docs/RowRequest.md @@ -0,0 +1,51 @@ +# RowRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | | + +## Methods + +### NewRowRequest + +`func NewRowRequest(title string, ) *RowRequest` + +NewRowRequest instantiates a new RowRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewRowRequestWithDefaults + +`func NewRowRequestWithDefaults() *RowRequest` + +NewRowRequestWithDefaults instantiates a new RowRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTitle + +`func (o *RowRequest) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *RowRequest) GetTitleOk() (*string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTitle + +`func (o *RowRequest) SetTitle(v string)` + +SetTitle sets Title field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/S3Endpoint.md b/azion-api/docs/S3Endpoint.md new file mode 100644 index 0000000..31dc0dd --- /dev/null +++ b/azion-api/docs/S3Endpoint.md @@ -0,0 +1,213 @@ +# S3Endpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Region** | **string** | | +**ObjectKeyPrefix** | Pointer to **NullableString** | | [optional] +**BucketName** | **string** | | +**ContentType** | **string** | * `plain/text` - plain/text * `application/gzip` - application/gzip | +**HostUrl** | **string** | | +**Type** | **string** | Type identifier for this endpoint (s3) | + +## Methods + +### NewS3Endpoint + +`func NewS3Endpoint(accessKey string, secretKey string, region string, bucketName string, contentType string, hostUrl string, type_ string, ) *S3Endpoint` + +NewS3Endpoint instantiates a new S3Endpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewS3EndpointWithDefaults + +`func NewS3EndpointWithDefaults() *S3Endpoint` + +NewS3EndpointWithDefaults instantiates a new S3Endpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *S3Endpoint) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *S3Endpoint) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *S3Endpoint) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *S3Endpoint) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *S3Endpoint) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *S3Endpoint) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetRegion + +`func (o *S3Endpoint) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *S3Endpoint) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *S3Endpoint) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetObjectKeyPrefix + +`func (o *S3Endpoint) GetObjectKeyPrefix() string` + +GetObjectKeyPrefix returns the ObjectKeyPrefix field if non-nil, zero value otherwise. + +### GetObjectKeyPrefixOk + +`func (o *S3Endpoint) GetObjectKeyPrefixOk() (*string, bool)` + +GetObjectKeyPrefixOk returns a tuple with the ObjectKeyPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectKeyPrefix + +`func (o *S3Endpoint) SetObjectKeyPrefix(v string)` + +SetObjectKeyPrefix sets ObjectKeyPrefix field to given value. + +### HasObjectKeyPrefix + +`func (o *S3Endpoint) HasObjectKeyPrefix() bool` + +HasObjectKeyPrefix returns a boolean if a field has been set. + +### SetObjectKeyPrefixNil + +`func (o *S3Endpoint) SetObjectKeyPrefixNil(b bool)` + + SetObjectKeyPrefixNil sets the value for ObjectKeyPrefix to be an explicit nil + +### UnsetObjectKeyPrefix +`func (o *S3Endpoint) UnsetObjectKeyPrefix()` + +UnsetObjectKeyPrefix ensures that no value is present for ObjectKeyPrefix, not even an explicit nil +### GetBucketName + +`func (o *S3Endpoint) GetBucketName() string` + +GetBucketName returns the BucketName field if non-nil, zero value otherwise. + +### GetBucketNameOk + +`func (o *S3Endpoint) GetBucketNameOk() (*string, bool)` + +GetBucketNameOk returns a tuple with the BucketName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketName + +`func (o *S3Endpoint) SetBucketName(v string)` + +SetBucketName sets BucketName field to given value. + + +### GetContentType + +`func (o *S3Endpoint) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *S3Endpoint) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *S3Endpoint) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetHostUrl + +`func (o *S3Endpoint) GetHostUrl() string` + +GetHostUrl returns the HostUrl field if non-nil, zero value otherwise. + +### GetHostUrlOk + +`func (o *S3Endpoint) GetHostUrlOk() (*string, bool)` + +GetHostUrlOk returns a tuple with the HostUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostUrl + +`func (o *S3Endpoint) SetHostUrl(v string)` + +SetHostUrl sets HostUrl field to given value. + + +### GetType + +`func (o *S3Endpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *S3Endpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *S3Endpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/S3EndpointRequest.md b/azion-api/docs/S3EndpointRequest.md new file mode 100644 index 0000000..2a1ca20 --- /dev/null +++ b/azion-api/docs/S3EndpointRequest.md @@ -0,0 +1,213 @@ +# S3EndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessKey** | **string** | | +**SecretKey** | **string** | | +**Region** | **string** | | +**ObjectKeyPrefix** | Pointer to **NullableString** | | [optional] +**BucketName** | **string** | | +**ContentType** | **string** | * `plain/text` - plain/text * `application/gzip` - application/gzip | +**HostUrl** | **string** | | +**Type** | **string** | Type identifier for this endpoint (s3) | + +## Methods + +### NewS3EndpointRequest + +`func NewS3EndpointRequest(accessKey string, secretKey string, region string, bucketName string, contentType string, hostUrl string, type_ string, ) *S3EndpointRequest` + +NewS3EndpointRequest instantiates a new S3EndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewS3EndpointRequestWithDefaults + +`func NewS3EndpointRequestWithDefaults() *S3EndpointRequest` + +NewS3EndpointRequestWithDefaults instantiates a new S3EndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessKey + +`func (o *S3EndpointRequest) GetAccessKey() string` + +GetAccessKey returns the AccessKey field if non-nil, zero value otherwise. + +### GetAccessKeyOk + +`func (o *S3EndpointRequest) GetAccessKeyOk() (*string, bool)` + +GetAccessKeyOk returns a tuple with the AccessKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessKey + +`func (o *S3EndpointRequest) SetAccessKey(v string)` + +SetAccessKey sets AccessKey field to given value. + + +### GetSecretKey + +`func (o *S3EndpointRequest) GetSecretKey() string` + +GetSecretKey returns the SecretKey field if non-nil, zero value otherwise. + +### GetSecretKeyOk + +`func (o *S3EndpointRequest) GetSecretKeyOk() (*string, bool)` + +GetSecretKeyOk returns a tuple with the SecretKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecretKey + +`func (o *S3EndpointRequest) SetSecretKey(v string)` + +SetSecretKey sets SecretKey field to given value. + + +### GetRegion + +`func (o *S3EndpointRequest) GetRegion() string` + +GetRegion returns the Region field if non-nil, zero value otherwise. + +### GetRegionOk + +`func (o *S3EndpointRequest) GetRegionOk() (*string, bool)` + +GetRegionOk returns a tuple with the Region field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRegion + +`func (o *S3EndpointRequest) SetRegion(v string)` + +SetRegion sets Region field to given value. + + +### GetObjectKeyPrefix + +`func (o *S3EndpointRequest) GetObjectKeyPrefix() string` + +GetObjectKeyPrefix returns the ObjectKeyPrefix field if non-nil, zero value otherwise. + +### GetObjectKeyPrefixOk + +`func (o *S3EndpointRequest) GetObjectKeyPrefixOk() (*string, bool)` + +GetObjectKeyPrefixOk returns a tuple with the ObjectKeyPrefix field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObjectKeyPrefix + +`func (o *S3EndpointRequest) SetObjectKeyPrefix(v string)` + +SetObjectKeyPrefix sets ObjectKeyPrefix field to given value. + +### HasObjectKeyPrefix + +`func (o *S3EndpointRequest) HasObjectKeyPrefix() bool` + +HasObjectKeyPrefix returns a boolean if a field has been set. + +### SetObjectKeyPrefixNil + +`func (o *S3EndpointRequest) SetObjectKeyPrefixNil(b bool)` + + SetObjectKeyPrefixNil sets the value for ObjectKeyPrefix to be an explicit nil + +### UnsetObjectKeyPrefix +`func (o *S3EndpointRequest) UnsetObjectKeyPrefix()` + +UnsetObjectKeyPrefix ensures that no value is present for ObjectKeyPrefix, not even an explicit nil +### GetBucketName + +`func (o *S3EndpointRequest) GetBucketName() string` + +GetBucketName returns the BucketName field if non-nil, zero value otherwise. + +### GetBucketNameOk + +`func (o *S3EndpointRequest) GetBucketNameOk() (*string, bool)` + +GetBucketNameOk returns a tuple with the BucketName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetBucketName + +`func (o *S3EndpointRequest) SetBucketName(v string)` + +SetBucketName sets BucketName field to given value. + + +### GetContentType + +`func (o *S3EndpointRequest) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *S3EndpointRequest) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *S3EndpointRequest) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetHostUrl + +`func (o *S3EndpointRequest) GetHostUrl() string` + +GetHostUrl returns the HostUrl field if non-nil, zero value otherwise. + +### GetHostUrlOk + +`func (o *S3EndpointRequest) GetHostUrlOk() (*string, bool)` + +GetHostUrlOk returns a tuple with the HostUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHostUrl + +`func (o *S3EndpointRequest) SetHostUrl(v string)` + +SetHostUrl sets HostUrl field to given value. + + +### GetType + +`func (o *S3EndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *S3EndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *S3EndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SQLAPI.md b/azion-api/docs/SQLAPI.md new file mode 100644 index 0000000..47a8874 --- /dev/null +++ b/azion-api/docs/SQLAPI.md @@ -0,0 +1,386 @@ +# \SQLAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDatabase**](SQLAPI.md#CreateDatabase) | **Post** /workspace/sql/databases | Create a database +[**DeleteDatabase**](SQLAPI.md#DeleteDatabase) | **Delete** /workspace/sql/databases/{database_id} | Delete a database +[**ExecuteQuery**](SQLAPI.md#ExecuteQuery) | **Post** /workspace/sql/databases/{database_id}/query | Execute a query into a database +[**ListDatabases**](SQLAPI.md#ListDatabases) | **Get** /workspace/sql/databases | List databases +[**RetrieveDatabase**](SQLAPI.md#RetrieveDatabase) | **Get** /workspace/sql/databases/{database_id} | Retrieve details from a database + + + +## CreateDatabase + +> DatabaseDetailResponse CreateDatabase(ctx).DatabaseRequest(databaseRequest).Execute() + +Create a database + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + databaseRequest := *openapiclient.NewDatabaseRequest("Name_example") // DatabaseRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SQLAPI.CreateDatabase(context.Background()).DatabaseRequest(databaseRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SQLAPI.CreateDatabase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateDatabase`: DatabaseDetailResponse + fmt.Fprintf(os.Stdout, "Response from `SQLAPI.CreateDatabase`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateDatabaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **databaseRequest** | [**DatabaseRequest**](DatabaseRequest.md) | | + +### Return type + +[**DatabaseDetailResponse**](DatabaseDetailResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteDatabase + +> DeleteResponse DeleteDatabase(ctx, databaseId).Execute() + +Delete a database + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + databaseId := int64(789) // int64 | A unique integer value identifying this database. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SQLAPI.DeleteDatabase(context.Background(), databaseId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SQLAPI.DeleteDatabase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteDatabase`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `SQLAPI.DeleteDatabase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**databaseId** | **int64** | A unique integer value identifying this database. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteDatabaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExecuteQuery + +> SQLResultResponse ExecuteQuery(ctx, databaseId).SQLStatementsRequest(sQLStatementsRequest).Execute() + +Execute a query into a database + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + databaseId := int64(789) // int64 | A unique integer value identifying this database. + sQLStatementsRequest := *openapiclient.NewSQLStatementsRequest([]string{"Statements_example"}) // SQLStatementsRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SQLAPI.ExecuteQuery(context.Background(), databaseId).SQLStatementsRequest(sQLStatementsRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SQLAPI.ExecuteQuery``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ExecuteQuery`: SQLResultResponse + fmt.Fprintf(os.Stdout, "Response from `SQLAPI.ExecuteQuery`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**databaseId** | **int64** | A unique integer value identifying this database. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExecuteQueryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **sQLStatementsRequest** | [**SQLStatementsRequest**](SQLStatementsRequest.md) | | + +### Return type + +[**SQLResultResponse**](SQLResultResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListDatabases + +> PaginatedDatabaseDetailList ListDatabases(ctx).Active(active).CreatedAtGte(createdAtGte).CreatedAtLte(createdAtLte).Fields(fields).Id(id).LastEditor(lastEditor).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Status(status).UpdatedAtGte(updatedAtGte).UpdatedAtLte(updatedAtLte).Execute() + +List databases + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + createdAtGte := time.Now() // time.Time | Filter by created_at (greater than or equal). (optional) + createdAtLte := time.Now() // time.Time | Filter by created_at (less than or equal). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + status := "status_example" // string | Filter by status (accepts comma-separated values). (optional) + updatedAtGte := time.Now() // time.Time | Filter by updated_at (greater than or equal). (optional) + updatedAtLte := time.Now() // time.Time | Filter by updated_at (less than or equal). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SQLAPI.ListDatabases(context.Background()).Active(active).CreatedAtGte(createdAtGte).CreatedAtLte(createdAtLte).Fields(fields).Id(id).LastEditor(lastEditor).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Status(status).UpdatedAtGte(updatedAtGte).UpdatedAtLte(updatedAtLte).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SQLAPI.ListDatabases``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListDatabases`: PaginatedDatabaseDetailList + fmt.Fprintf(os.Stdout, "Response from `SQLAPI.ListDatabases`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListDatabasesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **createdAtGte** | **time.Time** | Filter by created_at (greater than or equal). | + **createdAtLte** | **time.Time** | Filter by created_at (less than or equal). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **status** | **string** | Filter by status (accepts comma-separated values). | + **updatedAtGte** | **time.Time** | Filter by updated_at (greater than or equal). | + **updatedAtLte** | **time.Time** | Filter by updated_at (less than or equal). | + +### Return type + +[**PaginatedDatabaseDetailList**](PaginatedDatabaseDetailList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveDatabase + +> DatabaseDetailResponse RetrieveDatabase(ctx, databaseId).Fields(fields).Execute() + +Retrieve details from a database + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + databaseId := int64(789) // int64 | A unique integer value identifying this database. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SQLAPI.RetrieveDatabase(context.Background(), databaseId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SQLAPI.RetrieveDatabase``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveDatabase`: DatabaseDetailResponse + fmt.Fprintf(os.Stdout, "Response from `SQLAPI.RetrieveDatabase`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**databaseId** | **int64** | A unique integer value identifying this database. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveDatabaseRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**DatabaseDetailResponse**](DatabaseDetailResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/SQLResult.md b/azion-api/docs/SQLResult.md new file mode 100644 index 0000000..c77d62f --- /dev/null +++ b/azion-api/docs/SQLResult.md @@ -0,0 +1,72 @@ +# SQLResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Columns** | **[]interface{}** | List of column names | +**Rows** | **[]interface{}** | List of result rows | + +## Methods + +### NewSQLResult + +`func NewSQLResult(columns []interface{}, rows []interface{}, ) *SQLResult` + +NewSQLResult instantiates a new SQLResult object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSQLResultWithDefaults + +`func NewSQLResultWithDefaults() *SQLResult` + +NewSQLResultWithDefaults instantiates a new SQLResult object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetColumns + +`func (o *SQLResult) GetColumns() []interface{}` + +GetColumns returns the Columns field if non-nil, zero value otherwise. + +### GetColumnsOk + +`func (o *SQLResult) GetColumnsOk() (*[]interface{}, bool)` + +GetColumnsOk returns a tuple with the Columns field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetColumns + +`func (o *SQLResult) SetColumns(v []interface{})` + +SetColumns sets Columns field to given value. + + +### GetRows + +`func (o *SQLResult) GetRows() []interface{}` + +GetRows returns the Rows field if non-nil, zero value otherwise. + +### GetRowsOk + +`func (o *SQLResult) GetRowsOk() (*[]interface{}, bool)` + +GetRowsOk returns a tuple with the Rows field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRows + +`func (o *SQLResult) SetRows(v []interface{})` + +SetRows sets Rows field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SQLResultResponse.md b/azion-api/docs/SQLResultResponse.md new file mode 100644 index 0000000..7dad13a --- /dev/null +++ b/azion-api/docs/SQLResultResponse.md @@ -0,0 +1,77 @@ +# SQLResultResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**SQLResult**](SQLResult.md) | | + +## Methods + +### NewSQLResultResponse + +`func NewSQLResultResponse(data SQLResult, ) *SQLResultResponse` + +NewSQLResultResponse instantiates a new SQLResultResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSQLResultResponseWithDefaults + +`func NewSQLResultResponseWithDefaults() *SQLResultResponse` + +NewSQLResultResponseWithDefaults instantiates a new SQLResultResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *SQLResultResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *SQLResultResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *SQLResultResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *SQLResultResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *SQLResultResponse) GetData() SQLResult` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SQLResultResponse) GetDataOk() (*SQLResult, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SQLResultResponse) SetData(v SQLResult)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SQLStatementsRequest.md b/azion-api/docs/SQLStatementsRequest.md new file mode 100644 index 0000000..0c273d7 --- /dev/null +++ b/azion-api/docs/SQLStatementsRequest.md @@ -0,0 +1,51 @@ +# SQLStatementsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Statements** | **[]string** | List of SQL statements to execute | + +## Methods + +### NewSQLStatementsRequest + +`func NewSQLStatementsRequest(statements []string, ) *SQLStatementsRequest` + +NewSQLStatementsRequest instantiates a new SQLStatementsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSQLStatementsRequestWithDefaults + +`func NewSQLStatementsRequestWithDefaults() *SQLStatementsRequest` + +NewSQLStatementsRequestWithDefaults instantiates a new SQLStatementsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStatements + +`func (o *SQLStatementsRequest) GetStatements() []string` + +GetStatements returns the Statements field if non-nil, zero value otherwise. + +### GetStatementsOk + +`func (o *SQLStatementsRequest) GetStatementsOk() (*[]string, bool)` + +GetStatementsOk returns a tuple with the Statements field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStatements + +`func (o *SQLStatementsRequest) SetStatements(v []string)` + +SetStatements sets Statements field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceResource.md b/azion-api/docs/ServiceResource.md new file mode 100644 index 0000000..923a553 --- /dev/null +++ b/azion-api/docs/ServiceResource.md @@ -0,0 +1,282 @@ +# ServiceResource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**ContentHash** | **string** | | +**ContentType** | **string** | | +**FileGroup** | **string** | | +**FileMode** | **string** | | +**FileOwner** | **string** | | +**IsTemplate** | **bool** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **string** | | +**RefCount** | **int64** | | + +## Methods + +### NewServiceResource + +`func NewServiceResource(id int64, name string, contentHash string, contentType string, fileGroup string, fileMode string, fileOwner string, isTemplate bool, active bool, lastEditor string, lastModified string, refCount int64, ) *ServiceResource` + +NewServiceResource instantiates a new ServiceResource object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceResourceWithDefaults + +`func NewServiceResourceWithDefaults() *ServiceResource` + +NewServiceResourceWithDefaults instantiates a new ServiceResource object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ServiceResource) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ServiceResource) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ServiceResource) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ServiceResource) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceResource) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceResource) SetName(v string)` + +SetName sets Name field to given value. + + +### GetContentHash + +`func (o *ServiceResource) GetContentHash() string` + +GetContentHash returns the ContentHash field if non-nil, zero value otherwise. + +### GetContentHashOk + +`func (o *ServiceResource) GetContentHashOk() (*string, bool)` + +GetContentHashOk returns a tuple with the ContentHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentHash + +`func (o *ServiceResource) SetContentHash(v string)` + +SetContentHash sets ContentHash field to given value. + + +### GetContentType + +`func (o *ServiceResource) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *ServiceResource) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *ServiceResource) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetFileGroup + +`func (o *ServiceResource) GetFileGroup() string` + +GetFileGroup returns the FileGroup field if non-nil, zero value otherwise. + +### GetFileGroupOk + +`func (o *ServiceResource) GetFileGroupOk() (*string, bool)` + +GetFileGroupOk returns a tuple with the FileGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileGroup + +`func (o *ServiceResource) SetFileGroup(v string)` + +SetFileGroup sets FileGroup field to given value. + + +### GetFileMode + +`func (o *ServiceResource) GetFileMode() string` + +GetFileMode returns the FileMode field if non-nil, zero value otherwise. + +### GetFileModeOk + +`func (o *ServiceResource) GetFileModeOk() (*string, bool)` + +GetFileModeOk returns a tuple with the FileMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileMode + +`func (o *ServiceResource) SetFileMode(v string)` + +SetFileMode sets FileMode field to given value. + + +### GetFileOwner + +`func (o *ServiceResource) GetFileOwner() string` + +GetFileOwner returns the FileOwner field if non-nil, zero value otherwise. + +### GetFileOwnerOk + +`func (o *ServiceResource) GetFileOwnerOk() (*string, bool)` + +GetFileOwnerOk returns a tuple with the FileOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileOwner + +`func (o *ServiceResource) SetFileOwner(v string)` + +SetFileOwner sets FileOwner field to given value. + + +### GetIsTemplate + +`func (o *ServiceResource) GetIsTemplate() bool` + +GetIsTemplate returns the IsTemplate field if non-nil, zero value otherwise. + +### GetIsTemplateOk + +`func (o *ServiceResource) GetIsTemplateOk() (*bool, bool)` + +GetIsTemplateOk returns a tuple with the IsTemplate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsTemplate + +`func (o *ServiceResource) SetIsTemplate(v bool)` + +SetIsTemplate sets IsTemplate field to given value. + + +### GetActive + +`func (o *ServiceResource) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceResource) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceResource) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *ServiceResource) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ServiceResource) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ServiceResource) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ServiceResource) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ServiceResource) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ServiceResource) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + +### GetRefCount + +`func (o *ServiceResource) GetRefCount() int64` + +GetRefCount returns the RefCount field if non-nil, zero value otherwise. + +### GetRefCountOk + +`func (o *ServiceResource) GetRefCountOk() (*int64, bool)` + +GetRefCountOk returns a tuple with the RefCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefCount + +`func (o *ServiceResource) SetRefCount(v int64)` + +SetRefCount sets RefCount field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceResourceId.md b/azion-api/docs/ServiceResourceId.md new file mode 100644 index 0000000..0c82755 --- /dev/null +++ b/azion-api/docs/ServiceResourceId.md @@ -0,0 +1,318 @@ +# ServiceResourceId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**ContentHash** | **string** | | +**ContentType** | Pointer to **string** | | [optional] +**Trigger** | Pointer to [**ServiceResourceIdTrigger**](ServiceResourceIdTrigger.md) | | [optional] +**Content** | Pointer to **string** | | [optional] +**IsTemplate** | **bool** | | +**Active** | **bool** | | +**FileGroup** | **string** | | +**FileMode** | **string** | | +**FileOwner** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **string** | | + +## Methods + +### NewServiceResourceId + +`func NewServiceResourceId(id int64, name string, contentHash string, isTemplate bool, active bool, fileGroup string, fileMode string, fileOwner string, lastEditor string, lastModified string, ) *ServiceResourceId` + +NewServiceResourceId instantiates a new ServiceResourceId object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceResourceIdWithDefaults + +`func NewServiceResourceIdWithDefaults() *ServiceResourceId` + +NewServiceResourceIdWithDefaults instantiates a new ServiceResourceId object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ServiceResourceId) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ServiceResourceId) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ServiceResourceId) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ServiceResourceId) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceResourceId) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceResourceId) SetName(v string)` + +SetName sets Name field to given value. + + +### GetContentHash + +`func (o *ServiceResourceId) GetContentHash() string` + +GetContentHash returns the ContentHash field if non-nil, zero value otherwise. + +### GetContentHashOk + +`func (o *ServiceResourceId) GetContentHashOk() (*string, bool)` + +GetContentHashOk returns a tuple with the ContentHash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentHash + +`func (o *ServiceResourceId) SetContentHash(v string)` + +SetContentHash sets ContentHash field to given value. + + +### GetContentType + +`func (o *ServiceResourceId) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *ServiceResourceId) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *ServiceResourceId) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + +### HasContentType + +`func (o *ServiceResourceId) HasContentType() bool` + +HasContentType returns a boolean if a field has been set. + +### GetTrigger + +`func (o *ServiceResourceId) GetTrigger() ServiceResourceIdTrigger` + +GetTrigger returns the Trigger field if non-nil, zero value otherwise. + +### GetTriggerOk + +`func (o *ServiceResourceId) GetTriggerOk() (*ServiceResourceIdTrigger, bool)` + +GetTriggerOk returns a tuple with the Trigger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrigger + +`func (o *ServiceResourceId) SetTrigger(v ServiceResourceIdTrigger)` + +SetTrigger sets Trigger field to given value. + +### HasTrigger + +`func (o *ServiceResourceId) HasTrigger() bool` + +HasTrigger returns a boolean if a field has been set. + +### GetContent + +`func (o *ServiceResourceId) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *ServiceResourceId) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *ServiceResourceId) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *ServiceResourceId) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetIsTemplate + +`func (o *ServiceResourceId) GetIsTemplate() bool` + +GetIsTemplate returns the IsTemplate field if non-nil, zero value otherwise. + +### GetIsTemplateOk + +`func (o *ServiceResourceId) GetIsTemplateOk() (*bool, bool)` + +GetIsTemplateOk returns a tuple with the IsTemplate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetIsTemplate + +`func (o *ServiceResourceId) SetIsTemplate(v bool)` + +SetIsTemplate sets IsTemplate field to given value. + + +### GetActive + +`func (o *ServiceResourceId) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceResourceId) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceResourceId) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetFileGroup + +`func (o *ServiceResourceId) GetFileGroup() string` + +GetFileGroup returns the FileGroup field if non-nil, zero value otherwise. + +### GetFileGroupOk + +`func (o *ServiceResourceId) GetFileGroupOk() (*string, bool)` + +GetFileGroupOk returns a tuple with the FileGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileGroup + +`func (o *ServiceResourceId) SetFileGroup(v string)` + +SetFileGroup sets FileGroup field to given value. + + +### GetFileMode + +`func (o *ServiceResourceId) GetFileMode() string` + +GetFileMode returns the FileMode field if non-nil, zero value otherwise. + +### GetFileModeOk + +`func (o *ServiceResourceId) GetFileModeOk() (*string, bool)` + +GetFileModeOk returns a tuple with the FileMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileMode + +`func (o *ServiceResourceId) SetFileMode(v string)` + +SetFileMode sets FileMode field to given value. + + +### GetFileOwner + +`func (o *ServiceResourceId) GetFileOwner() string` + +GetFileOwner returns the FileOwner field if non-nil, zero value otherwise. + +### GetFileOwnerOk + +`func (o *ServiceResourceId) GetFileOwnerOk() (*string, bool)` + +GetFileOwnerOk returns a tuple with the FileOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileOwner + +`func (o *ServiceResourceId) SetFileOwner(v string)` + +SetFileOwner sets FileOwner field to given value. + + +### GetLastEditor + +`func (o *ServiceResourceId) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ServiceResourceId) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ServiceResourceId) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ServiceResourceId) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ServiceResourceId) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ServiceResourceId) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceResourceIdRequest.md b/azion-api/docs/ServiceResourceIdRequest.md new file mode 100644 index 0000000..443ff29 --- /dev/null +++ b/azion-api/docs/ServiceResourceIdRequest.md @@ -0,0 +1,192 @@ +# ServiceResourceIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ContentType** | Pointer to **string** | | [optional] +**Trigger** | Pointer to [**ServiceResourceIdTrigger**](ServiceResourceIdTrigger.md) | | [optional] +**Content** | Pointer to **string** | | [optional] +**FileGroup** | **string** | | +**FileMode** | **string** | | +**FileOwner** | **string** | | + +## Methods + +### NewServiceResourceIdRequest + +`func NewServiceResourceIdRequest(name string, fileGroup string, fileMode string, fileOwner string, ) *ServiceResourceIdRequest` + +NewServiceResourceIdRequest instantiates a new ServiceResourceIdRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceResourceIdRequestWithDefaults + +`func NewServiceResourceIdRequestWithDefaults() *ServiceResourceIdRequest` + +NewServiceResourceIdRequestWithDefaults instantiates a new ServiceResourceIdRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ServiceResourceIdRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceResourceIdRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceResourceIdRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetContentType + +`func (o *ServiceResourceIdRequest) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *ServiceResourceIdRequest) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *ServiceResourceIdRequest) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + +### HasContentType + +`func (o *ServiceResourceIdRequest) HasContentType() bool` + +HasContentType returns a boolean if a field has been set. + +### GetTrigger + +`func (o *ServiceResourceIdRequest) GetTrigger() ServiceResourceIdTrigger` + +GetTrigger returns the Trigger field if non-nil, zero value otherwise. + +### GetTriggerOk + +`func (o *ServiceResourceIdRequest) GetTriggerOk() (*ServiceResourceIdTrigger, bool)` + +GetTriggerOk returns a tuple with the Trigger field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTrigger + +`func (o *ServiceResourceIdRequest) SetTrigger(v ServiceResourceIdTrigger)` + +SetTrigger sets Trigger field to given value. + +### HasTrigger + +`func (o *ServiceResourceIdRequest) HasTrigger() bool` + +HasTrigger returns a boolean if a field has been set. + +### GetContent + +`func (o *ServiceResourceIdRequest) GetContent() string` + +GetContent returns the Content field if non-nil, zero value otherwise. + +### GetContentOk + +`func (o *ServiceResourceIdRequest) GetContentOk() (*string, bool)` + +GetContentOk returns a tuple with the Content field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContent + +`func (o *ServiceResourceIdRequest) SetContent(v string)` + +SetContent sets Content field to given value. + +### HasContent + +`func (o *ServiceResourceIdRequest) HasContent() bool` + +HasContent returns a boolean if a field has been set. + +### GetFileGroup + +`func (o *ServiceResourceIdRequest) GetFileGroup() string` + +GetFileGroup returns the FileGroup field if non-nil, zero value otherwise. + +### GetFileGroupOk + +`func (o *ServiceResourceIdRequest) GetFileGroupOk() (*string, bool)` + +GetFileGroupOk returns a tuple with the FileGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileGroup + +`func (o *ServiceResourceIdRequest) SetFileGroup(v string)` + +SetFileGroup sets FileGroup field to given value. + + +### GetFileMode + +`func (o *ServiceResourceIdRequest) GetFileMode() string` + +GetFileMode returns the FileMode field if non-nil, zero value otherwise. + +### GetFileModeOk + +`func (o *ServiceResourceIdRequest) GetFileModeOk() (*string, bool)` + +GetFileModeOk returns a tuple with the FileMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileMode + +`func (o *ServiceResourceIdRequest) SetFileMode(v string)` + +SetFileMode sets FileMode field to given value. + + +### GetFileOwner + +`func (o *ServiceResourceIdRequest) GetFileOwner() string` + +GetFileOwner returns the FileOwner field if non-nil, zero value otherwise. + +### GetFileOwnerOk + +`func (o *ServiceResourceIdRequest) GetFileOwnerOk() (*string, bool)` + +GetFileOwnerOk returns a tuple with the FileOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileOwner + +`func (o *ServiceResourceIdRequest) SetFileOwner(v string)` + +SetFileOwner sets FileOwner field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceResourceIdTrigger.md b/azion-api/docs/ServiceResourceIdTrigger.md new file mode 100644 index 0000000..511829f --- /dev/null +++ b/azion-api/docs/ServiceResourceIdTrigger.md @@ -0,0 +1,30 @@ +# ServiceResourceIdTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewServiceResourceIdTrigger + +`func NewServiceResourceIdTrigger() *ServiceResourceIdTrigger` + +NewServiceResourceIdTrigger instantiates a new ServiceResourceIdTrigger object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceResourceIdTriggerWithDefaults + +`func NewServiceResourceIdTriggerWithDefaults() *ServiceResourceIdTrigger` + +NewServiceResourceIdTriggerWithDefaults instantiates a new ServiceResourceIdTrigger object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceResourceRequest.md b/azion-api/docs/ServiceResourceRequest.md new file mode 100644 index 0000000..db027c4 --- /dev/null +++ b/azion-api/docs/ServiceResourceRequest.md @@ -0,0 +1,135 @@ +# ServiceResourceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ContentType** | **string** | | +**FileGroup** | **string** | | +**FileMode** | **string** | | +**FileOwner** | **string** | | + +## Methods + +### NewServiceResourceRequest + +`func NewServiceResourceRequest(name string, contentType string, fileGroup string, fileMode string, fileOwner string, ) *ServiceResourceRequest` + +NewServiceResourceRequest instantiates a new ServiceResourceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceResourceRequestWithDefaults + +`func NewServiceResourceRequestWithDefaults() *ServiceResourceRequest` + +NewServiceResourceRequestWithDefaults instantiates a new ServiceResourceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ServiceResourceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceResourceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceResourceRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetContentType + +`func (o *ServiceResourceRequest) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *ServiceResourceRequest) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *ServiceResourceRequest) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetFileGroup + +`func (o *ServiceResourceRequest) GetFileGroup() string` + +GetFileGroup returns the FileGroup field if non-nil, zero value otherwise. + +### GetFileGroupOk + +`func (o *ServiceResourceRequest) GetFileGroupOk() (*string, bool)` + +GetFileGroupOk returns a tuple with the FileGroup field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileGroup + +`func (o *ServiceResourceRequest) SetFileGroup(v string)` + +SetFileGroup sets FileGroup field to given value. + + +### GetFileMode + +`func (o *ServiceResourceRequest) GetFileMode() string` + +GetFileMode returns the FileMode field if non-nil, zero value otherwise. + +### GetFileModeOk + +`func (o *ServiceResourceRequest) GetFileModeOk() (*string, bool)` + +GetFileModeOk returns a tuple with the FileMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileMode + +`func (o *ServiceResourceRequest) SetFileMode(v string)` + +SetFileMode sets FileMode field to given value. + + +### GetFileOwner + +`func (o *ServiceResourceRequest) GetFileOwner() string` + +GetFileOwner returns the FileOwner field if non-nil, zero value otherwise. + +### GetFileOwnerOk + +`func (o *ServiceResourceRequest) GetFileOwnerOk() (*string, bool)` + +GetFileOwnerOk returns a tuple with the FileOwner field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFileOwner + +`func (o *ServiceResourceRequest) SetFileOwner(v string)` + +SetFileOwner sets FileOwner field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceToken.md b/azion-api/docs/ServiceToken.md new file mode 100644 index 0000000..63b888b --- /dev/null +++ b/azion-api/docs/ServiceToken.md @@ -0,0 +1,271 @@ +# ServiceToken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | +**Description** | Pointer to **string** | | [optional] +**Expires** | **time.Time** | | +**LastUsed** | **time.Time** | | + +## Methods + +### NewServiceToken + +`func NewServiceToken(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, expires time.Time, lastUsed time.Time, ) *ServiceToken` + +NewServiceToken instantiates a new ServiceToken object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceTokenWithDefaults + +`func NewServiceTokenWithDefaults() *ServiceToken` + +NewServiceTokenWithDefaults instantiates a new ServiceToken object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ServiceToken) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ServiceToken) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ServiceToken) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ServiceToken) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceToken) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceToken) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *ServiceToken) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ServiceToken) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *ServiceToken) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *ServiceToken) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ServiceToken) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ServiceToken) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *ServiceToken) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ServiceToken) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ServiceToken) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ServiceToken) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ServiceToken) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ServiceToken) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ServiceToken) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceToken) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceToken) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ServiceToken) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *ServiceToken) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ServiceToken) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ServiceToken) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### GetDescription + +`func (o *ServiceToken) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceToken) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceToken) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceToken) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetExpires + +`func (o *ServiceToken) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ServiceToken) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ServiceToken) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + + +### GetLastUsed + +`func (o *ServiceToken) GetLastUsed() time.Time` + +GetLastUsed returns the LastUsed field if non-nil, zero value otherwise. + +### GetLastUsedOk + +`func (o *ServiceToken) GetLastUsedOk() (*time.Time, bool)` + +GetLastUsedOk returns a tuple with the LastUsed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsed + +`func (o *ServiceToken) SetLastUsed(v time.Time)` + +SetLastUsed sets LastUsed field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceTokenCreate.md b/azion-api/docs/ServiceTokenCreate.md new file mode 100644 index 0000000..2c08f00 --- /dev/null +++ b/azion-api/docs/ServiceTokenCreate.md @@ -0,0 +1,292 @@ +# ServiceTokenCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | +**Description** | Pointer to **string** | | [optional] +**Expires** | **time.Time** | | +**LastUsed** | **time.Time** | | +**Token** | **string** | | + +## Methods + +### NewServiceTokenCreate + +`func NewServiceTokenCreate(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, expires time.Time, lastUsed time.Time, token string, ) *ServiceTokenCreate` + +NewServiceTokenCreate instantiates a new ServiceTokenCreate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceTokenCreateWithDefaults + +`func NewServiceTokenCreateWithDefaults() *ServiceTokenCreate` + +NewServiceTokenCreateWithDefaults instantiates a new ServiceTokenCreate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ServiceTokenCreate) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ServiceTokenCreate) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ServiceTokenCreate) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ServiceTokenCreate) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceTokenCreate) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceTokenCreate) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *ServiceTokenCreate) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ServiceTokenCreate) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *ServiceTokenCreate) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *ServiceTokenCreate) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ServiceTokenCreate) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ServiceTokenCreate) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *ServiceTokenCreate) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ServiceTokenCreate) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ServiceTokenCreate) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ServiceTokenCreate) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ServiceTokenCreate) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ServiceTokenCreate) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ServiceTokenCreate) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceTokenCreate) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceTokenCreate) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ServiceTokenCreate) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *ServiceTokenCreate) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ServiceTokenCreate) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ServiceTokenCreate) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### GetDescription + +`func (o *ServiceTokenCreate) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceTokenCreate) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceTokenCreate) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceTokenCreate) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetExpires + +`func (o *ServiceTokenCreate) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ServiceTokenCreate) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ServiceTokenCreate) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + + +### GetLastUsed + +`func (o *ServiceTokenCreate) GetLastUsed() time.Time` + +GetLastUsed returns the LastUsed field if non-nil, zero value otherwise. + +### GetLastUsedOk + +`func (o *ServiceTokenCreate) GetLastUsedOk() (*time.Time, bool)` + +GetLastUsedOk returns a tuple with the LastUsed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsed + +`func (o *ServiceTokenCreate) SetLastUsed(v time.Time)` + +SetLastUsed sets LastUsed field to given value. + + +### GetToken + +`func (o *ServiceTokenCreate) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *ServiceTokenCreate) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *ServiceTokenCreate) SetToken(v string)` + +SetToken sets Token field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceTokenCreateRequest.md b/azion-api/docs/ServiceTokenCreateRequest.md new file mode 100644 index 0000000..58e6968 --- /dev/null +++ b/azion-api/docs/ServiceTokenCreateRequest.md @@ -0,0 +1,124 @@ +# ServiceTokenCreateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Description** | Pointer to **string** | | [optional] +**Expires** | **time.Time** | | + +## Methods + +### NewServiceTokenCreateRequest + +`func NewServiceTokenCreateRequest(name string, expires time.Time, ) *ServiceTokenCreateRequest` + +NewServiceTokenCreateRequest instantiates a new ServiceTokenCreateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceTokenCreateRequestWithDefaults + +`func NewServiceTokenCreateRequestWithDefaults() *ServiceTokenCreateRequest` + +NewServiceTokenCreateRequestWithDefaults instantiates a new ServiceTokenCreateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ServiceTokenCreateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceTokenCreateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceTokenCreateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ServiceTokenCreateRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceTokenCreateRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceTokenCreateRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ServiceTokenCreateRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDescription + +`func (o *ServiceTokenCreateRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceTokenCreateRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceTokenCreateRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceTokenCreateRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetExpires + +`func (o *ServiceTokenCreateRequest) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ServiceTokenCreateRequest) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ServiceTokenCreateRequest) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceTokenRenew.md b/azion-api/docs/ServiceTokenRenew.md new file mode 100644 index 0000000..f1b835d --- /dev/null +++ b/azion-api/docs/ServiceTokenRenew.md @@ -0,0 +1,282 @@ +# ServiceTokenRenew + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | **bool** | | +**AccountId** | **int64** | | +**Description** | **string** | | +**Expires** | **time.Time** | | +**LastUsed** | **time.Time** | | +**Token** | **string** | | + +## Methods + +### NewServiceTokenRenew + +`func NewServiceTokenRenew(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, active bool, accountId int64, description string, expires time.Time, lastUsed time.Time, token string, ) *ServiceTokenRenew` + +NewServiceTokenRenew instantiates a new ServiceTokenRenew object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceTokenRenewWithDefaults + +`func NewServiceTokenRenewWithDefaults() *ServiceTokenRenew` + +NewServiceTokenRenewWithDefaults instantiates a new ServiceTokenRenew object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ServiceTokenRenew) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ServiceTokenRenew) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ServiceTokenRenew) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *ServiceTokenRenew) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceTokenRenew) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceTokenRenew) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *ServiceTokenRenew) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ServiceTokenRenew) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *ServiceTokenRenew) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *ServiceTokenRenew) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *ServiceTokenRenew) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *ServiceTokenRenew) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *ServiceTokenRenew) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *ServiceTokenRenew) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *ServiceTokenRenew) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *ServiceTokenRenew) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *ServiceTokenRenew) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *ServiceTokenRenew) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *ServiceTokenRenew) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceTokenRenew) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceTokenRenew) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetAccountId + +`func (o *ServiceTokenRenew) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *ServiceTokenRenew) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *ServiceTokenRenew) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### GetDescription + +`func (o *ServiceTokenRenew) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceTokenRenew) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceTokenRenew) SetDescription(v string)` + +SetDescription sets Description field to given value. + + +### GetExpires + +`func (o *ServiceTokenRenew) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ServiceTokenRenew) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ServiceTokenRenew) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + + +### GetLastUsed + +`func (o *ServiceTokenRenew) GetLastUsed() time.Time` + +GetLastUsed returns the LastUsed field if non-nil, zero value otherwise. + +### GetLastUsedOk + +`func (o *ServiceTokenRenew) GetLastUsedOk() (*time.Time, bool)` + +GetLastUsedOk returns a tuple with the LastUsed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastUsed + +`func (o *ServiceTokenRenew) SetLastUsed(v time.Time)` + +SetLastUsed sets LastUsed field to given value. + + +### GetToken + +`func (o *ServiceTokenRenew) GetToken() string` + +GetToken returns the Token field if non-nil, zero value otherwise. + +### GetTokenOk + +`func (o *ServiceTokenRenew) GetTokenOk() (*string, bool)` + +GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToken + +`func (o *ServiceTokenRenew) SetToken(v string)` + +SetToken sets Token field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceTokenRenewRequest.md b/azion-api/docs/ServiceTokenRenewRequest.md new file mode 100644 index 0000000..587f3a5 --- /dev/null +++ b/azion-api/docs/ServiceTokenRenewRequest.md @@ -0,0 +1,51 @@ +# ServiceTokenRenewRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Expires** | **time.Time** | | + +## Methods + +### NewServiceTokenRenewRequest + +`func NewServiceTokenRenewRequest(expires time.Time, ) *ServiceTokenRenewRequest` + +NewServiceTokenRenewRequest instantiates a new ServiceTokenRenewRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceTokenRenewRequestWithDefaults + +`func NewServiceTokenRenewRequestWithDefaults() *ServiceTokenRenewRequest` + +NewServiceTokenRenewRequestWithDefaults instantiates a new ServiceTokenRenewRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExpires + +`func (o *ServiceTokenRenewRequest) GetExpires() time.Time` + +GetExpires returns the Expires field if non-nil, zero value otherwise. + +### GetExpiresOk + +`func (o *ServiceTokenRenewRequest) GetExpiresOk() (*time.Time, bool)` + +GetExpiresOk returns a tuple with the Expires field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpires + +`func (o *ServiceTokenRenewRequest) SetExpires(v time.Time)` + +SetExpires sets Expires field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServiceTokenUpdateRequest.md b/azion-api/docs/ServiceTokenUpdateRequest.md new file mode 100644 index 0000000..f8f4740 --- /dev/null +++ b/azion-api/docs/ServiceTokenUpdateRequest.md @@ -0,0 +1,103 @@ +# ServiceTokenUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Description** | Pointer to **string** | | [optional] + +## Methods + +### NewServiceTokenUpdateRequest + +`func NewServiceTokenUpdateRequest(name string, ) *ServiceTokenUpdateRequest` + +NewServiceTokenUpdateRequest instantiates a new ServiceTokenUpdateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServiceTokenUpdateRequestWithDefaults + +`func NewServiceTokenUpdateRequestWithDefaults() *ServiceTokenUpdateRequest` + +NewServiceTokenUpdateRequestWithDefaults instantiates a new ServiceTokenUpdateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ServiceTokenUpdateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServiceTokenUpdateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServiceTokenUpdateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *ServiceTokenUpdateRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServiceTokenUpdateRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServiceTokenUpdateRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ServiceTokenUpdateRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDescription + +`func (o *ServiceTokenUpdateRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ServiceTokenUpdateRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ServiceTokenUpdateRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ServiceTokenUpdateRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Services.md b/azion-api/docs/Services.md new file mode 100644 index 0000000..eecaa5f --- /dev/null +++ b/azion-api/docs/Services.md @@ -0,0 +1,239 @@ +# Services + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**MinVersion** | Pointer to **string** | | [optional] +**Permissions** | Pointer to **int64** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **string** | | +**RefCount** | **int64** | | +**ProductVersion** | **string** | | + +## Methods + +### NewServices + +`func NewServices(id int64, lastEditor string, lastModified string, refCount int64, productVersion string, ) *Services` + +NewServices instantiates a new Services object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServicesWithDefaults + +`func NewServicesWithDefaults() *Services` + +NewServicesWithDefaults instantiates a new Services object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Services) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Services) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Services) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Services) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Services) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Services) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *Services) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *Services) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Services) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Services) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Services) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetMinVersion + +`func (o *Services) GetMinVersion() string` + +GetMinVersion returns the MinVersion field if non-nil, zero value otherwise. + +### GetMinVersionOk + +`func (o *Services) GetMinVersionOk() (*string, bool)` + +GetMinVersionOk returns a tuple with the MinVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinVersion + +`func (o *Services) SetMinVersion(v string)` + +SetMinVersion sets MinVersion field to given value. + +### HasMinVersion + +`func (o *Services) HasMinVersion() bool` + +HasMinVersion returns a boolean if a field has been set. + +### GetPermissions + +`func (o *Services) GetPermissions() int64` + +GetPermissions returns the Permissions field if non-nil, zero value otherwise. + +### GetPermissionsOk + +`func (o *Services) GetPermissionsOk() (*int64, bool)` + +GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermissions + +`func (o *Services) SetPermissions(v int64)` + +SetPermissions sets Permissions field to given value. + +### HasPermissions + +`func (o *Services) HasPermissions() bool` + +HasPermissions returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *Services) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Services) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Services) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Services) GetLastModified() string` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Services) GetLastModifiedOk() (*string, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Services) SetLastModified(v string)` + +SetLastModified sets LastModified field to given value. + + +### GetRefCount + +`func (o *Services) GetRefCount() int64` + +GetRefCount returns the RefCount field if non-nil, zero value otherwise. + +### GetRefCountOk + +`func (o *Services) GetRefCountOk() (*int64, bool)` + +GetRefCountOk returns a tuple with the RefCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefCount + +`func (o *Services) SetRefCount(v int64)` + +SetRefCount sets RefCount field to given value. + + +### GetProductVersion + +`func (o *Services) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Services) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Services) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ServicesRequest.md b/azion-api/docs/ServicesRequest.md new file mode 100644 index 0000000..2eed570 --- /dev/null +++ b/azion-api/docs/ServicesRequest.md @@ -0,0 +1,134 @@ +# ServicesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**MinVersion** | Pointer to **string** | | [optional] +**Permissions** | Pointer to **int64** | | [optional] + +## Methods + +### NewServicesRequest + +`func NewServicesRequest() *ServicesRequest` + +NewServicesRequest instantiates a new ServicesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewServicesRequestWithDefaults + +`func NewServicesRequestWithDefaults() *ServicesRequest` + +NewServicesRequestWithDefaults instantiates a new ServicesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ServicesRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ServicesRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ServicesRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ServicesRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetActive + +`func (o *ServicesRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ServicesRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ServicesRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ServicesRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetMinVersion + +`func (o *ServicesRequest) GetMinVersion() string` + +GetMinVersion returns the MinVersion field if non-nil, zero value otherwise. + +### GetMinVersionOk + +`func (o *ServicesRequest) GetMinVersionOk() (*string, bool)` + +GetMinVersionOk returns a tuple with the MinVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinVersion + +`func (o *ServicesRequest) SetMinVersion(v string)` + +SetMinVersion sets MinVersion field to given value. + +### HasMinVersion + +`func (o *ServicesRequest) HasMinVersion() bool` + +HasMinVersion returns a boolean if a field has been set. + +### GetPermissions + +`func (o *ServicesRequest) GetPermissions() int64` + +GetPermissions returns the Permissions field if non-nil, zero value otherwise. + +### GetPermissionsOk + +`func (o *ServicesRequest) GetPermissionsOk() (*int64, bool)` + +GetPermissionsOk returns a tuple with the Permissions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPermissions + +`func (o *ServicesRequest) SetPermissions(v int64)` + +SetPermissions sets Permissions field to given value. + +### HasPermissions + +`func (o *ServicesRequest) HasPermissions() bool` + +HasPermissions returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SessionTimeoutPolicy.md b/azion-api/docs/SessionTimeoutPolicy.md new file mode 100644 index 0000000..60b231d --- /dev/null +++ b/azion-api/docs/SessionTimeoutPolicy.md @@ -0,0 +1,72 @@ +# SessionTimeoutPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MaxIdleTime** | **int64** | | +**MaxSessionTime** | **int64** | | + +## Methods + +### NewSessionTimeoutPolicy + +`func NewSessionTimeoutPolicy(maxIdleTime int64, maxSessionTime int64, ) *SessionTimeoutPolicy` + +NewSessionTimeoutPolicy instantiates a new SessionTimeoutPolicy object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSessionTimeoutPolicyWithDefaults + +`func NewSessionTimeoutPolicyWithDefaults() *SessionTimeoutPolicy` + +NewSessionTimeoutPolicyWithDefaults instantiates a new SessionTimeoutPolicy object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMaxIdleTime + +`func (o *SessionTimeoutPolicy) GetMaxIdleTime() int64` + +GetMaxIdleTime returns the MaxIdleTime field if non-nil, zero value otherwise. + +### GetMaxIdleTimeOk + +`func (o *SessionTimeoutPolicy) GetMaxIdleTimeOk() (*int64, bool)` + +GetMaxIdleTimeOk returns a tuple with the MaxIdleTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxIdleTime + +`func (o *SessionTimeoutPolicy) SetMaxIdleTime(v int64)` + +SetMaxIdleTime sets MaxIdleTime field to given value. + + +### GetMaxSessionTime + +`func (o *SessionTimeoutPolicy) GetMaxSessionTime() int64` + +GetMaxSessionTime returns the MaxSessionTime field if non-nil, zero value otherwise. + +### GetMaxSessionTimeOk + +`func (o *SessionTimeoutPolicy) GetMaxSessionTimeOk() (*int64, bool)` + +GetMaxSessionTimeOk returns a tuple with the MaxSessionTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxSessionTime + +`func (o *SessionTimeoutPolicy) SetMaxSessionTime(v int64)` + +SetMaxSessionTime sets MaxSessionTime field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SessionTimeoutPolicyRequest.md b/azion-api/docs/SessionTimeoutPolicyRequest.md new file mode 100644 index 0000000..8f7308f --- /dev/null +++ b/azion-api/docs/SessionTimeoutPolicyRequest.md @@ -0,0 +1,72 @@ +# SessionTimeoutPolicyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MaxIdleTime** | **int64** | | +**MaxSessionTime** | **int64** | | + +## Methods + +### NewSessionTimeoutPolicyRequest + +`func NewSessionTimeoutPolicyRequest(maxIdleTime int64, maxSessionTime int64, ) *SessionTimeoutPolicyRequest` + +NewSessionTimeoutPolicyRequest instantiates a new SessionTimeoutPolicyRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSessionTimeoutPolicyRequestWithDefaults + +`func NewSessionTimeoutPolicyRequestWithDefaults() *SessionTimeoutPolicyRequest` + +NewSessionTimeoutPolicyRequestWithDefaults instantiates a new SessionTimeoutPolicyRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMaxIdleTime + +`func (o *SessionTimeoutPolicyRequest) GetMaxIdleTime() int64` + +GetMaxIdleTime returns the MaxIdleTime field if non-nil, zero value otherwise. + +### GetMaxIdleTimeOk + +`func (o *SessionTimeoutPolicyRequest) GetMaxIdleTimeOk() (*int64, bool)` + +GetMaxIdleTimeOk returns a tuple with the MaxIdleTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxIdleTime + +`func (o *SessionTimeoutPolicyRequest) SetMaxIdleTime(v int64)` + +SetMaxIdleTime sets MaxIdleTime field to given value. + + +### GetMaxSessionTime + +`func (o *SessionTimeoutPolicyRequest) GetMaxSessionTime() int64` + +GetMaxSessionTime returns the MaxSessionTime field if non-nil, zero value otherwise. + +### GetMaxSessionTimeOk + +`func (o *SessionTimeoutPolicyRequest) GetMaxSessionTimeOk() (*int64, bool)` + +GetMaxSessionTimeOk returns a tuple with the MaxSessionTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMaxSessionTime + +`func (o *SessionTimeoutPolicyRequest) SetMaxSessionTime(v int64)` + +SetMaxSessionTime sets MaxSessionTime field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SessionTimeoutPolicyResponse.md b/azion-api/docs/SessionTimeoutPolicyResponse.md new file mode 100644 index 0000000..3d86cbb --- /dev/null +++ b/azion-api/docs/SessionTimeoutPolicyResponse.md @@ -0,0 +1,51 @@ +# SessionTimeoutPolicyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Data** | [**SessionTimeoutPolicy**](SessionTimeoutPolicy.md) | | + +## Methods + +### NewSessionTimeoutPolicyResponse + +`func NewSessionTimeoutPolicyResponse(data SessionTimeoutPolicy, ) *SessionTimeoutPolicyResponse` + +NewSessionTimeoutPolicyResponse instantiates a new SessionTimeoutPolicyResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSessionTimeoutPolicyResponseWithDefaults + +`func NewSessionTimeoutPolicyResponseWithDefaults() *SessionTimeoutPolicyResponse` + +NewSessionTimeoutPolicyResponseWithDefaults instantiates a new SessionTimeoutPolicyResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetData + +`func (o *SessionTimeoutPolicyResponse) GetData() SessionTimeoutPolicy` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SessionTimeoutPolicyResponse) GetDataOk() (*SessionTimeoutPolicy, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SessionTimeoutPolicyResponse) SetData(v SessionTimeoutPolicy)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SplunkEndpoint.md b/azion-api/docs/SplunkEndpoint.md new file mode 100644 index 0000000..98f74f5 --- /dev/null +++ b/azion-api/docs/SplunkEndpoint.md @@ -0,0 +1,93 @@ +# SplunkEndpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**ApiKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (splunk) | + +## Methods + +### NewSplunkEndpoint + +`func NewSplunkEndpoint(url string, apiKey string, type_ string, ) *SplunkEndpoint` + +NewSplunkEndpoint instantiates a new SplunkEndpoint object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSplunkEndpointWithDefaults + +`func NewSplunkEndpointWithDefaults() *SplunkEndpoint` + +NewSplunkEndpointWithDefaults instantiates a new SplunkEndpoint object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *SplunkEndpoint) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *SplunkEndpoint) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *SplunkEndpoint) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetApiKey + +`func (o *SplunkEndpoint) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *SplunkEndpoint) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *SplunkEndpoint) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetType + +`func (o *SplunkEndpoint) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SplunkEndpoint) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SplunkEndpoint) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SplunkEndpointRequest.md b/azion-api/docs/SplunkEndpointRequest.md new file mode 100644 index 0000000..36e116b --- /dev/null +++ b/azion-api/docs/SplunkEndpointRequest.md @@ -0,0 +1,93 @@ +# SplunkEndpointRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | +**ApiKey** | **string** | | +**Type** | **string** | Type identifier for this endpoint (splunk) | + +## Methods + +### NewSplunkEndpointRequest + +`func NewSplunkEndpointRequest(url string, apiKey string, type_ string, ) *SplunkEndpointRequest` + +NewSplunkEndpointRequest instantiates a new SplunkEndpointRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSplunkEndpointRequestWithDefaults + +`func NewSplunkEndpointRequestWithDefaults() *SplunkEndpointRequest` + +NewSplunkEndpointRequestWithDefaults instantiates a new SplunkEndpointRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *SplunkEndpointRequest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *SplunkEndpointRequest) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *SplunkEndpointRequest) SetUrl(v string)` + +SetUrl sets Url field to given value. + + +### GetApiKey + +`func (o *SplunkEndpointRequest) GetApiKey() string` + +GetApiKey returns the ApiKey field if non-nil, zero value otherwise. + +### GetApiKeyOk + +`func (o *SplunkEndpointRequest) GetApiKeyOk() (*string, bool)` + +GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetApiKey + +`func (o *SplunkEndpointRequest) SetApiKey(v string)` + +SetApiKey sets ApiKey field to given value. + + +### GetType + +`func (o *SplunkEndpointRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *SplunkEndpointRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *SplunkEndpointRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/StateCacheModule.md b/azion-api/docs/StateCacheModule.md new file mode 100644 index 0000000..6b8de6b --- /dev/null +++ b/azion-api/docs/StateCacheModule.md @@ -0,0 +1,56 @@ +# StateCacheModule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewStateCacheModule + +`func NewStateCacheModule() *StateCacheModule` + +NewStateCacheModule instantiates a new StateCacheModule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStateCacheModuleWithDefaults + +`func NewStateCacheModuleWithDefaults() *StateCacheModule` + +NewStateCacheModuleWithDefaults instantiates a new StateCacheModule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *StateCacheModule) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *StateCacheModule) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *StateCacheModule) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *StateCacheModule) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/StateCacheModuleRequest.md b/azion-api/docs/StateCacheModuleRequest.md new file mode 100644 index 0000000..fdd2167 --- /dev/null +++ b/azion-api/docs/StateCacheModuleRequest.md @@ -0,0 +1,56 @@ +# StateCacheModuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | Pointer to **bool** | | [optional] + +## Methods + +### NewStateCacheModuleRequest + +`func NewStateCacheModuleRequest() *StateCacheModuleRequest` + +NewStateCacheModuleRequest instantiates a new StateCacheModuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStateCacheModuleRequestWithDefaults + +`func NewStateCacheModuleRequestWithDefaults() *StateCacheModuleRequest` + +NewStateCacheModuleRequestWithDefaults instantiates a new StateCacheModuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEnabled + +`func (o *StateCacheModuleRequest) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *StateCacheModuleRequest) GetEnabledOk() (*bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEnabled + +`func (o *StateCacheModuleRequest) SetEnabled(v bool)` + +SetEnabled sets Enabled field to given value. + +### HasEnabled + +`func (o *StateCacheModuleRequest) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/StateExecutedResponse.md b/azion-api/docs/StateExecutedResponse.md new file mode 100644 index 0000000..f4598b8 --- /dev/null +++ b/azion-api/docs/StateExecutedResponse.md @@ -0,0 +1,56 @@ +# StateExecutedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | State of the operation (lowercase with underscores) | [optional] + +## Methods + +### NewStateExecutedResponse + +`func NewStateExecutedResponse() *StateExecutedResponse` + +NewStateExecutedResponse instantiates a new StateExecutedResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewStateExecutedResponseWithDefaults + +`func NewStateExecutedResponseWithDefaults() *StateExecutedResponse` + +NewStateExecutedResponseWithDefaults instantiates a new StateExecutedResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *StateExecutedResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *StateExecutedResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *StateExecutedResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *StateExecutedResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/StorageBucketsAPI.md b/azion-api/docs/StorageBucketsAPI.md new file mode 100644 index 0000000..4042eba --- /dev/null +++ b/azion-api/docs/StorageBucketsAPI.md @@ -0,0 +1,392 @@ +# \StorageBucketsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBucket**](StorageBucketsAPI.md#CreateBucket) | **Post** /workspace/storage/buckets | Create a new bucket +[**DeleteBucket**](StorageBucketsAPI.md#DeleteBucket) | **Delete** /workspace/storage/buckets/{bucket_name} | Delete a bucket +[**ListBuckets**](StorageBucketsAPI.md#ListBuckets) | **Get** /workspace/storage/buckets | List buckets +[**RetrieveBucket**](StorageBucketsAPI.md#RetrieveBucket) | **Get** /workspace/storage/buckets/{bucket_name} | Retrieve a bucket +[**UpdateBucket**](StorageBucketsAPI.md#UpdateBucket) | **Patch** /workspace/storage/buckets/{bucket_name} | Update bucket info + + + +## CreateBucket + +> BucketCreateResponse CreateBucket(ctx).BucketCreateRequest(bucketCreateRequest).Execute() + +Create a new bucket + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketCreateRequest := *openapiclient.NewBucketCreateRequest("Name_example", "WorkloadsAccess_example") // BucketCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageBucketsAPI.CreateBucket(context.Background()).BucketCreateRequest(bucketCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageBucketsAPI.CreateBucket``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateBucket`: BucketCreateResponse + fmt.Fprintf(os.Stdout, "Response from `StorageBucketsAPI.CreateBucket`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateBucketRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bucketCreateRequest** | [**BucketCreateRequest**](BucketCreateRequest.md) | | + +### Return type + +[**BucketCreateResponse**](BucketCreateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteBucket + +> DeleteResponse DeleteBucket(ctx, bucketName).Execute() + +Delete a bucket + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageBucketsAPI.DeleteBucket(context.Background(), bucketName).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageBucketsAPI.DeleteBucket``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteBucket`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `StorageBucketsAPI.DeleteBucket`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteBucketRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListBuckets + +> PaginatedBucketList ListBuckets(ctx).Bucket(bucket).Created(created).CreatedGte(createdGte).CreatedLte(createdLte).Description(description).Fields(fields).LastEditor(lastEditor).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Status(status).WorkloadsAccess(workloadsAccess).Execute() + +List buckets + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucket := "bucket_example" // string | Filter by bucket (exact match). (optional) + created := time.Now() // time.Time | Filter by creation date (exact match). (optional) + createdGte := time.Now() // time.Time | Filter by creation date (greater than or equal). (optional) + createdLte := time.Now() // time.Time | Filter by creation date (less than or equal). (optional) + description := "description_example" // string | Filter by description (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModified := time.Now() // time.Time | Filter by last modified date (exact match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + status := "status_example" // string | Filter by status (accepts comma-separated values). (optional) + workloadsAccess := "workloadsAccess_example" // string | Filter by workloads access (accepts comma-separated values). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageBucketsAPI.ListBuckets(context.Background()).Bucket(bucket).Created(created).CreatedGte(createdGte).CreatedLte(createdLte).Description(description).Fields(fields).LastEditor(lastEditor).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Status(status).WorkloadsAccess(workloadsAccess).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageBucketsAPI.ListBuckets``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListBuckets`: PaginatedBucketList + fmt.Fprintf(os.Stdout, "Response from `StorageBucketsAPI.ListBuckets`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListBucketsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bucket** | **string** | Filter by bucket (exact match). | + **created** | **time.Time** | Filter by creation date (exact match). | + **createdGte** | **time.Time** | Filter by creation date (greater than or equal). | + **createdLte** | **time.Time** | Filter by creation date (less than or equal). | + **description** | **string** | Filter by description (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModified** | **time.Time** | Filter by last modified date (exact match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **status** | **string** | Filter by status (accepts comma-separated values). | + **workloadsAccess** | **string** | Filter by workloads access (accepts comma-separated values). | + +### Return type + +[**PaginatedBucketList**](PaginatedBucketList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveBucket + +> BucketCreateResponse RetrieveBucket(ctx, bucketName).Fields(fields).Execute() + +Retrieve a bucket + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageBucketsAPI.RetrieveBucket(context.Background(), bucketName).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageBucketsAPI.RetrieveBucket``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveBucket`: BucketCreateResponse + fmt.Fprintf(os.Stdout, "Response from `StorageBucketsAPI.RetrieveBucket`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveBucketRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**BucketCreateResponse**](BucketCreateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateBucket + +> BucketCreateResponse UpdateBucket(ctx, bucketName).PatchedBucketRequest(patchedBucketRequest).Execute() + +Update bucket info + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + patchedBucketRequest := *openapiclient.NewPatchedBucketRequest() // PatchedBucketRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageBucketsAPI.UpdateBucket(context.Background(), bucketName).PatchedBucketRequest(patchedBucketRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageBucketsAPI.UpdateBucket``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateBucket`: BucketCreateResponse + fmt.Fprintf(os.Stdout, "Response from `StorageBucketsAPI.UpdateBucket`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateBucketRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedBucketRequest** | [**PatchedBucketRequest**](PatchedBucketRequest.md) | | + +### Return type + +[**BucketCreateResponse**](BucketCreateResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/StorageCredentialsAPI.md b/azion-api/docs/StorageCredentialsAPI.md new file mode 100644 index 0000000..25396b1 --- /dev/null +++ b/azion-api/docs/StorageCredentialsAPI.md @@ -0,0 +1,313 @@ +# \StorageCredentialsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCredential**](StorageCredentialsAPI.md#CreateCredential) | **Post** /workspace/storage/credentials | Create a new credential +[**DeleteCredential**](StorageCredentialsAPI.md#DeleteCredential) | **Delete** /workspace/storage/credentials/{credential_id} | Delete a credential +[**ListCredentials**](StorageCredentialsAPI.md#ListCredentials) | **Get** /workspace/storage/credentials | List credentials +[**RetrieveCredential**](StorageCredentialsAPI.md#RetrieveCredential) | **Get** /workspace/storage/credentials/{credential_id} | Retrieve details from a credential + + + +## CreateCredential + +> CredentialResponse CreateCredential(ctx).CredentialCreateRequest(credentialCreateRequest).Execute() + +Create a new credential + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + credentialCreateRequest := *openapiclient.NewCredentialCreateRequest("Name_example", []string{"Capabilities_example"}) // CredentialCreateRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageCredentialsAPI.CreateCredential(context.Background()).CredentialCreateRequest(credentialCreateRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageCredentialsAPI.CreateCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateCredential`: CredentialResponse + fmt.Fprintf(os.Stdout, "Response from `StorageCredentialsAPI.CreateCredential`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateCredentialRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **credentialCreateRequest** | [**CredentialCreateRequest**](CredentialCreateRequest.md) | | + +### Return type + +[**CredentialResponse**](CredentialResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteCredential + +> DeleteResponse DeleteCredential(ctx, credentialId).Execute() + +Delete a credential + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + credentialId := int64(789) // int64 | The unique identifier of the credential + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageCredentialsAPI.DeleteCredential(context.Background(), credentialId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageCredentialsAPI.DeleteCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteCredential`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `StorageCredentialsAPI.DeleteCredential`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**credentialId** | **int64** | The unique identifier of the credential | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteCredentialRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListCredentials + +> PaginatedCredentialList ListCredentials(ctx).AccessKey(accessKey).Buckets(buckets).BucketsIn(bucketsIn).Fields(fields).Id(id).LastEditor(lastEditor).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List credentials + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + accessKey := "accessKey_example" // string | Filter by access key (exact match). (optional) + buckets := "buckets_example" // string | Filter by bucket name (exact match). (optional) + bucketsIn := "bucketsIn_example" // string | Filter by multiple bucket names (comma-separated). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModified := time.Now() // time.Time | Filter by last modified date (exact match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageCredentialsAPI.ListCredentials(context.Background()).AccessKey(accessKey).Buckets(buckets).BucketsIn(bucketsIn).Fields(fields).Id(id).LastEditor(lastEditor).LastModified(lastModified).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageCredentialsAPI.ListCredentials``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListCredentials`: PaginatedCredentialList + fmt.Fprintf(os.Stdout, "Response from `StorageCredentialsAPI.ListCredentials`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListCredentialsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accessKey** | **string** | Filter by access key (exact match). | + **buckets** | **string** | Filter by bucket name (exact match). | + **bucketsIn** | **string** | Filter by multiple bucket names (comma-separated). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModified** | **time.Time** | Filter by last modified date (exact match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedCredentialList**](PaginatedCredentialList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveCredential + +> CredentialResponse RetrieveCredential(ctx, credentialId).Fields(fields).Execute() + +Retrieve details from a credential + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + credentialId := int64(789) // int64 | The unique identifier of the credential + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageCredentialsAPI.RetrieveCredential(context.Background(), credentialId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageCredentialsAPI.RetrieveCredential``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveCredential`: CredentialResponse + fmt.Fprintf(os.Stdout, "Response from `StorageCredentialsAPI.RetrieveCredential`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**credentialId** | **int64** | The unique identifier of the credential | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveCredentialRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**CredentialResponse**](CredentialResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/StorageObjectsAPI.md b/azion-api/docs/StorageObjectsAPI.md new file mode 100644 index 0000000..813fbd5 --- /dev/null +++ b/azion-api/docs/StorageObjectsAPI.md @@ -0,0 +1,474 @@ +# \StorageObjectsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CopyObjectKey**](StorageObjectsAPI.md#CopyObjectKey) | **Post** /workspace/storage/buckets/{bucket_name}/objects/{object_key}/copy/{new_object_key} | Copy object to new key +[**CreateObjectKey**](StorageObjectsAPI.md#CreateObjectKey) | **Post** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Create new object key. +[**DeleteObjectKey**](StorageObjectsAPI.md#DeleteObjectKey) | **Delete** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Delete object key +[**DownloadObject**](StorageObjectsAPI.md#DownloadObject) | **Get** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Download object +[**ListObjects**](StorageObjectsAPI.md#ListObjects) | **Get** /workspace/storage/buckets/{bucket_name}/objects | List objects from bucket +[**UpdateObjectKey**](StorageObjectsAPI.md#UpdateObjectKey) | **Put** /workspace/storage/buckets/{bucket_name}/objects/{object_key} | Update the object key. + + + +## CopyObjectKey + +> interface{} CopyObjectKey(ctx, bucketName, newObjectKey, objectKey).Body(body).Execute() + +Copy object to new key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + newObjectKey := "newObjectKey_example" // string | The key/path of the destination object within the bucket + objectKey := "objectKey_example" // string | The key/path of the source object within the bucket + body := interface{}(987) // interface{} | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageObjectsAPI.CopyObjectKey(context.Background(), bucketName, newObjectKey, objectKey).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageObjectsAPI.CopyObjectKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CopyObjectKey`: interface{} + fmt.Fprintf(os.Stdout, "Response from `StorageObjectsAPI.CopyObjectKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | +**newObjectKey** | **string** | The key/path of the destination object within the bucket | +**objectKey** | **string** | The key/path of the source object within the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCopyObjectKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **body** | **interface{}** | | + +### Return type + +**interface{}** + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateObjectKey + +> SuccessObjectOperation CreateObjectKey(ctx, bucketName, objectKey).ContentType(contentType).Body(body).Execute() + +Create new object key. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + objectKey := "objectKey_example" // string | The key/path of the object within the bucket + contentType := "contentType_example" // string | The MIME type of the object being uploaded (optional) + body := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageObjectsAPI.CreateObjectKey(context.Background(), bucketName, objectKey).ContentType(contentType).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageObjectsAPI.CreateObjectKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateObjectKey`: SuccessObjectOperation + fmt.Fprintf(os.Stdout, "Response from `StorageObjectsAPI.CreateObjectKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | +**objectKey** | **string** | The key/path of the object within the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateObjectKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | The MIME type of the object being uploaded | + **body** | ***os.File** | | + +### Return type + +[**SuccessObjectOperation**](SuccessObjectOperation.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/octet-stream +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteObjectKey + +> DeleteResponse DeleteObjectKey(ctx, bucketName, objectKey).Execute() + +Delete object key + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + objectKey := "objectKey_example" // string | The key/path of the object within the bucket + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageObjectsAPI.DeleteObjectKey(context.Background(), bucketName, objectKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageObjectsAPI.DeleteObjectKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteObjectKey`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `StorageObjectsAPI.DeleteObjectKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | +**objectKey** | **string** | The key/path of the object within the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteObjectKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DownloadObject + +> *os.File DownloadObject(ctx, bucketName, objectKey).Fields(fields).Execute() + +Download object + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + objectKey := "objectKey_example" // string | The key/path of the object within the bucket + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageObjectsAPI.DownloadObject(context.Background(), bucketName, objectKey).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageObjectsAPI.DownloadObject``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DownloadObject`: *os.File + fmt.Fprintf(os.Stdout, "Response from `StorageObjectsAPI.DownloadObject`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | +**objectKey** | **string** | The key/path of the object within the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDownloadObjectRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListObjects + +> ResponseBucketObject ListObjects(ctx, bucketName).AllLevels(allLevels).ContinuationToken(continuationToken).Fields(fields).MaxObjectCount(maxObjectCount).Prefix(prefix).Execute() + +List objects from bucket + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + allLevels := true // bool | If true, lists objects recursively. If false, lists only the first level using Delimiter='/' (default: true). (optional) + continuationToken := "continuationToken_example" // string | A continuation token for the next page of records. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + maxObjectCount := int64(789) // int64 | Number of results to be returned on the page. Limited to 1000 objects. (optional) + prefix := "prefix_example" // string | Filter objects by key prefix. If empty, lists from the bucket root (default: empty). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageObjectsAPI.ListObjects(context.Background(), bucketName).AllLevels(allLevels).ContinuationToken(continuationToken).Fields(fields).MaxObjectCount(maxObjectCount).Prefix(prefix).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageObjectsAPI.ListObjects``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListObjects`: ResponseBucketObject + fmt.Fprintf(os.Stdout, "Response from `StorageObjectsAPI.ListObjects`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListObjectsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **allLevels** | **bool** | If true, lists objects recursively. If false, lists only the first level using Delimiter='/' (default: true). | + **continuationToken** | **string** | A continuation token for the next page of records. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **maxObjectCount** | **int64** | Number of results to be returned on the page. Limited to 1000 objects. | + **prefix** | **string** | Filter objects by key prefix. If empty, lists from the bucket root (default: empty). | + +### Return type + +[**ResponseBucketObject**](ResponseBucketObject.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateObjectKey + +> SuccessObjectOperation UpdateObjectKey(ctx, bucketName, objectKey).ContentType(contentType).Body(body).Execute() + +Update the object key. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + bucketName := "bucketName_example" // string | The name of the bucket + objectKey := "objectKey_example" // string | The key/path of the object within the bucket + contentType := "contentType_example" // string | The MIME type of the object being uploaded (optional) + body := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.StorageObjectsAPI.UpdateObjectKey(context.Background(), bucketName, objectKey).ContentType(contentType).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `StorageObjectsAPI.UpdateObjectKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateObjectKey`: SuccessObjectOperation + fmt.Fprintf(os.Stdout, "Response from `StorageObjectsAPI.UpdateObjectKey`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**bucketName** | **string** | The name of the bucket | +**objectKey** | **string** | The key/path of the object within the bucket | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateObjectKeyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **contentType** | **string** | The MIME type of the object being uploaded | + **body** | ***os.File** | | + +### Return type + +[**SuccessObjectOperation**](SuccessObjectOperation.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/octet-stream +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/SuccessObjectOperation.md b/azion-api/docs/SuccessObjectOperation.md new file mode 100644 index 0000000..b68ba04 --- /dev/null +++ b/azion-api/docs/SuccessObjectOperation.md @@ -0,0 +1,77 @@ +# SuccessObjectOperation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ObjectResponseData**](ObjectResponseData.md) | | + +## Methods + +### NewSuccessObjectOperation + +`func NewSuccessObjectOperation(data ObjectResponseData, ) *SuccessObjectOperation` + +NewSuccessObjectOperation instantiates a new SuccessObjectOperation object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSuccessObjectOperationWithDefaults + +`func NewSuccessObjectOperationWithDefaults() *SuccessObjectOperation` + +NewSuccessObjectOperationWithDefaults instantiates a new SuccessObjectOperation object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *SuccessObjectOperation) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *SuccessObjectOperation) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *SuccessObjectOperation) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *SuccessObjectOperation) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *SuccessObjectOperation) GetData() ObjectResponseData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SuccessObjectOperation) GetDataOk() (*ObjectResponseData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SuccessObjectOperation) SetData(v ObjectResponseData)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/SuccessObjectOperationAsync.md b/azion-api/docs/SuccessObjectOperationAsync.md new file mode 100644 index 0000000..77f5ff4 --- /dev/null +++ b/azion-api/docs/SuccessObjectOperationAsync.md @@ -0,0 +1,77 @@ +# SuccessObjectOperationAsync + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**ObjectResponseAsyncData**](ObjectResponseAsyncData.md) | | + +## Methods + +### NewSuccessObjectOperationAsync + +`func NewSuccessObjectOperationAsync(data ObjectResponseAsyncData, ) *SuccessObjectOperationAsync` + +NewSuccessObjectOperationAsync instantiates a new SuccessObjectOperationAsync object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSuccessObjectOperationAsyncWithDefaults + +`func NewSuccessObjectOperationAsyncWithDefaults() *SuccessObjectOperationAsync` + +NewSuccessObjectOperationAsyncWithDefaults instantiates a new SuccessObjectOperationAsync object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *SuccessObjectOperationAsync) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *SuccessObjectOperationAsync) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *SuccessObjectOperationAsync) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *SuccessObjectOperationAsync) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *SuccessObjectOperationAsync) GetData() ObjectResponseAsyncData` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *SuccessObjectOperationAsync) GetDataOk() (*ObjectResponseAsyncData, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *SuccessObjectOperationAsync) SetData(v ObjectResponseAsyncData)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TLSWorkload.md b/azion-api/docs/TLSWorkload.md new file mode 100644 index 0000000..a4afc94 --- /dev/null +++ b/azion-api/docs/TLSWorkload.md @@ -0,0 +1,128 @@ +# TLSWorkload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificate** | Pointer to **NullableInt64** | | [optional] +**Ciphers** | Pointer to **int64** | Allow to configure which set of ciphers will be used when TLS ciphers negotiation. * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 | [optional] +**MinimumVersion** | Pointer to [**NullableTLSWorkloadMinimumVersion**](TLSWorkloadMinimumVersion.md) | | [optional] + +## Methods + +### NewTLSWorkload + +`func NewTLSWorkload() *TLSWorkload` + +NewTLSWorkload instantiates a new TLSWorkload object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSWorkloadWithDefaults + +`func NewTLSWorkloadWithDefaults() *TLSWorkload` + +NewTLSWorkloadWithDefaults instantiates a new TLSWorkload object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCertificate + +`func (o *TLSWorkload) GetCertificate() int64` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *TLSWorkload) GetCertificateOk() (*int64, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *TLSWorkload) SetCertificate(v int64)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *TLSWorkload) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *TLSWorkload) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *TLSWorkload) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetCiphers + +`func (o *TLSWorkload) GetCiphers() int64` + +GetCiphers returns the Ciphers field if non-nil, zero value otherwise. + +### GetCiphersOk + +`func (o *TLSWorkload) GetCiphersOk() (*int64, bool)` + +GetCiphersOk returns a tuple with the Ciphers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCiphers + +`func (o *TLSWorkload) SetCiphers(v int64)` + +SetCiphers sets Ciphers field to given value. + +### HasCiphers + +`func (o *TLSWorkload) HasCiphers() bool` + +HasCiphers returns a boolean if a field has been set. + +### GetMinimumVersion + +`func (o *TLSWorkload) GetMinimumVersion() TLSWorkloadMinimumVersion` + +GetMinimumVersion returns the MinimumVersion field if non-nil, zero value otherwise. + +### GetMinimumVersionOk + +`func (o *TLSWorkload) GetMinimumVersionOk() (*TLSWorkloadMinimumVersion, bool)` + +GetMinimumVersionOk returns a tuple with the MinimumVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinimumVersion + +`func (o *TLSWorkload) SetMinimumVersion(v TLSWorkloadMinimumVersion)` + +SetMinimumVersion sets MinimumVersion field to given value. + +### HasMinimumVersion + +`func (o *TLSWorkload) HasMinimumVersion() bool` + +HasMinimumVersion returns a boolean if a field has been set. + +### SetMinimumVersionNil + +`func (o *TLSWorkload) SetMinimumVersionNil(b bool)` + + SetMinimumVersionNil sets the value for MinimumVersion to be an explicit nil + +### UnsetMinimumVersion +`func (o *TLSWorkload) UnsetMinimumVersion()` + +UnsetMinimumVersion ensures that no value is present for MinimumVersion, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TLSWorkloadMinimumVersion.md b/azion-api/docs/TLSWorkloadMinimumVersion.md new file mode 100644 index 0000000..5eaf9bd --- /dev/null +++ b/azion-api/docs/TLSWorkloadMinimumVersion.md @@ -0,0 +1,30 @@ +# TLSWorkloadMinimumVersion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Methods + +### NewTLSWorkloadMinimumVersion + +`func NewTLSWorkloadMinimumVersion() *TLSWorkloadMinimumVersion` + +NewTLSWorkloadMinimumVersion instantiates a new TLSWorkloadMinimumVersion object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSWorkloadMinimumVersionWithDefaults + +`func NewTLSWorkloadMinimumVersionWithDefaults() *TLSWorkloadMinimumVersion` + +NewTLSWorkloadMinimumVersionWithDefaults instantiates a new TLSWorkloadMinimumVersion object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TLSWorkloadRequest.md b/azion-api/docs/TLSWorkloadRequest.md new file mode 100644 index 0000000..71b5df1 --- /dev/null +++ b/azion-api/docs/TLSWorkloadRequest.md @@ -0,0 +1,128 @@ +# TLSWorkloadRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Certificate** | Pointer to **NullableInt64** | | [optional] +**Ciphers** | Pointer to **int64** | Allow to configure which set of ciphers will be used when TLS ciphers negotiation. * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 | [optional] +**MinimumVersion** | Pointer to [**NullableTLSWorkloadMinimumVersion**](TLSWorkloadMinimumVersion.md) | | [optional] + +## Methods + +### NewTLSWorkloadRequest + +`func NewTLSWorkloadRequest() *TLSWorkloadRequest` + +NewTLSWorkloadRequest instantiates a new TLSWorkloadRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTLSWorkloadRequestWithDefaults + +`func NewTLSWorkloadRequestWithDefaults() *TLSWorkloadRequest` + +NewTLSWorkloadRequestWithDefaults instantiates a new TLSWorkloadRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCertificate + +`func (o *TLSWorkloadRequest) GetCertificate() int64` + +GetCertificate returns the Certificate field if non-nil, zero value otherwise. + +### GetCertificateOk + +`func (o *TLSWorkloadRequest) GetCertificateOk() (*int64, bool)` + +GetCertificateOk returns a tuple with the Certificate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCertificate + +`func (o *TLSWorkloadRequest) SetCertificate(v int64)` + +SetCertificate sets Certificate field to given value. + +### HasCertificate + +`func (o *TLSWorkloadRequest) HasCertificate() bool` + +HasCertificate returns a boolean if a field has been set. + +### SetCertificateNil + +`func (o *TLSWorkloadRequest) SetCertificateNil(b bool)` + + SetCertificateNil sets the value for Certificate to be an explicit nil + +### UnsetCertificate +`func (o *TLSWorkloadRequest) UnsetCertificate()` + +UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +### GetCiphers + +`func (o *TLSWorkloadRequest) GetCiphers() int64` + +GetCiphers returns the Ciphers field if non-nil, zero value otherwise. + +### GetCiphersOk + +`func (o *TLSWorkloadRequest) GetCiphersOk() (*int64, bool)` + +GetCiphersOk returns a tuple with the Ciphers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCiphers + +`func (o *TLSWorkloadRequest) SetCiphers(v int64)` + +SetCiphers sets Ciphers field to given value. + +### HasCiphers + +`func (o *TLSWorkloadRequest) HasCiphers() bool` + +HasCiphers returns a boolean if a field has been set. + +### GetMinimumVersion + +`func (o *TLSWorkloadRequest) GetMinimumVersion() TLSWorkloadMinimumVersion` + +GetMinimumVersion returns the MinimumVersion field if non-nil, zero value otherwise. + +### GetMinimumVersionOk + +`func (o *TLSWorkloadRequest) GetMinimumVersionOk() (*TLSWorkloadMinimumVersion, bool)` + +GetMinimumVersionOk returns a tuple with the MinimumVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMinimumVersion + +`func (o *TLSWorkloadRequest) SetMinimumVersion(v TLSWorkloadMinimumVersion)` + +SetMinimumVersion sets MinimumVersion field to given value. + +### HasMinimumVersion + +`func (o *TLSWorkloadRequest) HasMinimumVersion() bool` + +HasMinimumVersion returns a boolean if a field has been set. + +### SetMinimumVersionNil + +`func (o *TLSWorkloadRequest) SetMinimumVersionNil(b bool)` + + SetMinimumVersionNil sets the value for MinimumVersion to be an explicit nil + +### UnsetMinimumVersion +`func (o *TLSWorkloadRequest) UnsetMinimumVersion()` + +UnsetMinimumVersion ensures that no value is present for MinimumVersion, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TOTPDevice.md b/azion-api/docs/TOTPDevice.md new file mode 100644 index 0000000..725d3c9 --- /dev/null +++ b/azion-api/docs/TOTPDevice.md @@ -0,0 +1,51 @@ +# TOTPDevice + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | | + +## Methods + +### NewTOTPDevice + +`func NewTOTPDevice(url string, ) *TOTPDevice` + +NewTOTPDevice instantiates a new TOTPDevice object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTOTPDeviceWithDefaults + +`func NewTOTPDeviceWithDefaults() *TOTPDevice` + +NewTOTPDeviceWithDefaults instantiates a new TOTPDevice object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *TOTPDevice) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *TOTPDevice) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *TOTPDevice) SetUrl(v string)` + +SetUrl sets Url field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TOTPDeviceList.md b/azion-api/docs/TOTPDeviceList.md new file mode 100644 index 0000000..7a135a5 --- /dev/null +++ b/azion-api/docs/TOTPDeviceList.md @@ -0,0 +1,140 @@ +# TOTPDeviceList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | User's full name (alphanumeric, spaces, hyphens, dots) | +**Email** | **string** | User's email address | +**Confirmed** | Pointer to **bool** | Is this device ready for use? | [optional] +**UserId** | **int64** | The user that this device belongs to. | + +## Methods + +### NewTOTPDeviceList + +`func NewTOTPDeviceList(id int64, name string, email string, userId int64, ) *TOTPDeviceList` + +NewTOTPDeviceList instantiates a new TOTPDeviceList object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTOTPDeviceListWithDefaults + +`func NewTOTPDeviceListWithDefaults() *TOTPDeviceList` + +NewTOTPDeviceListWithDefaults instantiates a new TOTPDeviceList object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *TOTPDeviceList) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *TOTPDeviceList) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *TOTPDeviceList) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *TOTPDeviceList) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TOTPDeviceList) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TOTPDeviceList) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *TOTPDeviceList) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *TOTPDeviceList) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *TOTPDeviceList) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetConfirmed + +`func (o *TOTPDeviceList) GetConfirmed() bool` + +GetConfirmed returns the Confirmed field if non-nil, zero value otherwise. + +### GetConfirmedOk + +`func (o *TOTPDeviceList) GetConfirmedOk() (*bool, bool)` + +GetConfirmedOk returns a tuple with the Confirmed field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConfirmed + +`func (o *TOTPDeviceList) SetConfirmed(v bool)` + +SetConfirmed sets Confirmed field to given value. + +### HasConfirmed + +`func (o *TOTPDeviceList) HasConfirmed() bool` + +HasConfirmed returns a boolean if a field has been set. + +### GetUserId + +`func (o *TOTPDeviceList) GetUserId() int64` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *TOTPDeviceList) GetUserIdOk() (*int64, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUserId + +`func (o *TOTPDeviceList) SetUserId(v int64)` + +SetUserId sets UserId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TOTPDeviceResponse.md b/azion-api/docs/TOTPDeviceResponse.md new file mode 100644 index 0000000..ed52f6e --- /dev/null +++ b/azion-api/docs/TOTPDeviceResponse.md @@ -0,0 +1,77 @@ +# TOTPDeviceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**TOTPDevice**](TOTPDevice.md) | | + +## Methods + +### NewTOTPDeviceResponse + +`func NewTOTPDeviceResponse(data TOTPDevice, ) *TOTPDeviceResponse` + +NewTOTPDeviceResponse instantiates a new TOTPDeviceResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTOTPDeviceResponseWithDefaults + +`func NewTOTPDeviceResponseWithDefaults() *TOTPDeviceResponse` + +NewTOTPDeviceResponseWithDefaults instantiates a new TOTPDeviceResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *TOTPDeviceResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *TOTPDeviceResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *TOTPDeviceResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *TOTPDeviceResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *TOTPDeviceResponse) GetData() TOTPDevice` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TOTPDeviceResponse) GetDataOk() (*TOTPDevice, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *TOTPDeviceResponse) SetData(v TOTPDevice)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TOTPVerificationRequest.md b/azion-api/docs/TOTPVerificationRequest.md new file mode 100644 index 0000000..83b0980 --- /dev/null +++ b/azion-api/docs/TOTPVerificationRequest.md @@ -0,0 +1,51 @@ +# TOTPVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | 6-digit TOTP code | + +## Methods + +### NewTOTPVerificationRequest + +`func NewTOTPVerificationRequest(code string, ) *TOTPVerificationRequest` + +NewTOTPVerificationRequest instantiates a new TOTPVerificationRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTOTPVerificationRequestWithDefaults + +`func NewTOTPVerificationRequestWithDefaults() *TOTPVerificationRequest` + +NewTOTPVerificationRequestWithDefaults instantiates a new TOTPVerificationRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *TOTPVerificationRequest) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *TOTPVerificationRequest) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *TOTPVerificationRequest) SetCode(v string)` + +SetCode sets Code field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Template.md b/azion-api/docs/Template.md new file mode 100644 index 0000000..13bc946 --- /dev/null +++ b/azion-api/docs/Template.md @@ -0,0 +1,182 @@ +# Template + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Custom** | **bool** | | +**Active** | Pointer to **bool** | | [optional] +**DataSet** | **string** | | + +## Methods + +### NewTemplate + +`func NewTemplate(id int64, name string, lastEditor string, lastModified time.Time, custom bool, dataSet string, ) *Template` + +NewTemplate instantiates a new Template object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTemplateWithDefaults + +`func NewTemplateWithDefaults() *Template` + +NewTemplateWithDefaults instantiates a new Template object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Template) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Template) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Template) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Template) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Template) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Template) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *Template) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Template) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Template) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Template) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Template) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Template) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetCustom + +`func (o *Template) GetCustom() bool` + +GetCustom returns the Custom field if non-nil, zero value otherwise. + +### GetCustomOk + +`func (o *Template) GetCustomOk() (*bool, bool)` + +GetCustomOk returns a tuple with the Custom field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustom + +`func (o *Template) SetCustom(v bool)` + +SetCustom sets Custom field to given value. + + +### GetActive + +`func (o *Template) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Template) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Template) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Template) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDataSet + +`func (o *Template) GetDataSet() string` + +GetDataSet returns the DataSet field if non-nil, zero value otherwise. + +### GetDataSetOk + +`func (o *Template) GetDataSetOk() (*string, bool)` + +GetDataSetOk returns a tuple with the DataSet field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSet + +`func (o *Template) SetDataSet(v string)` + +SetDataSet sets DataSet field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TemplateRequest.md b/azion-api/docs/TemplateRequest.md new file mode 100644 index 0000000..b84e155 --- /dev/null +++ b/azion-api/docs/TemplateRequest.md @@ -0,0 +1,98 @@ +# TemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**DataSet** | **string** | | + +## Methods + +### NewTemplateRequest + +`func NewTemplateRequest(name string, dataSet string, ) *TemplateRequest` + +NewTemplateRequest instantiates a new TemplateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTemplateRequestWithDefaults + +`func NewTemplateRequestWithDefaults() *TemplateRequest` + +NewTemplateRequestWithDefaults instantiates a new TemplateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *TemplateRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *TemplateRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *TemplateRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *TemplateRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *TemplateRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *TemplateRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *TemplateRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetDataSet + +`func (o *TemplateRequest) GetDataSet() string` + +GetDataSet returns the DataSet field if non-nil, zero value otherwise. + +### GetDataSetOk + +`func (o *TemplateRequest) GetDataSetOk() (*string, bool)` + +GetDataSetOk returns a tuple with the DataSet field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDataSet + +`func (o *TemplateRequest) SetDataSet(v string)` + +SetDataSet sets DataSet field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TemplateResponse.md b/azion-api/docs/TemplateResponse.md new file mode 100644 index 0000000..a624353 --- /dev/null +++ b/azion-api/docs/TemplateResponse.md @@ -0,0 +1,77 @@ +# TemplateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Template**](Template.md) | | + +## Methods + +### NewTemplateResponse + +`func NewTemplateResponse(data Template, ) *TemplateResponse` + +NewTemplateResponse instantiates a new TemplateResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTemplateResponseWithDefaults + +`func NewTemplateResponseWithDefaults() *TemplateResponse` + +NewTemplateResponseWithDefaults instantiates a new TemplateResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *TemplateResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *TemplateResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *TemplateResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *TemplateResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *TemplateResponse) GetData() Template` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TemplateResponse) GetDataOk() (*Template, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *TemplateResponse) SetData(v Template)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ThresholdsConfigField.md b/azion-api/docs/ThresholdsConfigField.md new file mode 100644 index 0000000..e00e7c1 --- /dev/null +++ b/azion-api/docs/ThresholdsConfigField.md @@ -0,0 +1,77 @@ +# ThresholdsConfigField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Threat** | **string** | * `cross_site_scripting` - cross_site_scripting * `directory_traversal` - directory_traversal * `evading_tricks` - evading_tricks * `file_upload` - file_upload * `identified_attack` - identified_attack * `remote_file_inclusion` - remote_file_inclusion * `sql_injection` - sql_injection * `unwanted_access` - unwanted_access | +**Sensitivity** | Pointer to **string** | * `highest` - Highest * `high` - High * `medium` - Medium * `low` - Low * `lowest` - Lowest | [optional] + +## Methods + +### NewThresholdsConfigField + +`func NewThresholdsConfigField(threat string, ) *ThresholdsConfigField` + +NewThresholdsConfigField instantiates a new ThresholdsConfigField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewThresholdsConfigFieldWithDefaults + +`func NewThresholdsConfigFieldWithDefaults() *ThresholdsConfigField` + +NewThresholdsConfigFieldWithDefaults instantiates a new ThresholdsConfigField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetThreat + +`func (o *ThresholdsConfigField) GetThreat() string` + +GetThreat returns the Threat field if non-nil, zero value otherwise. + +### GetThreatOk + +`func (o *ThresholdsConfigField) GetThreatOk() (*string, bool)` + +GetThreatOk returns a tuple with the Threat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreat + +`func (o *ThresholdsConfigField) SetThreat(v string)` + +SetThreat sets Threat field to given value. + + +### GetSensitivity + +`func (o *ThresholdsConfigField) GetSensitivity() string` + +GetSensitivity returns the Sensitivity field if non-nil, zero value otherwise. + +### GetSensitivityOk + +`func (o *ThresholdsConfigField) GetSensitivityOk() (*string, bool)` + +GetSensitivityOk returns a tuple with the Sensitivity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSensitivity + +`func (o *ThresholdsConfigField) SetSensitivity(v string)` + +SetSensitivity sets Sensitivity field to given value. + +### HasSensitivity + +`func (o *ThresholdsConfigField) HasSensitivity() bool` + +HasSensitivity returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ThresholdsConfigFieldRequest.md b/azion-api/docs/ThresholdsConfigFieldRequest.md new file mode 100644 index 0000000..ecac9e6 --- /dev/null +++ b/azion-api/docs/ThresholdsConfigFieldRequest.md @@ -0,0 +1,77 @@ +# ThresholdsConfigFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Threat** | **string** | * `cross_site_scripting` - cross_site_scripting * `directory_traversal` - directory_traversal * `evading_tricks` - evading_tricks * `file_upload` - file_upload * `identified_attack` - identified_attack * `remote_file_inclusion` - remote_file_inclusion * `sql_injection` - sql_injection * `unwanted_access` - unwanted_access | +**Sensitivity** | Pointer to **string** | * `highest` - Highest * `high` - High * `medium` - Medium * `low` - Low * `lowest` - Lowest | [optional] + +## Methods + +### NewThresholdsConfigFieldRequest + +`func NewThresholdsConfigFieldRequest(threat string, ) *ThresholdsConfigFieldRequest` + +NewThresholdsConfigFieldRequest instantiates a new ThresholdsConfigFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewThresholdsConfigFieldRequestWithDefaults + +`func NewThresholdsConfigFieldRequestWithDefaults() *ThresholdsConfigFieldRequest` + +NewThresholdsConfigFieldRequestWithDefaults instantiates a new ThresholdsConfigFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetThreat + +`func (o *ThresholdsConfigFieldRequest) GetThreat() string` + +GetThreat returns the Threat field if non-nil, zero value otherwise. + +### GetThreatOk + +`func (o *ThresholdsConfigFieldRequest) GetThreatOk() (*string, bool)` + +GetThreatOk returns a tuple with the Threat field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreat + +`func (o *ThresholdsConfigFieldRequest) SetThreat(v string)` + +SetThreat sets Threat field to given value. + + +### GetSensitivity + +`func (o *ThresholdsConfigFieldRequest) GetSensitivity() string` + +GetSensitivity returns the Sensitivity field if non-nil, zero value otherwise. + +### GetSensitivityOk + +`func (o *ThresholdsConfigFieldRequest) GetSensitivityOk() (*string, bool)` + +GetSensitivityOk returns a tuple with the Sensitivity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSensitivity + +`func (o *ThresholdsConfigFieldRequest) SetSensitivity(v string)` + +SetSensitivity sets Sensitivity field to given value. + +### HasSensitivity + +`func (o *ThresholdsConfigFieldRequest) HasSensitivity() bool` + +HasSensitivity returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Token.md b/azion-api/docs/Token.md new file mode 100644 index 0000000..ff41211 --- /dev/null +++ b/azion-api/docs/Token.md @@ -0,0 +1,51 @@ +# Token + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **string** | | + +## Methods + +### NewToken + +`func NewToken(accessToken string, ) *Token` + +NewToken instantiates a new Token object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenWithDefaults + +`func NewTokenWithDefaults() *Token` + +NewTokenWithDefaults instantiates a new Token object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *Token) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *Token) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *Token) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TokenPair.md b/azion-api/docs/TokenPair.md new file mode 100644 index 0000000..6f2a301 --- /dev/null +++ b/azion-api/docs/TokenPair.md @@ -0,0 +1,93 @@ +# TokenPair + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccessToken** | **string** | The access_token is a short-lived token (e.g., 10 minutes) used for API authentication in the Authorization: Bearer <access_token> header. | +**RefreshToken** | **string** | A long-lived JWT token used to refresh the access_token without requiring the user to authenticate again. | +**ResponseType** | **string** | Discriminator field for LoginResponse | + +## Methods + +### NewTokenPair + +`func NewTokenPair(accessToken string, refreshToken string, responseType string, ) *TokenPair` + +NewTokenPair instantiates a new TokenPair object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenPairWithDefaults + +`func NewTokenPairWithDefaults() *TokenPair` + +NewTokenPairWithDefaults instantiates a new TokenPair object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccessToken + +`func (o *TokenPair) GetAccessToken() string` + +GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. + +### GetAccessTokenOk + +`func (o *TokenPair) GetAccessTokenOk() (*string, bool)` + +GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccessToken + +`func (o *TokenPair) SetAccessToken(v string)` + +SetAccessToken sets AccessToken field to given value. + + +### GetRefreshToken + +`func (o *TokenPair) GetRefreshToken() string` + +GetRefreshToken returns the RefreshToken field if non-nil, zero value otherwise. + +### GetRefreshTokenOk + +`func (o *TokenPair) GetRefreshTokenOk() (*string, bool)` + +GetRefreshTokenOk returns a tuple with the RefreshToken field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRefreshToken + +`func (o *TokenPair) SetRefreshToken(v string)` + +SetRefreshToken sets RefreshToken field to given value. + + +### GetResponseType + +`func (o *TokenPair) GetResponseType() string` + +GetResponseType returns the ResponseType field if non-nil, zero value otherwise. + +### GetResponseTypeOk + +`func (o *TokenPair) GetResponseTypeOk() (*string, bool)` + +GetResponseTypeOk returns a tuple with the ResponseType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResponseType + +`func (o *TokenPair) SetResponseType(v string)` + +SetResponseType sets ResponseType field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TokenPairResponse.md b/azion-api/docs/TokenPairResponse.md new file mode 100644 index 0000000..e8235e1 --- /dev/null +++ b/azion-api/docs/TokenPairResponse.md @@ -0,0 +1,77 @@ +# TokenPairResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**TokenPair**](TokenPair.md) | | + +## Methods + +### NewTokenPairResponse + +`func NewTokenPairResponse(data TokenPair, ) *TokenPairResponse` + +NewTokenPairResponse instantiates a new TokenPairResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenPairResponseWithDefaults + +`func NewTokenPairResponseWithDefaults() *TokenPairResponse` + +NewTokenPairResponseWithDefaults instantiates a new TokenPairResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *TokenPairResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *TokenPairResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *TokenPairResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *TokenPairResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *TokenPairResponse) GetData() TokenPair` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TokenPairResponse) GetDataOk() (*TokenPair, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *TokenPairResponse) SetData(v TokenPair)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TokenRequest.md b/azion-api/docs/TokenRequest.md new file mode 100644 index 0000000..e59c644 --- /dev/null +++ b/azion-api/docs/TokenRequest.md @@ -0,0 +1,66 @@ +# TokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountId** | Pointer to **NullableInt64** | | [optional] + +## Methods + +### NewTokenRequest + +`func NewTokenRequest() *TokenRequest` + +NewTokenRequest instantiates a new TokenRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenRequestWithDefaults + +`func NewTokenRequestWithDefaults() *TokenRequest` + +NewTokenRequestWithDefaults instantiates a new TokenRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAccountId + +`func (o *TokenRequest) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *TokenRequest) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *TokenRequest) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + +### HasAccountId + +`func (o *TokenRequest) HasAccountId() bool` + +HasAccountId returns a boolean if a field has been set. + +### SetAccountIdNil + +`func (o *TokenRequest) SetAccountIdNil(b bool)` + + SetAccountIdNil sets the value for AccountId to be an explicit nil + +### UnsetAccountId +`func (o *TokenRequest) UnsetAccountId()` + +UnsetAccountId ensures that no value is present for AccountId, not even an explicit nil + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TokenResponse.md b/azion-api/docs/TokenResponse.md new file mode 100644 index 0000000..a3e8ef7 --- /dev/null +++ b/azion-api/docs/TokenResponse.md @@ -0,0 +1,77 @@ +# TokenResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Token**](Token.md) | | + +## Methods + +### NewTokenResponse + +`func NewTokenResponse(data Token, ) *TokenResponse` + +NewTokenResponse instantiates a new TokenResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTokenResponseWithDefaults + +`func NewTokenResponseWithDefaults() *TokenResponse` + +NewTokenResponseWithDefaults instantiates a new TokenResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *TokenResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *TokenResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *TokenResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *TokenResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *TokenResponse) GetData() Token` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *TokenResponse) GetDataOk() (*Token, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *TokenResponse) SetData(v Token)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Tool.md b/azion-api/docs/Tool.md new file mode 100644 index 0000000..cc174d3 --- /dev/null +++ b/azion-api/docs/Tool.md @@ -0,0 +1,234 @@ +# Tool + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ToolId** | **int64** | | +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Type** | **string** | | +**JsonSchema** | Pointer to **map[string]interface{}** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Kbs** | **string** | | +**LastModified** | **time.Time** | | +**LastEditor** | **string** | | + +## Methods + +### NewTool + +`func NewTool(toolId int64, name string, type_ string, kbs string, lastModified time.Time, lastEditor string, ) *Tool` + +NewTool instantiates a new Tool object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewToolWithDefaults + +`func NewToolWithDefaults() *Tool` + +NewToolWithDefaults instantiates a new Tool object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetToolId + +`func (o *Tool) GetToolId() int64` + +GetToolId returns the ToolId field if non-nil, zero value otherwise. + +### GetToolIdOk + +`func (o *Tool) GetToolIdOk() (*int64, bool)` + +GetToolIdOk returns a tuple with the ToolId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolId + +`func (o *Tool) SetToolId(v int64)` + +SetToolId sets ToolId field to given value. + + +### GetName + +`func (o *Tool) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Tool) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Tool) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *Tool) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Tool) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *Tool) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *Tool) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *Tool) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Tool) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Tool) SetType(v string)` + +SetType sets Type field to given value. + + +### GetJsonSchema + +`func (o *Tool) GetJsonSchema() map[string]interface{}` + +GetJsonSchema returns the JsonSchema field if non-nil, zero value otherwise. + +### GetJsonSchemaOk + +`func (o *Tool) GetJsonSchemaOk() (*map[string]interface{}, bool)` + +GetJsonSchemaOk returns a tuple with the JsonSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJsonSchema + +`func (o *Tool) SetJsonSchema(v map[string]interface{})` + +SetJsonSchema sets JsonSchema field to given value. + +### HasJsonSchema + +`func (o *Tool) HasJsonSchema() bool` + +HasJsonSchema returns a boolean if a field has been set. + +### GetActive + +`func (o *Tool) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Tool) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Tool) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Tool) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetKbs + +`func (o *Tool) GetKbs() string` + +GetKbs returns the Kbs field if non-nil, zero value otherwise. + +### GetKbsOk + +`func (o *Tool) GetKbsOk() (*string, bool)` + +GetKbsOk returns a tuple with the Kbs field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKbs + +`func (o *Tool) SetKbs(v string)` + +SetKbs sets Kbs field to given value. + + +### GetLastModified + +`func (o *Tool) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Tool) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Tool) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetLastEditor + +`func (o *Tool) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Tool) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Tool) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ToolKBLink.md b/azion-api/docs/ToolKBLink.md new file mode 100644 index 0000000..7d72297 --- /dev/null +++ b/azion-api/docs/ToolKBLink.md @@ -0,0 +1,72 @@ +# ToolKBLink + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ToolKbId** | **int64** | | +**KbId** | **int64** | | + +## Methods + +### NewToolKBLink + +`func NewToolKBLink(toolKbId int64, kbId int64, ) *ToolKBLink` + +NewToolKBLink instantiates a new ToolKBLink object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewToolKBLinkWithDefaults + +`func NewToolKBLinkWithDefaults() *ToolKBLink` + +NewToolKBLinkWithDefaults instantiates a new ToolKBLink object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetToolKbId + +`func (o *ToolKBLink) GetToolKbId() int64` + +GetToolKbId returns the ToolKbId field if non-nil, zero value otherwise. + +### GetToolKbIdOk + +`func (o *ToolKBLink) GetToolKbIdOk() (*int64, bool)` + +GetToolKbIdOk returns a tuple with the ToolKbId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetToolKbId + +`func (o *ToolKBLink) SetToolKbId(v int64)` + +SetToolKbId sets ToolKbId field to given value. + + +### GetKbId + +`func (o *ToolKBLink) GetKbId() int64` + +GetKbId returns the KbId field if non-nil, zero value otherwise. + +### GetKbIdOk + +`func (o *ToolKBLink) GetKbIdOk() (*int64, bool)` + +GetKbIdOk returns a tuple with the KbId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetKbId + +`func (o *ToolKBLink) SetKbId(v int64)` + +SetKbId sets KbId field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ToolRequest.md b/azion-api/docs/ToolRequest.md new file mode 100644 index 0000000..c33b425 --- /dev/null +++ b/azion-api/docs/ToolRequest.md @@ -0,0 +1,150 @@ +# ToolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Description** | Pointer to **string** | | [optional] +**Type** | **string** | | +**JsonSchema** | Pointer to **map[string]interface{}** | | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewToolRequest + +`func NewToolRequest(name string, type_ string, ) *ToolRequest` + +NewToolRequest instantiates a new ToolRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewToolRequestWithDefaults + +`func NewToolRequestWithDefaults() *ToolRequest` + +NewToolRequestWithDefaults instantiates a new ToolRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ToolRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ToolRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ToolRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDescription + +`func (o *ToolRequest) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *ToolRequest) GetDescriptionOk() (*string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDescription + +`func (o *ToolRequest) SetDescription(v string)` + +SetDescription sets Description field to given value. + +### HasDescription + +`func (o *ToolRequest) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### GetType + +`func (o *ToolRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ToolRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ToolRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetJsonSchema + +`func (o *ToolRequest) GetJsonSchema() map[string]interface{}` + +GetJsonSchema returns the JsonSchema field if non-nil, zero value otherwise. + +### GetJsonSchemaOk + +`func (o *ToolRequest) GetJsonSchemaOk() (*map[string]interface{}, bool)` + +GetJsonSchemaOk returns a tuple with the JsonSchema field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJsonSchema + +`func (o *ToolRequest) SetJsonSchema(v map[string]interface{})` + +SetJsonSchema sets JsonSchema field to given value. + +### HasJsonSchema + +`func (o *ToolRequest) HasJsonSchema() bool` + +HasJsonSchema returns a boolean if a field has been set. + +### GetActive + +`func (o *ToolRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ToolRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ToolRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *ToolRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Transform.md b/azion-api/docs/Transform.md new file mode 100644 index 0000000..2d55258 --- /dev/null +++ b/azion-api/docs/Transform.md @@ -0,0 +1,72 @@ +# Transform + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (render_template) | +**Attributes** | [**TransformRenderTemplate**](TransformRenderTemplate.md) | | + +## Methods + +### NewTransform + +`func NewTransform(type_ string, attributes TransformRenderTemplate, ) *Transform` + +NewTransform instantiates a new Transform object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformWithDefaults + +`func NewTransformWithDefaults() *Transform` + +NewTransformWithDefaults instantiates a new Transform object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *Transform) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Transform) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Transform) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *Transform) GetAttributes() TransformRenderTemplate` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *Transform) GetAttributesOk() (*TransformRenderTemplate, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *Transform) SetAttributes(v TransformRenderTemplate)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformFilterWorkloads.md b/azion-api/docs/TransformFilterWorkloads.md new file mode 100644 index 0000000..b540b9a --- /dev/null +++ b/azion-api/docs/TransformFilterWorkloads.md @@ -0,0 +1,51 @@ +# TransformFilterWorkloads + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Workloads** | **[]int64** | | + +## Methods + +### NewTransformFilterWorkloads + +`func NewTransformFilterWorkloads(workloads []int64, ) *TransformFilterWorkloads` + +NewTransformFilterWorkloads instantiates a new TransformFilterWorkloads object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformFilterWorkloadsWithDefaults + +`func NewTransformFilterWorkloadsWithDefaults() *TransformFilterWorkloads` + +NewTransformFilterWorkloadsWithDefaults instantiates a new TransformFilterWorkloads object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWorkloads + +`func (o *TransformFilterWorkloads) GetWorkloads() []int64` + +GetWorkloads returns the Workloads field if non-nil, zero value otherwise. + +### GetWorkloadsOk + +`func (o *TransformFilterWorkloads) GetWorkloadsOk() (*[]int64, bool)` + +GetWorkloadsOk returns a tuple with the Workloads field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloads + +`func (o *TransformFilterWorkloads) SetWorkloads(v []int64)` + +SetWorkloads sets Workloads field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformFilterWorkloadsAttributes.md b/azion-api/docs/TransformFilterWorkloadsAttributes.md new file mode 100644 index 0000000..bfee4a0 --- /dev/null +++ b/azion-api/docs/TransformFilterWorkloadsAttributes.md @@ -0,0 +1,72 @@ +# TransformFilterWorkloadsAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `filter_workloads` - Filter Workloads | +**Attributes** | [**TransformFilterWorkloads**](TransformFilterWorkloads.md) | | + +## Methods + +### NewTransformFilterWorkloadsAttributes + +`func NewTransformFilterWorkloadsAttributes(type_ string, attributes TransformFilterWorkloads, ) *TransformFilterWorkloadsAttributes` + +NewTransformFilterWorkloadsAttributes instantiates a new TransformFilterWorkloadsAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformFilterWorkloadsAttributesWithDefaults + +`func NewTransformFilterWorkloadsAttributesWithDefaults() *TransformFilterWorkloadsAttributes` + +NewTransformFilterWorkloadsAttributesWithDefaults instantiates a new TransformFilterWorkloadsAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformFilterWorkloadsAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformFilterWorkloadsAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformFilterWorkloadsAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformFilterWorkloadsAttributes) GetAttributes() TransformFilterWorkloads` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformFilterWorkloadsAttributes) GetAttributesOk() (*TransformFilterWorkloads, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformFilterWorkloadsAttributes) SetAttributes(v TransformFilterWorkloads)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformFilterWorkloadsAttributesRequest.md b/azion-api/docs/TransformFilterWorkloadsAttributesRequest.md new file mode 100644 index 0000000..1e2948a --- /dev/null +++ b/azion-api/docs/TransformFilterWorkloadsAttributesRequest.md @@ -0,0 +1,72 @@ +# TransformFilterWorkloadsAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `filter_workloads` - Filter Workloads | +**Attributes** | [**TransformFilterWorkloadsRequest**](TransformFilterWorkloadsRequest.md) | | + +## Methods + +### NewTransformFilterWorkloadsAttributesRequest + +`func NewTransformFilterWorkloadsAttributesRequest(type_ string, attributes TransformFilterWorkloadsRequest, ) *TransformFilterWorkloadsAttributesRequest` + +NewTransformFilterWorkloadsAttributesRequest instantiates a new TransformFilterWorkloadsAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformFilterWorkloadsAttributesRequestWithDefaults + +`func NewTransformFilterWorkloadsAttributesRequestWithDefaults() *TransformFilterWorkloadsAttributesRequest` + +NewTransformFilterWorkloadsAttributesRequestWithDefaults instantiates a new TransformFilterWorkloadsAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformFilterWorkloadsAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformFilterWorkloadsAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformFilterWorkloadsAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformFilterWorkloadsAttributesRequest) GetAttributes() TransformFilterWorkloadsRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformFilterWorkloadsAttributesRequest) GetAttributesOk() (*TransformFilterWorkloadsRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformFilterWorkloadsAttributesRequest) SetAttributes(v TransformFilterWorkloadsRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformFilterWorkloadsRequest.md b/azion-api/docs/TransformFilterWorkloadsRequest.md new file mode 100644 index 0000000..8a0a26a --- /dev/null +++ b/azion-api/docs/TransformFilterWorkloadsRequest.md @@ -0,0 +1,51 @@ +# TransformFilterWorkloadsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Workloads** | **[]int64** | | + +## Methods + +### NewTransformFilterWorkloadsRequest + +`func NewTransformFilterWorkloadsRequest(workloads []int64, ) *TransformFilterWorkloadsRequest` + +NewTransformFilterWorkloadsRequest instantiates a new TransformFilterWorkloadsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformFilterWorkloadsRequestWithDefaults + +`func NewTransformFilterWorkloadsRequestWithDefaults() *TransformFilterWorkloadsRequest` + +NewTransformFilterWorkloadsRequestWithDefaults instantiates a new TransformFilterWorkloadsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetWorkloads + +`func (o *TransformFilterWorkloadsRequest) GetWorkloads() []int64` + +GetWorkloads returns the Workloads field if non-nil, zero value otherwise. + +### GetWorkloadsOk + +`func (o *TransformFilterWorkloadsRequest) GetWorkloadsOk() (*[]int64, bool)` + +GetWorkloadsOk returns a tuple with the Workloads field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloads + +`func (o *TransformFilterWorkloadsRequest) SetWorkloads(v []int64)` + +SetWorkloads sets Workloads field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformRenderTemplate.md b/azion-api/docs/TransformRenderTemplate.md new file mode 100644 index 0000000..c56604c --- /dev/null +++ b/azion-api/docs/TransformRenderTemplate.md @@ -0,0 +1,51 @@ +# TransformRenderTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Template** | **int64** | | + +## Methods + +### NewTransformRenderTemplate + +`func NewTransformRenderTemplate(template int64, ) *TransformRenderTemplate` + +NewTransformRenderTemplate instantiates a new TransformRenderTemplate object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformRenderTemplateWithDefaults + +`func NewTransformRenderTemplateWithDefaults() *TransformRenderTemplate` + +NewTransformRenderTemplateWithDefaults instantiates a new TransformRenderTemplate object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTemplate + +`func (o *TransformRenderTemplate) GetTemplate() int64` + +GetTemplate returns the Template field if non-nil, zero value otherwise. + +### GetTemplateOk + +`func (o *TransformRenderTemplate) GetTemplateOk() (*int64, bool)` + +GetTemplateOk returns a tuple with the Template field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplate + +`func (o *TransformRenderTemplate) SetTemplate(v int64)` + +SetTemplate sets Template field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformRenderTemplateAttributes.md b/azion-api/docs/TransformRenderTemplateAttributes.md new file mode 100644 index 0000000..7b8acae --- /dev/null +++ b/azion-api/docs/TransformRenderTemplateAttributes.md @@ -0,0 +1,72 @@ +# TransformRenderTemplateAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `render_template` - Render Template | +**Attributes** | [**TransformRenderTemplate**](TransformRenderTemplate.md) | | + +## Methods + +### NewTransformRenderTemplateAttributes + +`func NewTransformRenderTemplateAttributes(type_ string, attributes TransformRenderTemplate, ) *TransformRenderTemplateAttributes` + +NewTransformRenderTemplateAttributes instantiates a new TransformRenderTemplateAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformRenderTemplateAttributesWithDefaults + +`func NewTransformRenderTemplateAttributesWithDefaults() *TransformRenderTemplateAttributes` + +NewTransformRenderTemplateAttributesWithDefaults instantiates a new TransformRenderTemplateAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformRenderTemplateAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformRenderTemplateAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformRenderTemplateAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformRenderTemplateAttributes) GetAttributes() TransformRenderTemplate` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformRenderTemplateAttributes) GetAttributesOk() (*TransformRenderTemplate, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformRenderTemplateAttributes) SetAttributes(v TransformRenderTemplate)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformRenderTemplateAttributesRequest.md b/azion-api/docs/TransformRenderTemplateAttributesRequest.md new file mode 100644 index 0000000..eb635c4 --- /dev/null +++ b/azion-api/docs/TransformRenderTemplateAttributesRequest.md @@ -0,0 +1,72 @@ +# TransformRenderTemplateAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `render_template` - Render Template | +**Attributes** | [**TransformRenderTemplateRequest**](TransformRenderTemplateRequest.md) | | + +## Methods + +### NewTransformRenderTemplateAttributesRequest + +`func NewTransformRenderTemplateAttributesRequest(type_ string, attributes TransformRenderTemplateRequest, ) *TransformRenderTemplateAttributesRequest` + +NewTransformRenderTemplateAttributesRequest instantiates a new TransformRenderTemplateAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformRenderTemplateAttributesRequestWithDefaults + +`func NewTransformRenderTemplateAttributesRequestWithDefaults() *TransformRenderTemplateAttributesRequest` + +NewTransformRenderTemplateAttributesRequestWithDefaults instantiates a new TransformRenderTemplateAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformRenderTemplateAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformRenderTemplateAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformRenderTemplateAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformRenderTemplateAttributesRequest) GetAttributes() TransformRenderTemplateRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformRenderTemplateAttributesRequest) GetAttributesOk() (*TransformRenderTemplateRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformRenderTemplateAttributesRequest) SetAttributes(v TransformRenderTemplateRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformRenderTemplateRequest.md b/azion-api/docs/TransformRenderTemplateRequest.md new file mode 100644 index 0000000..737af78 --- /dev/null +++ b/azion-api/docs/TransformRenderTemplateRequest.md @@ -0,0 +1,51 @@ +# TransformRenderTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Template** | **int64** | | + +## Methods + +### NewTransformRenderTemplateRequest + +`func NewTransformRenderTemplateRequest(template int64, ) *TransformRenderTemplateRequest` + +NewTransformRenderTemplateRequest instantiates a new TransformRenderTemplateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformRenderTemplateRequestWithDefaults + +`func NewTransformRenderTemplateRequestWithDefaults() *TransformRenderTemplateRequest` + +NewTransformRenderTemplateRequestWithDefaults instantiates a new TransformRenderTemplateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetTemplate + +`func (o *TransformRenderTemplateRequest) GetTemplate() int64` + +GetTemplate returns the Template field if non-nil, zero value otherwise. + +### GetTemplateOk + +`func (o *TransformRenderTemplateRequest) GetTemplateOk() (*int64, bool)` + +GetTemplateOk returns a tuple with the Template field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTemplate + +`func (o *TransformRenderTemplateRequest) SetTemplate(v int64)` + +SetTemplate sets Template field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformRequest.md b/azion-api/docs/TransformRequest.md new file mode 100644 index 0000000..af369f4 --- /dev/null +++ b/azion-api/docs/TransformRequest.md @@ -0,0 +1,72 @@ +# TransformRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (render_template) | +**Attributes** | [**TransformRenderTemplateRequest**](TransformRenderTemplateRequest.md) | | + +## Methods + +### NewTransformRequest + +`func NewTransformRequest(type_ string, attributes TransformRenderTemplateRequest, ) *TransformRequest` + +NewTransformRequest instantiates a new TransformRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformRequestWithDefaults + +`func NewTransformRequestWithDefaults() *TransformRequest` + +NewTransformRequestWithDefaults instantiates a new TransformRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformRequest) GetAttributes() TransformRenderTemplateRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformRequest) GetAttributesOk() (*TransformRenderTemplateRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformRequest) SetAttributes(v TransformRenderTemplateRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformSampling.md b/azion-api/docs/TransformSampling.md new file mode 100644 index 0000000..9aefacc --- /dev/null +++ b/azion-api/docs/TransformSampling.md @@ -0,0 +1,51 @@ +# TransformSampling + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rate** | **int64** | | + +## Methods + +### NewTransformSampling + +`func NewTransformSampling(rate int64, ) *TransformSampling` + +NewTransformSampling instantiates a new TransformSampling object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformSamplingWithDefaults + +`func NewTransformSamplingWithDefaults() *TransformSampling` + +NewTransformSamplingWithDefaults instantiates a new TransformSampling object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRate + +`func (o *TransformSampling) GetRate() int64` + +GetRate returns the Rate field if non-nil, zero value otherwise. + +### GetRateOk + +`func (o *TransformSampling) GetRateOk() (*int64, bool)` + +GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRate + +`func (o *TransformSampling) SetRate(v int64)` + +SetRate sets Rate field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformSamplingAttributes.md b/azion-api/docs/TransformSamplingAttributes.md new file mode 100644 index 0000000..c58283a --- /dev/null +++ b/azion-api/docs/TransformSamplingAttributes.md @@ -0,0 +1,72 @@ +# TransformSamplingAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `sampling` - Sampling | +**Attributes** | [**TransformSampling**](TransformSampling.md) | | + +## Methods + +### NewTransformSamplingAttributes + +`func NewTransformSamplingAttributes(type_ string, attributes TransformSampling, ) *TransformSamplingAttributes` + +NewTransformSamplingAttributes instantiates a new TransformSamplingAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformSamplingAttributesWithDefaults + +`func NewTransformSamplingAttributesWithDefaults() *TransformSamplingAttributes` + +NewTransformSamplingAttributesWithDefaults instantiates a new TransformSamplingAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformSamplingAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformSamplingAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformSamplingAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformSamplingAttributes) GetAttributes() TransformSampling` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformSamplingAttributes) GetAttributesOk() (*TransformSampling, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformSamplingAttributes) SetAttributes(v TransformSampling)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformSamplingAttributesRequest.md b/azion-api/docs/TransformSamplingAttributesRequest.md new file mode 100644 index 0000000..3d723c4 --- /dev/null +++ b/azion-api/docs/TransformSamplingAttributesRequest.md @@ -0,0 +1,72 @@ +# TransformSamplingAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | * `sampling` - Sampling | +**Attributes** | [**TransformSamplingRequest**](TransformSamplingRequest.md) | | + +## Methods + +### NewTransformSamplingAttributesRequest + +`func NewTransformSamplingAttributesRequest(type_ string, attributes TransformSamplingRequest, ) *TransformSamplingAttributesRequest` + +NewTransformSamplingAttributesRequest instantiates a new TransformSamplingAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformSamplingAttributesRequestWithDefaults + +`func NewTransformSamplingAttributesRequestWithDefaults() *TransformSamplingAttributesRequest` + +NewTransformSamplingAttributesRequestWithDefaults instantiates a new TransformSamplingAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformSamplingAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformSamplingAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformSamplingAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformSamplingAttributesRequest) GetAttributes() TransformSamplingRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformSamplingAttributesRequest) GetAttributesOk() (*TransformSamplingRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformSamplingAttributesRequest) SetAttributes(v TransformSamplingRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformSamplingRequest.md b/azion-api/docs/TransformSamplingRequest.md new file mode 100644 index 0000000..5e48967 --- /dev/null +++ b/azion-api/docs/TransformSamplingRequest.md @@ -0,0 +1,51 @@ +# TransformSamplingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rate** | **int64** | | + +## Methods + +### NewTransformSamplingRequest + +`func NewTransformSamplingRequest(rate int64, ) *TransformSamplingRequest` + +NewTransformSamplingRequest instantiates a new TransformSamplingRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformSamplingRequestWithDefaults + +`func NewTransformSamplingRequestWithDefaults() *TransformSamplingRequest` + +NewTransformSamplingRequestWithDefaults instantiates a new TransformSamplingRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRate + +`func (o *TransformSamplingRequest) GetRate() int64` + +GetRate returns the Rate field if non-nil, zero value otherwise. + +### GetRateOk + +`func (o *TransformSamplingRequest) GetRateOk() (*int64, bool)` + +GetRateOk returns a tuple with the Rate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRate + +`func (o *TransformSamplingRequest) SetRate(v int64)` + +SetRate sets Rate field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformShared.md b/azion-api/docs/TransformShared.md new file mode 100644 index 0000000..38d4a77 --- /dev/null +++ b/azion-api/docs/TransformShared.md @@ -0,0 +1,51 @@ +# TransformShared + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | | + +## Methods + +### NewTransformShared + +`func NewTransformShared(type_ string, ) *TransformShared` + +NewTransformShared instantiates a new TransformShared object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformSharedWithDefaults + +`func NewTransformSharedWithDefaults() *TransformShared` + +NewTransformSharedWithDefaults instantiates a new TransformShared object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformShared) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformShared) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformShared) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformTransformFilterWorkloadsAttributes.md b/azion-api/docs/TransformTransformFilterWorkloadsAttributes.md new file mode 100644 index 0000000..1780818 --- /dev/null +++ b/azion-api/docs/TransformTransformFilterWorkloadsAttributes.md @@ -0,0 +1,72 @@ +# TransformTransformFilterWorkloadsAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (filter_workloads) | +**Attributes** | [**TransformFilterWorkloads**](TransformFilterWorkloads.md) | | + +## Methods + +### NewTransformTransformFilterWorkloadsAttributes + +`func NewTransformTransformFilterWorkloadsAttributes(type_ string, attributes TransformFilterWorkloads, ) *TransformTransformFilterWorkloadsAttributes` + +NewTransformTransformFilterWorkloadsAttributes instantiates a new TransformTransformFilterWorkloadsAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformTransformFilterWorkloadsAttributesWithDefaults + +`func NewTransformTransformFilterWorkloadsAttributesWithDefaults() *TransformTransformFilterWorkloadsAttributes` + +NewTransformTransformFilterWorkloadsAttributesWithDefaults instantiates a new TransformTransformFilterWorkloadsAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformTransformFilterWorkloadsAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformTransformFilterWorkloadsAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformTransformFilterWorkloadsAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformTransformFilterWorkloadsAttributes) GetAttributes() TransformFilterWorkloads` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformTransformFilterWorkloadsAttributes) GetAttributesOk() (*TransformFilterWorkloads, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformTransformFilterWorkloadsAttributes) SetAttributes(v TransformFilterWorkloads)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformTransformFilterWorkloadsAttributesRequest.md b/azion-api/docs/TransformTransformFilterWorkloadsAttributesRequest.md new file mode 100644 index 0000000..cbbf6ff --- /dev/null +++ b/azion-api/docs/TransformTransformFilterWorkloadsAttributesRequest.md @@ -0,0 +1,72 @@ +# TransformTransformFilterWorkloadsAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (filter_workloads) | +**Attributes** | [**TransformFilterWorkloadsRequest**](TransformFilterWorkloadsRequest.md) | | + +## Methods + +### NewTransformTransformFilterWorkloadsAttributesRequest + +`func NewTransformTransformFilterWorkloadsAttributesRequest(type_ string, attributes TransformFilterWorkloadsRequest, ) *TransformTransformFilterWorkloadsAttributesRequest` + +NewTransformTransformFilterWorkloadsAttributesRequest instantiates a new TransformTransformFilterWorkloadsAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformTransformFilterWorkloadsAttributesRequestWithDefaults + +`func NewTransformTransformFilterWorkloadsAttributesRequestWithDefaults() *TransformTransformFilterWorkloadsAttributesRequest` + +NewTransformTransformFilterWorkloadsAttributesRequestWithDefaults instantiates a new TransformTransformFilterWorkloadsAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformTransformFilterWorkloadsAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformTransformFilterWorkloadsAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformTransformFilterWorkloadsAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformTransformFilterWorkloadsAttributesRequest) GetAttributes() TransformFilterWorkloadsRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformTransformFilterWorkloadsAttributesRequest) GetAttributesOk() (*TransformFilterWorkloadsRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformTransformFilterWorkloadsAttributesRequest) SetAttributes(v TransformFilterWorkloadsRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformTransformRenderTemplateAttributes.md b/azion-api/docs/TransformTransformRenderTemplateAttributes.md new file mode 100644 index 0000000..e6544af --- /dev/null +++ b/azion-api/docs/TransformTransformRenderTemplateAttributes.md @@ -0,0 +1,72 @@ +# TransformTransformRenderTemplateAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (render_template) | +**Attributes** | [**TransformRenderTemplate**](TransformRenderTemplate.md) | | + +## Methods + +### NewTransformTransformRenderTemplateAttributes + +`func NewTransformTransformRenderTemplateAttributes(type_ string, attributes TransformRenderTemplate, ) *TransformTransformRenderTemplateAttributes` + +NewTransformTransformRenderTemplateAttributes instantiates a new TransformTransformRenderTemplateAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformTransformRenderTemplateAttributesWithDefaults + +`func NewTransformTransformRenderTemplateAttributesWithDefaults() *TransformTransformRenderTemplateAttributes` + +NewTransformTransformRenderTemplateAttributesWithDefaults instantiates a new TransformTransformRenderTemplateAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformTransformRenderTemplateAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformTransformRenderTemplateAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformTransformRenderTemplateAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformTransformRenderTemplateAttributes) GetAttributes() TransformRenderTemplate` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformTransformRenderTemplateAttributes) GetAttributesOk() (*TransformRenderTemplate, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformTransformRenderTemplateAttributes) SetAttributes(v TransformRenderTemplate)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformTransformRenderTemplateAttributesRequest.md b/azion-api/docs/TransformTransformRenderTemplateAttributesRequest.md new file mode 100644 index 0000000..815a0da --- /dev/null +++ b/azion-api/docs/TransformTransformRenderTemplateAttributesRequest.md @@ -0,0 +1,72 @@ +# TransformTransformRenderTemplateAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (render_template) | +**Attributes** | [**TransformRenderTemplateRequest**](TransformRenderTemplateRequest.md) | | + +## Methods + +### NewTransformTransformRenderTemplateAttributesRequest + +`func NewTransformTransformRenderTemplateAttributesRequest(type_ string, attributes TransformRenderTemplateRequest, ) *TransformTransformRenderTemplateAttributesRequest` + +NewTransformTransformRenderTemplateAttributesRequest instantiates a new TransformTransformRenderTemplateAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformTransformRenderTemplateAttributesRequestWithDefaults + +`func NewTransformTransformRenderTemplateAttributesRequestWithDefaults() *TransformTransformRenderTemplateAttributesRequest` + +NewTransformTransformRenderTemplateAttributesRequestWithDefaults instantiates a new TransformTransformRenderTemplateAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformTransformRenderTemplateAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformTransformRenderTemplateAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformTransformRenderTemplateAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformTransformRenderTemplateAttributesRequest) GetAttributes() TransformRenderTemplateRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformTransformRenderTemplateAttributesRequest) GetAttributesOk() (*TransformRenderTemplateRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformTransformRenderTemplateAttributesRequest) SetAttributes(v TransformRenderTemplateRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformTransformSamplingAttributes.md b/azion-api/docs/TransformTransformSamplingAttributes.md new file mode 100644 index 0000000..edb8787 --- /dev/null +++ b/azion-api/docs/TransformTransformSamplingAttributes.md @@ -0,0 +1,72 @@ +# TransformTransformSamplingAttributes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (sampling) | +**Attributes** | [**TransformSampling**](TransformSampling.md) | | + +## Methods + +### NewTransformTransformSamplingAttributes + +`func NewTransformTransformSamplingAttributes(type_ string, attributes TransformSampling, ) *TransformTransformSamplingAttributes` + +NewTransformTransformSamplingAttributes instantiates a new TransformTransformSamplingAttributes object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformTransformSamplingAttributesWithDefaults + +`func NewTransformTransformSamplingAttributesWithDefaults() *TransformTransformSamplingAttributes` + +NewTransformTransformSamplingAttributesWithDefaults instantiates a new TransformTransformSamplingAttributes object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformTransformSamplingAttributes) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformTransformSamplingAttributes) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformTransformSamplingAttributes) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformTransformSamplingAttributes) GetAttributes() TransformSampling` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformTransformSamplingAttributes) GetAttributesOk() (*TransformSampling, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformTransformSamplingAttributes) SetAttributes(v TransformSampling)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/TransformTransformSamplingAttributesRequest.md b/azion-api/docs/TransformTransformSamplingAttributesRequest.md new file mode 100644 index 0000000..4b3c3ab --- /dev/null +++ b/azion-api/docs/TransformTransformSamplingAttributesRequest.md @@ -0,0 +1,72 @@ +# TransformTransformSamplingAttributesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | Type identifier for this endpoint (sampling) | +**Attributes** | [**TransformSamplingRequest**](TransformSamplingRequest.md) | | + +## Methods + +### NewTransformTransformSamplingAttributesRequest + +`func NewTransformTransformSamplingAttributesRequest(type_ string, attributes TransformSamplingRequest, ) *TransformTransformSamplingAttributesRequest` + +NewTransformTransformSamplingAttributesRequest instantiates a new TransformTransformSamplingAttributesRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewTransformTransformSamplingAttributesRequestWithDefaults + +`func NewTransformTransformSamplingAttributesRequestWithDefaults() *TransformTransformSamplingAttributesRequest` + +NewTransformTransformSamplingAttributesRequestWithDefaults instantiates a new TransformTransformSamplingAttributesRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetType + +`func (o *TransformTransformSamplingAttributesRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *TransformTransformSamplingAttributesRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *TransformTransformSamplingAttributesRequest) SetType(v string)` + +SetType sets Type field to given value. + + +### GetAttributes + +`func (o *TransformTransformSamplingAttributesRequest) GetAttributes() TransformSamplingRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *TransformTransformSamplingAttributesRequest) GetAttributesOk() (*TransformSamplingRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *TransformTransformSamplingAttributesRequest) SetAttributes(v TransformSamplingRequest)` + +SetAttributes sets Attributes field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UpdateAccountInfoDetailsRequest.md b/azion-api/docs/UpdateAccountInfoDetailsRequest.md new file mode 100644 index 0000000..a8f768c --- /dev/null +++ b/azion-api/docs/UpdateAccountInfoDetailsRequest.md @@ -0,0 +1,56 @@ +# UpdateAccountInfoDetailsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Info** | Pointer to [**AccountInfoRequest**](AccountInfoRequest.md) | | [optional] + +## Methods + +### NewUpdateAccountInfoDetailsRequest + +`func NewUpdateAccountInfoDetailsRequest() *UpdateAccountInfoDetailsRequest` + +NewUpdateAccountInfoDetailsRequest instantiates a new UpdateAccountInfoDetailsRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateAccountInfoDetailsRequestWithDefaults + +`func NewUpdateAccountInfoDetailsRequestWithDefaults() *UpdateAccountInfoDetailsRequest` + +NewUpdateAccountInfoDetailsRequestWithDefaults instantiates a new UpdateAccountInfoDetailsRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetInfo + +`func (o *UpdateAccountInfoDetailsRequest) GetInfo() AccountInfoRequest` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *UpdateAccountInfoDetailsRequest) GetInfoOk() (*AccountInfoRequest, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *UpdateAccountInfoDetailsRequest) SetInfo(v AccountInfoRequest)` + +SetInfo sets Info field to given value. + +### HasInfo + +`func (o *UpdateAccountInfoDetailsRequest) HasInfo() bool` + +HasInfo returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UpdateUserInfoRequest.md b/azion-api/docs/UpdateUserInfoRequest.md new file mode 100644 index 0000000..a2ad8d8 --- /dev/null +++ b/azion-api/docs/UpdateUserInfoRequest.md @@ -0,0 +1,56 @@ +# UpdateUserInfoRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Info** | Pointer to [**UserInfoRequest**](UserInfoRequest.md) | | [optional] + +## Methods + +### NewUpdateUserInfoRequest + +`func NewUpdateUserInfoRequest() *UpdateUserInfoRequest` + +NewUpdateUserInfoRequest instantiates a new UpdateUserInfoRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateUserInfoRequestWithDefaults + +`func NewUpdateUserInfoRequestWithDefaults() *UpdateUserInfoRequest` + +NewUpdateUserInfoRequestWithDefaults instantiates a new UpdateUserInfoRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetInfo + +`func (o *UpdateUserInfoRequest) GetInfo() UserInfoRequest` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *UpdateUserInfoRequest) GetInfoOk() (*UserInfoRequest, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *UpdateUserInfoRequest) SetInfo(v UserInfoRequest)` + +SetInfo sets Info field to given value. + +### HasInfo + +`func (o *UpdateUserInfoRequest) HasInfo() bool` + +HasInfo returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UpdateZoneRequest.md b/azion-api/docs/UpdateZoneRequest.md new file mode 100644 index 0000000..4c30105 --- /dev/null +++ b/azion-api/docs/UpdateZoneRequest.md @@ -0,0 +1,72 @@ +# UpdateZoneRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | **bool** | | + +## Methods + +### NewUpdateZoneRequest + +`func NewUpdateZoneRequest(name string, active bool, ) *UpdateZoneRequest` + +NewUpdateZoneRequest instantiates a new UpdateZoneRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUpdateZoneRequestWithDefaults + +`func NewUpdateZoneRequestWithDefaults() *UpdateZoneRequest` + +NewUpdateZoneRequestWithDefaults instantiates a new UpdateZoneRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *UpdateZoneRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateZoneRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UpdateZoneRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *UpdateZoneRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *UpdateZoneRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *UpdateZoneRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/User.md b/azion-api/docs/User.md new file mode 100644 index 0000000..8b31590 --- /dev/null +++ b/azion-api/docs/User.md @@ -0,0 +1,344 @@ +# User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Email** | **string** | | +**Created** | **time.Time** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Active** | Pointer to **bool** | | [optional] +**AccountId** | **int64** | | +**LastLogin** | **time.Time** | | +**TwoFactorEnabled** | Pointer to **bool** | | [optional] +**Preferences** | Pointer to **map[string]interface{}** | User-specific preferences in JSON format. | [optional] +**Phone** | Pointer to **string** | | [optional] +**Info** | **map[string]interface{}** | | +**Lockout** | **string** | | + +## Methods + +### NewUser + +`func NewUser(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, lastLogin time.Time, info map[string]interface{}, lockout string, ) *User` + +NewUser instantiates a new User object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserWithDefaults + +`func NewUserWithDefaults() *User` + +NewUserWithDefaults instantiates a new User object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *User) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *User) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *User) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *User) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *User) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *User) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *User) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *User) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *User) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetCreated + +`func (o *User) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *User) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *User) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetLastEditor + +`func (o *User) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *User) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *User) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *User) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *User) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *User) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetActive + +`func (o *User) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *User) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *User) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *User) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetAccountId + +`func (o *User) GetAccountId() int64` + +GetAccountId returns the AccountId field if non-nil, zero value otherwise. + +### GetAccountIdOk + +`func (o *User) GetAccountIdOk() (*int64, bool)` + +GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAccountId + +`func (o *User) SetAccountId(v int64)` + +SetAccountId sets AccountId field to given value. + + +### GetLastLogin + +`func (o *User) GetLastLogin() time.Time` + +GetLastLogin returns the LastLogin field if non-nil, zero value otherwise. + +### GetLastLoginOk + +`func (o *User) GetLastLoginOk() (*time.Time, bool)` + +GetLastLoginOk returns a tuple with the LastLogin field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastLogin + +`func (o *User) SetLastLogin(v time.Time)` + +SetLastLogin sets LastLogin field to given value. + + +### GetTwoFactorEnabled + +`func (o *User) GetTwoFactorEnabled() bool` + +GetTwoFactorEnabled returns the TwoFactorEnabled field if non-nil, zero value otherwise. + +### GetTwoFactorEnabledOk + +`func (o *User) GetTwoFactorEnabledOk() (*bool, bool)` + +GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorEnabled + +`func (o *User) SetTwoFactorEnabled(v bool)` + +SetTwoFactorEnabled sets TwoFactorEnabled field to given value. + +### HasTwoFactorEnabled + +`func (o *User) HasTwoFactorEnabled() bool` + +HasTwoFactorEnabled returns a boolean if a field has been set. + +### GetPreferences + +`func (o *User) GetPreferences() map[string]interface{}` + +GetPreferences returns the Preferences field if non-nil, zero value otherwise. + +### GetPreferencesOk + +`func (o *User) GetPreferencesOk() (*map[string]interface{}, bool)` + +GetPreferencesOk returns a tuple with the Preferences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferences + +`func (o *User) SetPreferences(v map[string]interface{})` + +SetPreferences sets Preferences field to given value. + +### HasPreferences + +`func (o *User) HasPreferences() bool` + +HasPreferences returns a boolean if a field has been set. + +### GetPhone + +`func (o *User) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *User) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *User) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *User) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetInfo + +`func (o *User) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *User) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *User) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetLockout + +`func (o *User) GetLockout() string` + +GetLockout returns the Lockout field if non-nil, zero value otherwise. + +### GetLockoutOk + +`func (o *User) GetLockoutOk() (*string, bool)` + +GetLockoutOk returns a tuple with the Lockout field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLockout + +`func (o *User) SetLockout(v string)` + +SetLockout sets Lockout field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UserInfo.md b/azion-api/docs/UserInfo.md new file mode 100644 index 0000000..be67b1a --- /dev/null +++ b/azion-api/docs/UserInfo.md @@ -0,0 +1,51 @@ +# UserInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Info** | **map[string]interface{}** | | + +## Methods + +### NewUserInfo + +`func NewUserInfo(info map[string]interface{}, ) *UserInfo` + +NewUserInfo instantiates a new UserInfo object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserInfoWithDefaults + +`func NewUserInfoWithDefaults() *UserInfo` + +NewUserInfoWithDefaults instantiates a new UserInfo object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetInfo + +`func (o *UserInfo) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *UserInfo) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *UserInfo) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UserInfoRequest.md b/azion-api/docs/UserInfoRequest.md new file mode 100644 index 0000000..5256a98 --- /dev/null +++ b/azion-api/docs/UserInfoRequest.md @@ -0,0 +1,56 @@ +# UserInfoRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobFunction** | Pointer to **string** | The job function. | [optional] + +## Methods + +### NewUserInfoRequest + +`func NewUserInfoRequest() *UserInfoRequest` + +NewUserInfoRequest instantiates a new UserInfoRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserInfoRequestWithDefaults + +`func NewUserInfoRequestWithDefaults() *UserInfoRequest` + +NewUserInfoRequestWithDefaults instantiates a new UserInfoRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetJobFunction + +`func (o *UserInfoRequest) GetJobFunction() string` + +GetJobFunction returns the JobFunction field if non-nil, zero value otherwise. + +### GetJobFunctionOk + +`func (o *UserInfoRequest) GetJobFunctionOk() (*string, bool)` + +GetJobFunctionOk returns a tuple with the JobFunction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetJobFunction + +`func (o *UserInfoRequest) SetJobFunction(v string)` + +SetJobFunction sets JobFunction field to given value. + +### HasJobFunction + +`func (o *UserInfoRequest) HasJobFunction() bool` + +HasJobFunction returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UserLoginMethodResponse.md b/azion-api/docs/UserLoginMethodResponse.md new file mode 100644 index 0000000..f276381 --- /dev/null +++ b/azion-api/docs/UserLoginMethodResponse.md @@ -0,0 +1,72 @@ +# UserLoginMethodResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Method** | **string** | Login method type (lowercase with underscores) | +**Url** | **string** | | + +## Methods + +### NewUserLoginMethodResponse + +`func NewUserLoginMethodResponse(method string, url string, ) *UserLoginMethodResponse` + +NewUserLoginMethodResponse instantiates a new UserLoginMethodResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserLoginMethodResponseWithDefaults + +`func NewUserLoginMethodResponseWithDefaults() *UserLoginMethodResponse` + +NewUserLoginMethodResponseWithDefaults instantiates a new UserLoginMethodResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMethod + +`func (o *UserLoginMethodResponse) GetMethod() string` + +GetMethod returns the Method field if non-nil, zero value otherwise. + +### GetMethodOk + +`func (o *UserLoginMethodResponse) GetMethodOk() (*string, bool)` + +GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMethod + +`func (o *UserLoginMethodResponse) SetMethod(v string)` + +SetMethod sets Method field to given value. + + +### GetUrl + +`func (o *UserLoginMethodResponse) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *UserLoginMethodResponse) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *UserLoginMethodResponse) SetUrl(v string)` + +SetUrl sets Url field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UserRequest.md b/azion-api/docs/UserRequest.md new file mode 100644 index 0000000..ef5f865 --- /dev/null +++ b/azion-api/docs/UserRequest.md @@ -0,0 +1,176 @@ +# UserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Email** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**TwoFactorEnabled** | Pointer to **bool** | | [optional] +**Preferences** | Pointer to **map[string]interface{}** | User-specific preferences in JSON format. | [optional] +**Phone** | Pointer to **string** | | [optional] + +## Methods + +### NewUserRequest + +`func NewUserRequest(name string, email string, ) *UserRequest` + +NewUserRequest instantiates a new UserRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewUserRequestWithDefaults + +`func NewUserRequestWithDefaults() *UserRequest` + +NewUserRequestWithDefaults instantiates a new UserRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *UserRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UserRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *UserRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetEmail + +`func (o *UserRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *UserRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *UserRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + + +### GetActive + +`func (o *UserRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *UserRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *UserRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *UserRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetTwoFactorEnabled + +`func (o *UserRequest) GetTwoFactorEnabled() bool` + +GetTwoFactorEnabled returns the TwoFactorEnabled field if non-nil, zero value otherwise. + +### GetTwoFactorEnabledOk + +`func (o *UserRequest) GetTwoFactorEnabledOk() (*bool, bool)` + +GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTwoFactorEnabled + +`func (o *UserRequest) SetTwoFactorEnabled(v bool)` + +SetTwoFactorEnabled sets TwoFactorEnabled field to given value. + +### HasTwoFactorEnabled + +`func (o *UserRequest) HasTwoFactorEnabled() bool` + +HasTwoFactorEnabled returns a boolean if a field has been set. + +### GetPreferences + +`func (o *UserRequest) GetPreferences() map[string]interface{}` + +GetPreferences returns the Preferences field if non-nil, zero value otherwise. + +### GetPreferencesOk + +`func (o *UserRequest) GetPreferencesOk() (*map[string]interface{}, bool)` + +GetPreferencesOk returns a tuple with the Preferences field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreferences + +`func (o *UserRequest) SetPreferences(v map[string]interface{})` + +SetPreferences sets Preferences field to given value. + +### HasPreferences + +`func (o *UserRequest) HasPreferences() bool` + +HasPreferences returns a boolean if a field has been set. + +### GetPhone + +`func (o *UserRequest) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *UserRequest) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *UserRequest) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *UserRequest) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/UsersLockoutAPI.md b/azion-api/docs/UsersLockoutAPI.md new file mode 100644 index 0000000..dcf42e4 --- /dev/null +++ b/azion-api/docs/UsersLockoutAPI.md @@ -0,0 +1,77 @@ +# \UsersLockoutAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DestroyLockoutUser**](UsersLockoutAPI.md#DestroyLockoutUser) | **Delete** /identity/users/{user_id}/lockout | Unlock user + + + +## DestroyLockoutUser + +> DestroyLockoutUser(ctx, userId).Execute() + +Unlock user + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + userId := int64(789) // int64 | A unique integer value identifying the user. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + r, err := apiClient.UsersLockoutAPI.DestroyLockoutUser(context.Background(), userId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `UsersLockoutAPI.DestroyLockoutUser``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int64** | A unique integer value identifying the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDestroyLockoutUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (empty response body) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/VCSContinuousDeploymentExecutionsAPI.md b/azion-api/docs/VCSContinuousDeploymentExecutionsAPI.md new file mode 100644 index 0000000..5984e82 --- /dev/null +++ b/azion-api/docs/VCSContinuousDeploymentExecutionsAPI.md @@ -0,0 +1,175 @@ +# \VCSContinuousDeploymentExecutionsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateExecution**](VCSContinuousDeploymentExecutionsAPI.md#CreateExecution) | **Post** /vcs/continuous_deployments/{continuous_deployment_id}/executions | Create a execution +[**ListExecutions**](VCSContinuousDeploymentExecutionsAPI.md#ListExecutions) | **Get** /vcs/continuous_deployments/{continuous_deployment_id}/executions | List executions + + + +## CreateExecution + +> ResponseExecution CreateExecution(ctx, continuousDeploymentId).Body(body).Execute() + +Create a execution + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := int64(789) // int64 | Unique identifier of the continuous deployment + body := map[string]interface{}{ ... } // map[string]interface{} | No request body required (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentExecutionsAPI.CreateExecution(context.Background(), continuousDeploymentId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentExecutionsAPI.CreateExecution``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateExecution`: ResponseExecution + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentExecutionsAPI.CreateExecution`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **int64** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateExecutionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | No request body required | + +### Return type + +[**ResponseExecution**](ResponseExecution.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListExecutions + +> PaginatedExecutionList ListExecutions(ctx, continuousDeploymentId).CreatedAtGte(createdAtGte).CreatedAtLte(createdAtLte).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Status(status).UpdatedAtGte(updatedAtGte).UpdatedAtLte(updatedAtLte).Execute() + +List executions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := int64(789) // int64 | Unique identifier of the continuous deployment + createdAtGte := time.Now() // time.Time | Filter by created date (greater than or equal). (optional) + createdAtLte := time.Now() // time.Time | Filter by created date (less than or equal). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + status := "status_example" // string | Filter by status (accepts comma-separated values). (optional) + updatedAtGte := time.Now() // time.Time | Filter by updated date (greater than or equal). (optional) + updatedAtLte := time.Now() // time.Time | Filter by updated date (less than or equal). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentExecutionsAPI.ListExecutions(context.Background(), continuousDeploymentId).CreatedAtGte(createdAtGte).CreatedAtLte(createdAtLte).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Status(status).UpdatedAtGte(updatedAtGte).UpdatedAtLte(updatedAtLte).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentExecutionsAPI.ListExecutions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListExecutions`: PaginatedExecutionList + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentExecutionsAPI.ListExecutions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **int64** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListExecutionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createdAtGte** | **time.Time** | Filter by created date (greater than or equal). | + **createdAtLte** | **time.Time** | Filter by created date (less than or equal). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **status** | **string** | Filter by status (accepts comma-separated values). | + **updatedAtGte** | **time.Time** | Filter by updated date (greater than or equal). | + **updatedAtLte** | **time.Time** | Filter by updated date (less than or equal). | + +### Return type + +[**PaginatedExecutionList**](PaginatedExecutionList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/VCSContinuousDeploymentExecutorAPI.md b/azion-api/docs/VCSContinuousDeploymentExecutorAPI.md new file mode 100644 index 0000000..28f8abb --- /dev/null +++ b/azion-api/docs/VCSContinuousDeploymentExecutorAPI.md @@ -0,0 +1,154 @@ +# \VCSContinuousDeploymentExecutorAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RetrieveExecutor**](VCSContinuousDeploymentExecutorAPI.md#RetrieveExecutor) | **Get** /vcs/continuous_deployments/{continuous_deployment_id}/executor | Retrieve details from a executor +[**UpdateExecutor**](VCSContinuousDeploymentExecutorAPI.md#UpdateExecutor) | **Put** /vcs/continuous_deployments/{continuous_deployment_id}/executor | Update a executor + + + +## RetrieveExecutor + +> ResponseRetrieveExecutor RetrieveExecutor(ctx, continuousDeploymentId).Fields(fields).Execute() + +Retrieve details from a executor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := int64(789) // int64 | Unique identifier of the continuous deployment + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentExecutorAPI.RetrieveExecutor(context.Background(), continuousDeploymentId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentExecutorAPI.RetrieveExecutor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveExecutor`: ResponseRetrieveExecutor + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentExecutorAPI.RetrieveExecutor`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **int64** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveExecutorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveExecutor**](ResponseRetrieveExecutor.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateExecutor + +> ResponseExecutor UpdateExecutor(ctx, continuousDeploymentId).Body(body).Execute() + +Update a executor + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := int64(789) // int64 | Unique identifier of the continuous deployment + body := map[string]interface{}{ ... } // map[string]interface{} | No request body required (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentExecutorAPI.UpdateExecutor(context.Background(), continuousDeploymentId).Body(body).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentExecutorAPI.UpdateExecutor``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateExecutor`: ResponseExecutor + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentExecutorAPI.UpdateExecutor`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **int64** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateExecutorRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **map[string]interface{}** | No request body required | + +### Return type + +[**ResponseExecutor**](ResponseExecutor.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/VCSContinuousDeploymentsAPI.md b/azion-api/docs/VCSContinuousDeploymentsAPI.md new file mode 100644 index 0000000..16ee858 --- /dev/null +++ b/azion-api/docs/VCSContinuousDeploymentsAPI.md @@ -0,0 +1,459 @@ +# \VCSContinuousDeploymentsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateContinuousDeployment**](VCSContinuousDeploymentsAPI.md#CreateContinuousDeployment) | **Post** /vcs/continuous_deployments | Create a continuous deployment +[**DeleteContinuousDeployment**](VCSContinuousDeploymentsAPI.md#DeleteContinuousDeployment) | **Delete** /vcs/continuous_deployments/{continuous_deployment_id} | Delete a continuous deployment +[**ListContinuousDeployments**](VCSContinuousDeploymentsAPI.md#ListContinuousDeployments) | **Get** /vcs/continuous_deployments | List continuous deployments +[**PartialUpdateContinuousDeployment**](VCSContinuousDeploymentsAPI.md#PartialUpdateContinuousDeployment) | **Patch** /vcs/continuous_deployments/{continuous_deployment_id} | Partialy update a continuous deployment +[**RetrieveContinuousDeployment**](VCSContinuousDeploymentsAPI.md#RetrieveContinuousDeployment) | **Get** /vcs/continuous_deployments/{continuous_deployment_id} | Retrieve details from a continuous deployment +[**UpdateContinuousDeployment**](VCSContinuousDeploymentsAPI.md#UpdateContinuousDeployment) | **Put** /vcs/continuous_deployments/{continuous_deployment_id} | Update a continuous deployment + + + +## CreateContinuousDeployment + +> ResponseContinuousDeployment CreateContinuousDeployment(ctx).ContinuousDeploymentRequest(continuousDeploymentRequest).Execute() + +Create a continuous deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentRequest := *openapiclient.NewContinuousDeploymentRequest("Name_example", "Repository_example", "Branch_example", []openapiclient.BuildContextFieldRequest{*openapiclient.NewBuildContextFieldRequest("Field_example", "Value_example")}, int64(123), int64(123)) // ContinuousDeploymentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentsAPI.CreateContinuousDeployment(context.Background()).ContinuousDeploymentRequest(continuousDeploymentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentsAPI.CreateContinuousDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateContinuousDeployment`: ResponseContinuousDeployment + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentsAPI.CreateContinuousDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateContinuousDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **continuousDeploymentRequest** | [**ContinuousDeploymentRequest**](ContinuousDeploymentRequest.md) | | + +### Return type + +[**ResponseContinuousDeployment**](ResponseContinuousDeployment.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteContinuousDeployment + +> ResponseDeleteContinuousDeployment DeleteContinuousDeployment(ctx, continuousDeploymentId).Execute() + +Delete a continuous deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := "continuousDeploymentId_example" // string | Unique identifier of the continuous deployment + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentsAPI.DeleteContinuousDeployment(context.Background(), continuousDeploymentId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentsAPI.DeleteContinuousDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteContinuousDeployment`: ResponseDeleteContinuousDeployment + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentsAPI.DeleteContinuousDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **string** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteContinuousDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteContinuousDeployment**](ResponseDeleteContinuousDeployment.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListContinuousDeployments + +> PaginatedContinuousDeploymentList ListContinuousDeployments(ctx).Branch(branch).CreatedGte(createdGte).CreatedLte(createdLte).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Repository(repository).Search(search).Execute() + +List continuous deployments + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + branch := "branch_example" // string | Filter by branch (exact match). (optional) + createdGte := time.Now() // time.Time | Filter by created date (greater than or equal). (optional) + createdLte := time.Now() // time.Time | Filter by created date (less than or equal). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + repository := "repository_example" // string | Filter by repository (case-insensitive, partial match). (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentsAPI.ListContinuousDeployments(context.Background()).Branch(branch).CreatedGte(createdGte).CreatedLte(createdLte).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Repository(repository).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentsAPI.ListContinuousDeployments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListContinuousDeployments`: PaginatedContinuousDeploymentList + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentsAPI.ListContinuousDeployments`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListContinuousDeploymentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **branch** | **string** | Filter by branch (exact match). | + **createdGte** | **time.Time** | Filter by created date (greater than or equal). | + **createdLte** | **time.Time** | Filter by created date (less than or equal). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **repository** | **string** | Filter by repository (case-insensitive, partial match). | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedContinuousDeploymentList**](PaginatedContinuousDeploymentList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateContinuousDeployment + +> ResponseContinuousDeployment PartialUpdateContinuousDeployment(ctx, continuousDeploymentId).PatchContinuousDeploymentRequest(patchContinuousDeploymentRequest).Execute() + +Partialy update a continuous deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := "continuousDeploymentId_example" // string | Unique identifier of the continuous deployment + patchContinuousDeploymentRequest := *openapiclient.NewPatchContinuousDeploymentRequest() // PatchContinuousDeploymentRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentsAPI.PartialUpdateContinuousDeployment(context.Background(), continuousDeploymentId).PatchContinuousDeploymentRequest(patchContinuousDeploymentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentsAPI.PartialUpdateContinuousDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateContinuousDeployment`: ResponseContinuousDeployment + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentsAPI.PartialUpdateContinuousDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **string** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateContinuousDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchContinuousDeploymentRequest** | [**PatchContinuousDeploymentRequest**](PatchContinuousDeploymentRequest.md) | | + +### Return type + +[**ResponseContinuousDeployment**](ResponseContinuousDeployment.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveContinuousDeployment + +> ResponseRetrieveContinuousDeployment RetrieveContinuousDeployment(ctx, continuousDeploymentId).Fields(fields).Execute() + +Retrieve details from a continuous deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := "continuousDeploymentId_example" // string | Unique identifier of the continuous deployment + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentsAPI.RetrieveContinuousDeployment(context.Background(), continuousDeploymentId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentsAPI.RetrieveContinuousDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveContinuousDeployment`: ResponseRetrieveContinuousDeployment + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentsAPI.RetrieveContinuousDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **string** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveContinuousDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveContinuousDeployment**](ResponseRetrieveContinuousDeployment.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateContinuousDeployment + +> ResponseContinuousDeployment UpdateContinuousDeployment(ctx, continuousDeploymentId).ContinuousDeploymentRequest(continuousDeploymentRequest).Execute() + +Update a continuous deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + continuousDeploymentId := "continuousDeploymentId_example" // string | Unique identifier of the continuous deployment + continuousDeploymentRequest := *openapiclient.NewContinuousDeploymentRequest("Name_example", "Repository_example", "Branch_example", []openapiclient.BuildContextFieldRequest{*openapiclient.NewBuildContextFieldRequest("Field_example", "Value_example")}, int64(123), int64(123)) // ContinuousDeploymentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSContinuousDeploymentsAPI.UpdateContinuousDeployment(context.Background(), continuousDeploymentId).ContinuousDeploymentRequest(continuousDeploymentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSContinuousDeploymentsAPI.UpdateContinuousDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateContinuousDeployment`: ResponseContinuousDeployment + fmt.Fprintf(os.Stdout, "Response from `VCSContinuousDeploymentsAPI.UpdateContinuousDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**continuousDeploymentId** | **string** | Unique identifier of the continuous deployment | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateContinuousDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **continuousDeploymentRequest** | [**ContinuousDeploymentRequest**](ContinuousDeploymentRequest.md) | | + +### Return type + +[**ResponseContinuousDeployment**](ResponseContinuousDeployment.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/VCSExecutionScriptsAPI.md b/azion-api/docs/VCSExecutionScriptsAPI.md new file mode 100644 index 0000000..81531ad --- /dev/null +++ b/azion-api/docs/VCSExecutionScriptsAPI.md @@ -0,0 +1,160 @@ +# \VCSExecutionScriptsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListExecutionScripts**](VCSExecutionScriptsAPI.md#ListExecutionScripts) | **Get** /vcs/execution_scripts | List execution scripts +[**RetrieveExecutionScript**](VCSExecutionScriptsAPI.md#RetrieveExecutionScript) | **Get** /vcs/execution_scripts/{execution_script_id} | Retrieve details from a execution script + + + +## ListExecutionScripts + +> PaginatedExecutionScriptList ListExecutionScripts(ctx).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List execution scripts + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSExecutionScriptsAPI.ListExecutionScripts(context.Background()).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSExecutionScriptsAPI.ListExecutionScripts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListExecutionScripts`: PaginatedExecutionScriptList + fmt.Fprintf(os.Stdout, "Response from `VCSExecutionScriptsAPI.ListExecutionScripts`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListExecutionScriptsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedExecutionScriptList**](PaginatedExecutionScriptList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveExecutionScript + +> ResponseRetrieveExecutionScript RetrieveExecutionScript(ctx, executionScriptId).Fields(fields).Execute() + +Retrieve details from a execution script + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + executionScriptId := int64(789) // int64 | A unique integer value identifying this execution script. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSExecutionScriptsAPI.RetrieveExecutionScript(context.Background(), executionScriptId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSExecutionScriptsAPI.RetrieveExecutionScript``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveExecutionScript`: ResponseRetrieveExecutionScript + fmt.Fprintf(os.Stdout, "Response from `VCSExecutionScriptsAPI.RetrieveExecutionScript`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**executionScriptId** | **int64** | A unique integer value identifying this execution script. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveExecutionScriptRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveExecutionScript**](ResponseRetrieveExecutionScript.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/VCSIntegrationsAPI.md b/azion-api/docs/VCSIntegrationsAPI.md new file mode 100644 index 0000000..f4cde9d --- /dev/null +++ b/azion-api/docs/VCSIntegrationsAPI.md @@ -0,0 +1,314 @@ +# \VCSIntegrationsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIntegration**](VCSIntegrationsAPI.md#DeleteIntegration) | **Delete** /vcs/integrations/{integration_id} | Delete an integration +[**ListIntegrations**](VCSIntegrationsAPI.md#ListIntegrations) | **Get** /vcs/integrations | List integrations +[**ListRepositories**](VCSIntegrationsAPI.md#ListRepositories) | **Get** /vcs/integrations/{integration_id}/repositories | List integration repositories. +[**RetrieveIntegration**](VCSIntegrationsAPI.md#RetrieveIntegration) | **Get** /vcs/integrations/{integration_id} | Retrieve details from a integration + + + +## DeleteIntegration + +> ResponseDeleteIntegration DeleteIntegration(ctx, integrationId).Execute() + +Delete an integration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + integrationId := "integrationId_example" // string | Unique identifier of the integration + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSIntegrationsAPI.DeleteIntegration(context.Background(), integrationId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSIntegrationsAPI.DeleteIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteIntegration`: ResponseDeleteIntegration + fmt.Fprintf(os.Stdout, "Response from `VCSIntegrationsAPI.DeleteIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**integrationId** | **string** | Unique identifier of the integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**ResponseDeleteIntegration**](ResponseDeleteIntegration.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListIntegrations + +> PaginatedIntegrationList ListIntegrations(ctx).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Platform(platform).Scope(scope).Search(search).Execute() + +List integrations + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + platform := "platform_example" // string | Filter by platform id (exact match). (optional) + scope := "scope_example" // string | Filter by scope (case-insensitive, partial match). (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSIntegrationsAPI.ListIntegrations(context.Background()).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Platform(platform).Scope(scope).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSIntegrationsAPI.ListIntegrations``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListIntegrations`: PaginatedIntegrationList + fmt.Fprintf(os.Stdout, "Response from `VCSIntegrationsAPI.ListIntegrations`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListIntegrationsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **platform** | **string** | Filter by platform id (exact match). | + **scope** | **string** | Filter by scope (case-insensitive, partial match). | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedIntegrationList**](PaginatedIntegrationList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListRepositories + +> PaginatedRepositoryList ListRepositories(ctx, integrationId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List integration repositories. + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + integrationId := int64(789) // int64 | Unique identifier of the integration + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSIntegrationsAPI.ListRepositories(context.Background(), integrationId).Fields(fields).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSIntegrationsAPI.ListRepositories``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListRepositories`: PaginatedRepositoryList + fmt.Fprintf(os.Stdout, "Response from `VCSIntegrationsAPI.ListRepositories`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**integrationId** | **int64** | Unique identifier of the integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListRepositoriesRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedRepositoryList**](PaginatedRepositoryList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveIntegration + +> ResponseRetrieveIntegration RetrieveIntegration(ctx, integrationId).Fields(fields).Execute() + +Retrieve details from a integration + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + integrationId := "integrationId_example" // string | Unique identifier of the integration + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSIntegrationsAPI.RetrieveIntegration(context.Background(), integrationId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSIntegrationsAPI.RetrieveIntegration``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveIntegration`: ResponseRetrieveIntegration + fmt.Fprintf(os.Stdout, "Response from `VCSIntegrationsAPI.RetrieveIntegration`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**integrationId** | **string** | Unique identifier of the integration | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveIntegrationRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**ResponseRetrieveIntegration**](ResponseRetrieveIntegration.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/VCSProvidersAPI.md b/azion-api/docs/VCSProvidersAPI.md new file mode 100644 index 0000000..7c82c8b --- /dev/null +++ b/azion-api/docs/VCSProvidersAPI.md @@ -0,0 +1,87 @@ +# \VCSProvidersAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListProviders**](VCSProvidersAPI.md#ListProviders) | **Get** /vcs/providers | List providers + + + +## ListProviders + +> PaginatedPlatformList ListProviders(ctx).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List providers + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VCSProvidersAPI.ListProviders(context.Background()).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VCSProvidersAPI.ListProviders``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListProviders`: PaginatedPlatformList + fmt.Fprintf(os.Stdout, "Response from `VCSProvidersAPI.ListProviders`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListProvidersRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedPlatformList**](PaginatedPlatformList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/WAF.md b/azion-api/docs/WAF.md new file mode 100644 index 0000000..7d79727 --- /dev/null +++ b/azion-api/docs/WAF.md @@ -0,0 +1,202 @@ +# WAF + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Active** | Pointer to **bool** | | [optional] +**Name** | **string** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ProductVersion** | Pointer to **NullableString** | | [optional] +**EngineSettings** | Pointer to [**WAFEngineSettingsField**](WAFEngineSettingsField.md) | | [optional] + +## Methods + +### NewWAF + +`func NewWAF(id int64, name string, lastEditor string, lastModified time.Time, ) *WAF` + +NewWAF instantiates a new WAF object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFWithDefaults + +`func NewWAFWithDefaults() *WAF` + +NewWAFWithDefaults instantiates a new WAF object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WAF) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WAF) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WAF) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetActive + +`func (o *WAF) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WAF) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WAF) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WAF) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetName + +`func (o *WAF) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAF) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAF) SetName(v string)` + +SetName sets Name field to given value. + + +### GetLastEditor + +`func (o *WAF) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *WAF) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *WAF) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *WAF) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *WAF) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *WAF) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetProductVersion + +`func (o *WAF) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *WAF) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *WAF) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *WAF) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### SetProductVersionNil + +`func (o *WAF) SetProductVersionNil(b bool)` + + SetProductVersionNil sets the value for ProductVersion to be an explicit nil + +### UnsetProductVersion +`func (o *WAF) UnsetProductVersion()` + +UnsetProductVersion ensures that no value is present for ProductVersion, not even an explicit nil +### GetEngineSettings + +`func (o *WAF) GetEngineSettings() WAFEngineSettingsField` + +GetEngineSettings returns the EngineSettings field if non-nil, zero value otherwise. + +### GetEngineSettingsOk + +`func (o *WAF) GetEngineSettingsOk() (*WAFEngineSettingsField, bool)` + +GetEngineSettingsOk returns a tuple with the EngineSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEngineSettings + +`func (o *WAF) SetEngineSettings(v WAFEngineSettingsField)` + +SetEngineSettings sets EngineSettings field to given value. + +### HasEngineSettings + +`func (o *WAF) HasEngineSettings() bool` + +HasEngineSettings returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFEngineSettingsAttributesField.md b/azion-api/docs/WAFEngineSettingsAttributesField.md new file mode 100644 index 0000000..457547c --- /dev/null +++ b/azion-api/docs/WAFEngineSettingsAttributesField.md @@ -0,0 +1,82 @@ +# WAFEngineSettingsAttributesField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rulesets** | Pointer to **[]int64** | | [optional] +**Thresholds** | Pointer to [**[]ThresholdsConfigField**](ThresholdsConfigField.md) | | [optional] + +## Methods + +### NewWAFEngineSettingsAttributesField + +`func NewWAFEngineSettingsAttributesField() *WAFEngineSettingsAttributesField` + +NewWAFEngineSettingsAttributesField instantiates a new WAFEngineSettingsAttributesField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFEngineSettingsAttributesFieldWithDefaults + +`func NewWAFEngineSettingsAttributesFieldWithDefaults() *WAFEngineSettingsAttributesField` + +NewWAFEngineSettingsAttributesFieldWithDefaults instantiates a new WAFEngineSettingsAttributesField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRulesets + +`func (o *WAFEngineSettingsAttributesField) GetRulesets() []int64` + +GetRulesets returns the Rulesets field if non-nil, zero value otherwise. + +### GetRulesetsOk + +`func (o *WAFEngineSettingsAttributesField) GetRulesetsOk() (*[]int64, bool)` + +GetRulesetsOk returns a tuple with the Rulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRulesets + +`func (o *WAFEngineSettingsAttributesField) SetRulesets(v []int64)` + +SetRulesets sets Rulesets field to given value. + +### HasRulesets + +`func (o *WAFEngineSettingsAttributesField) HasRulesets() bool` + +HasRulesets returns a boolean if a field has been set. + +### GetThresholds + +`func (o *WAFEngineSettingsAttributesField) GetThresholds() []ThresholdsConfigField` + +GetThresholds returns the Thresholds field if non-nil, zero value otherwise. + +### GetThresholdsOk + +`func (o *WAFEngineSettingsAttributesField) GetThresholdsOk() (*[]ThresholdsConfigField, bool)` + +GetThresholdsOk returns a tuple with the Thresholds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThresholds + +`func (o *WAFEngineSettingsAttributesField) SetThresholds(v []ThresholdsConfigField)` + +SetThresholds sets Thresholds field to given value. + +### HasThresholds + +`func (o *WAFEngineSettingsAttributesField) HasThresholds() bool` + +HasThresholds returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFEngineSettingsAttributesFieldRequest.md b/azion-api/docs/WAFEngineSettingsAttributesFieldRequest.md new file mode 100644 index 0000000..8cab58a --- /dev/null +++ b/azion-api/docs/WAFEngineSettingsAttributesFieldRequest.md @@ -0,0 +1,82 @@ +# WAFEngineSettingsAttributesFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rulesets** | Pointer to **[]int64** | | [optional] +**Thresholds** | Pointer to [**[]ThresholdsConfigFieldRequest**](ThresholdsConfigFieldRequest.md) | | [optional] + +## Methods + +### NewWAFEngineSettingsAttributesFieldRequest + +`func NewWAFEngineSettingsAttributesFieldRequest() *WAFEngineSettingsAttributesFieldRequest` + +NewWAFEngineSettingsAttributesFieldRequest instantiates a new WAFEngineSettingsAttributesFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFEngineSettingsAttributesFieldRequestWithDefaults + +`func NewWAFEngineSettingsAttributesFieldRequestWithDefaults() *WAFEngineSettingsAttributesFieldRequest` + +NewWAFEngineSettingsAttributesFieldRequestWithDefaults instantiates a new WAFEngineSettingsAttributesFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRulesets + +`func (o *WAFEngineSettingsAttributesFieldRequest) GetRulesets() []int64` + +GetRulesets returns the Rulesets field if non-nil, zero value otherwise. + +### GetRulesetsOk + +`func (o *WAFEngineSettingsAttributesFieldRequest) GetRulesetsOk() (*[]int64, bool)` + +GetRulesetsOk returns a tuple with the Rulesets field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRulesets + +`func (o *WAFEngineSettingsAttributesFieldRequest) SetRulesets(v []int64)` + +SetRulesets sets Rulesets field to given value. + +### HasRulesets + +`func (o *WAFEngineSettingsAttributesFieldRequest) HasRulesets() bool` + +HasRulesets returns a boolean if a field has been set. + +### GetThresholds + +`func (o *WAFEngineSettingsAttributesFieldRequest) GetThresholds() []ThresholdsConfigFieldRequest` + +GetThresholds returns the Thresholds field if non-nil, zero value otherwise. + +### GetThresholdsOk + +`func (o *WAFEngineSettingsAttributesFieldRequest) GetThresholdsOk() (*[]ThresholdsConfigFieldRequest, bool)` + +GetThresholdsOk returns a tuple with the Thresholds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThresholds + +`func (o *WAFEngineSettingsAttributesFieldRequest) SetThresholds(v []ThresholdsConfigFieldRequest)` + +SetThresholds sets Thresholds field to given value. + +### HasThresholds + +`func (o *WAFEngineSettingsAttributesFieldRequest) HasThresholds() bool` + +HasThresholds returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFEngineSettingsField.md b/azion-api/docs/WAFEngineSettingsField.md new file mode 100644 index 0000000..82a54e3 --- /dev/null +++ b/azion-api/docs/WAFEngineSettingsField.md @@ -0,0 +1,108 @@ +# WAFEngineSettingsField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EngineVersion** | Pointer to **string** | * `2021-Q3` - 2021-Q3 | [optional] +**Type** | Pointer to **string** | * `score` - score | [optional] +**Attributes** | Pointer to [**WAFEngineSettingsAttributesField**](WAFEngineSettingsAttributesField.md) | | [optional] + +## Methods + +### NewWAFEngineSettingsField + +`func NewWAFEngineSettingsField() *WAFEngineSettingsField` + +NewWAFEngineSettingsField instantiates a new WAFEngineSettingsField object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFEngineSettingsFieldWithDefaults + +`func NewWAFEngineSettingsFieldWithDefaults() *WAFEngineSettingsField` + +NewWAFEngineSettingsFieldWithDefaults instantiates a new WAFEngineSettingsField object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEngineVersion + +`func (o *WAFEngineSettingsField) GetEngineVersion() string` + +GetEngineVersion returns the EngineVersion field if non-nil, zero value otherwise. + +### GetEngineVersionOk + +`func (o *WAFEngineSettingsField) GetEngineVersionOk() (*string, bool)` + +GetEngineVersionOk returns a tuple with the EngineVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEngineVersion + +`func (o *WAFEngineSettingsField) SetEngineVersion(v string)` + +SetEngineVersion sets EngineVersion field to given value. + +### HasEngineVersion + +`func (o *WAFEngineSettingsField) HasEngineVersion() bool` + +HasEngineVersion returns a boolean if a field has been set. + +### GetType + +`func (o *WAFEngineSettingsField) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *WAFEngineSettingsField) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *WAFEngineSettingsField) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *WAFEngineSettingsField) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetAttributes + +`func (o *WAFEngineSettingsField) GetAttributes() WAFEngineSettingsAttributesField` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *WAFEngineSettingsField) GetAttributesOk() (*WAFEngineSettingsAttributesField, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *WAFEngineSettingsField) SetAttributes(v WAFEngineSettingsAttributesField)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *WAFEngineSettingsField) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFEngineSettingsFieldRequest.md b/azion-api/docs/WAFEngineSettingsFieldRequest.md new file mode 100644 index 0000000..48b0e35 --- /dev/null +++ b/azion-api/docs/WAFEngineSettingsFieldRequest.md @@ -0,0 +1,108 @@ +# WAFEngineSettingsFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EngineVersion** | Pointer to **string** | * `2021-Q3` - 2021-Q3 | [optional] +**Type** | Pointer to **string** | * `score` - score | [optional] +**Attributes** | Pointer to [**WAFEngineSettingsAttributesFieldRequest**](WAFEngineSettingsAttributesFieldRequest.md) | | [optional] + +## Methods + +### NewWAFEngineSettingsFieldRequest + +`func NewWAFEngineSettingsFieldRequest() *WAFEngineSettingsFieldRequest` + +NewWAFEngineSettingsFieldRequest instantiates a new WAFEngineSettingsFieldRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFEngineSettingsFieldRequestWithDefaults + +`func NewWAFEngineSettingsFieldRequestWithDefaults() *WAFEngineSettingsFieldRequest` + +NewWAFEngineSettingsFieldRequestWithDefaults instantiates a new WAFEngineSettingsFieldRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetEngineVersion + +`func (o *WAFEngineSettingsFieldRequest) GetEngineVersion() string` + +GetEngineVersion returns the EngineVersion field if non-nil, zero value otherwise. + +### GetEngineVersionOk + +`func (o *WAFEngineSettingsFieldRequest) GetEngineVersionOk() (*string, bool)` + +GetEngineVersionOk returns a tuple with the EngineVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEngineVersion + +`func (o *WAFEngineSettingsFieldRequest) SetEngineVersion(v string)` + +SetEngineVersion sets EngineVersion field to given value. + +### HasEngineVersion + +`func (o *WAFEngineSettingsFieldRequest) HasEngineVersion() bool` + +HasEngineVersion returns a boolean if a field has been set. + +### GetType + +`func (o *WAFEngineSettingsFieldRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *WAFEngineSettingsFieldRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *WAFEngineSettingsFieldRequest) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *WAFEngineSettingsFieldRequest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### GetAttributes + +`func (o *WAFEngineSettingsFieldRequest) GetAttributes() WAFEngineSettingsAttributesFieldRequest` + +GetAttributes returns the Attributes field if non-nil, zero value otherwise. + +### GetAttributesOk + +`func (o *WAFEngineSettingsFieldRequest) GetAttributesOk() (*WAFEngineSettingsAttributesFieldRequest, bool)` + +GetAttributesOk returns a tuple with the Attributes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAttributes + +`func (o *WAFEngineSettingsFieldRequest) SetAttributes(v WAFEngineSettingsAttributesFieldRequest)` + +SetAttributes sets Attributes field to given value. + +### HasAttributes + +`func (o *WAFEngineSettingsFieldRequest) HasAttributes() bool` + +HasAttributes returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionCondition.md b/azion-api/docs/WAFExceptionCondition.md new file mode 100644 index 0000000..d27f11c --- /dev/null +++ b/azion-api/docs/WAFExceptionCondition.md @@ -0,0 +1,93 @@ +# WAFExceptionCondition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `specific_body_form_field_value` - specific_body_form_field_value * `specific_http_header_value` - specific_http_header_value * `specific_query_string_value` - specific_query_string_value | +**Name** | **string** | | +**Value** | **string** | | + +## Methods + +### NewWAFExceptionCondition + +`func NewWAFExceptionCondition(match string, name string, value string, ) *WAFExceptionCondition` + +NewWAFExceptionCondition instantiates a new WAFExceptionCondition object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionConditionWithDefaults + +`func NewWAFExceptionConditionWithDefaults() *WAFExceptionCondition` + +NewWAFExceptionConditionWithDefaults instantiates a new WAFExceptionCondition object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionCondition) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionCondition) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionCondition) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetName + +`func (o *WAFExceptionCondition) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFExceptionCondition) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFExceptionCondition) SetName(v string)` + +SetName sets Name field to given value. + + +### GetValue + +`func (o *WAFExceptionCondition) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WAFExceptionCondition) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WAFExceptionCondition) SetValue(v string)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionConditionRequest.md b/azion-api/docs/WAFExceptionConditionRequest.md new file mode 100644 index 0000000..dfbbb1c --- /dev/null +++ b/azion-api/docs/WAFExceptionConditionRequest.md @@ -0,0 +1,93 @@ +# WAFExceptionConditionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `specific_body_form_field_value` - specific_body_form_field_value * `specific_http_header_value` - specific_http_header_value * `specific_query_string_value` - specific_query_string_value | +**Name** | **string** | | +**Value** | **string** | | + +## Methods + +### NewWAFExceptionConditionRequest + +`func NewWAFExceptionConditionRequest(match string, name string, value string, ) *WAFExceptionConditionRequest` + +NewWAFExceptionConditionRequest instantiates a new WAFExceptionConditionRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionConditionRequestWithDefaults + +`func NewWAFExceptionConditionRequestWithDefaults() *WAFExceptionConditionRequest` + +NewWAFExceptionConditionRequestWithDefaults instantiates a new WAFExceptionConditionRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionConditionRequest) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionConditionRequest) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionConditionRequest) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetName + +`func (o *WAFExceptionConditionRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFExceptionConditionRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFExceptionConditionRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetValue + +`func (o *WAFExceptionConditionRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WAFExceptionConditionRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WAFExceptionConditionRequest) SetValue(v string)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionGenericCondition.md b/azion-api/docs/WAFExceptionGenericCondition.md new file mode 100644 index 0000000..d977f23 --- /dev/null +++ b/azion-api/docs/WAFExceptionGenericCondition.md @@ -0,0 +1,51 @@ +# WAFExceptionGenericCondition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `any_http_header_name` - any_http_header_name * `any_http_header_value` - any_http_header_value * `any_query_string_name` - any_query_string_name * `any_query_string_value` - any_query_string_value * `any_url` - any_url * `body_form_field_name` - body_form_field_name * `body_form_field_value` - body_form_field_value * `file_extension` - file_extension * `raw_body` - raw_body | + +## Methods + +### NewWAFExceptionGenericCondition + +`func NewWAFExceptionGenericCondition(match string, ) *WAFExceptionGenericCondition` + +NewWAFExceptionGenericCondition instantiates a new WAFExceptionGenericCondition object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionGenericConditionWithDefaults + +`func NewWAFExceptionGenericConditionWithDefaults() *WAFExceptionGenericCondition` + +NewWAFExceptionGenericConditionWithDefaults instantiates a new WAFExceptionGenericCondition object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionGenericCondition) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionGenericCondition) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionGenericCondition) SetMatch(v string)` + +SetMatch sets Match field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionGenericConditionRequest.md b/azion-api/docs/WAFExceptionGenericConditionRequest.md new file mode 100644 index 0000000..5667403 --- /dev/null +++ b/azion-api/docs/WAFExceptionGenericConditionRequest.md @@ -0,0 +1,51 @@ +# WAFExceptionGenericConditionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `any_http_header_name` - any_http_header_name * `any_http_header_value` - any_http_header_value * `any_query_string_name` - any_query_string_name * `any_query_string_value` - any_query_string_value * `any_url` - any_url * `body_form_field_name` - body_form_field_name * `body_form_field_value` - body_form_field_value * `file_extension` - file_extension * `raw_body` - raw_body | + +## Methods + +### NewWAFExceptionGenericConditionRequest + +`func NewWAFExceptionGenericConditionRequest(match string, ) *WAFExceptionGenericConditionRequest` + +NewWAFExceptionGenericConditionRequest instantiates a new WAFExceptionGenericConditionRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionGenericConditionRequestWithDefaults + +`func NewWAFExceptionGenericConditionRequestWithDefaults() *WAFExceptionGenericConditionRequest` + +NewWAFExceptionGenericConditionRequestWithDefaults instantiates a new WAFExceptionGenericConditionRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionGenericConditionRequest) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionGenericConditionRequest) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionGenericConditionRequest) SetMatch(v string)` + +SetMatch sets Match field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionSpecificConditionOnName.md b/azion-api/docs/WAFExceptionSpecificConditionOnName.md new file mode 100644 index 0000000..cde7292 --- /dev/null +++ b/azion-api/docs/WAFExceptionSpecificConditionOnName.md @@ -0,0 +1,72 @@ +# WAFExceptionSpecificConditionOnName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `specific_body_form_field_name` - specific_body_form_field_name * `specific_http_header_name` - specific_http_header_name * `specific_query_string_name` - specific_query_string_name | +**Name** | **string** | | + +## Methods + +### NewWAFExceptionSpecificConditionOnName + +`func NewWAFExceptionSpecificConditionOnName(match string, name string, ) *WAFExceptionSpecificConditionOnName` + +NewWAFExceptionSpecificConditionOnName instantiates a new WAFExceptionSpecificConditionOnName object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionSpecificConditionOnNameWithDefaults + +`func NewWAFExceptionSpecificConditionOnNameWithDefaults() *WAFExceptionSpecificConditionOnName` + +NewWAFExceptionSpecificConditionOnNameWithDefaults instantiates a new WAFExceptionSpecificConditionOnName object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionSpecificConditionOnName) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionSpecificConditionOnName) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionSpecificConditionOnName) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetName + +`func (o *WAFExceptionSpecificConditionOnName) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFExceptionSpecificConditionOnName) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFExceptionSpecificConditionOnName) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionSpecificConditionOnNameRequest.md b/azion-api/docs/WAFExceptionSpecificConditionOnNameRequest.md new file mode 100644 index 0000000..d052704 --- /dev/null +++ b/azion-api/docs/WAFExceptionSpecificConditionOnNameRequest.md @@ -0,0 +1,72 @@ +# WAFExceptionSpecificConditionOnNameRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `specific_body_form_field_name` - specific_body_form_field_name * `specific_http_header_name` - specific_http_header_name * `specific_query_string_name` - specific_query_string_name | +**Name** | **string** | | + +## Methods + +### NewWAFExceptionSpecificConditionOnNameRequest + +`func NewWAFExceptionSpecificConditionOnNameRequest(match string, name string, ) *WAFExceptionSpecificConditionOnNameRequest` + +NewWAFExceptionSpecificConditionOnNameRequest instantiates a new WAFExceptionSpecificConditionOnNameRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionSpecificConditionOnNameRequestWithDefaults + +`func NewWAFExceptionSpecificConditionOnNameRequestWithDefaults() *WAFExceptionSpecificConditionOnNameRequest` + +NewWAFExceptionSpecificConditionOnNameRequestWithDefaults instantiates a new WAFExceptionSpecificConditionOnNameRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionSpecificConditionOnNameRequest) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionSpecificConditionOnNameRequest) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionSpecificConditionOnNameRequest) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetName + +`func (o *WAFExceptionSpecificConditionOnNameRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFExceptionSpecificConditionOnNameRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFExceptionSpecificConditionOnNameRequest) SetName(v string)` + +SetName sets Name field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionSpecificConditionOnValue.md b/azion-api/docs/WAFExceptionSpecificConditionOnValue.md new file mode 100644 index 0000000..25c72ae --- /dev/null +++ b/azion-api/docs/WAFExceptionSpecificConditionOnValue.md @@ -0,0 +1,72 @@ +# WAFExceptionSpecificConditionOnValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `specific_body_form_field_value` - specific_body_form_field_value * `specific_http_header_value` - specific_http_header_value * `specific_query_string_value` - specific_query_string_value | +**Value** | **string** | | + +## Methods + +### NewWAFExceptionSpecificConditionOnValue + +`func NewWAFExceptionSpecificConditionOnValue(match string, value string, ) *WAFExceptionSpecificConditionOnValue` + +NewWAFExceptionSpecificConditionOnValue instantiates a new WAFExceptionSpecificConditionOnValue object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionSpecificConditionOnValueWithDefaults + +`func NewWAFExceptionSpecificConditionOnValueWithDefaults() *WAFExceptionSpecificConditionOnValue` + +NewWAFExceptionSpecificConditionOnValueWithDefaults instantiates a new WAFExceptionSpecificConditionOnValue object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionSpecificConditionOnValue) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionSpecificConditionOnValue) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionSpecificConditionOnValue) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetValue + +`func (o *WAFExceptionSpecificConditionOnValue) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WAFExceptionSpecificConditionOnValue) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WAFExceptionSpecificConditionOnValue) SetValue(v string)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFExceptionSpecificConditionOnValueRequest.md b/azion-api/docs/WAFExceptionSpecificConditionOnValueRequest.md new file mode 100644 index 0000000..a5cedc9 --- /dev/null +++ b/azion-api/docs/WAFExceptionSpecificConditionOnValueRequest.md @@ -0,0 +1,72 @@ +# WAFExceptionSpecificConditionOnValueRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Match** | **string** | * `specific_body_form_field_value` - specific_body_form_field_value * `specific_http_header_value` - specific_http_header_value * `specific_query_string_value` - specific_query_string_value | +**Value** | **string** | | + +## Methods + +### NewWAFExceptionSpecificConditionOnValueRequest + +`func NewWAFExceptionSpecificConditionOnValueRequest(match string, value string, ) *WAFExceptionSpecificConditionOnValueRequest` + +NewWAFExceptionSpecificConditionOnValueRequest instantiates a new WAFExceptionSpecificConditionOnValueRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFExceptionSpecificConditionOnValueRequestWithDefaults + +`func NewWAFExceptionSpecificConditionOnValueRequestWithDefaults() *WAFExceptionSpecificConditionOnValueRequest` + +NewWAFExceptionSpecificConditionOnValueRequestWithDefaults instantiates a new WAFExceptionSpecificConditionOnValueRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMatch + +`func (o *WAFExceptionSpecificConditionOnValueRequest) GetMatch() string` + +GetMatch returns the Match field if non-nil, zero value otherwise. + +### GetMatchOk + +`func (o *WAFExceptionSpecificConditionOnValueRequest) GetMatchOk() (*string, bool)` + +GetMatchOk returns a tuple with the Match field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMatch + +`func (o *WAFExceptionSpecificConditionOnValueRequest) SetMatch(v string)` + +SetMatch sets Match field to given value. + + +### GetValue + +`func (o *WAFExceptionSpecificConditionOnValueRequest) GetValue() string` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *WAFExceptionSpecificConditionOnValueRequest) GetValueOk() (*string, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetValue + +`func (o *WAFExceptionSpecificConditionOnValueRequest) SetValue(v string)` + +SetValue sets Value field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFRequest.md b/azion-api/docs/WAFRequest.md new file mode 100644 index 0000000..be68e31 --- /dev/null +++ b/azion-api/docs/WAFRequest.md @@ -0,0 +1,139 @@ +# WAFRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | Pointer to **bool** | | [optional] +**Name** | **string** | | +**ProductVersion** | Pointer to **NullableString** | | [optional] +**EngineSettings** | Pointer to [**WAFEngineSettingsFieldRequest**](WAFEngineSettingsFieldRequest.md) | | [optional] + +## Methods + +### NewWAFRequest + +`func NewWAFRequest(name string, ) *WAFRequest` + +NewWAFRequest instantiates a new WAFRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFRequestWithDefaults + +`func NewWAFRequestWithDefaults() *WAFRequest` + +NewWAFRequestWithDefaults instantiates a new WAFRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActive + +`func (o *WAFRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WAFRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WAFRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WAFRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetName + +`func (o *WAFRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetProductVersion + +`func (o *WAFRequest) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *WAFRequest) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *WAFRequest) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + +### HasProductVersion + +`func (o *WAFRequest) HasProductVersion() bool` + +HasProductVersion returns a boolean if a field has been set. + +### SetProductVersionNil + +`func (o *WAFRequest) SetProductVersionNil(b bool)` + + SetProductVersionNil sets the value for ProductVersion to be an explicit nil + +### UnsetProductVersion +`func (o *WAFRequest) UnsetProductVersion()` + +UnsetProductVersion ensures that no value is present for ProductVersion, not even an explicit nil +### GetEngineSettings + +`func (o *WAFRequest) GetEngineSettings() WAFEngineSettingsFieldRequest` + +GetEngineSettings returns the EngineSettings field if non-nil, zero value otherwise. + +### GetEngineSettingsOk + +`func (o *WAFRequest) GetEngineSettingsOk() (*WAFEngineSettingsFieldRequest, bool)` + +GetEngineSettingsOk returns a tuple with the EngineSettings field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEngineSettings + +`func (o *WAFRequest) SetEngineSettings(v WAFEngineSettingsFieldRequest)` + +SetEngineSettings sets EngineSettings field to given value. + +### HasEngineSettings + +`func (o *WAFRequest) HasEngineSettings() bool` + +HasEngineSettings returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFResponse.md b/azion-api/docs/WAFResponse.md new file mode 100644 index 0000000..bbac4a9 --- /dev/null +++ b/azion-api/docs/WAFResponse.md @@ -0,0 +1,77 @@ +# WAFResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**WAF**](WAF.md) | | + +## Methods + +### NewWAFResponse + +`func NewWAFResponse(data WAF, ) *WAFResponse` + +NewWAFResponse instantiates a new WAFResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFResponseWithDefaults + +`func NewWAFResponseWithDefaults() *WAFResponse` + +NewWAFResponseWithDefaults instantiates a new WAFResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *WAFResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *WAFResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *WAFResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *WAFResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *WAFResponse) GetData() WAF` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WAFResponse) GetDataOk() (*WAF, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *WAFResponse) SetData(v WAF)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFRule.md b/azion-api/docs/WAFRule.md new file mode 100644 index 0000000..4d427ed --- /dev/null +++ b/azion-api/docs/WAFRule.md @@ -0,0 +1,249 @@ +# WAFRule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**RuleId** | Pointer to **int64** | 0 - All Rules<br> 1 - Validation of protocol compliance: weird request, unable to parse<br> 2 - Request too big, stored on disk and not parsed<br> 10 - Validation of protocol compliance: invalid HEX encoding (null bytes)<br> 11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)<br> 12 - Validation of protocol compliance: invalid formatted URL<br> 13 - Validation of protocol compliance: invalid POST format<br> 14 - Validation of protocol compliance: invalid POST boundary<br> 15 - Validation of protocol compliance: invalid JSON<br> 16 - Validation of protocol compliance: POST with no body<br> 17 - Possible SQL Injection attack: validation with libinjection_sql<br> 18 - Possible XSS attack: validation with libinjection_xss<br> 1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies<br> 1001 - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies<br> 1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies<br> 1003 - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies<br> 1004 - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies<br> 1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies<br> 1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies<br> 1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies<br> 1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String<br> 1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String<br> 1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies<br> 1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies<br> 1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies<br> 1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies<br> 1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies<br> 1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies<br> 1100 - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies<br> 1101 - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies<br> 1102 - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies<br> 1103 - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies<br> 1104 - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies<br> 1105 - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies<br> 1106 - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies<br> 1107 - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies<br> 1108 - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies<br> 1109 - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies<br> 1110 - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies<br> 1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR<br> 1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies<br> 1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies<br> 1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies<br> 1203 - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies<br> 1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies<br> 1205 - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies<br> 1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies<br> 1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies<br> 1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies<br> 1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies<br> 1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies<br> 1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies<br> 1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies<br> 1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies<br> 1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies<br> 1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies<br> 1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies<br> 1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies<br> 1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies<br> 1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies<br> 1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies<br> 1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file<br> 2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering * `0` - All Rules * `1` - Validation of protocol compliance: weird request, unable to parse * `2` - Request too big, stored on disk and not parsed * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) * `12` - Validation of protocol compliance: invalid formatted URL * `13` - Validation of protocol compliance: invalid POST format * `14` - Validation of protocol compliance: invalid POST boundary * `15` - Validation of protocol compliance: invalid JSON * `16` - Validation of protocol compliance: POST with no body * `17` - Possible SQL Injection attack: validation with libinjection_sql * `18` - Possible XSS attack: validation with libinjection_xss * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies * `1001` - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies * `1003` - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies * `1004` - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies * `1100` - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies * `1101` - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies * `1102` - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies * `1103` - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies * `1104` - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies * `1105` - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies * `1106` - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies * `1107` - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies * `1108` - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies * `1109` - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies * `1110` - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies * `1203` - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies * `1205` - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering | [optional] +**Name** | **string** | | +**Path** | Pointer to **NullableString** | | [optional] +**Conditions** | [**[]WAFExceptionCondition**](WAFExceptionCondition.md) | | +**Operator** | Pointer to **string** | * `regex` - regex * `contains` - contains | [optional] +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | + +## Methods + +### NewWAFRule + +`func NewWAFRule(id int64, name string, conditions []WAFExceptionCondition, lastEditor string, lastModified time.Time, ) *WAFRule` + +NewWAFRule instantiates a new WAFRule object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFRuleWithDefaults + +`func NewWAFRuleWithDefaults() *WAFRule` + +NewWAFRuleWithDefaults instantiates a new WAFRule object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WAFRule) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WAFRule) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WAFRule) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetRuleId + +`func (o *WAFRule) GetRuleId() int64` + +GetRuleId returns the RuleId field if non-nil, zero value otherwise. + +### GetRuleIdOk + +`func (o *WAFRule) GetRuleIdOk() (*int64, bool)` + +GetRuleIdOk returns a tuple with the RuleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuleId + +`func (o *WAFRule) SetRuleId(v int64)` + +SetRuleId sets RuleId field to given value. + +### HasRuleId + +`func (o *WAFRule) HasRuleId() bool` + +HasRuleId returns a boolean if a field has been set. + +### GetName + +`func (o *WAFRule) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFRule) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFRule) SetName(v string)` + +SetName sets Name field to given value. + + +### GetPath + +`func (o *WAFRule) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *WAFRule) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *WAFRule) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *WAFRule) HasPath() bool` + +HasPath returns a boolean if a field has been set. + +### SetPathNil + +`func (o *WAFRule) SetPathNil(b bool)` + + SetPathNil sets the value for Path to be an explicit nil + +### UnsetPath +`func (o *WAFRule) UnsetPath()` + +UnsetPath ensures that no value is present for Path, not even an explicit nil +### GetConditions + +`func (o *WAFRule) GetConditions() []WAFExceptionCondition` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *WAFRule) GetConditionsOk() (*[]WAFExceptionCondition, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *WAFRule) SetConditions(v []WAFExceptionCondition)` + +SetConditions sets Conditions field to given value. + + +### GetOperator + +`func (o *WAFRule) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *WAFRule) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *WAFRule) SetOperator(v string)` + +SetOperator sets Operator field to given value. + +### HasOperator + +`func (o *WAFRule) HasOperator() bool` + +HasOperator returns a boolean if a field has been set. + +### GetActive + +`func (o *WAFRule) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WAFRule) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WAFRule) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WAFRule) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *WAFRule) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *WAFRule) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *WAFRule) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *WAFRule) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *WAFRule) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *WAFRule) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFRuleRequest.md b/azion-api/docs/WAFRuleRequest.md new file mode 100644 index 0000000..6bbf76b --- /dev/null +++ b/azion-api/docs/WAFRuleRequest.md @@ -0,0 +1,186 @@ +# WAFRuleRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RuleId** | Pointer to **int64** | 0 - All Rules<br> 1 - Validation of protocol compliance: weird request, unable to parse<br> 2 - Request too big, stored on disk and not parsed<br> 10 - Validation of protocol compliance: invalid HEX encoding (null bytes)<br> 11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)<br> 12 - Validation of protocol compliance: invalid formatted URL<br> 13 - Validation of protocol compliance: invalid POST format<br> 14 - Validation of protocol compliance: invalid POST boundary<br> 15 - Validation of protocol compliance: invalid JSON<br> 16 - Validation of protocol compliance: POST with no body<br> 17 - Possible SQL Injection attack: validation with libinjection_sql<br> 18 - Possible XSS attack: validation with libinjection_xss<br> 1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies<br> 1001 - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies<br> 1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies<br> 1003 - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies<br> 1004 - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies<br> 1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies<br> 1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies<br> 1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies<br> 1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String<br> 1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String<br> 1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies<br> 1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies<br> 1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies<br> 1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies<br> 1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies<br> 1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies<br> 1100 - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies<br> 1101 - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies<br> 1102 - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies<br> 1103 - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies<br> 1104 - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies<br> 1105 - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies<br> 1106 - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies<br> 1107 - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies<br> 1108 - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies<br> 1109 - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies<br> 1110 - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies<br> 1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR<br> 1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies<br> 1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies<br> 1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies<br> 1203 - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies<br> 1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies<br> 1205 - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies<br> 1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies<br> 1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies<br> 1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies<br> 1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies<br> 1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies<br> 1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies<br> 1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies<br> 1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies<br> 1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies<br> 1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies<br> 1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies<br> 1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies<br> 1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies<br> 1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies<br> 1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies<br> 1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file<br> 2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering * `0` - All Rules * `1` - Validation of protocol compliance: weird request, unable to parse * `2` - Request too big, stored on disk and not parsed * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) * `12` - Validation of protocol compliance: invalid formatted URL * `13` - Validation of protocol compliance: invalid POST format * `14` - Validation of protocol compliance: invalid POST boundary * `15` - Validation of protocol compliance: invalid JSON * `16` - Validation of protocol compliance: POST with no body * `17` - Possible SQL Injection attack: validation with libinjection_sql * `18` - Possible XSS attack: validation with libinjection_xss * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies * `1001` - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies * `1003` - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies * `1004` - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies * `1100` - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies * `1101` - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies * `1102` - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies * `1103` - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies * `1104` - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies * `1105` - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies * `1106` - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies * `1107` - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies * `1108` - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies * `1109` - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies * `1110` - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies * `1203` - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies * `1205` - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering | [optional] +**Name** | **string** | | +**Path** | Pointer to **NullableString** | | [optional] +**Conditions** | [**[]WAFExceptionConditionRequest**](WAFExceptionConditionRequest.md) | | +**Operator** | Pointer to **string** | * `regex` - regex * `contains` - contains | [optional] +**Active** | Pointer to **bool** | | [optional] + +## Methods + +### NewWAFRuleRequest + +`func NewWAFRuleRequest(name string, conditions []WAFExceptionConditionRequest, ) *WAFRuleRequest` + +NewWAFRuleRequest instantiates a new WAFRuleRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFRuleRequestWithDefaults + +`func NewWAFRuleRequestWithDefaults() *WAFRuleRequest` + +NewWAFRuleRequestWithDefaults instantiates a new WAFRuleRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRuleId + +`func (o *WAFRuleRequest) GetRuleId() int64` + +GetRuleId returns the RuleId field if non-nil, zero value otherwise. + +### GetRuleIdOk + +`func (o *WAFRuleRequest) GetRuleIdOk() (*int64, bool)` + +GetRuleIdOk returns a tuple with the RuleId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRuleId + +`func (o *WAFRuleRequest) SetRuleId(v int64)` + +SetRuleId sets RuleId field to given value. + +### HasRuleId + +`func (o *WAFRuleRequest) HasRuleId() bool` + +HasRuleId returns a boolean if a field has been set. + +### GetName + +`func (o *WAFRuleRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WAFRuleRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WAFRuleRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetPath + +`func (o *WAFRuleRequest) GetPath() string` + +GetPath returns the Path field if non-nil, zero value otherwise. + +### GetPathOk + +`func (o *WAFRuleRequest) GetPathOk() (*string, bool)` + +GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPath + +`func (o *WAFRuleRequest) SetPath(v string)` + +SetPath sets Path field to given value. + +### HasPath + +`func (o *WAFRuleRequest) HasPath() bool` + +HasPath returns a boolean if a field has been set. + +### SetPathNil + +`func (o *WAFRuleRequest) SetPathNil(b bool)` + + SetPathNil sets the value for Path to be an explicit nil + +### UnsetPath +`func (o *WAFRuleRequest) UnsetPath()` + +UnsetPath ensures that no value is present for Path, not even an explicit nil +### GetConditions + +`func (o *WAFRuleRequest) GetConditions() []WAFExceptionConditionRequest` + +GetConditions returns the Conditions field if non-nil, zero value otherwise. + +### GetConditionsOk + +`func (o *WAFRuleRequest) GetConditionsOk() (*[]WAFExceptionConditionRequest, bool)` + +GetConditionsOk returns a tuple with the Conditions field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetConditions + +`func (o *WAFRuleRequest) SetConditions(v []WAFExceptionConditionRequest)` + +SetConditions sets Conditions field to given value. + + +### GetOperator + +`func (o *WAFRuleRequest) GetOperator() string` + +GetOperator returns the Operator field if non-nil, zero value otherwise. + +### GetOperatorOk + +`func (o *WAFRuleRequest) GetOperatorOk() (*string, bool)` + +GetOperatorOk returns a tuple with the Operator field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOperator + +`func (o *WAFRuleRequest) SetOperator(v string)` + +SetOperator sets Operator field to given value. + +### HasOperator + +`func (o *WAFRuleRequest) HasOperator() bool` + +HasOperator returns a boolean if a field has been set. + +### GetActive + +`func (o *WAFRuleRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WAFRuleRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WAFRuleRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WAFRuleRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFRuleResponse.md b/azion-api/docs/WAFRuleResponse.md new file mode 100644 index 0000000..846c4ed --- /dev/null +++ b/azion-api/docs/WAFRuleResponse.md @@ -0,0 +1,77 @@ +# WAFRuleResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**WAFRule**](WAFRule.md) | | + +## Methods + +### NewWAFRuleResponse + +`func NewWAFRuleResponse(data WAFRule, ) *WAFRuleResponse` + +NewWAFRuleResponse instantiates a new WAFRuleResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWAFRuleResponseWithDefaults + +`func NewWAFRuleResponseWithDefaults() *WAFRuleResponse` + +NewWAFRuleResponseWithDefaults instantiates a new WAFRuleResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *WAFRuleResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *WAFRuleResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *WAFRuleResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *WAFRuleResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *WAFRuleResponse) GetData() WAFRule` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WAFRuleResponse) GetDataOk() (*WAFRule, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *WAFRuleResponse) SetData(v WAFRule)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WAFsAPI.md b/azion-api/docs/WAFsAPI.md new file mode 100644 index 0000000..9f48db2 --- /dev/null +++ b/azion-api/docs/WAFsAPI.md @@ -0,0 +1,517 @@ +# \WAFsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CloneWaf**](WAFsAPI.md#CloneWaf) | **Post** /workspace/wafs/{waf_id}/clone | Clone a Web Application Firewall (WAF) +[**CreateWaf**](WAFsAPI.md#CreateWaf) | **Post** /workspace/wafs | Create a Web Application Firewall (WAF) +[**DeleteWaf**](WAFsAPI.md#DeleteWaf) | **Delete** /workspace/wafs/{waf_id} | Delete a Web Application Firewall (WAF) +[**ListWafs**](WAFsAPI.md#ListWafs) | **Get** /workspace/wafs | List Web Application Firewalls (WAFs) +[**PartialUpdateWaf**](WAFsAPI.md#PartialUpdateWaf) | **Patch** /workspace/wafs/{waf_id} | Partially update a Web Application Firewall (WAF) +[**RetrieveWaf**](WAFsAPI.md#RetrieveWaf) | **Get** /workspace/wafs/{waf_id} | Retrieve details from a Web Application Firewall (WAF) +[**UpdateWaf**](WAFsAPI.md#UpdateWaf) | **Put** /workspace/wafs/{waf_id} | Update a Web Application Firewall (WAF) + + + +## CloneWaf + +> WAFResponse CloneWaf(ctx, wafId).CloneWAFRequest(cloneWAFRequest).Execute() + +Clone a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + cloneWAFRequest := *openapiclient.NewCloneWAFRequest("Name_example") // CloneWAFRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.CloneWaf(context.Background(), wafId).CloneWAFRequest(cloneWAFRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.CloneWaf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CloneWaf`: WAFResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.CloneWaf`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCloneWafRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **cloneWAFRequest** | [**CloneWAFRequest**](CloneWAFRequest.md) | | + +### Return type + +[**WAFResponse**](WAFResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## CreateWaf + +> WAFResponse CreateWaf(ctx).WAFRequest(wAFRequest).Execute() + +Create a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wAFRequest := *openapiclient.NewWAFRequest("Name_example") // WAFRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.CreateWaf(context.Background()).WAFRequest(wAFRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.CreateWaf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateWaf`: WAFResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.CreateWaf`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateWafRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **wAFRequest** | [**WAFRequest**](WAFRequest.md) | | + +### Return type + +[**WAFResponse**](WAFResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWaf + +> DeleteResponse DeleteWaf(ctx, wafId).Execute() + +Delete a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.DeleteWaf(context.Background(), wafId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.DeleteWaf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteWaf`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.DeleteWaf`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteWafRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWafs + +> PaginatedWAFList ListWafs(ctx).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Web Application Firewalls (WAFs) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.ListWafs(context.Background()).Fields(fields).Id(id).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.ListWafs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListWafs`: PaginatedWAFList + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.ListWafs`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListWafsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedWAFList**](PaginatedWAFList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateWaf + +> WAFResponse PartialUpdateWaf(ctx, wafId).PatchedWAFRequest(patchedWAFRequest).Execute() + +Partially update a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + patchedWAFRequest := *openapiclient.NewPatchedWAFRequest() // PatchedWAFRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.PartialUpdateWaf(context.Background(), wafId).PatchedWAFRequest(patchedWAFRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.PartialUpdateWaf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateWaf`: WAFResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.PartialUpdateWaf`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateWafRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedWAFRequest** | [**PatchedWAFRequest**](PatchedWAFRequest.md) | | + +### Return type + +[**WAFResponse**](WAFResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveWaf + +> WAFResponse RetrieveWaf(ctx, wafId).Fields(fields).Execute() + +Retrieve details from a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.RetrieveWaf(context.Background(), wafId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.RetrieveWaf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveWaf`: WAFResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.RetrieveWaf`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveWafRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**WAFResponse**](WAFResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWaf + +> WAFResponse UpdateWaf(ctx, wafId).WAFRequest(wAFRequest).Execute() + +Update a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + wAFRequest := *openapiclient.NewWAFRequest("Name_example") // WAFRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsAPI.UpdateWaf(context.Background(), wafId).WAFRequest(wAFRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsAPI.UpdateWaf``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateWaf`: WAFResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsAPI.UpdateWaf`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateWafRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **wAFRequest** | [**WAFRequest**](WAFRequest.md) | | + +### Return type + +[**WAFResponse**](WAFResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/WAFsExceptionsAPI.md b/azion-api/docs/WAFsExceptionsAPI.md new file mode 100644 index 0000000..08ac912 --- /dev/null +++ b/azion-api/docs/WAFsExceptionsAPI.md @@ -0,0 +1,481 @@ +# \WAFsExceptionsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateWafException**](WAFsExceptionsAPI.md#CreateWafException) | **Post** /workspace/wafs/{waf_id}/exceptions | Create an Exception for a Web Application Firewall (WAF) +[**DeleteWafException**](WAFsExceptionsAPI.md#DeleteWafException) | **Delete** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Delete an Exception from a Web Application Firewall (WAF) +[**ListWafExceptions**](WAFsExceptionsAPI.md#ListWafExceptions) | **Get** /workspace/wafs/{waf_id}/exceptions | List Exceptions for a Web Application Firewall (WAF) +[**PartialUpdateWafException**](WAFsExceptionsAPI.md#PartialUpdateWafException) | **Patch** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Partially update an Exception for a Web Application Firewall (WAF) +[**RetrieveWafException**](WAFsExceptionsAPI.md#RetrieveWafException) | **Get** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Retrieve details of an Exception from a Web Application Firewall (WAF) +[**UpdateWafException**](WAFsExceptionsAPI.md#UpdateWafException) | **Put** /workspace/wafs/{waf_id}/exceptions/{exception_id} | Update an Exception for a Web Application Firewall (WAF) + + + +## CreateWafException + +> WAFRuleResponse CreateWafException(ctx, wafId).WAFRuleRequest(wAFRuleRequest).Execute() + +Create an Exception for a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + wAFRuleRequest := *openapiclient.NewWAFRuleRequest("Name_example", []openapiclient.WAFExceptionConditionRequest{openapiclient.WAFExceptionConditionRequest{WAFExceptionGenericConditionRequest: openapiclient.NewWAFExceptionGenericConditionRequest("Match_example")}}) // WAFRuleRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsExceptionsAPI.CreateWafException(context.Background(), wafId).WAFRuleRequest(wAFRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsExceptionsAPI.CreateWafException``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateWafException`: WAFRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsExceptionsAPI.CreateWafException`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateWafExceptionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **wAFRuleRequest** | [**WAFRuleRequest**](WAFRuleRequest.md) | | + +### Return type + +[**WAFRuleResponse**](WAFRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWafException + +> DeleteResponse DeleteWafException(ctx, exceptionId, wafId).Execute() + +Delete an Exception from a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + exceptionId := int64(789) // int64 | A unique integer value identifying the WAF exception. + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsExceptionsAPI.DeleteWafException(context.Background(), exceptionId, wafId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsExceptionsAPI.DeleteWafException``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteWafException`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsExceptionsAPI.DeleteWafException`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exceptionId** | **int64** | A unique integer value identifying the WAF exception. | +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteWafExceptionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWafExceptions + +> PaginatedWAFRuleList ListWafExceptions(ctx, wafId).CreatedAtGte(createdAtGte).CreatedAtLte(createdAtLte).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Ordering(ordering).Page(page).PageSize(pageSize).Path(path).Search(search).Execute() + +List Exceptions for a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + createdAtGte := time.Now() // time.Time | Filter by creation date (greater than or equal). (optional) + createdAtLte := time.Now() // time.Time | Filter by creation date (less than or equal). (optional) + description := "description_example" // string | Filter by description (case-insensitive, partial match). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + path := "path_example" // string | Filter by path (case-insensitive, partial match). (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsExceptionsAPI.ListWafExceptions(context.Background(), wafId).CreatedAtGte(createdAtGte).CreatedAtLte(createdAtLte).Description(description).Fields(fields).Id(id).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).Ordering(ordering).Page(page).PageSize(pageSize).Path(path).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsExceptionsAPI.ListWafExceptions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListWafExceptions`: PaginatedWAFRuleList + fmt.Fprintf(os.Stdout, "Response from `WAFsExceptionsAPI.ListWafExceptions`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListWafExceptionsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **createdAtGte** | **time.Time** | Filter by creation date (greater than or equal). | + **createdAtLte** | **time.Time** | Filter by creation date (less than or equal). | + **description** | **string** | Filter by description (case-insensitive, partial match). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **path** | **string** | Filter by path (case-insensitive, partial match). | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedWAFRuleList**](PaginatedWAFRuleList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateWafException + +> WAFRuleResponse PartialUpdateWafException(ctx, exceptionId, wafId).PatchedWAFRuleRequest(patchedWAFRuleRequest).Execute() + +Partially update an Exception for a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + exceptionId := int64(789) // int64 | A unique integer value identifying the WAF exception. + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + patchedWAFRuleRequest := *openapiclient.NewPatchedWAFRuleRequest() // PatchedWAFRuleRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsExceptionsAPI.PartialUpdateWafException(context.Background(), exceptionId, wafId).PatchedWAFRuleRequest(patchedWAFRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsExceptionsAPI.PartialUpdateWafException``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateWafException`: WAFRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsExceptionsAPI.PartialUpdateWafException`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exceptionId** | **int64** | A unique integer value identifying the WAF exception. | +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateWafExceptionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedWAFRuleRequest** | [**PatchedWAFRuleRequest**](PatchedWAFRuleRequest.md) | | + +### Return type + +[**WAFRuleResponse**](WAFRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveWafException + +> WAFRuleResponse RetrieveWafException(ctx, exceptionId, wafId).Fields(fields).Execute() + +Retrieve details of an Exception from a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + exceptionId := int64(789) // int64 | A unique integer value identifying the WAF exception. + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsExceptionsAPI.RetrieveWafException(context.Background(), exceptionId, wafId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsExceptionsAPI.RetrieveWafException``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveWafException`: WAFRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsExceptionsAPI.RetrieveWafException`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exceptionId** | **int64** | A unique integer value identifying the WAF exception. | +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveWafExceptionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**WAFRuleResponse**](WAFRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWafException + +> WAFRuleResponse UpdateWafException(ctx, exceptionId, wafId).WAFRuleRequest(wAFRuleRequest).Execute() + +Update an Exception for a Web Application Firewall (WAF) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + exceptionId := int64(789) // int64 | A unique integer value identifying the WAF exception. + wafId := int64(789) // int64 | A unique integer value identifying the WAF. + wAFRuleRequest := *openapiclient.NewWAFRuleRequest("Name_example", []openapiclient.WAFExceptionConditionRequest{openapiclient.WAFExceptionConditionRequest{WAFExceptionGenericConditionRequest: openapiclient.NewWAFExceptionGenericConditionRequest("Match_example")}}) // WAFRuleRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WAFsExceptionsAPI.UpdateWafException(context.Background(), exceptionId, wafId).WAFRuleRequest(wAFRuleRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WAFsExceptionsAPI.UpdateWafException``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateWafException`: WAFRuleResponse + fmt.Fprintf(os.Stdout, "Response from `WAFsExceptionsAPI.UpdateWafException`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**exceptionId** | **int64** | A unique integer value identifying the WAF exception. | +**wafId** | **int64** | A unique integer value identifying the WAF. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateWafExceptionRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **wAFRuleRequest** | [**WAFRuleRequest**](WAFRuleRequest.md) | | + +### Return type + +[**WAFRuleResponse**](WAFRuleResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Workload.md b/azion-api/docs/Workload.md new file mode 100644 index 0000000..17fa21b --- /dev/null +++ b/azion-api/docs/Workload.md @@ -0,0 +1,338 @@ +# Workload + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**Infrastructure** | Pointer to **int64** | * `1` - Production Infrastructure (All Locations) * `2` - Staging Infrastructure | [optional] +**Tls** | Pointer to [**TLSWorkload**](TLSWorkload.md) | | [optional] +**Protocols** | Pointer to [**Protocols**](Protocols.md) | | [optional] +**Mtls** | Pointer to [**MTLS**](MTLS.md) | | [optional] +**Domains** | Pointer to **[]string** | | [optional] +**WorkloadDomainAllowAccess** | Pointer to **bool** | | [optional] +**WorkloadDomain** | **string** | | +**ProductVersion** | **string** | | + +## Methods + +### NewWorkload + +`func NewWorkload(id int64, name string, lastEditor string, lastModified time.Time, workloadDomain string, productVersion string, ) *Workload` + +NewWorkload instantiates a new Workload object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkloadWithDefaults + +`func NewWorkloadWithDefaults() *Workload` + +NewWorkloadWithDefaults instantiates a new Workload object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Workload) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Workload) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Workload) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Workload) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Workload) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Workload) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *Workload) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Workload) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Workload) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *Workload) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetLastEditor + +`func (o *Workload) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Workload) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Workload) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Workload) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Workload) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Workload) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetInfrastructure + +`func (o *Workload) GetInfrastructure() int64` + +GetInfrastructure returns the Infrastructure field if non-nil, zero value otherwise. + +### GetInfrastructureOk + +`func (o *Workload) GetInfrastructureOk() (*int64, bool)` + +GetInfrastructureOk returns a tuple with the Infrastructure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfrastructure + +`func (o *Workload) SetInfrastructure(v int64)` + +SetInfrastructure sets Infrastructure field to given value. + +### HasInfrastructure + +`func (o *Workload) HasInfrastructure() bool` + +HasInfrastructure returns a boolean if a field has been set. + +### GetTls + +`func (o *Workload) GetTls() TLSWorkload` + +GetTls returns the Tls field if non-nil, zero value otherwise. + +### GetTlsOk + +`func (o *Workload) GetTlsOk() (*TLSWorkload, bool)` + +GetTlsOk returns a tuple with the Tls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTls + +`func (o *Workload) SetTls(v TLSWorkload)` + +SetTls sets Tls field to given value. + +### HasTls + +`func (o *Workload) HasTls() bool` + +HasTls returns a boolean if a field has been set. + +### GetProtocols + +`func (o *Workload) GetProtocols() Protocols` + +GetProtocols returns the Protocols field if non-nil, zero value otherwise. + +### GetProtocolsOk + +`func (o *Workload) GetProtocolsOk() (*Protocols, bool)` + +GetProtocolsOk returns a tuple with the Protocols field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocols + +`func (o *Workload) SetProtocols(v Protocols)` + +SetProtocols sets Protocols field to given value. + +### HasProtocols + +`func (o *Workload) HasProtocols() bool` + +HasProtocols returns a boolean if a field has been set. + +### GetMtls + +`func (o *Workload) GetMtls() MTLS` + +GetMtls returns the Mtls field if non-nil, zero value otherwise. + +### GetMtlsOk + +`func (o *Workload) GetMtlsOk() (*MTLS, bool)` + +GetMtlsOk returns a tuple with the Mtls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMtls + +`func (o *Workload) SetMtls(v MTLS)` + +SetMtls sets Mtls field to given value. + +### HasMtls + +`func (o *Workload) HasMtls() bool` + +HasMtls returns a boolean if a field has been set. + +### GetDomains + +`func (o *Workload) GetDomains() []string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *Workload) GetDomainsOk() (*[]string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *Workload) SetDomains(v []string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *Workload) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetWorkloadDomainAllowAccess + +`func (o *Workload) GetWorkloadDomainAllowAccess() bool` + +GetWorkloadDomainAllowAccess returns the WorkloadDomainAllowAccess field if non-nil, zero value otherwise. + +### GetWorkloadDomainAllowAccessOk + +`func (o *Workload) GetWorkloadDomainAllowAccessOk() (*bool, bool)` + +GetWorkloadDomainAllowAccessOk returns a tuple with the WorkloadDomainAllowAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadDomainAllowAccess + +`func (o *Workload) SetWorkloadDomainAllowAccess(v bool)` + +SetWorkloadDomainAllowAccess sets WorkloadDomainAllowAccess field to given value. + +### HasWorkloadDomainAllowAccess + +`func (o *Workload) HasWorkloadDomainAllowAccess() bool` + +HasWorkloadDomainAllowAccess returns a boolean if a field has been set. + +### GetWorkloadDomain + +`func (o *Workload) GetWorkloadDomain() string` + +GetWorkloadDomain returns the WorkloadDomain field if non-nil, zero value otherwise. + +### GetWorkloadDomainOk + +`func (o *Workload) GetWorkloadDomainOk() (*string, bool)` + +GetWorkloadDomainOk returns a tuple with the WorkloadDomain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadDomain + +`func (o *Workload) SetWorkloadDomain(v string)` + +SetWorkloadDomain sets WorkloadDomain field to given value. + + +### GetProductVersion + +`func (o *Workload) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Workload) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Workload) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkloadDeployment.md b/azion-api/docs/WorkloadDeployment.md new file mode 100644 index 0000000..98c9fb0 --- /dev/null +++ b/azion-api/docs/WorkloadDeployment.md @@ -0,0 +1,187 @@ +# WorkloadDeployment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Current** | Pointer to **bool** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Strategy** | [**DeploymentStrategyDefaultDeploymentStrategy**](DeploymentStrategyDefaultDeploymentStrategy.md) | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | + +## Methods + +### NewWorkloadDeployment + +`func NewWorkloadDeployment(id int64, name string, strategy DeploymentStrategyDefaultDeploymentStrategy, lastEditor string, lastModified time.Time, ) *WorkloadDeployment` + +NewWorkloadDeployment instantiates a new WorkloadDeployment object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkloadDeploymentWithDefaults + +`func NewWorkloadDeploymentWithDefaults() *WorkloadDeployment` + +NewWorkloadDeploymentWithDefaults instantiates a new WorkloadDeployment object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *WorkloadDeployment) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *WorkloadDeployment) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *WorkloadDeployment) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *WorkloadDeployment) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WorkloadDeployment) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WorkloadDeployment) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCurrent + +`func (o *WorkloadDeployment) GetCurrent() bool` + +GetCurrent returns the Current field if non-nil, zero value otherwise. + +### GetCurrentOk + +`func (o *WorkloadDeployment) GetCurrentOk() (*bool, bool)` + +GetCurrentOk returns a tuple with the Current field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrent + +`func (o *WorkloadDeployment) SetCurrent(v bool)` + +SetCurrent sets Current field to given value. + +### HasCurrent + +`func (o *WorkloadDeployment) HasCurrent() bool` + +HasCurrent returns a boolean if a field has been set. + +### GetActive + +`func (o *WorkloadDeployment) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WorkloadDeployment) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WorkloadDeployment) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WorkloadDeployment) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetStrategy + +`func (o *WorkloadDeployment) GetStrategy() DeploymentStrategyDefaultDeploymentStrategy` + +GetStrategy returns the Strategy field if non-nil, zero value otherwise. + +### GetStrategyOk + +`func (o *WorkloadDeployment) GetStrategyOk() (*DeploymentStrategyDefaultDeploymentStrategy, bool)` + +GetStrategyOk returns a tuple with the Strategy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrategy + +`func (o *WorkloadDeployment) SetStrategy(v DeploymentStrategyDefaultDeploymentStrategy)` + +SetStrategy sets Strategy field to given value. + + +### GetLastEditor + +`func (o *WorkloadDeployment) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *WorkloadDeployment) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *WorkloadDeployment) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *WorkloadDeployment) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *WorkloadDeployment) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *WorkloadDeployment) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkloadDeploymentRequest.md b/azion-api/docs/WorkloadDeploymentRequest.md new file mode 100644 index 0000000..756d020 --- /dev/null +++ b/azion-api/docs/WorkloadDeploymentRequest.md @@ -0,0 +1,124 @@ +# WorkloadDeploymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Current** | Pointer to **bool** | | [optional] +**Active** | Pointer to **bool** | | [optional] +**Strategy** | [**DeploymentStrategyDefaultDeploymentStrategyRequest**](DeploymentStrategyDefaultDeploymentStrategyRequest.md) | | + +## Methods + +### NewWorkloadDeploymentRequest + +`func NewWorkloadDeploymentRequest(name string, strategy DeploymentStrategyDefaultDeploymentStrategyRequest, ) *WorkloadDeploymentRequest` + +NewWorkloadDeploymentRequest instantiates a new WorkloadDeploymentRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkloadDeploymentRequestWithDefaults + +`func NewWorkloadDeploymentRequestWithDefaults() *WorkloadDeploymentRequest` + +NewWorkloadDeploymentRequestWithDefaults instantiates a new WorkloadDeploymentRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *WorkloadDeploymentRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WorkloadDeploymentRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WorkloadDeploymentRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetCurrent + +`func (o *WorkloadDeploymentRequest) GetCurrent() bool` + +GetCurrent returns the Current field if non-nil, zero value otherwise. + +### GetCurrentOk + +`func (o *WorkloadDeploymentRequest) GetCurrentOk() (*bool, bool)` + +GetCurrentOk returns a tuple with the Current field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCurrent + +`func (o *WorkloadDeploymentRequest) SetCurrent(v bool)` + +SetCurrent sets Current field to given value. + +### HasCurrent + +`func (o *WorkloadDeploymentRequest) HasCurrent() bool` + +HasCurrent returns a boolean if a field has been set. + +### GetActive + +`func (o *WorkloadDeploymentRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WorkloadDeploymentRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WorkloadDeploymentRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WorkloadDeploymentRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetStrategy + +`func (o *WorkloadDeploymentRequest) GetStrategy() DeploymentStrategyDefaultDeploymentStrategyRequest` + +GetStrategy returns the Strategy field if non-nil, zero value otherwise. + +### GetStrategyOk + +`func (o *WorkloadDeploymentRequest) GetStrategyOk() (*DeploymentStrategyDefaultDeploymentStrategyRequest, bool)` + +GetStrategyOk returns a tuple with the Strategy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStrategy + +`func (o *WorkloadDeploymentRequest) SetStrategy(v DeploymentStrategyDefaultDeploymentStrategyRequest)` + +SetStrategy sets Strategy field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkloadDeploymentResponse.md b/azion-api/docs/WorkloadDeploymentResponse.md new file mode 100644 index 0000000..94a13e4 --- /dev/null +++ b/azion-api/docs/WorkloadDeploymentResponse.md @@ -0,0 +1,77 @@ +# WorkloadDeploymentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**WorkloadDeployment**](WorkloadDeployment.md) | | + +## Methods + +### NewWorkloadDeploymentResponse + +`func NewWorkloadDeploymentResponse(data WorkloadDeployment, ) *WorkloadDeploymentResponse` + +NewWorkloadDeploymentResponse instantiates a new WorkloadDeploymentResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkloadDeploymentResponseWithDefaults + +`func NewWorkloadDeploymentResponseWithDefaults() *WorkloadDeploymentResponse` + +NewWorkloadDeploymentResponseWithDefaults instantiates a new WorkloadDeploymentResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *WorkloadDeploymentResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *WorkloadDeploymentResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *WorkloadDeploymentResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *WorkloadDeploymentResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *WorkloadDeploymentResponse) GetData() WorkloadDeployment` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WorkloadDeploymentResponse) GetDataOk() (*WorkloadDeployment, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *WorkloadDeploymentResponse) SetData(v WorkloadDeployment)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkloadDeploymentsAPI.md b/azion-api/docs/WorkloadDeploymentsAPI.md new file mode 100644 index 0000000..482694d --- /dev/null +++ b/azion-api/docs/WorkloadDeploymentsAPI.md @@ -0,0 +1,470 @@ +# \WorkloadDeploymentsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateWorkloadDeployment**](WorkloadDeploymentsAPI.md#CreateWorkloadDeployment) | **Post** /workspace/workloads/{workload_id}/deployments | Create a Workload Deployment +[**DeleteWorkloadDeployment**](WorkloadDeploymentsAPI.md#DeleteWorkloadDeployment) | **Delete** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Delete a Workload Deployment +[**ListWorkloadDeployments**](WorkloadDeploymentsAPI.md#ListWorkloadDeployments) | **Get** /workspace/workloads/{workload_id}/deployments | List Workload Deployments +[**PartialUpdateWorkloadDeployment**](WorkloadDeploymentsAPI.md#PartialUpdateWorkloadDeployment) | **Patch** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Partially update a Workload Deployment +[**RetrieveWorkloadDeployment**](WorkloadDeploymentsAPI.md#RetrieveWorkloadDeployment) | **Get** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Retrieve details of a Workload Deployment +[**UpdateWorkloadDeployment**](WorkloadDeploymentsAPI.md#UpdateWorkloadDeployment) | **Put** /workspace/workloads/{workload_id}/deployments/{deployment_id} | Update a Workload Deployment + + + +## CreateWorkloadDeployment + +> WorkloadDeploymentResponse CreateWorkloadDeployment(ctx, workloadId).WorkloadDeploymentRequest(workloadDeploymentRequest).Execute() + +Create a Workload Deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + workloadDeploymentRequest := *openapiclient.NewWorkloadDeploymentRequest("Name_example", *openapiclient.NewDeploymentStrategyDefaultDeploymentStrategyRequest("Type_example", *openapiclient.NewDefaultDeploymentStrategyAttrsRequest(int64(123)))) // WorkloadDeploymentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadDeploymentsAPI.CreateWorkloadDeployment(context.Background(), workloadId).WorkloadDeploymentRequest(workloadDeploymentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadDeploymentsAPI.CreateWorkloadDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateWorkloadDeployment`: WorkloadDeploymentResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadDeploymentsAPI.CreateWorkloadDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateWorkloadDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **workloadDeploymentRequest** | [**WorkloadDeploymentRequest**](WorkloadDeploymentRequest.md) | | + +### Return type + +[**WorkloadDeploymentResponse**](WorkloadDeploymentResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWorkloadDeployment + +> DeleteResponse DeleteWorkloadDeployment(ctx, deploymentId, workloadId).Execute() + +Delete a Workload Deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + deploymentId := int64(789) // int64 | A unique integer value identifying the deployment. + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadDeploymentsAPI.DeleteWorkloadDeployment(context.Background(), deploymentId, workloadId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadDeploymentsAPI.DeleteWorkloadDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteWorkloadDeployment`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadDeploymentsAPI.DeleteWorkloadDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**deploymentId** | **int64** | A unique integer value identifying the deployment. | +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteWorkloadDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkloadDeployments + +> PaginatedWorkloadDeploymentList ListWorkloadDeployments(ctx, workloadId).Current(current).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Tag(tag).Execute() + +List Workload Deployments + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + current := true // bool | Filter by current status. (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + tag := "tag_example" // string | Filter by tag (case-insensitive, partial match). (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadDeploymentsAPI.ListWorkloadDeployments(context.Background(), workloadId).Current(current).Fields(fields).Id(id).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Tag(tag).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadDeploymentsAPI.ListWorkloadDeployments``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListWorkloadDeployments`: PaginatedWorkloadDeploymentList + fmt.Fprintf(os.Stdout, "Response from `WorkloadDeploymentsAPI.ListWorkloadDeployments`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListWorkloadDeploymentsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **current** | **bool** | Filter by current status. | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + **tag** | **string** | Filter by tag (case-insensitive, partial match). | + +### Return type + +[**PaginatedWorkloadDeploymentList**](PaginatedWorkloadDeploymentList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateWorkloadDeployment + +> WorkloadDeploymentResponse PartialUpdateWorkloadDeployment(ctx, deploymentId, workloadId).PatchedWorkloadDeploymentRequest(patchedWorkloadDeploymentRequest).Execute() + +Partially update a Workload Deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + deploymentId := int64(789) // int64 | A unique integer value identifying the deployment. + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + patchedWorkloadDeploymentRequest := *openapiclient.NewPatchedWorkloadDeploymentRequest() // PatchedWorkloadDeploymentRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadDeploymentsAPI.PartialUpdateWorkloadDeployment(context.Background(), deploymentId, workloadId).PatchedWorkloadDeploymentRequest(patchedWorkloadDeploymentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadDeploymentsAPI.PartialUpdateWorkloadDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateWorkloadDeployment`: WorkloadDeploymentResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadDeploymentsAPI.PartialUpdateWorkloadDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**deploymentId** | **int64** | A unique integer value identifying the deployment. | +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateWorkloadDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **patchedWorkloadDeploymentRequest** | [**PatchedWorkloadDeploymentRequest**](PatchedWorkloadDeploymentRequest.md) | | + +### Return type + +[**WorkloadDeploymentResponse**](WorkloadDeploymentResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveWorkloadDeployment + +> WorkloadDeploymentResponse RetrieveWorkloadDeployment(ctx, deploymentId, workloadId).Fields(fields).Execute() + +Retrieve details of a Workload Deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + deploymentId := int64(789) // int64 | A unique integer value identifying the deployment. + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadDeploymentsAPI.RetrieveWorkloadDeployment(context.Background(), deploymentId, workloadId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadDeploymentsAPI.RetrieveWorkloadDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveWorkloadDeployment`: WorkloadDeploymentResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadDeploymentsAPI.RetrieveWorkloadDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**deploymentId** | **int64** | A unique integer value identifying the deployment. | +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveWorkloadDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**WorkloadDeploymentResponse**](WorkloadDeploymentResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorkloadDeployment + +> WorkloadDeploymentResponse UpdateWorkloadDeployment(ctx, deploymentId, workloadId).WorkloadDeploymentRequest(workloadDeploymentRequest).Execute() + +Update a Workload Deployment + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + deploymentId := int64(789) // int64 | A unique integer value identifying the deployment. + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + workloadDeploymentRequest := *openapiclient.NewWorkloadDeploymentRequest("Name_example", *openapiclient.NewDeploymentStrategyDefaultDeploymentStrategyRequest("Type_example", *openapiclient.NewDefaultDeploymentStrategyAttrsRequest(int64(123)))) // WorkloadDeploymentRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadDeploymentsAPI.UpdateWorkloadDeployment(context.Background(), deploymentId, workloadId).WorkloadDeploymentRequest(workloadDeploymentRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadDeploymentsAPI.UpdateWorkloadDeployment``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateWorkloadDeployment`: WorkloadDeploymentResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadDeploymentsAPI.UpdateWorkloadDeployment`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**deploymentId** | **int64** | A unique integer value identifying the deployment. | +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateWorkloadDeploymentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **workloadDeploymentRequest** | [**WorkloadDeploymentRequest**](WorkloadDeploymentRequest.md) | | + +### Return type + +[**WorkloadDeploymentResponse**](WorkloadDeploymentResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/WorkloadRequest.md b/azion-api/docs/WorkloadRequest.md new file mode 100644 index 0000000..c9682a1 --- /dev/null +++ b/azion-api/docs/WorkloadRequest.md @@ -0,0 +1,233 @@ +# WorkloadRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Active** | Pointer to **bool** | | [optional] +**Infrastructure** | Pointer to **int64** | * `1` - Production Infrastructure (All Locations) * `2` - Staging Infrastructure | [optional] +**Tls** | Pointer to [**TLSWorkloadRequest**](TLSWorkloadRequest.md) | | [optional] +**Protocols** | Pointer to [**ProtocolsRequest**](ProtocolsRequest.md) | | [optional] +**Mtls** | Pointer to [**MTLSRequest**](MTLSRequest.md) | | [optional] +**Domains** | Pointer to **[]string** | | [optional] +**WorkloadDomainAllowAccess** | Pointer to **bool** | | [optional] + +## Methods + +### NewWorkloadRequest + +`func NewWorkloadRequest(name string, ) *WorkloadRequest` + +NewWorkloadRequest instantiates a new WorkloadRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkloadRequestWithDefaults + +`func NewWorkloadRequestWithDefaults() *WorkloadRequest` + +NewWorkloadRequestWithDefaults instantiates a new WorkloadRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *WorkloadRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WorkloadRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WorkloadRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *WorkloadRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *WorkloadRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *WorkloadRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + +### HasActive + +`func (o *WorkloadRequest) HasActive() bool` + +HasActive returns a boolean if a field has been set. + +### GetInfrastructure + +`func (o *WorkloadRequest) GetInfrastructure() int64` + +GetInfrastructure returns the Infrastructure field if non-nil, zero value otherwise. + +### GetInfrastructureOk + +`func (o *WorkloadRequest) GetInfrastructureOk() (*int64, bool)` + +GetInfrastructureOk returns a tuple with the Infrastructure field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfrastructure + +`func (o *WorkloadRequest) SetInfrastructure(v int64)` + +SetInfrastructure sets Infrastructure field to given value. + +### HasInfrastructure + +`func (o *WorkloadRequest) HasInfrastructure() bool` + +HasInfrastructure returns a boolean if a field has been set. + +### GetTls + +`func (o *WorkloadRequest) GetTls() TLSWorkloadRequest` + +GetTls returns the Tls field if non-nil, zero value otherwise. + +### GetTlsOk + +`func (o *WorkloadRequest) GetTlsOk() (*TLSWorkloadRequest, bool)` + +GetTlsOk returns a tuple with the Tls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTls + +`func (o *WorkloadRequest) SetTls(v TLSWorkloadRequest)` + +SetTls sets Tls field to given value. + +### HasTls + +`func (o *WorkloadRequest) HasTls() bool` + +HasTls returns a boolean if a field has been set. + +### GetProtocols + +`func (o *WorkloadRequest) GetProtocols() ProtocolsRequest` + +GetProtocols returns the Protocols field if non-nil, zero value otherwise. + +### GetProtocolsOk + +`func (o *WorkloadRequest) GetProtocolsOk() (*ProtocolsRequest, bool)` + +GetProtocolsOk returns a tuple with the Protocols field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProtocols + +`func (o *WorkloadRequest) SetProtocols(v ProtocolsRequest)` + +SetProtocols sets Protocols field to given value. + +### HasProtocols + +`func (o *WorkloadRequest) HasProtocols() bool` + +HasProtocols returns a boolean if a field has been set. + +### GetMtls + +`func (o *WorkloadRequest) GetMtls() MTLSRequest` + +GetMtls returns the Mtls field if non-nil, zero value otherwise. + +### GetMtlsOk + +`func (o *WorkloadRequest) GetMtlsOk() (*MTLSRequest, bool)` + +GetMtlsOk returns a tuple with the Mtls field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMtls + +`func (o *WorkloadRequest) SetMtls(v MTLSRequest)` + +SetMtls sets Mtls field to given value. + +### HasMtls + +`func (o *WorkloadRequest) HasMtls() bool` + +HasMtls returns a boolean if a field has been set. + +### GetDomains + +`func (o *WorkloadRequest) GetDomains() []string` + +GetDomains returns the Domains field if non-nil, zero value otherwise. + +### GetDomainsOk + +`func (o *WorkloadRequest) GetDomainsOk() (*[]string, bool)` + +GetDomainsOk returns a tuple with the Domains field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomains + +`func (o *WorkloadRequest) SetDomains(v []string)` + +SetDomains sets Domains field to given value. + +### HasDomains + +`func (o *WorkloadRequest) HasDomains() bool` + +HasDomains returns a boolean if a field has been set. + +### GetWorkloadDomainAllowAccess + +`func (o *WorkloadRequest) GetWorkloadDomainAllowAccess() bool` + +GetWorkloadDomainAllowAccess returns the WorkloadDomainAllowAccess field if non-nil, zero value otherwise. + +### GetWorkloadDomainAllowAccessOk + +`func (o *WorkloadRequest) GetWorkloadDomainAllowAccessOk() (*bool, bool)` + +GetWorkloadDomainAllowAccessOk returns a tuple with the WorkloadDomainAllowAccess field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkloadDomainAllowAccess + +`func (o *WorkloadRequest) SetWorkloadDomainAllowAccess(v bool)` + +SetWorkloadDomainAllowAccess sets WorkloadDomainAllowAccess field to given value. + +### HasWorkloadDomainAllowAccess + +`func (o *WorkloadRequest) HasWorkloadDomainAllowAccess() bool` + +HasWorkloadDomainAllowAccess returns a boolean if a field has been set. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkloadResponse.md b/azion-api/docs/WorkloadResponse.md new file mode 100644 index 0000000..1f17a7b --- /dev/null +++ b/azion-api/docs/WorkloadResponse.md @@ -0,0 +1,77 @@ +# WorkloadResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Workload**](Workload.md) | | + +## Methods + +### NewWorkloadResponse + +`func NewWorkloadResponse(data Workload, ) *WorkloadResponse` + +NewWorkloadResponse instantiates a new WorkloadResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkloadResponseWithDefaults + +`func NewWorkloadResponseWithDefaults() *WorkloadResponse` + +NewWorkloadResponseWithDefaults instantiates a new WorkloadResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *WorkloadResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *WorkloadResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *WorkloadResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *WorkloadResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *WorkloadResponse) GetData() Workload` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *WorkloadResponse) GetDataOk() (*Workload, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *WorkloadResponse) SetData(v Workload)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkloadsAPI.md b/azion-api/docs/WorkloadsAPI.md new file mode 100644 index 0000000..e913def --- /dev/null +++ b/azion-api/docs/WorkloadsAPI.md @@ -0,0 +1,461 @@ +# \WorkloadsAPI + +All URIs are relative to *https://stage-api.azion.com/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateWorkload**](WorkloadsAPI.md#CreateWorkload) | **Post** /workspace/workloads | Create an Workload +[**DeleteWorkload**](WorkloadsAPI.md#DeleteWorkload) | **Delete** /workspace/workloads/{workload_id} | Delete an Workload +[**ListWorkloads**](WorkloadsAPI.md#ListWorkloads) | **Get** /workspace/workloads | List Workloads +[**PartialUpdateWorkload**](WorkloadsAPI.md#PartialUpdateWorkload) | **Patch** /workspace/workloads/{workload_id} | Partially update an Workload +[**RetrieveWorkload**](WorkloadsAPI.md#RetrieveWorkload) | **Get** /workspace/workloads/{workload_id} | Retrieve details of an Workload +[**UpdateWorkload**](WorkloadsAPI.md#UpdateWorkload) | **Put** /workspace/workloads/{workload_id} | Update an Workload + + + +## CreateWorkload + +> WorkloadResponse CreateWorkload(ctx).WorkloadRequest(workloadRequest).Execute() + +Create an Workload + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadRequest := *openapiclient.NewWorkloadRequest("Name_example") // WorkloadRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadsAPI.CreateWorkload(context.Background()).WorkloadRequest(workloadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadsAPI.CreateWorkload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `CreateWorkload`: WorkloadResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadsAPI.CreateWorkload`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateWorkloadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workloadRequest** | [**WorkloadRequest**](WorkloadRequest.md) | | + +### Return type + +[**WorkloadResponse**](WorkloadResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## DeleteWorkload + +> DeleteResponse DeleteWorkload(ctx, workloadId).Execute() + +Delete an Workload + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadsAPI.DeleteWorkload(context.Background(), workloadId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadsAPI.DeleteWorkload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DeleteWorkload`: DeleteResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadsAPI.DeleteWorkload`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteWorkloadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**DeleteResponse**](DeleteResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ListWorkloads + +> PaginatedWorkloadList ListWorkloads(ctx).Active(active).DigitalCertificateId(digitalCertificateId).Fields(fields).Id(id).Infrastructure(infrastructure).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).MapName(mapName).MtlsTrustedCaCertificateId(mtlsTrustedCaCertificateId).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + +List Workloads + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + active := true // bool | Filter by active status. (optional) + digitalCertificateId := int64(789) // int64 | Filter by digital certificate id (accepts comma-separated values). (optional) + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + id := int64(789) // int64 | Filter by id (accepts comma-separated values). (optional) + infrastructure := "infrastructure_example" // string | Filter by infrastructure (accepts comma-separated values). (optional) + lastEditor := "lastEditor_example" // string | Filter by last editor (case-insensitive, partial match). (optional) + lastModifiedGte := time.Now() // time.Time | Filter by last modified date (greater than or equal). (optional) + lastModifiedLte := time.Now() // time.Time | Filter by last modified date (less than or equal). (optional) + mapName := "mapName_example" // string | Filter by map name (case-insensitive, partial match). (optional) + mtlsTrustedCaCertificateId := int64(789) // int64 | Filter by mTLS trusted CA certificate id (accepts comma-separated values). (optional) + name := "name_example" // string | Filter by name (case-insensitive, partial match). (optional) + ordering := "ordering_example" // string | Which field to use when ordering the results. (optional) + page := int32(56) // int32 | A page number within the paginated result set. (optional) + pageSize := int32(56) // int32 | A numeric value that indicates the number of items per page. (optional) + search := "search_example" // string | A search term. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadsAPI.ListWorkloads(context.Background()).Active(active).DigitalCertificateId(digitalCertificateId).Fields(fields).Id(id).Infrastructure(infrastructure).LastEditor(lastEditor).LastModifiedGte(lastModifiedGte).LastModifiedLte(lastModifiedLte).MapName(mapName).MtlsTrustedCaCertificateId(mtlsTrustedCaCertificateId).Name(name).Ordering(ordering).Page(page).PageSize(pageSize).Search(search).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadsAPI.ListWorkloads``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ListWorkloads`: PaginatedWorkloadList + fmt.Fprintf(os.Stdout, "Response from `WorkloadsAPI.ListWorkloads`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiListWorkloadsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **active** | **bool** | Filter by active status. | + **digitalCertificateId** | **int64** | Filter by digital certificate id (accepts comma-separated values). | + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + **id** | **int64** | Filter by id (accepts comma-separated values). | + **infrastructure** | **string** | Filter by infrastructure (accepts comma-separated values). | + **lastEditor** | **string** | Filter by last editor (case-insensitive, partial match). | + **lastModifiedGte** | **time.Time** | Filter by last modified date (greater than or equal). | + **lastModifiedLte** | **time.Time** | Filter by last modified date (less than or equal). | + **mapName** | **string** | Filter by map name (case-insensitive, partial match). | + **mtlsTrustedCaCertificateId** | **int64** | Filter by mTLS trusted CA certificate id (accepts comma-separated values). | + **name** | **string** | Filter by name (case-insensitive, partial match). | + **ordering** | **string** | Which field to use when ordering the results. | + **page** | **int32** | A page number within the paginated result set. | + **pageSize** | **int32** | A numeric value that indicates the number of items per page. | + **search** | **string** | A search term. | + +### Return type + +[**PaginatedWorkloadList**](PaginatedWorkloadList.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## PartialUpdateWorkload + +> WorkloadResponse PartialUpdateWorkload(ctx, workloadId).PatchedWorkloadRequest(patchedWorkloadRequest).Execute() + +Partially update an Workload + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + patchedWorkloadRequest := *openapiclient.NewPatchedWorkloadRequest() // PatchedWorkloadRequest | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadsAPI.PartialUpdateWorkload(context.Background(), workloadId).PatchedWorkloadRequest(patchedWorkloadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadsAPI.PartialUpdateWorkload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `PartialUpdateWorkload`: WorkloadResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadsAPI.PartialUpdateWorkload`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiPartialUpdateWorkloadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **patchedWorkloadRequest** | [**PatchedWorkloadRequest**](PatchedWorkloadRequest.md) | | + +### Return type + +[**WorkloadResponse**](WorkloadResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## RetrieveWorkload + +> WorkloadResponse RetrieveWorkload(ctx, workloadId).Fields(fields).Execute() + +Retrieve details of an Workload + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + fields := "fields_example" // string | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadsAPI.RetrieveWorkload(context.Background(), workloadId).Fields(fields).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadsAPI.RetrieveWorkload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `RetrieveWorkload`: WorkloadResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadsAPI.RetrieveWorkload`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiRetrieveWorkloadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **fields** | **string** | Comma-separated list of field names to include in the response. Nested fields can be accessed using dot notation. | + +### Return type + +[**WorkloadResponse**](WorkloadResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## UpdateWorkload + +> WorkloadResponse UpdateWorkload(ctx, workloadId).WorkloadRequest(workloadRequest).Execute() + +Update an Workload + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + workloadId := int64(789) // int64 | A unique integer value identifying the workload. + workloadRequest := *openapiclient.NewWorkloadRequest("Name_example") // WorkloadRequest | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.WorkloadsAPI.UpdateWorkload(context.Background(), workloadId).WorkloadRequest(workloadRequest).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `WorkloadsAPI.UpdateWorkload``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateWorkload`: WorkloadResponse + fmt.Fprintf(os.Stdout, "Response from `WorkloadsAPI.UpdateWorkload`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**workloadId** | **int64** | A unique integer value identifying the workload. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateWorkloadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **workloadRequest** | [**WorkloadRequest**](WorkloadRequest.md) | | + +### Return type + +[**WorkloadResponse**](WorkloadResponse.md) + +### Authorization + +[TokenAuth](../README.md#TokenAuth), [BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/azion-api/docs/Workspace.md b/azion-api/docs/Workspace.md new file mode 100644 index 0000000..ed81bdc --- /dev/null +++ b/azion-api/docs/Workspace.md @@ -0,0 +1,240 @@ +# Workspace + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Active** | **bool** | | +**LastEditor** | **string** | | +**LastModified** | **time.Time** | | +**ParentId** | **int64** | | +**Created** | **time.Time** | | +**Info** | **map[string]interface{}** | | +**WorkspaceId** | **string** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewWorkspace + +`func NewWorkspace(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, workspaceId string, type_ string, ) *Workspace` + +NewWorkspace instantiates a new Workspace object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkspaceWithDefaults + +`func NewWorkspaceWithDefaults() *Workspace` + +NewWorkspaceWithDefaults instantiates a new Workspace object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Workspace) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Workspace) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Workspace) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Workspace) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Workspace) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Workspace) SetName(v string)` + +SetName sets Name field to given value. + + +### GetActive + +`func (o *Workspace) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Workspace) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Workspace) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetLastEditor + +`func (o *Workspace) GetLastEditor() string` + +GetLastEditor returns the LastEditor field if non-nil, zero value otherwise. + +### GetLastEditorOk + +`func (o *Workspace) GetLastEditorOk() (*string, bool)` + +GetLastEditorOk returns a tuple with the LastEditor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastEditor + +`func (o *Workspace) SetLastEditor(v string)` + +SetLastEditor sets LastEditor field to given value. + + +### GetLastModified + +`func (o *Workspace) GetLastModified() time.Time` + +GetLastModified returns the LastModified field if non-nil, zero value otherwise. + +### GetLastModifiedOk + +`func (o *Workspace) GetLastModifiedOk() (*time.Time, bool)` + +GetLastModifiedOk returns a tuple with the LastModified field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLastModified + +`func (o *Workspace) SetLastModified(v time.Time)` + +SetLastModified sets LastModified field to given value. + + +### GetParentId + +`func (o *Workspace) GetParentId() int64` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *Workspace) GetParentIdOk() (*int64, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *Workspace) SetParentId(v int64)` + +SetParentId sets ParentId field to given value. + + +### GetCreated + +`func (o *Workspace) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Workspace) GetCreatedOk() (*time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreated + +`func (o *Workspace) SetCreated(v time.Time)` + +SetCreated sets Created field to given value. + + +### GetInfo + +`func (o *Workspace) GetInfo() map[string]interface{}` + +GetInfo returns the Info field if non-nil, zero value otherwise. + +### GetInfoOk + +`func (o *Workspace) GetInfoOk() (*map[string]interface{}, bool)` + +GetInfoOk returns a tuple with the Info field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetInfo + +`func (o *Workspace) SetInfo(v map[string]interface{})` + +SetInfo sets Info field to given value. + + +### GetWorkspaceId + +`func (o *Workspace) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *Workspace) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *Workspace) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + +### GetType + +`func (o *Workspace) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *Workspace) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *Workspace) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/WorkspaceRequest.md b/azion-api/docs/WorkspaceRequest.md new file mode 100644 index 0000000..17accdb --- /dev/null +++ b/azion-api/docs/WorkspaceRequest.md @@ -0,0 +1,72 @@ +# WorkspaceRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Type** | **string** | * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace | + +## Methods + +### NewWorkspaceRequest + +`func NewWorkspaceRequest(name string, type_ string, ) *WorkspaceRequest` + +NewWorkspaceRequest instantiates a new WorkspaceRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewWorkspaceRequestWithDefaults + +`func NewWorkspaceRequestWithDefaults() *WorkspaceRequest` + +NewWorkspaceRequestWithDefaults instantiates a new WorkspaceRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *WorkspaceRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *WorkspaceRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *WorkspaceRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetType + +`func (o *WorkspaceRequest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *WorkspaceRequest) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *WorkspaceRequest) SetType(v string)` + +SetType sets Type field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/Zone.md b/azion-api/docs/Zone.md new file mode 100644 index 0000000..7bf34c9 --- /dev/null +++ b/azion-api/docs/Zone.md @@ -0,0 +1,156 @@ +# Zone + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Name** | **string** | | +**Domain** | **string** | | +**Active** | **bool** | | +**Nameservers** | **[]string** | | +**ProductVersion** | **string** | | + +## Methods + +### NewZone + +`func NewZone(id int64, name string, domain string, active bool, nameservers []string, productVersion string, ) *Zone` + +NewZone instantiates a new Zone object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewZoneWithDefaults + +`func NewZoneWithDefaults() *Zone` + +NewZoneWithDefaults instantiates a new Zone object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *Zone) GetId() int64` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Zone) GetIdOk() (*int64, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *Zone) SetId(v int64)` + +SetId sets Id field to given value. + + +### GetName + +`func (o *Zone) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Zone) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *Zone) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDomain + +`func (o *Zone) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *Zone) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *Zone) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetActive + +`func (o *Zone) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *Zone) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *Zone) SetActive(v bool)` + +SetActive sets Active field to given value. + + +### GetNameservers + +`func (o *Zone) GetNameservers() []string` + +GetNameservers returns the Nameservers field if non-nil, zero value otherwise. + +### GetNameserversOk + +`func (o *Zone) GetNameserversOk() (*[]string, bool)` + +GetNameserversOk returns a tuple with the Nameservers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNameservers + +`func (o *Zone) SetNameservers(v []string)` + +SetNameservers sets Nameservers field to given value. + + +### GetProductVersion + +`func (o *Zone) GetProductVersion() string` + +GetProductVersion returns the ProductVersion field if non-nil, zero value otherwise. + +### GetProductVersionOk + +`func (o *Zone) GetProductVersionOk() (*string, bool)` + +GetProductVersionOk returns a tuple with the ProductVersion field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetProductVersion + +`func (o *Zone) SetProductVersion(v string)` + +SetProductVersion sets ProductVersion field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ZoneRequest.md b/azion-api/docs/ZoneRequest.md new file mode 100644 index 0000000..6de88e9 --- /dev/null +++ b/azion-api/docs/ZoneRequest.md @@ -0,0 +1,93 @@ +# ZoneRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Domain** | **string** | | +**Active** | **bool** | | + +## Methods + +### NewZoneRequest + +`func NewZoneRequest(name string, domain string, active bool, ) *ZoneRequest` + +NewZoneRequest instantiates a new ZoneRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewZoneRequestWithDefaults + +`func NewZoneRequestWithDefaults() *ZoneRequest` + +NewZoneRequestWithDefaults instantiates a new ZoneRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetName + +`func (o *ZoneRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ZoneRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ZoneRequest) SetName(v string)` + +SetName sets Name field to given value. + + +### GetDomain + +`func (o *ZoneRequest) GetDomain() string` + +GetDomain returns the Domain field if non-nil, zero value otherwise. + +### GetDomainOk + +`func (o *ZoneRequest) GetDomainOk() (*string, bool)` + +GetDomainOk returns a tuple with the Domain field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDomain + +`func (o *ZoneRequest) SetDomain(v string)` + +SetDomain sets Domain field to given value. + + +### GetActive + +`func (o *ZoneRequest) GetActive() bool` + +GetActive returns the Active field if non-nil, zero value otherwise. + +### GetActiveOk + +`func (o *ZoneRequest) GetActiveOk() (*bool, bool)` + +GetActiveOk returns a tuple with the Active field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActive + +`func (o *ZoneRequest) SetActive(v bool)` + +SetActive sets Active field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/docs/ZoneResponse.md b/azion-api/docs/ZoneResponse.md new file mode 100644 index 0000000..8ac08a8 --- /dev/null +++ b/azion-api/docs/ZoneResponse.md @@ -0,0 +1,77 @@ +# ZoneResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | Pointer to **string** | | [optional] +**Data** | [**Zone**](Zone.md) | | + +## Methods + +### NewZoneResponse + +`func NewZoneResponse(data Zone, ) *ZoneResponse` + +NewZoneResponse instantiates a new ZoneResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewZoneResponseWithDefaults + +`func NewZoneResponseWithDefaults() *ZoneResponse` + +NewZoneResponseWithDefaults instantiates a new ZoneResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetState + +`func (o *ZoneResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ZoneResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ZoneResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *ZoneResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetData + +`func (o *ZoneResponse) GetData() Zone` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ZoneResponse) GetDataOk() (*Zone, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ZoneResponse) SetData(v Zone)` + +SetData sets Data field to given value. + + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/azion-api/git_push.sh b/azion-api/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/azion-api/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/azion-api/model_account.go b/azion-api/model_account.go new file mode 100644 index 0000000..41234d7 --- /dev/null +++ b/azion-api/model_account.go @@ -0,0 +1,248 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// Account - struct for Account +type Account struct { + Brand *Brand + Organization *Organization + Reseller *Reseller + Workspace *Workspace +} + +// BrandAsAccount is a convenience function that returns Brand wrapped in Account +func BrandAsAccount(v *Brand) Account { + return Account{ + Brand: v, + } +} + +// OrganizationAsAccount is a convenience function that returns Organization wrapped in Account +func OrganizationAsAccount(v *Organization) Account { + return Account{ + Organization: v, + } +} + +// ResellerAsAccount is a convenience function that returns Reseller wrapped in Account +func ResellerAsAccount(v *Reseller) Account { + return Account{ + Reseller: v, + } +} + +// WorkspaceAsAccount is a convenience function that returns Workspace wrapped in Account +func WorkspaceAsAccount(v *Workspace) Account { + return Account{ + Workspace: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Account) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Brand + err = newStrictDecoder(data).Decode(&dst.Brand) + if err == nil { + jsonBrand, _ := json.Marshal(dst.Brand) + if string(jsonBrand) == "{}" { // empty struct + dst.Brand = nil + } else { + if err = validator.Validate(dst.Brand); err != nil { + dst.Brand = nil + } else { + match++ + } + } + } else { + dst.Brand = nil + } + + // try to unmarshal data into Organization + err = newStrictDecoder(data).Decode(&dst.Organization) + if err == nil { + jsonOrganization, _ := json.Marshal(dst.Organization) + if string(jsonOrganization) == "{}" { // empty struct + dst.Organization = nil + } else { + if err = validator.Validate(dst.Organization); err != nil { + dst.Organization = nil + } else { + match++ + } + } + } else { + dst.Organization = nil + } + + // try to unmarshal data into Reseller + err = newStrictDecoder(data).Decode(&dst.Reseller) + if err == nil { + jsonReseller, _ := json.Marshal(dst.Reseller) + if string(jsonReseller) == "{}" { // empty struct + dst.Reseller = nil + } else { + if err = validator.Validate(dst.Reseller); err != nil { + dst.Reseller = nil + } else { + match++ + } + } + } else { + dst.Reseller = nil + } + + // try to unmarshal data into Workspace + err = newStrictDecoder(data).Decode(&dst.Workspace) + if err == nil { + jsonWorkspace, _ := json.Marshal(dst.Workspace) + if string(jsonWorkspace) == "{}" { // empty struct + dst.Workspace = nil + } else { + if err = validator.Validate(dst.Workspace); err != nil { + dst.Workspace = nil + } else { + match++ + } + } + } else { + dst.Workspace = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Brand = nil + dst.Organization = nil + dst.Reseller = nil + dst.Workspace = nil + + return fmt.Errorf("data matches more than one schema in oneOf(Account)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(Account)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Account) MarshalJSON() ([]byte, error) { + if src.Brand != nil { + return json.Marshal(&src.Brand) + } + + if src.Organization != nil { + return json.Marshal(&src.Organization) + } + + if src.Reseller != nil { + return json.Marshal(&src.Reseller) + } + + if src.Workspace != nil { + return json.Marshal(&src.Workspace) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Account) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Brand != nil { + return obj.Brand + } + + if obj.Organization != nil { + return obj.Organization + } + + if obj.Reseller != nil { + return obj.Reseller + } + + if obj.Workspace != nil { + return obj.Workspace + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj Account) GetActualInstanceValue() (interface{}) { + if obj.Brand != nil { + return *obj.Brand + } + + if obj.Organization != nil { + return *obj.Organization + } + + if obj.Reseller != nil { + return *obj.Reseller + } + + if obj.Workspace != nil { + return *obj.Workspace + } + + // all schemas are nil + return nil +} + +type NullableAccount struct { + value *Account + isSet bool +} + +func (v NullableAccount) Get() *Account { + return v.value +} + +func (v *NullableAccount) Set(val *Account) { + v.value = val + v.isSet = true +} + +func (v NullableAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccount(val *Account) *NullableAccount { + return &NullableAccount{value: val, isSet: true} +} + +func (v NullableAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_account_info.go b/azion-api/model_account_info.go new file mode 100644 index 0000000..98a3f76 --- /dev/null +++ b/azion-api/model_account_info.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AccountInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccountInfo{} + +// AccountInfo struct for AccountInfo +type AccountInfo struct { + Info map[string]interface{} `json:"info"` +} + +type _AccountInfo AccountInfo + +// NewAccountInfo instantiates a new AccountInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccountInfo(info map[string]interface{}) *AccountInfo { + this := AccountInfo{} + this.Info = info + return &this +} + +// NewAccountInfoWithDefaults instantiates a new AccountInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccountInfoWithDefaults() *AccountInfo { + this := AccountInfo{} + return &this +} + +// GetInfo returns the Info field value +// If the value is explicit nil, the zero value for map[string]interface{} will be returned +func (o *AccountInfo) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AccountInfo) GetInfoOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Info) { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *AccountInfo) SetInfo(v map[string]interface{}) { + o.Info = v +} + +func (o AccountInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Info != nil { + toSerialize["info"] = o.Info + } + return toSerialize, nil +} + +func (o *AccountInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "info", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAccountInfo := _AccountInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAccountInfo) + + if err != nil { + return err + } + + *o = AccountInfo(varAccountInfo) + + return err +} + +type NullableAccountInfo struct { + value *AccountInfo + isSet bool +} + +func (v NullableAccountInfo) Get() *AccountInfo { + return v.value +} + +func (v *NullableAccountInfo) Set(val *AccountInfo) { + v.value = val + v.isSet = true +} + +func (v NullableAccountInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountInfo(val *AccountInfo) *NullableAccountInfo { + return &NullableAccountInfo{value: val, isSet: true} +} + +func (v NullableAccountInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_account_info_request.go b/azion-api/model_account_info_request.go new file mode 100644 index 0000000..4f0e2fc --- /dev/null +++ b/azion-api/model_account_info_request.go @@ -0,0 +1,165 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the AccountInfoRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AccountInfoRequest{} + +// AccountInfoRequest struct for AccountInfoRequest +type AccountInfoRequest struct { + // The industry type. Common values: Education, Energy, Finance, Games, Health, Media, Public Sector, Retail, Services, Technology, Telecom, Transportation, Other. + Industry *string `json:"industry,omitempty"` + // The size of the company. Must be an integer greater than or equal to 1. + CompanySize *int64 `json:"company_size,omitempty"` +} + +// NewAccountInfoRequest instantiates a new AccountInfoRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAccountInfoRequest() *AccountInfoRequest { + this := AccountInfoRequest{} + return &this +} + +// NewAccountInfoRequestWithDefaults instantiates a new AccountInfoRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAccountInfoRequestWithDefaults() *AccountInfoRequest { + this := AccountInfoRequest{} + return &this +} + +// GetIndustry returns the Industry field value if set, zero value otherwise. +func (o *AccountInfoRequest) GetIndustry() string { + if o == nil || IsNil(o.Industry) { + var ret string + return ret + } + return *o.Industry +} + +// GetIndustryOk returns a tuple with the Industry field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountInfoRequest) GetIndustryOk() (*string, bool) { + if o == nil || IsNil(o.Industry) { + return nil, false + } + return o.Industry, true +} + +// HasIndustry returns a boolean if a field has been set. +func (o *AccountInfoRequest) HasIndustry() bool { + if o != nil && !IsNil(o.Industry) { + return true + } + + return false +} + +// SetIndustry gets a reference to the given string and assigns it to the Industry field. +func (o *AccountInfoRequest) SetIndustry(v string) { + o.Industry = &v +} + +// GetCompanySize returns the CompanySize field value if set, zero value otherwise. +func (o *AccountInfoRequest) GetCompanySize() int64 { + if o == nil || IsNil(o.CompanySize) { + var ret int64 + return ret + } + return *o.CompanySize +} + +// GetCompanySizeOk returns a tuple with the CompanySize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AccountInfoRequest) GetCompanySizeOk() (*int64, bool) { + if o == nil || IsNil(o.CompanySize) { + return nil, false + } + return o.CompanySize, true +} + +// HasCompanySize returns a boolean if a field has been set. +func (o *AccountInfoRequest) HasCompanySize() bool { + if o != nil && !IsNil(o.CompanySize) { + return true + } + + return false +} + +// SetCompanySize gets a reference to the given int64 and assigns it to the CompanySize field. +func (o *AccountInfoRequest) SetCompanySize(v int64) { + o.CompanySize = &v +} + +func (o AccountInfoRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AccountInfoRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Industry) { + toSerialize["industry"] = o.Industry + } + if !IsNil(o.CompanySize) { + toSerialize["company_size"] = o.CompanySize + } + return toSerialize, nil +} + +type NullableAccountInfoRequest struct { + value *AccountInfoRequest + isSet bool +} + +func (v NullableAccountInfoRequest) Get() *AccountInfoRequest { + return v.value +} + +func (v *NullableAccountInfoRequest) Set(val *AccountInfoRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAccountInfoRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountInfoRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountInfoRequest(val *AccountInfoRequest) *NullableAccountInfoRequest { + return &NullableAccountInfoRequest{value: val, isSet: true} +} + +func (v NullableAccountInfoRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountInfoRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_account_request.go b/azion-api/model_account_request.go new file mode 100644 index 0000000..a1028cd --- /dev/null +++ b/azion-api/model_account_request.go @@ -0,0 +1,248 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// AccountRequest - struct for AccountRequest +type AccountRequest struct { + BrandRequest *BrandRequest + OrganizationRequest *OrganizationRequest + ResellerRequest *ResellerRequest + WorkspaceRequest *WorkspaceRequest +} + +// BrandRequestAsAccountRequest is a convenience function that returns BrandRequest wrapped in AccountRequest +func BrandRequestAsAccountRequest(v *BrandRequest) AccountRequest { + return AccountRequest{ + BrandRequest: v, + } +} + +// OrganizationRequestAsAccountRequest is a convenience function that returns OrganizationRequest wrapped in AccountRequest +func OrganizationRequestAsAccountRequest(v *OrganizationRequest) AccountRequest { + return AccountRequest{ + OrganizationRequest: v, + } +} + +// ResellerRequestAsAccountRequest is a convenience function that returns ResellerRequest wrapped in AccountRequest +func ResellerRequestAsAccountRequest(v *ResellerRequest) AccountRequest { + return AccountRequest{ + ResellerRequest: v, + } +} + +// WorkspaceRequestAsAccountRequest is a convenience function that returns WorkspaceRequest wrapped in AccountRequest +func WorkspaceRequestAsAccountRequest(v *WorkspaceRequest) AccountRequest { + return AccountRequest{ + WorkspaceRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *AccountRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BrandRequest + err = newStrictDecoder(data).Decode(&dst.BrandRequest) + if err == nil { + jsonBrandRequest, _ := json.Marshal(dst.BrandRequest) + if string(jsonBrandRequest) == "{}" { // empty struct + dst.BrandRequest = nil + } else { + if err = validator.Validate(dst.BrandRequest); err != nil { + dst.BrandRequest = nil + } else { + match++ + } + } + } else { + dst.BrandRequest = nil + } + + // try to unmarshal data into OrganizationRequest + err = newStrictDecoder(data).Decode(&dst.OrganizationRequest) + if err == nil { + jsonOrganizationRequest, _ := json.Marshal(dst.OrganizationRequest) + if string(jsonOrganizationRequest) == "{}" { // empty struct + dst.OrganizationRequest = nil + } else { + if err = validator.Validate(dst.OrganizationRequest); err != nil { + dst.OrganizationRequest = nil + } else { + match++ + } + } + } else { + dst.OrganizationRequest = nil + } + + // try to unmarshal data into ResellerRequest + err = newStrictDecoder(data).Decode(&dst.ResellerRequest) + if err == nil { + jsonResellerRequest, _ := json.Marshal(dst.ResellerRequest) + if string(jsonResellerRequest) == "{}" { // empty struct + dst.ResellerRequest = nil + } else { + if err = validator.Validate(dst.ResellerRequest); err != nil { + dst.ResellerRequest = nil + } else { + match++ + } + } + } else { + dst.ResellerRequest = nil + } + + // try to unmarshal data into WorkspaceRequest + err = newStrictDecoder(data).Decode(&dst.WorkspaceRequest) + if err == nil { + jsonWorkspaceRequest, _ := json.Marshal(dst.WorkspaceRequest) + if string(jsonWorkspaceRequest) == "{}" { // empty struct + dst.WorkspaceRequest = nil + } else { + if err = validator.Validate(dst.WorkspaceRequest); err != nil { + dst.WorkspaceRequest = nil + } else { + match++ + } + } + } else { + dst.WorkspaceRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BrandRequest = nil + dst.OrganizationRequest = nil + dst.ResellerRequest = nil + dst.WorkspaceRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(AccountRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(AccountRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src AccountRequest) MarshalJSON() ([]byte, error) { + if src.BrandRequest != nil { + return json.Marshal(&src.BrandRequest) + } + + if src.OrganizationRequest != nil { + return json.Marshal(&src.OrganizationRequest) + } + + if src.ResellerRequest != nil { + return json.Marshal(&src.ResellerRequest) + } + + if src.WorkspaceRequest != nil { + return json.Marshal(&src.WorkspaceRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *AccountRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.BrandRequest != nil { + return obj.BrandRequest + } + + if obj.OrganizationRequest != nil { + return obj.OrganizationRequest + } + + if obj.ResellerRequest != nil { + return obj.ResellerRequest + } + + if obj.WorkspaceRequest != nil { + return obj.WorkspaceRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj AccountRequest) GetActualInstanceValue() (interface{}) { + if obj.BrandRequest != nil { + return *obj.BrandRequest + } + + if obj.OrganizationRequest != nil { + return *obj.OrganizationRequest + } + + if obj.ResellerRequest != nil { + return *obj.ResellerRequest + } + + if obj.WorkspaceRequest != nil { + return *obj.WorkspaceRequest + } + + // all schemas are nil + return nil +} + +type NullableAccountRequest struct { + value *AccountRequest + isSet bool +} + +func (v NullableAccountRequest) Get() *AccountRequest { + return v.value +} + +func (v *NullableAccountRequest) Set(val *AccountRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAccountRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAccountRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAccountRequest(val *AccountRequest) *NullableAccountRequest { + return &NullableAccountRequest{value: val, isSet: true} +} + +func (v NullableAccountRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAccountRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_address.go b/azion-api/model_address.go new file mode 100644 index 0000000..677d753 --- /dev/null +++ b/azion-api/model_address.go @@ -0,0 +1,317 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Address type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Address{} + +// Address struct for Address +type Address struct { + // Indicates if the address is active for use + Active *bool `json:"active,omitempty"` + // IPv4/IPv6 address or CNAME to resolve + Address string `json:"address"` + // Port number for HTTP connections + HttpPort *int64 `json:"http_port,omitempty"` + // Port number for HTTPS connections + HttpsPort *int64 `json:"https_port,omitempty"` + Modules NullableAddressModules `json:"modules,omitempty"` +} + +type _Address Address + +// NewAddress instantiates a new Address object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddress(address string) *Address { + this := Address{} + this.Address = address + return &this +} + +// NewAddressWithDefaults instantiates a new Address object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddressWithDefaults() *Address { + this := Address{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Address) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Address) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Address) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Address) SetActive(v bool) { + o.Active = &v +} + +// GetAddress returns the Address field value +func (o *Address) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *Address) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *Address) SetAddress(v string) { + o.Address = v +} + +// GetHttpPort returns the HttpPort field value if set, zero value otherwise. +func (o *Address) GetHttpPort() int64 { + if o == nil || IsNil(o.HttpPort) { + var ret int64 + return ret + } + return *o.HttpPort +} + +// GetHttpPortOk returns a tuple with the HttpPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Address) GetHttpPortOk() (*int64, bool) { + if o == nil || IsNil(o.HttpPort) { + return nil, false + } + return o.HttpPort, true +} + +// HasHttpPort returns a boolean if a field has been set. +func (o *Address) HasHttpPort() bool { + if o != nil && !IsNil(o.HttpPort) { + return true + } + + return false +} + +// SetHttpPort gets a reference to the given int64 and assigns it to the HttpPort field. +func (o *Address) SetHttpPort(v int64) { + o.HttpPort = &v +} + +// GetHttpsPort returns the HttpsPort field value if set, zero value otherwise. +func (o *Address) GetHttpsPort() int64 { + if o == nil || IsNil(o.HttpsPort) { + var ret int64 + return ret + } + return *o.HttpsPort +} + +// GetHttpsPortOk returns a tuple with the HttpsPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Address) GetHttpsPortOk() (*int64, bool) { + if o == nil || IsNil(o.HttpsPort) { + return nil, false + } + return o.HttpsPort, true +} + +// HasHttpsPort returns a boolean if a field has been set. +func (o *Address) HasHttpsPort() bool { + if o != nil && !IsNil(o.HttpsPort) { + return true + } + + return false +} + +// SetHttpsPort gets a reference to the given int64 and assigns it to the HttpsPort field. +func (o *Address) SetHttpsPort(v int64) { + o.HttpsPort = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Address) GetModules() AddressModules { + if o == nil || IsNil(o.Modules.Get()) { + var ret AddressModules + return ret + } + return *o.Modules.Get() +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Address) GetModulesOk() (*AddressModules, bool) { + if o == nil { + return nil, false + } + return o.Modules.Get(), o.Modules.IsSet() +} + +// HasModules returns a boolean if a field has been set. +func (o *Address) HasModules() bool { + if o != nil && o.Modules.IsSet() { + return true + } + + return false +} + +// SetModules gets a reference to the given NullableAddressModules and assigns it to the Modules field. +func (o *Address) SetModules(v AddressModules) { + o.Modules.Set(&v) +} +// SetModulesNil sets the value for Modules to be an explicit nil +func (o *Address) SetModulesNil() { + o.Modules.Set(nil) +} + +// UnsetModules ensures that no value is present for Modules, not even an explicit nil +func (o *Address) UnsetModules() { + o.Modules.Unset() +} + +func (o Address) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Address) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["address"] = o.Address + if !IsNil(o.HttpPort) { + toSerialize["http_port"] = o.HttpPort + } + if !IsNil(o.HttpsPort) { + toSerialize["https_port"] = o.HttpsPort + } + if o.Modules.IsSet() { + toSerialize["modules"] = o.Modules.Get() + } + return toSerialize, nil +} + +func (o *Address) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddress := _Address{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddress) + + if err != nil { + return err + } + + *o = Address(varAddress) + + return err +} + +type NullableAddress struct { + value *Address + isSet bool +} + +func (v NullableAddress) Get() *Address { + return v.value +} + +func (v *NullableAddress) Set(val *Address) { + v.value = val + v.isSet = true +} + +func (v NullableAddress) IsSet() bool { + return v.isSet +} + +func (v *NullableAddress) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddress(val *Address) *NullableAddress { + return &NullableAddress{value: val, isSet: true} +} + +func (v NullableAddress) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddress) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_address_load_balancer_module.go b/azion-api/model_address_load_balancer_module.go new file mode 100644 index 0000000..100f9cb --- /dev/null +++ b/azion-api/model_address_load_balancer_module.go @@ -0,0 +1,165 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the AddressLoadBalancerModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddressLoadBalancerModule{} + +// AddressLoadBalancerModule struct for AddressLoadBalancerModule +type AddressLoadBalancerModule struct { + // Role of the address in load balancing * `primary` - Primary * `backup` - Backup + ServerRole *string `json:"server_role,omitempty"` + // Weight used in load balancing strategy + Weight *int64 `json:"weight,omitempty"` +} + +// NewAddressLoadBalancerModule instantiates a new AddressLoadBalancerModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddressLoadBalancerModule() *AddressLoadBalancerModule { + this := AddressLoadBalancerModule{} + return &this +} + +// NewAddressLoadBalancerModuleWithDefaults instantiates a new AddressLoadBalancerModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddressLoadBalancerModuleWithDefaults() *AddressLoadBalancerModule { + this := AddressLoadBalancerModule{} + return &this +} + +// GetServerRole returns the ServerRole field value if set, zero value otherwise. +func (o *AddressLoadBalancerModule) GetServerRole() string { + if o == nil || IsNil(o.ServerRole) { + var ret string + return ret + } + return *o.ServerRole +} + +// GetServerRoleOk returns a tuple with the ServerRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressLoadBalancerModule) GetServerRoleOk() (*string, bool) { + if o == nil || IsNil(o.ServerRole) { + return nil, false + } + return o.ServerRole, true +} + +// HasServerRole returns a boolean if a field has been set. +func (o *AddressLoadBalancerModule) HasServerRole() bool { + if o != nil && !IsNil(o.ServerRole) { + return true + } + + return false +} + +// SetServerRole gets a reference to the given string and assigns it to the ServerRole field. +func (o *AddressLoadBalancerModule) SetServerRole(v string) { + o.ServerRole = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *AddressLoadBalancerModule) GetWeight() int64 { + if o == nil || IsNil(o.Weight) { + var ret int64 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressLoadBalancerModule) GetWeightOk() (*int64, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *AddressLoadBalancerModule) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int64 and assigns it to the Weight field. +func (o *AddressLoadBalancerModule) SetWeight(v int64) { + o.Weight = &v +} + +func (o AddressLoadBalancerModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressLoadBalancerModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ServerRole) { + toSerialize["server_role"] = o.ServerRole + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +type NullableAddressLoadBalancerModule struct { + value *AddressLoadBalancerModule + isSet bool +} + +func (v NullableAddressLoadBalancerModule) Get() *AddressLoadBalancerModule { + return v.value +} + +func (v *NullableAddressLoadBalancerModule) Set(val *AddressLoadBalancerModule) { + v.value = val + v.isSet = true +} + +func (v NullableAddressLoadBalancerModule) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressLoadBalancerModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressLoadBalancerModule(val *AddressLoadBalancerModule) *NullableAddressLoadBalancerModule { + return &NullableAddressLoadBalancerModule{value: val, isSet: true} +} + +func (v NullableAddressLoadBalancerModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressLoadBalancerModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_address_load_balancer_module_request.go b/azion-api/model_address_load_balancer_module_request.go new file mode 100644 index 0000000..46237ac --- /dev/null +++ b/azion-api/model_address_load_balancer_module_request.go @@ -0,0 +1,165 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the AddressLoadBalancerModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddressLoadBalancerModuleRequest{} + +// AddressLoadBalancerModuleRequest struct for AddressLoadBalancerModuleRequest +type AddressLoadBalancerModuleRequest struct { + // Role of the address in load balancing * `primary` - Primary * `backup` - Backup + ServerRole *string `json:"server_role,omitempty"` + // Weight used in load balancing strategy + Weight *int64 `json:"weight,omitempty"` +} + +// NewAddressLoadBalancerModuleRequest instantiates a new AddressLoadBalancerModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddressLoadBalancerModuleRequest() *AddressLoadBalancerModuleRequest { + this := AddressLoadBalancerModuleRequest{} + return &this +} + +// NewAddressLoadBalancerModuleRequestWithDefaults instantiates a new AddressLoadBalancerModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddressLoadBalancerModuleRequestWithDefaults() *AddressLoadBalancerModuleRequest { + this := AddressLoadBalancerModuleRequest{} + return &this +} + +// GetServerRole returns the ServerRole field value if set, zero value otherwise. +func (o *AddressLoadBalancerModuleRequest) GetServerRole() string { + if o == nil || IsNil(o.ServerRole) { + var ret string + return ret + } + return *o.ServerRole +} + +// GetServerRoleOk returns a tuple with the ServerRole field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressLoadBalancerModuleRequest) GetServerRoleOk() (*string, bool) { + if o == nil || IsNil(o.ServerRole) { + return nil, false + } + return o.ServerRole, true +} + +// HasServerRole returns a boolean if a field has been set. +func (o *AddressLoadBalancerModuleRequest) HasServerRole() bool { + if o != nil && !IsNil(o.ServerRole) { + return true + } + + return false +} + +// SetServerRole gets a reference to the given string and assigns it to the ServerRole field. +func (o *AddressLoadBalancerModuleRequest) SetServerRole(v string) { + o.ServerRole = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *AddressLoadBalancerModuleRequest) GetWeight() int64 { + if o == nil || IsNil(o.Weight) { + var ret int64 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressLoadBalancerModuleRequest) GetWeightOk() (*int64, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *AddressLoadBalancerModuleRequest) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int64 and assigns it to the Weight field. +func (o *AddressLoadBalancerModuleRequest) SetWeight(v int64) { + o.Weight = &v +} + +func (o AddressLoadBalancerModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressLoadBalancerModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ServerRole) { + toSerialize["server_role"] = o.ServerRole + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +type NullableAddressLoadBalancerModuleRequest struct { + value *AddressLoadBalancerModuleRequest + isSet bool +} + +func (v NullableAddressLoadBalancerModuleRequest) Get() *AddressLoadBalancerModuleRequest { + return v.value +} + +func (v *NullableAddressLoadBalancerModuleRequest) Set(val *AddressLoadBalancerModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddressLoadBalancerModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressLoadBalancerModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressLoadBalancerModuleRequest(val *AddressLoadBalancerModuleRequest) *NullableAddressLoadBalancerModuleRequest { + return &NullableAddressLoadBalancerModuleRequest{value: val, isSet: true} +} + +func (v NullableAddressLoadBalancerModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressLoadBalancerModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_address_modules.go b/azion-api/model_address_modules.go new file mode 100644 index 0000000..67aba1f --- /dev/null +++ b/azion-api/model_address_modules.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the AddressModules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddressModules{} + +// AddressModules struct for AddressModules +type AddressModules struct { + LoadBalancer *AddressLoadBalancerModule `json:"load_balancer,omitempty"` +} + +// NewAddressModules instantiates a new AddressModules object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddressModules() *AddressModules { + this := AddressModules{} + return &this +} + +// NewAddressModulesWithDefaults instantiates a new AddressModules object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddressModulesWithDefaults() *AddressModules { + this := AddressModules{} + return &this +} + +// GetLoadBalancer returns the LoadBalancer field value if set, zero value otherwise. +func (o *AddressModules) GetLoadBalancer() AddressLoadBalancerModule { + if o == nil || IsNil(o.LoadBalancer) { + var ret AddressLoadBalancerModule + return ret + } + return *o.LoadBalancer +} + +// GetLoadBalancerOk returns a tuple with the LoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressModules) GetLoadBalancerOk() (*AddressLoadBalancerModule, bool) { + if o == nil || IsNil(o.LoadBalancer) { + return nil, false + } + return o.LoadBalancer, true +} + +// HasLoadBalancer returns a boolean if a field has been set. +func (o *AddressModules) HasLoadBalancer() bool { + if o != nil && !IsNil(o.LoadBalancer) { + return true + } + + return false +} + +// SetLoadBalancer gets a reference to the given AddressLoadBalancerModule and assigns it to the LoadBalancer field. +func (o *AddressModules) SetLoadBalancer(v AddressLoadBalancerModule) { + o.LoadBalancer = &v +} + +func (o AddressModules) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressModules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancer) { + toSerialize["load_balancer"] = o.LoadBalancer + } + return toSerialize, nil +} + +type NullableAddressModules struct { + value *AddressModules + isSet bool +} + +func (v NullableAddressModules) Get() *AddressModules { + return v.value +} + +func (v *NullableAddressModules) Set(val *AddressModules) { + v.value = val + v.isSet = true +} + +func (v NullableAddressModules) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressModules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressModules(val *AddressModules) *NullableAddressModules { + return &NullableAddressModules{value: val, isSet: true} +} + +func (v NullableAddressModules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressModules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_address_modules_request.go b/azion-api/model_address_modules_request.go new file mode 100644 index 0000000..6661482 --- /dev/null +++ b/azion-api/model_address_modules_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the AddressModulesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddressModulesRequest{} + +// AddressModulesRequest struct for AddressModulesRequest +type AddressModulesRequest struct { + LoadBalancer *AddressLoadBalancerModuleRequest `json:"load_balancer,omitempty"` +} + +// NewAddressModulesRequest instantiates a new AddressModulesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddressModulesRequest() *AddressModulesRequest { + this := AddressModulesRequest{} + return &this +} + +// NewAddressModulesRequestWithDefaults instantiates a new AddressModulesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddressModulesRequestWithDefaults() *AddressModulesRequest { + this := AddressModulesRequest{} + return &this +} + +// GetLoadBalancer returns the LoadBalancer field value if set, zero value otherwise. +func (o *AddressModulesRequest) GetLoadBalancer() AddressLoadBalancerModuleRequest { + if o == nil || IsNil(o.LoadBalancer) { + var ret AddressLoadBalancerModuleRequest + return ret + } + return *o.LoadBalancer +} + +// GetLoadBalancerOk returns a tuple with the LoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressModulesRequest) GetLoadBalancerOk() (*AddressLoadBalancerModuleRequest, bool) { + if o == nil || IsNil(o.LoadBalancer) { + return nil, false + } + return o.LoadBalancer, true +} + +// HasLoadBalancer returns a boolean if a field has been set. +func (o *AddressModulesRequest) HasLoadBalancer() bool { + if o != nil && !IsNil(o.LoadBalancer) { + return true + } + + return false +} + +// SetLoadBalancer gets a reference to the given AddressLoadBalancerModuleRequest and assigns it to the LoadBalancer field. +func (o *AddressModulesRequest) SetLoadBalancer(v AddressLoadBalancerModuleRequest) { + o.LoadBalancer = &v +} + +func (o AddressModulesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressModulesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancer) { + toSerialize["load_balancer"] = o.LoadBalancer + } + return toSerialize, nil +} + +type NullableAddressModulesRequest struct { + value *AddressModulesRequest + isSet bool +} + +func (v NullableAddressModulesRequest) Get() *AddressModulesRequest { + return v.value +} + +func (v *NullableAddressModulesRequest) Set(val *AddressModulesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddressModulesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressModulesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressModulesRequest(val *AddressModulesRequest) *NullableAddressModulesRequest { + return &NullableAddressModulesRequest{value: val, isSet: true} +} + +func (v NullableAddressModulesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressModulesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_address_request.go b/azion-api/model_address_request.go new file mode 100644 index 0000000..e8dbe67 --- /dev/null +++ b/azion-api/model_address_request.go @@ -0,0 +1,317 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AddressRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AddressRequest{} + +// AddressRequest struct for AddressRequest +type AddressRequest struct { + // Indicates if the address is active for use + Active *bool `json:"active,omitempty"` + // IPv4/IPv6 address or CNAME to resolve + Address string `json:"address"` + // Port number for HTTP connections + HttpPort *int64 `json:"http_port,omitempty"` + // Port number for HTTPS connections + HttpsPort *int64 `json:"https_port,omitempty"` + Modules NullableAddressModulesRequest `json:"modules,omitempty"` +} + +type _AddressRequest AddressRequest + +// NewAddressRequest instantiates a new AddressRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAddressRequest(address string) *AddressRequest { + this := AddressRequest{} + this.Address = address + return &this +} + +// NewAddressRequestWithDefaults instantiates a new AddressRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAddressRequestWithDefaults() *AddressRequest { + this := AddressRequest{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *AddressRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *AddressRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *AddressRequest) SetActive(v bool) { + o.Active = &v +} + +// GetAddress returns the Address field value +func (o *AddressRequest) GetAddress() string { + if o == nil { + var ret string + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetAddressOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *AddressRequest) SetAddress(v string) { + o.Address = v +} + +// GetHttpPort returns the HttpPort field value if set, zero value otherwise. +func (o *AddressRequest) GetHttpPort() int64 { + if o == nil || IsNil(o.HttpPort) { + var ret int64 + return ret + } + return *o.HttpPort +} + +// GetHttpPortOk returns a tuple with the HttpPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetHttpPortOk() (*int64, bool) { + if o == nil || IsNil(o.HttpPort) { + return nil, false + } + return o.HttpPort, true +} + +// HasHttpPort returns a boolean if a field has been set. +func (o *AddressRequest) HasHttpPort() bool { + if o != nil && !IsNil(o.HttpPort) { + return true + } + + return false +} + +// SetHttpPort gets a reference to the given int64 and assigns it to the HttpPort field. +func (o *AddressRequest) SetHttpPort(v int64) { + o.HttpPort = &v +} + +// GetHttpsPort returns the HttpsPort field value if set, zero value otherwise. +func (o *AddressRequest) GetHttpsPort() int64 { + if o == nil || IsNil(o.HttpsPort) { + var ret int64 + return ret + } + return *o.HttpsPort +} + +// GetHttpsPortOk returns a tuple with the HttpsPort field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AddressRequest) GetHttpsPortOk() (*int64, bool) { + if o == nil || IsNil(o.HttpsPort) { + return nil, false + } + return o.HttpsPort, true +} + +// HasHttpsPort returns a boolean if a field has been set. +func (o *AddressRequest) HasHttpsPort() bool { + if o != nil && !IsNil(o.HttpsPort) { + return true + } + + return false +} + +// SetHttpsPort gets a reference to the given int64 and assigns it to the HttpsPort field. +func (o *AddressRequest) SetHttpsPort(v int64) { + o.HttpsPort = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AddressRequest) GetModules() AddressModulesRequest { + if o == nil || IsNil(o.Modules.Get()) { + var ret AddressModulesRequest + return ret + } + return *o.Modules.Get() +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AddressRequest) GetModulesOk() (*AddressModulesRequest, bool) { + if o == nil { + return nil, false + } + return o.Modules.Get(), o.Modules.IsSet() +} + +// HasModules returns a boolean if a field has been set. +func (o *AddressRequest) HasModules() bool { + if o != nil && o.Modules.IsSet() { + return true + } + + return false +} + +// SetModules gets a reference to the given NullableAddressModulesRequest and assigns it to the Modules field. +func (o *AddressRequest) SetModules(v AddressModulesRequest) { + o.Modules.Set(&v) +} +// SetModulesNil sets the value for Modules to be an explicit nil +func (o *AddressRequest) SetModulesNil() { + o.Modules.Set(nil) +} + +// UnsetModules ensures that no value is present for Modules, not even an explicit nil +func (o *AddressRequest) UnsetModules() { + o.Modules.Unset() +} + +func (o AddressRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AddressRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["address"] = o.Address + if !IsNil(o.HttpPort) { + toSerialize["http_port"] = o.HttpPort + } + if !IsNil(o.HttpsPort) { + toSerialize["https_port"] = o.HttpsPort + } + if o.Modules.IsSet() { + toSerialize["modules"] = o.Modules.Get() + } + return toSerialize, nil +} + +func (o *AddressRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAddressRequest := _AddressRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAddressRequest) + + if err != nil { + return err + } + + *o = AddressRequest(varAddressRequest) + + return err +} + +type NullableAddressRequest struct { + value *AddressRequest + isSet bool +} + +func (v NullableAddressRequest) Get() *AddressRequest { + return v.value +} + +func (v *NullableAddressRequest) Set(val *AddressRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAddressRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAddressRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAddressRequest(val *AddressRequest) *NullableAddressRequest { + return &NullableAddressRequest{value: val, isSet: true} +} + +func (v NullableAddressRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAddressRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aggregated_field.go b/azion-api/model_aggregated_field.go new file mode 100644 index 0000000..b4afbb8 --- /dev/null +++ b/azion-api/model_aggregated_field.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AggregatedField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AggregatedField{} + +// AggregatedField struct for AggregatedField +type AggregatedField struct { + Aggregation string `json:"aggregation"` + Variable string `json:"variable"` +} + +type _AggregatedField AggregatedField + +// NewAggregatedField instantiates a new AggregatedField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAggregatedField(aggregation string, variable string) *AggregatedField { + this := AggregatedField{} + this.Aggregation = aggregation + this.Variable = variable + return &this +} + +// NewAggregatedFieldWithDefaults instantiates a new AggregatedField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAggregatedFieldWithDefaults() *AggregatedField { + this := AggregatedField{} + return &this +} + +// GetAggregation returns the Aggregation field value +func (o *AggregatedField) GetAggregation() string { + if o == nil { + var ret string + return ret + } + + return o.Aggregation +} + +// GetAggregationOk returns a tuple with the Aggregation field value +// and a boolean to check if the value has been set. +func (o *AggregatedField) GetAggregationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Aggregation, true +} + +// SetAggregation sets field value +func (o *AggregatedField) SetAggregation(v string) { + o.Aggregation = v +} + +// GetVariable returns the Variable field value +func (o *AggregatedField) GetVariable() string { + if o == nil { + var ret string + return ret + } + + return o.Variable +} + +// GetVariableOk returns a tuple with the Variable field value +// and a boolean to check if the value has been set. +func (o *AggregatedField) GetVariableOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Variable, true +} + +// SetVariable sets field value +func (o *AggregatedField) SetVariable(v string) { + o.Variable = v +} + +func (o AggregatedField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AggregatedField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["aggregation"] = o.Aggregation + toSerialize["variable"] = o.Variable + return toSerialize, nil +} + +func (o *AggregatedField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "aggregation", + "variable", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAggregatedField := _AggregatedField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAggregatedField) + + if err != nil { + return err + } + + *o = AggregatedField(varAggregatedField) + + return err +} + +type NullableAggregatedField struct { + value *AggregatedField + isSet bool +} + +func (v NullableAggregatedField) Get() *AggregatedField { + return v.value +} + +func (v *NullableAggregatedField) Set(val *AggregatedField) { + v.value = val + v.isSet = true +} + +func (v NullableAggregatedField) IsSet() bool { + return v.isSet +} + +func (v *NullableAggregatedField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAggregatedField(val *AggregatedField) *NullableAggregatedField { + return &NullableAggregatedField{value: val, isSet: true} +} + +func (v NullableAggregatedField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAggregatedField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aggregated_field_request.go b/azion-api/model_aggregated_field_request.go new file mode 100644 index 0000000..bed2408 --- /dev/null +++ b/azion-api/model_aggregated_field_request.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AggregatedFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AggregatedFieldRequest{} + +// AggregatedFieldRequest struct for AggregatedFieldRequest +type AggregatedFieldRequest struct { + Aggregation string `json:"aggregation"` + Variable string `json:"variable"` +} + +type _AggregatedFieldRequest AggregatedFieldRequest + +// NewAggregatedFieldRequest instantiates a new AggregatedFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAggregatedFieldRequest(aggregation string, variable string) *AggregatedFieldRequest { + this := AggregatedFieldRequest{} + this.Aggregation = aggregation + this.Variable = variable + return &this +} + +// NewAggregatedFieldRequestWithDefaults instantiates a new AggregatedFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAggregatedFieldRequestWithDefaults() *AggregatedFieldRequest { + this := AggregatedFieldRequest{} + return &this +} + +// GetAggregation returns the Aggregation field value +func (o *AggregatedFieldRequest) GetAggregation() string { + if o == nil { + var ret string + return ret + } + + return o.Aggregation +} + +// GetAggregationOk returns a tuple with the Aggregation field value +// and a boolean to check if the value has been set. +func (o *AggregatedFieldRequest) GetAggregationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Aggregation, true +} + +// SetAggregation sets field value +func (o *AggregatedFieldRequest) SetAggregation(v string) { + o.Aggregation = v +} + +// GetVariable returns the Variable field value +func (o *AggregatedFieldRequest) GetVariable() string { + if o == nil { + var ret string + return ret + } + + return o.Variable +} + +// GetVariableOk returns a tuple with the Variable field value +// and a boolean to check if the value has been set. +func (o *AggregatedFieldRequest) GetVariableOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Variable, true +} + +// SetVariable sets field value +func (o *AggregatedFieldRequest) SetVariable(v string) { + o.Variable = v +} + +func (o AggregatedFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AggregatedFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["aggregation"] = o.Aggregation + toSerialize["variable"] = o.Variable + return toSerialize, nil +} + +func (o *AggregatedFieldRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "aggregation", + "variable", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAggregatedFieldRequest := _AggregatedFieldRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAggregatedFieldRequest) + + if err != nil { + return err + } + + *o = AggregatedFieldRequest(varAggregatedFieldRequest) + + return err +} + +type NullableAggregatedFieldRequest struct { + value *AggregatedFieldRequest + isSet bool +} + +func (v NullableAggregatedFieldRequest) Get() *AggregatedFieldRequest { + return v.value +} + +func (v *NullableAggregatedFieldRequest) Set(val *AggregatedFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAggregatedFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAggregatedFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAggregatedFieldRequest(val *AggregatedFieldRequest) *NullableAggregatedFieldRequest { + return &NullableAggregatedFieldRequest{value: val, isSet: true} +} + +func (v NullableAggregatedFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAggregatedFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_alg_type.go b/azion-api/model_alg_type.go new file mode 100644 index 0000000..7205d6e --- /dev/null +++ b/azion-api/model_alg_type.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AlgType type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AlgType{} + +// AlgType struct for AlgType +type AlgType struct { + Id int64 `json:"id"` + Slug string `json:"slug"` +} + +type _AlgType AlgType + +// NewAlgType instantiates a new AlgType object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAlgType(id int64, slug string) *AlgType { + this := AlgType{} + this.Id = id + this.Slug = slug + return &this +} + +// NewAlgTypeWithDefaults instantiates a new AlgType object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAlgTypeWithDefaults() *AlgType { + this := AlgType{} + return &this +} + +// GetId returns the Id field value +func (o *AlgType) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *AlgType) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *AlgType) SetId(v int64) { + o.Id = v +} + +// GetSlug returns the Slug field value +func (o *AlgType) GetSlug() string { + if o == nil { + var ret string + return ret + } + + return o.Slug +} + +// GetSlugOk returns a tuple with the Slug field value +// and a boolean to check if the value has been set. +func (o *AlgType) GetSlugOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Slug, true +} + +// SetSlug sets field value +func (o *AlgType) SetSlug(v string) { + o.Slug = v +} + +func (o AlgType) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AlgType) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["slug"] = o.Slug + return toSerialize, nil +} + +func (o *AlgType) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "slug", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAlgType := _AlgType{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAlgType) + + if err != nil { + return err + } + + *o = AlgType(varAlgType) + + return err +} + +type NullableAlgType struct { + value *AlgType + isSet bool +} + +func (v NullableAlgType) Get() *AlgType { + return v.value +} + +func (v *NullableAlgType) Set(val *AlgType) { + v.value = val + v.isSet = true +} + +func (v NullableAlgType) IsSet() bool { + return v.isSet +} + +func (v *NullableAlgType) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAlgType(val *AlgType) *NullableAlgType { + return &NullableAlgType{value: val, isSet: true} +} + +func (v NullableAlgType) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAlgType) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application.go b/azion-api/model_application.go new file mode 100644 index 0000000..10c6973 --- /dev/null +++ b/azion-api/model_application.go @@ -0,0 +1,380 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Application type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Application{} + +// Application struct for Application +type Application struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Modules *ApplicationModules `json:"modules,omitempty"` + Active *bool `json:"active,omitempty"` + Debug *bool `json:"debug,omitempty"` + ProductVersion string `json:"product_version"` +} + +type _Application Application + +// NewApplication instantiates a new Application object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplication(id int64, name string, lastEditor string, lastModified time.Time, productVersion string) *Application { + this := Application{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + return &this +} + +// NewApplicationWithDefaults instantiates a new Application object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationWithDefaults() *Application { + this := Application{} + return &this +} + +// GetId returns the Id field value +func (o *Application) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Application) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Application) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Application) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Application) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Application) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Application) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Application) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Application) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Application) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Application) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Application) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *Application) GetModules() ApplicationModules { + if o == nil || IsNil(o.Modules) { + var ret ApplicationModules + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Application) GetModulesOk() (*ApplicationModules, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *Application) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given ApplicationModules and assigns it to the Modules field. +func (o *Application) SetModules(v ApplicationModules) { + o.Modules = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Application) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Application) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Application) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Application) SetActive(v bool) { + o.Active = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *Application) GetDebug() bool { + if o == nil || IsNil(o.Debug) { + var ret bool + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Application) GetDebugOk() (*bool, bool) { + if o == nil || IsNil(o.Debug) { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *Application) HasDebug() bool { + if o != nil && !IsNil(o.Debug) { + return true + } + + return false +} + +// SetDebug gets a reference to the given bool and assigns it to the Debug field. +func (o *Application) SetDebug(v bool) { + o.Debug = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Application) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Application) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Application) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Application) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Application) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Debug) { + toSerialize["debug"] = o.Debug + } + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Application) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplication := _Application{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplication) + + if err != nil { + return err + } + + *o = Application(varApplication) + + return err +} + +type NullableApplication struct { + value *Application + isSet bool +} + +func (v NullableApplication) Get() *Application { + return v.value +} + +func (v *NullableApplication) Set(val *Application) { + v.value = val + v.isSet = true +} + +func (v NullableApplication) IsSet() bool { + return v.isSet +} + +func (v *NullableApplication) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplication(val *Application) *NullableApplication { + return &NullableApplication{value: val, isSet: true} +} + +func (v NullableApplication) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplication) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_accelerator_module.go b/azion-api/model_application_accelerator_module.go new file mode 100644 index 0000000..d1cb0bb --- /dev/null +++ b/azion-api/model_application_accelerator_module.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ApplicationAcceleratorModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationAcceleratorModule{} + +// ApplicationAcceleratorModule struct for ApplicationAcceleratorModule +type ApplicationAcceleratorModule struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewApplicationAcceleratorModule instantiates a new ApplicationAcceleratorModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationAcceleratorModule() *ApplicationAcceleratorModule { + this := ApplicationAcceleratorModule{} + return &this +} + +// NewApplicationAcceleratorModuleWithDefaults instantiates a new ApplicationAcceleratorModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationAcceleratorModuleWithDefaults() *ApplicationAcceleratorModule { + this := ApplicationAcceleratorModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ApplicationAcceleratorModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAcceleratorModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ApplicationAcceleratorModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ApplicationAcceleratorModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o ApplicationAcceleratorModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationAcceleratorModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableApplicationAcceleratorModule struct { + value *ApplicationAcceleratorModule + isSet bool +} + +func (v NullableApplicationAcceleratorModule) Get() *ApplicationAcceleratorModule { + return v.value +} + +func (v *NullableApplicationAcceleratorModule) Set(val *ApplicationAcceleratorModule) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationAcceleratorModule) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationAcceleratorModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationAcceleratorModule(val *ApplicationAcceleratorModule) *NullableApplicationAcceleratorModule { + return &NullableApplicationAcceleratorModule{value: val, isSet: true} +} + +func (v NullableApplicationAcceleratorModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationAcceleratorModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_accelerator_module_request.go b/azion-api/model_application_accelerator_module_request.go new file mode 100644 index 0000000..4f28690 --- /dev/null +++ b/azion-api/model_application_accelerator_module_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ApplicationAcceleratorModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationAcceleratorModuleRequest{} + +// ApplicationAcceleratorModuleRequest struct for ApplicationAcceleratorModuleRequest +type ApplicationAcceleratorModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewApplicationAcceleratorModuleRequest instantiates a new ApplicationAcceleratorModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationAcceleratorModuleRequest() *ApplicationAcceleratorModuleRequest { + this := ApplicationAcceleratorModuleRequest{} + return &this +} + +// NewApplicationAcceleratorModuleRequestWithDefaults instantiates a new ApplicationAcceleratorModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationAcceleratorModuleRequestWithDefaults() *ApplicationAcceleratorModuleRequest { + this := ApplicationAcceleratorModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ApplicationAcceleratorModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAcceleratorModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ApplicationAcceleratorModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ApplicationAcceleratorModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o ApplicationAcceleratorModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationAcceleratorModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableApplicationAcceleratorModuleRequest struct { + value *ApplicationAcceleratorModuleRequest + isSet bool +} + +func (v NullableApplicationAcceleratorModuleRequest) Get() *ApplicationAcceleratorModuleRequest { + return v.value +} + +func (v *NullableApplicationAcceleratorModuleRequest) Set(val *ApplicationAcceleratorModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationAcceleratorModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationAcceleratorModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationAcceleratorModuleRequest(val *ApplicationAcceleratorModuleRequest) *NullableApplicationAcceleratorModuleRequest { + return &NullableApplicationAcceleratorModuleRequest{value: val, isSet: true} +} + +func (v NullableApplicationAcceleratorModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationAcceleratorModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_criterion_argument.go b/azion-api/model_application_criterion_argument.go new file mode 100644 index 0000000..e53b98c --- /dev/null +++ b/azion-api/model_application_criterion_argument.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ApplicationCriterionArgument - struct for ApplicationCriterionArgument +type ApplicationCriterionArgument struct { + Int64 *int64 + String *string +} + +// int64AsApplicationCriterionArgument is a convenience function that returns int64 wrapped in ApplicationCriterionArgument +func Int64AsApplicationCriterionArgument(v *int64) ApplicationCriterionArgument { + return ApplicationCriterionArgument{ + Int64: v, + } +} + +// stringAsApplicationCriterionArgument is a convenience function that returns string wrapped in ApplicationCriterionArgument +func StringAsApplicationCriterionArgument(v *string) ApplicationCriterionArgument { + return ApplicationCriterionArgument{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ApplicationCriterionArgument) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Int64 + err = newStrictDecoder(data).Decode(&dst.Int64) + if err == nil { + jsonInt64, _ := json.Marshal(dst.Int64) + if string(jsonInt64) == "{}" { // empty struct + dst.Int64 = nil + } else { + if err = validator.Validate(dst.Int64); err != nil { + dst.Int64 = nil + } else { + match++ + } + } + } else { + dst.Int64 = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Int64 = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ApplicationCriterionArgument)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ApplicationCriterionArgument)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ApplicationCriterionArgument) MarshalJSON() ([]byte, error) { + if src.Int64 != nil { + return json.Marshal(&src.Int64) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ApplicationCriterionArgument) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Int64 != nil { + return obj.Int64 + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ApplicationCriterionArgument) GetActualInstanceValue() (interface{}) { + if obj.Int64 != nil { + return *obj.Int64 + } + + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableApplicationCriterionArgument struct { + value *ApplicationCriterionArgument + isSet bool +} + +func (v NullableApplicationCriterionArgument) Get() *ApplicationCriterionArgument { + return v.value +} + +func (v *NullableApplicationCriterionArgument) Set(val *ApplicationCriterionArgument) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCriterionArgument) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCriterionArgument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCriterionArgument(val *ApplicationCriterionArgument) *NullableApplicationCriterionArgument { + return &NullableApplicationCriterionArgument{value: val, isSet: true} +} + +func (v NullableApplicationCriterionArgument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCriterionArgument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_criterion_argument_request.go b/azion-api/model_application_criterion_argument_request.go new file mode 100644 index 0000000..0f57722 --- /dev/null +++ b/azion-api/model_application_criterion_argument_request.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ApplicationCriterionArgumentRequest - struct for ApplicationCriterionArgumentRequest +type ApplicationCriterionArgumentRequest struct { + Int64 *int64 + String *string +} + +// int64AsApplicationCriterionArgumentRequest is a convenience function that returns int64 wrapped in ApplicationCriterionArgumentRequest +func Int64AsApplicationCriterionArgumentRequest(v *int64) ApplicationCriterionArgumentRequest { + return ApplicationCriterionArgumentRequest{ + Int64: v, + } +} + +// stringAsApplicationCriterionArgumentRequest is a convenience function that returns string wrapped in ApplicationCriterionArgumentRequest +func StringAsApplicationCriterionArgumentRequest(v *string) ApplicationCriterionArgumentRequest { + return ApplicationCriterionArgumentRequest{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ApplicationCriterionArgumentRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Int64 + err = newStrictDecoder(data).Decode(&dst.Int64) + if err == nil { + jsonInt64, _ := json.Marshal(dst.Int64) + if string(jsonInt64) == "{}" { // empty struct + dst.Int64 = nil + } else { + if err = validator.Validate(dst.Int64); err != nil { + dst.Int64 = nil + } else { + match++ + } + } + } else { + dst.Int64 = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Int64 = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ApplicationCriterionArgumentRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ApplicationCriterionArgumentRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ApplicationCriterionArgumentRequest) MarshalJSON() ([]byte, error) { + if src.Int64 != nil { + return json.Marshal(&src.Int64) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ApplicationCriterionArgumentRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Int64 != nil { + return obj.Int64 + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ApplicationCriterionArgumentRequest) GetActualInstanceValue() (interface{}) { + if obj.Int64 != nil { + return *obj.Int64 + } + + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableApplicationCriterionArgumentRequest struct { + value *ApplicationCriterionArgumentRequest + isSet bool +} + +func (v NullableApplicationCriterionArgumentRequest) Get() *ApplicationCriterionArgumentRequest { + return v.value +} + +func (v *NullableApplicationCriterionArgumentRequest) Set(val *ApplicationCriterionArgumentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCriterionArgumentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCriterionArgumentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCriterionArgumentRequest(val *ApplicationCriterionArgumentRequest) *NullableApplicationCriterionArgumentRequest { + return &NullableApplicationCriterionArgumentRequest{value: val, isSet: true} +} + +func (v NullableApplicationCriterionArgumentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCriterionArgumentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_criterion_field.go b/azion-api/model_application_criterion_field.go new file mode 100644 index 0000000..86843b8 --- /dev/null +++ b/azion-api/model_application_criterion_field.go @@ -0,0 +1,264 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApplicationCriterionField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationCriterionField{} + +// ApplicationCriterionField The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. | Variable | Description | Phase | Operators | Argument | | -------- | ----------- | ----- | --------- | ---------| | ${arg_<name>} | Use this variable to match a query param. Replace <name> with the specific query param you want to match, replacing any '-' with '_'. Examples: ${arg_search}, ${arg_next}. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${args} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${cookie_<name>} | Use this variable to match cookies sent by the browser Cookie headers.Replace <name> with the specific cookie name you want to match, replacing any '-' with '_'. Examples: cookie_session_id, cookie_user_pref. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${device_group} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_region_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_region} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${host} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${domain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${http_<header_name>} | Use this variable to match HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${remote_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${remote_user} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request_method} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request_uri} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${scheme} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${sent_http_<header_name>} | Use this variable to match HTTP headers sent to origin server. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_addr} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_cookie_<name>} | Use this variable to match cookies sent by the origin server in Set-Cookie headers.Replace <name> with the specific cookie you want to match, replacing any '-' with '_'. Examples: ${upstream_cookie_mycookie}, ${upstream_cookie_user_info}. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_http_<header_name>} | Use this variable to match origin HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. If many origins are consulted while the request is processed, only headers from the last origin are stored. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${uri} | The normalized (urldecoded) URI of the request. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${server_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${server_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_escaped_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_fingerprint} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_i_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_s_dn_parsed} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_s_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_serial} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_v_end} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_v_remain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_v_start} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_verify} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${tcpinfo_rtt} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${remote_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request_body} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. +type ApplicationCriterionField struct { + // * `if` - if * `or` - or * `and` - and + Conditional string `json:"conditional"` + // * `${arg_}` - ${arg_} * `${args}` - ${args} * `${cookie_}` - ${cookie_} * `${device_group}` - ${device_group} * `${geoip_city_continent_code}` - ${geoip_city_continent_code} * `${geoip_city_country_code}` - ${geoip_city_country_code} * `${geoip_city_country_name}` - ${geoip_city_country_name} * `${geoip_city}` - ${geoip_city} * `${geoip_continent_code}` - ${geoip_continent_code} * `${geoip_country_code}` - ${geoip_country_code} * `${geoip_country_name}` - ${geoip_country_name} * `${geoip_region_name}` - ${geoip_region_name} * `${geoip_region}` - ${geoip_region} * `${host}` - ${host} * `${domain}` - ${domain} * `${http_}` - ${http_} * `${remote_addr}` - ${remote_addr} * `${remote_user}` - ${remote_user} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${request}` - ${request} * `${scheme}` - ${scheme} * `${sent_http_}` - ${sent_http_} * `${status}` - ${status} * `${upstream_addr}` - ${upstream_addr} * `${upstream_cookie_}` - ${upstream_cookie_} * `${upstream_http_}` - ${upstream_http_} * `${upstream_status}` - ${upstream_status} * `${uri}` - ${uri} * `${server_addr}` - ${server_addr} * `${server_port}` - ${server_port} * `${ssl_client_cert}` - ${ssl_client_cert} * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} * `${ssl_client_i_dn}` - ${ssl_client_i_dn} * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} * `${ssl_client_s_dn}` - ${ssl_client_s_dn} * `${ssl_client_serial}` - ${ssl_client_serial} * `${ssl_client_v_end}` - ${ssl_client_v_end} * `${ssl_client_v_remain}` - ${ssl_client_v_remain} * `${ssl_client_v_start}` - ${ssl_client_v_start} * `${ssl_client_verify}` - ${ssl_client_verify} * `${tcpinfo_rtt}` - ${tcpinfo_rtt} * `${remote_port}` - ${remote_port} * `${request_body}` - ${request_body} + Variable string `json:"variable"` + // * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with + Operator string `json:"operator"` + Argument NullableApplicationCriterionArgument `json:"argument,omitempty"` +} + +type _ApplicationCriterionField ApplicationCriterionField + +// NewApplicationCriterionField instantiates a new ApplicationCriterionField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationCriterionField(conditional string, variable string, operator string) *ApplicationCriterionField { + this := ApplicationCriterionField{} + this.Conditional = conditional + this.Variable = variable + this.Operator = operator + return &this +} + +// NewApplicationCriterionFieldWithDefaults instantiates a new ApplicationCriterionField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationCriterionFieldWithDefaults() *ApplicationCriterionField { + this := ApplicationCriterionField{} + return &this +} + +// GetConditional returns the Conditional field value +func (o *ApplicationCriterionField) GetConditional() string { + if o == nil { + var ret string + return ret + } + + return o.Conditional +} + +// GetConditionalOk returns a tuple with the Conditional field value +// and a boolean to check if the value has been set. +func (o *ApplicationCriterionField) GetConditionalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Conditional, true +} + +// SetConditional sets field value +func (o *ApplicationCriterionField) SetConditional(v string) { + o.Conditional = v +} + +// GetVariable returns the Variable field value +func (o *ApplicationCriterionField) GetVariable() string { + if o == nil { + var ret string + return ret + } + + return o.Variable +} + +// GetVariableOk returns a tuple with the Variable field value +// and a boolean to check if the value has been set. +func (o *ApplicationCriterionField) GetVariableOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Variable, true +} + +// SetVariable sets field value +func (o *ApplicationCriterionField) SetVariable(v string) { + o.Variable = v +} + +// GetOperator returns the Operator field value +func (o *ApplicationCriterionField) GetOperator() string { + if o == nil { + var ret string + return ret + } + + return o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value +// and a boolean to check if the value has been set. +func (o *ApplicationCriterionField) GetOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operator, true +} + +// SetOperator sets field value +func (o *ApplicationCriterionField) SetOperator(v string) { + o.Operator = v +} + +// GetArgument returns the Argument field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApplicationCriterionField) GetArgument() ApplicationCriterionArgument { + if o == nil || IsNil(o.Argument.Get()) { + var ret ApplicationCriterionArgument + return ret + } + return *o.Argument.Get() +} + +// GetArgumentOk returns a tuple with the Argument field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationCriterionField) GetArgumentOk() (*ApplicationCriterionArgument, bool) { + if o == nil { + return nil, false + } + return o.Argument.Get(), o.Argument.IsSet() +} + +// HasArgument returns a boolean if a field has been set. +func (o *ApplicationCriterionField) HasArgument() bool { + if o != nil && o.Argument.IsSet() { + return true + } + + return false +} + +// SetArgument gets a reference to the given NullableApplicationCriterionArgument and assigns it to the Argument field. +func (o *ApplicationCriterionField) SetArgument(v ApplicationCriterionArgument) { + o.Argument.Set(&v) +} +// SetArgumentNil sets the value for Argument to be an explicit nil +func (o *ApplicationCriterionField) SetArgumentNil() { + o.Argument.Set(nil) +} + +// UnsetArgument ensures that no value is present for Argument, not even an explicit nil +func (o *ApplicationCriterionField) UnsetArgument() { + o.Argument.Unset() +} + +func (o ApplicationCriterionField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationCriterionField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["conditional"] = o.Conditional + toSerialize["variable"] = o.Variable + toSerialize["operator"] = o.Operator + if o.Argument.IsSet() { + toSerialize["argument"] = o.Argument.Get() + } + return toSerialize, nil +} + +func (o *ApplicationCriterionField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "conditional", + "variable", + "operator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationCriterionField := _ApplicationCriterionField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplicationCriterionField) + + if err != nil { + return err + } + + *o = ApplicationCriterionField(varApplicationCriterionField) + + return err +} + +type NullableApplicationCriterionField struct { + value *ApplicationCriterionField + isSet bool +} + +func (v NullableApplicationCriterionField) Get() *ApplicationCriterionField { + return v.value +} + +func (v *NullableApplicationCriterionField) Set(val *ApplicationCriterionField) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCriterionField) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCriterionField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCriterionField(val *ApplicationCriterionField) *NullableApplicationCriterionField { + return &NullableApplicationCriterionField{value: val, isSet: true} +} + +func (v NullableApplicationCriterionField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCriterionField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_criterion_field_request.go b/azion-api/model_application_criterion_field_request.go new file mode 100644 index 0000000..5e16a6c --- /dev/null +++ b/azion-api/model_application_criterion_field_request.go @@ -0,0 +1,264 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApplicationCriterionFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationCriterionFieldRequest{} + +// ApplicationCriterionFieldRequest The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. | Variable | Description | Phase | Operators | Argument | | -------- | ----------- | ----- | --------- | ---------| | ${arg_<name>} | Use this variable to match a query param. Replace <name> with the specific query param you want to match, replacing any '-' with '_'. Examples: ${arg_search}, ${arg_next}. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${args} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${cookie_<name>} | Use this variable to match cookies sent by the browser Cookie headers.Replace <name> with the specific cookie name you want to match, replacing any '-' with '_'. Examples: cookie_session_id, cookie_user_pref. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${device_group} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_city} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_continent_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_country_code} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_country_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_region_name} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${geoip_region} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${host} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${domain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${http_<header_name>} | Use this variable to match HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${remote_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${remote_user} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request_method} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request_uri} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${scheme} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${sent_http_<header_name>} | Use this variable to match HTTP headers sent to origin server. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_addr} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_cookie_<name>} | Use this variable to match cookies sent by the origin server in Set-Cookie headers.Replace <name> with the specific cookie you want to match, replacing any '-' with '_'. Examples: ${upstream_cookie_mycookie}, ${upstream_cookie_user_info}. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_http_<header_name>} | Use this variable to match origin HTTP headers. Replace <header_name> with the specific header you want to match, replacing any '-' with '_'. If many origins are consulted while the request is processed, only headers from the last origin are stored. Examples: http_authorization, http_accept, http_x_debug. | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${upstream_status} | | response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${uri} | The normalized (urldecoded) URI of the request. | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${server_addr} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${server_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_escaped_cert} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_fingerprint} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_i_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_s_dn_parsed} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_s_dn} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_serial} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_v_end} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_v_remain} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_v_start} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${ssl_client_verify} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${tcpinfo_rtt} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${remote_port} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | | ${request_body} | | default, request, response | is_equal, is_not_equal, starts_with, does_not_start_with, matches, does_not_match, exists, does_not_exist | string | About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. +type ApplicationCriterionFieldRequest struct { + // * `if` - if * `or` - or * `and` - and + Conditional string `json:"conditional"` + // * `${arg_}` - ${arg_} * `${args}` - ${args} * `${cookie_}` - ${cookie_} * `${device_group}` - ${device_group} * `${geoip_city_continent_code}` - ${geoip_city_continent_code} * `${geoip_city_country_code}` - ${geoip_city_country_code} * `${geoip_city_country_name}` - ${geoip_city_country_name} * `${geoip_city}` - ${geoip_city} * `${geoip_continent_code}` - ${geoip_continent_code} * `${geoip_country_code}` - ${geoip_country_code} * `${geoip_country_name}` - ${geoip_country_name} * `${geoip_region_name}` - ${geoip_region_name} * `${geoip_region}` - ${geoip_region} * `${host}` - ${host} * `${domain}` - ${domain} * `${http_}` - ${http_} * `${remote_addr}` - ${remote_addr} * `${remote_user}` - ${remote_user} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${request}` - ${request} * `${scheme}` - ${scheme} * `${sent_http_}` - ${sent_http_} * `${status}` - ${status} * `${upstream_addr}` - ${upstream_addr} * `${upstream_cookie_}` - ${upstream_cookie_} * `${upstream_http_}` - ${upstream_http_} * `${upstream_status}` - ${upstream_status} * `${uri}` - ${uri} * `${server_addr}` - ${server_addr} * `${server_port}` - ${server_port} * `${ssl_client_cert}` - ${ssl_client_cert} * `${ssl_client_escaped_cert}` - ${ssl_client_escaped_cert} * `${ssl_client_fingerprint}` - ${ssl_client_fingerprint} * `${ssl_client_i_dn}` - ${ssl_client_i_dn} * `${ssl_client_s_dn_parsed}` - ${ssl_client_s_dn_parsed} * `${ssl_client_s_dn}` - ${ssl_client_s_dn} * `${ssl_client_serial}` - ${ssl_client_serial} * `${ssl_client_v_end}` - ${ssl_client_v_end} * `${ssl_client_v_remain}` - ${ssl_client_v_remain} * `${ssl_client_v_start}` - ${ssl_client_v_start} * `${ssl_client_verify}` - ${ssl_client_verify} * `${tcpinfo_rtt}` - ${tcpinfo_rtt} * `${remote_port}` - ${remote_port} * `${request_body}` - ${request_body} + Variable string `json:"variable"` + // * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with + Operator string `json:"operator"` + Argument NullableApplicationCriterionArgumentRequest `json:"argument,omitempty"` +} + +type _ApplicationCriterionFieldRequest ApplicationCriterionFieldRequest + +// NewApplicationCriterionFieldRequest instantiates a new ApplicationCriterionFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationCriterionFieldRequest(conditional string, variable string, operator string) *ApplicationCriterionFieldRequest { + this := ApplicationCriterionFieldRequest{} + this.Conditional = conditional + this.Variable = variable + this.Operator = operator + return &this +} + +// NewApplicationCriterionFieldRequestWithDefaults instantiates a new ApplicationCriterionFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationCriterionFieldRequestWithDefaults() *ApplicationCriterionFieldRequest { + this := ApplicationCriterionFieldRequest{} + return &this +} + +// GetConditional returns the Conditional field value +func (o *ApplicationCriterionFieldRequest) GetConditional() string { + if o == nil { + var ret string + return ret + } + + return o.Conditional +} + +// GetConditionalOk returns a tuple with the Conditional field value +// and a boolean to check if the value has been set. +func (o *ApplicationCriterionFieldRequest) GetConditionalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Conditional, true +} + +// SetConditional sets field value +func (o *ApplicationCriterionFieldRequest) SetConditional(v string) { + o.Conditional = v +} + +// GetVariable returns the Variable field value +func (o *ApplicationCriterionFieldRequest) GetVariable() string { + if o == nil { + var ret string + return ret + } + + return o.Variable +} + +// GetVariableOk returns a tuple with the Variable field value +// and a boolean to check if the value has been set. +func (o *ApplicationCriterionFieldRequest) GetVariableOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Variable, true +} + +// SetVariable sets field value +func (o *ApplicationCriterionFieldRequest) SetVariable(v string) { + o.Variable = v +} + +// GetOperator returns the Operator field value +func (o *ApplicationCriterionFieldRequest) GetOperator() string { + if o == nil { + var ret string + return ret + } + + return o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value +// and a boolean to check if the value has been set. +func (o *ApplicationCriterionFieldRequest) GetOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operator, true +} + +// SetOperator sets field value +func (o *ApplicationCriterionFieldRequest) SetOperator(v string) { + o.Operator = v +} + +// GetArgument returns the Argument field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ApplicationCriterionFieldRequest) GetArgument() ApplicationCriterionArgumentRequest { + if o == nil || IsNil(o.Argument.Get()) { + var ret ApplicationCriterionArgumentRequest + return ret + } + return *o.Argument.Get() +} + +// GetArgumentOk returns a tuple with the Argument field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ApplicationCriterionFieldRequest) GetArgumentOk() (*ApplicationCriterionArgumentRequest, bool) { + if o == nil { + return nil, false + } + return o.Argument.Get(), o.Argument.IsSet() +} + +// HasArgument returns a boolean if a field has been set. +func (o *ApplicationCriterionFieldRequest) HasArgument() bool { + if o != nil && o.Argument.IsSet() { + return true + } + + return false +} + +// SetArgument gets a reference to the given NullableApplicationCriterionArgumentRequest and assigns it to the Argument field. +func (o *ApplicationCriterionFieldRequest) SetArgument(v ApplicationCriterionArgumentRequest) { + o.Argument.Set(&v) +} +// SetArgumentNil sets the value for Argument to be an explicit nil +func (o *ApplicationCriterionFieldRequest) SetArgumentNil() { + o.Argument.Set(nil) +} + +// UnsetArgument ensures that no value is present for Argument, not even an explicit nil +func (o *ApplicationCriterionFieldRequest) UnsetArgument() { + o.Argument.Unset() +} + +func (o ApplicationCriterionFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationCriterionFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["conditional"] = o.Conditional + toSerialize["variable"] = o.Variable + toSerialize["operator"] = o.Operator + if o.Argument.IsSet() { + toSerialize["argument"] = o.Argument.Get() + } + return toSerialize, nil +} + +func (o *ApplicationCriterionFieldRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "conditional", + "variable", + "operator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationCriterionFieldRequest := _ApplicationCriterionFieldRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplicationCriterionFieldRequest) + + if err != nil { + return err + } + + *o = ApplicationCriterionFieldRequest(varApplicationCriterionFieldRequest) + + return err +} + +type NullableApplicationCriterionFieldRequest struct { + value *ApplicationCriterionFieldRequest + isSet bool +} + +func (v NullableApplicationCriterionFieldRequest) Get() *ApplicationCriterionFieldRequest { + return v.value +} + +func (v *NullableApplicationCriterionFieldRequest) Set(val *ApplicationCriterionFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationCriterionFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationCriterionFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationCriterionFieldRequest(val *ApplicationCriterionFieldRequest) *NullableApplicationCriterionFieldRequest { + return &NullableApplicationCriterionFieldRequest{value: val, isSet: true} +} + +func (v NullableApplicationCriterionFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationCriterionFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_modules.go b/azion-api/model_application_modules.go new file mode 100644 index 0000000..da88629 --- /dev/null +++ b/azion-api/model_application_modules.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ApplicationModules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationModules{} + +// ApplicationModules struct for ApplicationModules +type ApplicationModules struct { + Cache *CacheModule `json:"cache,omitempty"` + Functions *FunctionModule `json:"functions,omitempty"` + ApplicationAccelerator *ApplicationAcceleratorModule `json:"application_accelerator,omitempty"` + ImageProcessor *ImageProcessorModule `json:"image_processor,omitempty"` +} + +// NewApplicationModules instantiates a new ApplicationModules object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationModules() *ApplicationModules { + this := ApplicationModules{} + return &this +} + +// NewApplicationModulesWithDefaults instantiates a new ApplicationModules object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationModulesWithDefaults() *ApplicationModules { + this := ApplicationModules{} + return &this +} + +// GetCache returns the Cache field value if set, zero value otherwise. +func (o *ApplicationModules) GetCache() CacheModule { + if o == nil || IsNil(o.Cache) { + var ret CacheModule + return ret + } + return *o.Cache +} + +// GetCacheOk returns a tuple with the Cache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModules) GetCacheOk() (*CacheModule, bool) { + if o == nil || IsNil(o.Cache) { + return nil, false + } + return o.Cache, true +} + +// HasCache returns a boolean if a field has been set. +func (o *ApplicationModules) HasCache() bool { + if o != nil && !IsNil(o.Cache) { + return true + } + + return false +} + +// SetCache gets a reference to the given CacheModule and assigns it to the Cache field. +func (o *ApplicationModules) SetCache(v CacheModule) { + o.Cache = &v +} + +// GetFunctions returns the Functions field value if set, zero value otherwise. +func (o *ApplicationModules) GetFunctions() FunctionModule { + if o == nil || IsNil(o.Functions) { + var ret FunctionModule + return ret + } + return *o.Functions +} + +// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModules) GetFunctionsOk() (*FunctionModule, bool) { + if o == nil || IsNil(o.Functions) { + return nil, false + } + return o.Functions, true +} + +// HasFunctions returns a boolean if a field has been set. +func (o *ApplicationModules) HasFunctions() bool { + if o != nil && !IsNil(o.Functions) { + return true + } + + return false +} + +// SetFunctions gets a reference to the given FunctionModule and assigns it to the Functions field. +func (o *ApplicationModules) SetFunctions(v FunctionModule) { + o.Functions = &v +} + +// GetApplicationAccelerator returns the ApplicationAccelerator field value if set, zero value otherwise. +func (o *ApplicationModules) GetApplicationAccelerator() ApplicationAcceleratorModule { + if o == nil || IsNil(o.ApplicationAccelerator) { + var ret ApplicationAcceleratorModule + return ret + } + return *o.ApplicationAccelerator +} + +// GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModules) GetApplicationAcceleratorOk() (*ApplicationAcceleratorModule, bool) { + if o == nil || IsNil(o.ApplicationAccelerator) { + return nil, false + } + return o.ApplicationAccelerator, true +} + +// HasApplicationAccelerator returns a boolean if a field has been set. +func (o *ApplicationModules) HasApplicationAccelerator() bool { + if o != nil && !IsNil(o.ApplicationAccelerator) { + return true + } + + return false +} + +// SetApplicationAccelerator gets a reference to the given ApplicationAcceleratorModule and assigns it to the ApplicationAccelerator field. +func (o *ApplicationModules) SetApplicationAccelerator(v ApplicationAcceleratorModule) { + o.ApplicationAccelerator = &v +} + +// GetImageProcessor returns the ImageProcessor field value if set, zero value otherwise. +func (o *ApplicationModules) GetImageProcessor() ImageProcessorModule { + if o == nil || IsNil(o.ImageProcessor) { + var ret ImageProcessorModule + return ret + } + return *o.ImageProcessor +} + +// GetImageProcessorOk returns a tuple with the ImageProcessor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModules) GetImageProcessorOk() (*ImageProcessorModule, bool) { + if o == nil || IsNil(o.ImageProcessor) { + return nil, false + } + return o.ImageProcessor, true +} + +// HasImageProcessor returns a boolean if a field has been set. +func (o *ApplicationModules) HasImageProcessor() bool { + if o != nil && !IsNil(o.ImageProcessor) { + return true + } + + return false +} + +// SetImageProcessor gets a reference to the given ImageProcessorModule and assigns it to the ImageProcessor field. +func (o *ApplicationModules) SetImageProcessor(v ImageProcessorModule) { + o.ImageProcessor = &v +} + +func (o ApplicationModules) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationModules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cache) { + toSerialize["cache"] = o.Cache + } + if !IsNil(o.Functions) { + toSerialize["functions"] = o.Functions + } + if !IsNil(o.ApplicationAccelerator) { + toSerialize["application_accelerator"] = o.ApplicationAccelerator + } + if !IsNil(o.ImageProcessor) { + toSerialize["image_processor"] = o.ImageProcessor + } + return toSerialize, nil +} + +type NullableApplicationModules struct { + value *ApplicationModules + isSet bool +} + +func (v NullableApplicationModules) Get() *ApplicationModules { + return v.value +} + +func (v *NullableApplicationModules) Set(val *ApplicationModules) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationModules) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationModules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationModules(val *ApplicationModules) *NullableApplicationModules { + return &NullableApplicationModules{value: val, isSet: true} +} + +func (v NullableApplicationModules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationModules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_modules_request.go b/azion-api/model_application_modules_request.go new file mode 100644 index 0000000..2afab07 --- /dev/null +++ b/azion-api/model_application_modules_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ApplicationModulesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationModulesRequest{} + +// ApplicationModulesRequest struct for ApplicationModulesRequest +type ApplicationModulesRequest struct { + Cache *CacheModuleRequest `json:"cache,omitempty"` + Functions *FunctionModuleRequest `json:"functions,omitempty"` + ApplicationAccelerator *ApplicationAcceleratorModuleRequest `json:"application_accelerator,omitempty"` + ImageProcessor *ImageProcessorModuleRequest `json:"image_processor,omitempty"` +} + +// NewApplicationModulesRequest instantiates a new ApplicationModulesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationModulesRequest() *ApplicationModulesRequest { + this := ApplicationModulesRequest{} + return &this +} + +// NewApplicationModulesRequestWithDefaults instantiates a new ApplicationModulesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationModulesRequestWithDefaults() *ApplicationModulesRequest { + this := ApplicationModulesRequest{} + return &this +} + +// GetCache returns the Cache field value if set, zero value otherwise. +func (o *ApplicationModulesRequest) GetCache() CacheModuleRequest { + if o == nil || IsNil(o.Cache) { + var ret CacheModuleRequest + return ret + } + return *o.Cache +} + +// GetCacheOk returns a tuple with the Cache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModulesRequest) GetCacheOk() (*CacheModuleRequest, bool) { + if o == nil || IsNil(o.Cache) { + return nil, false + } + return o.Cache, true +} + +// HasCache returns a boolean if a field has been set. +func (o *ApplicationModulesRequest) HasCache() bool { + if o != nil && !IsNil(o.Cache) { + return true + } + + return false +} + +// SetCache gets a reference to the given CacheModuleRequest and assigns it to the Cache field. +func (o *ApplicationModulesRequest) SetCache(v CacheModuleRequest) { + o.Cache = &v +} + +// GetFunctions returns the Functions field value if set, zero value otherwise. +func (o *ApplicationModulesRequest) GetFunctions() FunctionModuleRequest { + if o == nil || IsNil(o.Functions) { + var ret FunctionModuleRequest + return ret + } + return *o.Functions +} + +// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModulesRequest) GetFunctionsOk() (*FunctionModuleRequest, bool) { + if o == nil || IsNil(o.Functions) { + return nil, false + } + return o.Functions, true +} + +// HasFunctions returns a boolean if a field has been set. +func (o *ApplicationModulesRequest) HasFunctions() bool { + if o != nil && !IsNil(o.Functions) { + return true + } + + return false +} + +// SetFunctions gets a reference to the given FunctionModuleRequest and assigns it to the Functions field. +func (o *ApplicationModulesRequest) SetFunctions(v FunctionModuleRequest) { + o.Functions = &v +} + +// GetApplicationAccelerator returns the ApplicationAccelerator field value if set, zero value otherwise. +func (o *ApplicationModulesRequest) GetApplicationAccelerator() ApplicationAcceleratorModuleRequest { + if o == nil || IsNil(o.ApplicationAccelerator) { + var ret ApplicationAcceleratorModuleRequest + return ret + } + return *o.ApplicationAccelerator +} + +// GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModulesRequest) GetApplicationAcceleratorOk() (*ApplicationAcceleratorModuleRequest, bool) { + if o == nil || IsNil(o.ApplicationAccelerator) { + return nil, false + } + return o.ApplicationAccelerator, true +} + +// HasApplicationAccelerator returns a boolean if a field has been set. +func (o *ApplicationModulesRequest) HasApplicationAccelerator() bool { + if o != nil && !IsNil(o.ApplicationAccelerator) { + return true + } + + return false +} + +// SetApplicationAccelerator gets a reference to the given ApplicationAcceleratorModuleRequest and assigns it to the ApplicationAccelerator field. +func (o *ApplicationModulesRequest) SetApplicationAccelerator(v ApplicationAcceleratorModuleRequest) { + o.ApplicationAccelerator = &v +} + +// GetImageProcessor returns the ImageProcessor field value if set, zero value otherwise. +func (o *ApplicationModulesRequest) GetImageProcessor() ImageProcessorModuleRequest { + if o == nil || IsNil(o.ImageProcessor) { + var ret ImageProcessorModuleRequest + return ret + } + return *o.ImageProcessor +} + +// GetImageProcessorOk returns a tuple with the ImageProcessor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationModulesRequest) GetImageProcessorOk() (*ImageProcessorModuleRequest, bool) { + if o == nil || IsNil(o.ImageProcessor) { + return nil, false + } + return o.ImageProcessor, true +} + +// HasImageProcessor returns a boolean if a field has been set. +func (o *ApplicationModulesRequest) HasImageProcessor() bool { + if o != nil && !IsNil(o.ImageProcessor) { + return true + } + + return false +} + +// SetImageProcessor gets a reference to the given ImageProcessorModuleRequest and assigns it to the ImageProcessor field. +func (o *ApplicationModulesRequest) SetImageProcessor(v ImageProcessorModuleRequest) { + o.ImageProcessor = &v +} + +func (o ApplicationModulesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationModulesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cache) { + toSerialize["cache"] = o.Cache + } + if !IsNil(o.Functions) { + toSerialize["functions"] = o.Functions + } + if !IsNil(o.ApplicationAccelerator) { + toSerialize["application_accelerator"] = o.ApplicationAccelerator + } + if !IsNil(o.ImageProcessor) { + toSerialize["image_processor"] = o.ImageProcessor + } + return toSerialize, nil +} + +type NullableApplicationModulesRequest struct { + value *ApplicationModulesRequest + isSet bool +} + +func (v NullableApplicationModulesRequest) Get() *ApplicationModulesRequest { + return v.value +} + +func (v *NullableApplicationModulesRequest) Set(val *ApplicationModulesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationModulesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationModulesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationModulesRequest(val *ApplicationModulesRequest) *NullableApplicationModulesRequest { + return &NullableApplicationModulesRequest{value: val, isSet: true} +} + +func (v NullableApplicationModulesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationModulesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_request.go b/azion-api/model_application_request.go new file mode 100644 index 0000000..2c1177b --- /dev/null +++ b/azion-api/model_application_request.go @@ -0,0 +1,267 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApplicationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationRequest{} + +// ApplicationRequest struct for ApplicationRequest +type ApplicationRequest struct { + Name string `json:"name"` + Modules *ApplicationModulesRequest `json:"modules,omitempty"` + Active *bool `json:"active,omitempty"` + Debug *bool `json:"debug,omitempty"` +} + +type _ApplicationRequest ApplicationRequest + +// NewApplicationRequest instantiates a new ApplicationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationRequest(name string) *ApplicationRequest { + this := ApplicationRequest{} + this.Name = name + return &this +} + +// NewApplicationRequestWithDefaults instantiates a new ApplicationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationRequestWithDefaults() *ApplicationRequest { + this := ApplicationRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ApplicationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ApplicationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ApplicationRequest) SetName(v string) { + o.Name = v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *ApplicationRequest) GetModules() ApplicationModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret ApplicationModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationRequest) GetModulesOk() (*ApplicationModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *ApplicationRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given ApplicationModulesRequest and assigns it to the Modules field. +func (o *ApplicationRequest) SetModules(v ApplicationModulesRequest) { + o.Modules = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ApplicationRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ApplicationRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ApplicationRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *ApplicationRequest) GetDebug() bool { + if o == nil || IsNil(o.Debug) { + var ret bool + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationRequest) GetDebugOk() (*bool, bool) { + if o == nil || IsNil(o.Debug) { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *ApplicationRequest) HasDebug() bool { + if o != nil && !IsNil(o.Debug) { + return true + } + + return false +} + +// SetDebug gets a reference to the given bool and assigns it to the Debug field. +func (o *ApplicationRequest) SetDebug(v bool) { + o.Debug = &v +} + +func (o ApplicationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Debug) { + toSerialize["debug"] = o.Debug + } + return toSerialize, nil +} + +func (o *ApplicationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationRequest := _ApplicationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplicationRequest) + + if err != nil { + return err + } + + *o = ApplicationRequest(varApplicationRequest) + + return err +} + +type NullableApplicationRequest struct { + value *ApplicationRequest + isSet bool +} + +func (v NullableApplicationRequest) Get() *ApplicationRequest { + return v.value +} + +func (v *NullableApplicationRequest) Set(val *ApplicationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationRequest(val *ApplicationRequest) *NullableApplicationRequest { + return &NullableApplicationRequest{value: val, isSet: true} +} + +func (v NullableApplicationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_request_phase_rule_engine_order.go b/azion-api/model_application_request_phase_rule_engine_order.go new file mode 100644 index 0000000..7d5acec --- /dev/null +++ b/azion-api/model_application_request_phase_rule_engine_order.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApplicationRequestPhaseRuleEngineOrder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationRequestPhaseRuleEngineOrder{} + +// ApplicationRequestPhaseRuleEngineOrder struct for ApplicationRequestPhaseRuleEngineOrder +type ApplicationRequestPhaseRuleEngineOrder struct { + Order []int64 `json:"order"` +} + +type _ApplicationRequestPhaseRuleEngineOrder ApplicationRequestPhaseRuleEngineOrder + +// NewApplicationRequestPhaseRuleEngineOrder instantiates a new ApplicationRequestPhaseRuleEngineOrder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationRequestPhaseRuleEngineOrder(order []int64) *ApplicationRequestPhaseRuleEngineOrder { + this := ApplicationRequestPhaseRuleEngineOrder{} + this.Order = order + return &this +} + +// NewApplicationRequestPhaseRuleEngineOrderWithDefaults instantiates a new ApplicationRequestPhaseRuleEngineOrder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationRequestPhaseRuleEngineOrderWithDefaults() *ApplicationRequestPhaseRuleEngineOrder { + this := ApplicationRequestPhaseRuleEngineOrder{} + return &this +} + +// GetOrder returns the Order field value +func (o *ApplicationRequestPhaseRuleEngineOrder) GetOrder() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *ApplicationRequestPhaseRuleEngineOrder) GetOrderOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Order, true +} + +// SetOrder sets field value +func (o *ApplicationRequestPhaseRuleEngineOrder) SetOrder(v []int64) { + o.Order = v +} + +func (o ApplicationRequestPhaseRuleEngineOrder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationRequestPhaseRuleEngineOrder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *ApplicationRequestPhaseRuleEngineOrder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationRequestPhaseRuleEngineOrder := _ApplicationRequestPhaseRuleEngineOrder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplicationRequestPhaseRuleEngineOrder) + + if err != nil { + return err + } + + *o = ApplicationRequestPhaseRuleEngineOrder(varApplicationRequestPhaseRuleEngineOrder) + + return err +} + +type NullableApplicationRequestPhaseRuleEngineOrder struct { + value *ApplicationRequestPhaseRuleEngineOrder + isSet bool +} + +func (v NullableApplicationRequestPhaseRuleEngineOrder) Get() *ApplicationRequestPhaseRuleEngineOrder { + return v.value +} + +func (v *NullableApplicationRequestPhaseRuleEngineOrder) Set(val *ApplicationRequestPhaseRuleEngineOrder) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationRequestPhaseRuleEngineOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationRequestPhaseRuleEngineOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationRequestPhaseRuleEngineOrder(val *ApplicationRequestPhaseRuleEngineOrder) *NullableApplicationRequestPhaseRuleEngineOrder { + return &NullableApplicationRequestPhaseRuleEngineOrder{value: val, isSet: true} +} + +func (v NullableApplicationRequestPhaseRuleEngineOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationRequestPhaseRuleEngineOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_response.go b/azion-api/model_application_response.go new file mode 100644 index 0000000..a67d742 --- /dev/null +++ b/azion-api/model_application_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApplicationResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationResponse{} + +// ApplicationResponse struct for ApplicationResponse +type ApplicationResponse struct { + State *string `json:"state,omitempty"` + Data Application `json:"data"` +} + +type _ApplicationResponse ApplicationResponse + +// NewApplicationResponse instantiates a new ApplicationResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationResponse(data Application) *ApplicationResponse { + this := ApplicationResponse{} + this.Data = data + return &this +} + +// NewApplicationResponseWithDefaults instantiates a new ApplicationResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationResponseWithDefaults() *ApplicationResponse { + this := ApplicationResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ApplicationResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ApplicationResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ApplicationResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ApplicationResponse) GetData() Application { + if o == nil { + var ret Application + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ApplicationResponse) GetDataOk() (*Application, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ApplicationResponse) SetData(v Application) { + o.Data = v +} + +func (o ApplicationResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ApplicationResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationResponse := _ApplicationResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplicationResponse) + + if err != nil { + return err + } + + *o = ApplicationResponse(varApplicationResponse) + + return err +} + +type NullableApplicationResponse struct { + value *ApplicationResponse + isSet bool +} + +func (v NullableApplicationResponse) Get() *ApplicationResponse { + return v.value +} + +func (v *NullableApplicationResponse) Set(val *ApplicationResponse) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationResponse(val *ApplicationResponse) *NullableApplicationResponse { + return &NullableApplicationResponse{value: val, isSet: true} +} + +func (v NullableApplicationResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_application_response_phase_rule_engine_order_request.go b/azion-api/model_application_response_phase_rule_engine_order_request.go new file mode 100644 index 0000000..0771ea1 --- /dev/null +++ b/azion-api/model_application_response_phase_rule_engine_order_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ApplicationResponsePhaseRuleEngineOrderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ApplicationResponsePhaseRuleEngineOrderRequest{} + +// ApplicationResponsePhaseRuleEngineOrderRequest struct for ApplicationResponsePhaseRuleEngineOrderRequest +type ApplicationResponsePhaseRuleEngineOrderRequest struct { + Order []int64 `json:"order"` +} + +type _ApplicationResponsePhaseRuleEngineOrderRequest ApplicationResponsePhaseRuleEngineOrderRequest + +// NewApplicationResponsePhaseRuleEngineOrderRequest instantiates a new ApplicationResponsePhaseRuleEngineOrderRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewApplicationResponsePhaseRuleEngineOrderRequest(order []int64) *ApplicationResponsePhaseRuleEngineOrderRequest { + this := ApplicationResponsePhaseRuleEngineOrderRequest{} + this.Order = order + return &this +} + +// NewApplicationResponsePhaseRuleEngineOrderRequestWithDefaults instantiates a new ApplicationResponsePhaseRuleEngineOrderRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewApplicationResponsePhaseRuleEngineOrderRequestWithDefaults() *ApplicationResponsePhaseRuleEngineOrderRequest { + this := ApplicationResponsePhaseRuleEngineOrderRequest{} + return &this +} + +// GetOrder returns the Order field value +func (o *ApplicationResponsePhaseRuleEngineOrderRequest) GetOrder() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *ApplicationResponsePhaseRuleEngineOrderRequest) GetOrderOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Order, true +} + +// SetOrder sets field value +func (o *ApplicationResponsePhaseRuleEngineOrderRequest) SetOrder(v []int64) { + o.Order = v +} + +func (o ApplicationResponsePhaseRuleEngineOrderRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ApplicationResponsePhaseRuleEngineOrderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *ApplicationResponsePhaseRuleEngineOrderRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApplicationResponsePhaseRuleEngineOrderRequest := _ApplicationResponsePhaseRuleEngineOrderRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varApplicationResponsePhaseRuleEngineOrderRequest) + + if err != nil { + return err + } + + *o = ApplicationResponsePhaseRuleEngineOrderRequest(varApplicationResponsePhaseRuleEngineOrderRequest) + + return err +} + +type NullableApplicationResponsePhaseRuleEngineOrderRequest struct { + value *ApplicationResponsePhaseRuleEngineOrderRequest + isSet bool +} + +func (v NullableApplicationResponsePhaseRuleEngineOrderRequest) Get() *ApplicationResponsePhaseRuleEngineOrderRequest { + return v.value +} + +func (v *NullableApplicationResponsePhaseRuleEngineOrderRequest) Set(val *ApplicationResponsePhaseRuleEngineOrderRequest) { + v.value = val + v.isSet = true +} + +func (v NullableApplicationResponsePhaseRuleEngineOrderRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableApplicationResponsePhaseRuleEngineOrderRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableApplicationResponsePhaseRuleEngineOrderRequest(val *ApplicationResponsePhaseRuleEngineOrderRequest) *NullableApplicationResponsePhaseRuleEngineOrderRequest { + return &NullableApplicationResponsePhaseRuleEngineOrderRequest{value: val, isSet: true} +} + +func (v NullableApplicationResponsePhaseRuleEngineOrderRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableApplicationResponsePhaseRuleEngineOrderRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aws4_hmac.go b/azion-api/model_aws4_hmac.go new file mode 100644 index 0000000..5413327 --- /dev/null +++ b/azion-api/model_aws4_hmac.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWS4HMAC type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWS4HMAC{} + +// AWS4HMAC struct for AWS4HMAC +type AWS4HMAC struct { + // * `aws4_hmac_sha256` - AWS for HMAC - SHA256 + Type *string `json:"type,omitempty"` + Attributes AWS4HMACAttributes `json:"attributes"` +} + +type _AWS4HMAC AWS4HMAC + +// NewAWS4HMAC instantiates a new AWS4HMAC object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWS4HMAC(attributes AWS4HMACAttributes) *AWS4HMAC { + this := AWS4HMAC{} + this.Attributes = attributes + return &this +} + +// NewAWS4HMACWithDefaults instantiates a new AWS4HMAC object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWS4HMACWithDefaults() *AWS4HMAC { + this := AWS4HMAC{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AWS4HMAC) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWS4HMAC) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AWS4HMAC) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AWS4HMAC) SetType(v string) { + o.Type = &v +} + +// GetAttributes returns the Attributes field value +func (o *AWS4HMAC) GetAttributes() AWS4HMACAttributes { + if o == nil { + var ret AWS4HMACAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *AWS4HMAC) GetAttributesOk() (*AWS4HMACAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *AWS4HMAC) SetAttributes(v AWS4HMACAttributes) { + o.Attributes = v +} + +func (o AWS4HMAC) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWS4HMAC) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *AWS4HMAC) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWS4HMAC := _AWS4HMAC{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWS4HMAC) + + if err != nil { + return err + } + + *o = AWS4HMAC(varAWS4HMAC) + + return err +} + +type NullableAWS4HMAC struct { + value *AWS4HMAC + isSet bool +} + +func (v NullableAWS4HMAC) Get() *AWS4HMAC { + return v.value +} + +func (v *NullableAWS4HMAC) Set(val *AWS4HMAC) { + v.value = val + v.isSet = true +} + +func (v NullableAWS4HMAC) IsSet() bool { + return v.isSet +} + +func (v *NullableAWS4HMAC) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWS4HMAC(val *AWS4HMAC) *NullableAWS4HMAC { + return &NullableAWS4HMAC{value: val, isSet: true} +} + +func (v NullableAWS4HMAC) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWS4HMAC) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aws4_hmac_attributes.go b/azion-api/model_aws4_hmac_attributes.go new file mode 100644 index 0000000..9e39b3c --- /dev/null +++ b/azion-api/model_aws4_hmac_attributes.go @@ -0,0 +1,251 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWS4HMACAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWS4HMACAttributes{} + +// AWS4HMACAttributes struct for AWS4HMACAttributes +type AWS4HMACAttributes struct { + Region string `json:"region"` + Service *string `json:"service,omitempty"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` +} + +type _AWS4HMACAttributes AWS4HMACAttributes + +// NewAWS4HMACAttributes instantiates a new AWS4HMACAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWS4HMACAttributes(region string, accessKey string, secretKey string) *AWS4HMACAttributes { + this := AWS4HMACAttributes{} + this.Region = region + this.AccessKey = accessKey + this.SecretKey = secretKey + return &this +} + +// NewAWS4HMACAttributesWithDefaults instantiates a new AWS4HMACAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWS4HMACAttributesWithDefaults() *AWS4HMACAttributes { + this := AWS4HMACAttributes{} + return &this +} + +// GetRegion returns the Region field value +func (o *AWS4HMACAttributes) GetRegion() string { + if o == nil { + var ret string + return ret + } + + return o.Region +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributes) GetRegionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Region, true +} + +// SetRegion sets field value +func (o *AWS4HMACAttributes) SetRegion(v string) { + o.Region = v +} + +// GetService returns the Service field value if set, zero value otherwise. +func (o *AWS4HMACAttributes) GetService() string { + if o == nil || IsNil(o.Service) { + var ret string + return ret + } + return *o.Service +} + +// GetServiceOk returns a tuple with the Service field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributes) GetServiceOk() (*string, bool) { + if o == nil || IsNil(o.Service) { + return nil, false + } + return o.Service, true +} + +// HasService returns a boolean if a field has been set. +func (o *AWS4HMACAttributes) HasService() bool { + if o != nil && !IsNil(o.Service) { + return true + } + + return false +} + +// SetService gets a reference to the given string and assigns it to the Service field. +func (o *AWS4HMACAttributes) SetService(v string) { + o.Service = &v +} + +// GetAccessKey returns the AccessKey field value +func (o *AWS4HMACAttributes) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributes) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *AWS4HMACAttributes) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *AWS4HMACAttributes) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributes) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *AWS4HMACAttributes) SetSecretKey(v string) { + o.SecretKey = v +} + +func (o AWS4HMACAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWS4HMACAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["region"] = o.Region + if !IsNil(o.Service) { + toSerialize["service"] = o.Service + } + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + return toSerialize, nil +} + +func (o *AWS4HMACAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "region", + "access_key", + "secret_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWS4HMACAttributes := _AWS4HMACAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWS4HMACAttributes) + + if err != nil { + return err + } + + *o = AWS4HMACAttributes(varAWS4HMACAttributes) + + return err +} + +type NullableAWS4HMACAttributes struct { + value *AWS4HMACAttributes + isSet bool +} + +func (v NullableAWS4HMACAttributes) Get() *AWS4HMACAttributes { + return v.value +} + +func (v *NullableAWS4HMACAttributes) Set(val *AWS4HMACAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableAWS4HMACAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableAWS4HMACAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWS4HMACAttributes(val *AWS4HMACAttributes) *NullableAWS4HMACAttributes { + return &NullableAWS4HMACAttributes{value: val, isSet: true} +} + +func (v NullableAWS4HMACAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWS4HMACAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aws4_hmac_attributes_request.go b/azion-api/model_aws4_hmac_attributes_request.go new file mode 100644 index 0000000..f54eec5 --- /dev/null +++ b/azion-api/model_aws4_hmac_attributes_request.go @@ -0,0 +1,251 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWS4HMACAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWS4HMACAttributesRequest{} + +// AWS4HMACAttributesRequest struct for AWS4HMACAttributesRequest +type AWS4HMACAttributesRequest struct { + Region string `json:"region"` + Service *string `json:"service,omitempty"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` +} + +type _AWS4HMACAttributesRequest AWS4HMACAttributesRequest + +// NewAWS4HMACAttributesRequest instantiates a new AWS4HMACAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWS4HMACAttributesRequest(region string, accessKey string, secretKey string) *AWS4HMACAttributesRequest { + this := AWS4HMACAttributesRequest{} + this.Region = region + this.AccessKey = accessKey + this.SecretKey = secretKey + return &this +} + +// NewAWS4HMACAttributesRequestWithDefaults instantiates a new AWS4HMACAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWS4HMACAttributesRequestWithDefaults() *AWS4HMACAttributesRequest { + this := AWS4HMACAttributesRequest{} + return &this +} + +// GetRegion returns the Region field value +func (o *AWS4HMACAttributesRequest) GetRegion() string { + if o == nil { + var ret string + return ret + } + + return o.Region +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributesRequest) GetRegionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Region, true +} + +// SetRegion sets field value +func (o *AWS4HMACAttributesRequest) SetRegion(v string) { + o.Region = v +} + +// GetService returns the Service field value if set, zero value otherwise. +func (o *AWS4HMACAttributesRequest) GetService() string { + if o == nil || IsNil(o.Service) { + var ret string + return ret + } + return *o.Service +} + +// GetServiceOk returns a tuple with the Service field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributesRequest) GetServiceOk() (*string, bool) { + if o == nil || IsNil(o.Service) { + return nil, false + } + return o.Service, true +} + +// HasService returns a boolean if a field has been set. +func (o *AWS4HMACAttributesRequest) HasService() bool { + if o != nil && !IsNil(o.Service) { + return true + } + + return false +} + +// SetService gets a reference to the given string and assigns it to the Service field. +func (o *AWS4HMACAttributesRequest) SetService(v string) { + o.Service = &v +} + +// GetAccessKey returns the AccessKey field value +func (o *AWS4HMACAttributesRequest) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributesRequest) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *AWS4HMACAttributesRequest) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *AWS4HMACAttributesRequest) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACAttributesRequest) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *AWS4HMACAttributesRequest) SetSecretKey(v string) { + o.SecretKey = v +} + +func (o AWS4HMACAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWS4HMACAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["region"] = o.Region + if !IsNil(o.Service) { + toSerialize["service"] = o.Service + } + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + return toSerialize, nil +} + +func (o *AWS4HMACAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "region", + "access_key", + "secret_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWS4HMACAttributesRequest := _AWS4HMACAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWS4HMACAttributesRequest) + + if err != nil { + return err + } + + *o = AWS4HMACAttributesRequest(varAWS4HMACAttributesRequest) + + return err +} + +type NullableAWS4HMACAttributesRequest struct { + value *AWS4HMACAttributesRequest + isSet bool +} + +func (v NullableAWS4HMACAttributesRequest) Get() *AWS4HMACAttributesRequest { + return v.value +} + +func (v *NullableAWS4HMACAttributesRequest) Set(val *AWS4HMACAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAWS4HMACAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAWS4HMACAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWS4HMACAttributesRequest(val *AWS4HMACAttributesRequest) *NullableAWS4HMACAttributesRequest { + return &NullableAWS4HMACAttributesRequest{value: val, isSet: true} +} + +func (v NullableAWS4HMACAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWS4HMACAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aws4_hmac_request.go b/azion-api/model_aws4_hmac_request.go new file mode 100644 index 0000000..7654868 --- /dev/null +++ b/azion-api/model_aws4_hmac_request.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWS4HMACRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWS4HMACRequest{} + +// AWS4HMACRequest struct for AWS4HMACRequest +type AWS4HMACRequest struct { + // * `aws4_hmac_sha256` - AWS for HMAC - SHA256 + Type *string `json:"type,omitempty"` + Attributes AWS4HMACAttributesRequest `json:"attributes"` +} + +type _AWS4HMACRequest AWS4HMACRequest + +// NewAWS4HMACRequest instantiates a new AWS4HMACRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWS4HMACRequest(attributes AWS4HMACAttributesRequest) *AWS4HMACRequest { + this := AWS4HMACRequest{} + this.Attributes = attributes + return &this +} + +// NewAWS4HMACRequestWithDefaults instantiates a new AWS4HMACRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWS4HMACRequestWithDefaults() *AWS4HMACRequest { + this := AWS4HMACRequest{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *AWS4HMACRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AWS4HMACRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AWS4HMACRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AWS4HMACRequest) SetType(v string) { + o.Type = &v +} + +// GetAttributes returns the Attributes field value +func (o *AWS4HMACRequest) GetAttributes() AWS4HMACAttributesRequest { + if o == nil { + var ret AWS4HMACAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *AWS4HMACRequest) GetAttributesOk() (*AWS4HMACAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *AWS4HMACRequest) SetAttributes(v AWS4HMACAttributesRequest) { + o.Attributes = v +} + +func (o AWS4HMACRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWS4HMACRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *AWS4HMACRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWS4HMACRequest := _AWS4HMACRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWS4HMACRequest) + + if err != nil { + return err + } + + *o = AWS4HMACRequest(varAWS4HMACRequest) + + return err +} + +type NullableAWS4HMACRequest struct { + value *AWS4HMACRequest + isSet bool +} + +func (v NullableAWS4HMACRequest) Get() *AWS4HMACRequest { + return v.value +} + +func (v *NullableAWS4HMACRequest) Set(val *AWS4HMACRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAWS4HMACRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAWS4HMACRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWS4HMACRequest(val *AWS4HMACRequest) *NullableAWS4HMACRequest { + return &NullableAWS4HMACRequest{value: val, isSet: true} +} + +func (v NullableAWS4HMACRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWS4HMACRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aws_kinesis_firehose_endpoint.go b/azion-api/model_aws_kinesis_firehose_endpoint.go new file mode 100644 index 0000000..7e783bc --- /dev/null +++ b/azion-api/model_aws_kinesis_firehose_endpoint.go @@ -0,0 +1,272 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWSKinesisFirehoseEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWSKinesisFirehoseEndpoint{} + +// AWSKinesisFirehoseEndpoint struct for AWSKinesisFirehoseEndpoint +type AWSKinesisFirehoseEndpoint struct { + AccessKey string `json:"access_key"` + StreamName string `json:"stream_name"` + Region string `json:"region"` + SecretKey string `json:"secret_key"` + // Type identifier for this endpoint (aws_kinesis_firehose) + Type string `json:"type"` +} + +type _AWSKinesisFirehoseEndpoint AWSKinesisFirehoseEndpoint + +// NewAWSKinesisFirehoseEndpoint instantiates a new AWSKinesisFirehoseEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWSKinesisFirehoseEndpoint(accessKey string, streamName string, region string, secretKey string, type_ string) *AWSKinesisFirehoseEndpoint { + this := AWSKinesisFirehoseEndpoint{} + this.AccessKey = accessKey + this.StreamName = streamName + this.Region = region + this.SecretKey = secretKey + this.Type = type_ + return &this +} + +// NewAWSKinesisFirehoseEndpointWithDefaults instantiates a new AWSKinesisFirehoseEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWSKinesisFirehoseEndpointWithDefaults() *AWSKinesisFirehoseEndpoint { + this := AWSKinesisFirehoseEndpoint{} + return &this +} + +// GetAccessKey returns the AccessKey field value +func (o *AWSKinesisFirehoseEndpoint) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpoint) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *AWSKinesisFirehoseEndpoint) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetStreamName returns the StreamName field value +func (o *AWSKinesisFirehoseEndpoint) GetStreamName() string { + if o == nil { + var ret string + return ret + } + + return o.StreamName +} + +// GetStreamNameOk returns a tuple with the StreamName field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpoint) GetStreamNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StreamName, true +} + +// SetStreamName sets field value +func (o *AWSKinesisFirehoseEndpoint) SetStreamName(v string) { + o.StreamName = v +} + +// GetRegion returns the Region field value +func (o *AWSKinesisFirehoseEndpoint) GetRegion() string { + if o == nil { + var ret string + return ret + } + + return o.Region +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpoint) GetRegionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Region, true +} + +// SetRegion sets field value +func (o *AWSKinesisFirehoseEndpoint) SetRegion(v string) { + o.Region = v +} + +// GetSecretKey returns the SecretKey field value +func (o *AWSKinesisFirehoseEndpoint) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpoint) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *AWSKinesisFirehoseEndpoint) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetType returns the Type field value +func (o *AWSKinesisFirehoseEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AWSKinesisFirehoseEndpoint) SetType(v string) { + o.Type = v +} + +func (o AWSKinesisFirehoseEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWSKinesisFirehoseEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_key"] = o.AccessKey + toSerialize["stream_name"] = o.StreamName + toSerialize["region"] = o.Region + toSerialize["secret_key"] = o.SecretKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AWSKinesisFirehoseEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_key", + "stream_name", + "region", + "secret_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWSKinesisFirehoseEndpoint := _AWSKinesisFirehoseEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWSKinesisFirehoseEndpoint) + + if err != nil { + return err + } + + *o = AWSKinesisFirehoseEndpoint(varAWSKinesisFirehoseEndpoint) + + return err +} + +type NullableAWSKinesisFirehoseEndpoint struct { + value *AWSKinesisFirehoseEndpoint + isSet bool +} + +func (v NullableAWSKinesisFirehoseEndpoint) Get() *AWSKinesisFirehoseEndpoint { + return v.value +} + +func (v *NullableAWSKinesisFirehoseEndpoint) Set(val *AWSKinesisFirehoseEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableAWSKinesisFirehoseEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableAWSKinesisFirehoseEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWSKinesisFirehoseEndpoint(val *AWSKinesisFirehoseEndpoint) *NullableAWSKinesisFirehoseEndpoint { + return &NullableAWSKinesisFirehoseEndpoint{value: val, isSet: true} +} + +func (v NullableAWSKinesisFirehoseEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWSKinesisFirehoseEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_aws_kinesis_firehose_endpoint_request.go b/azion-api/model_aws_kinesis_firehose_endpoint_request.go new file mode 100644 index 0000000..f9d1329 --- /dev/null +++ b/azion-api/model_aws_kinesis_firehose_endpoint_request.go @@ -0,0 +1,272 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AWSKinesisFirehoseEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AWSKinesisFirehoseEndpointRequest{} + +// AWSKinesisFirehoseEndpointRequest struct for AWSKinesisFirehoseEndpointRequest +type AWSKinesisFirehoseEndpointRequest struct { + AccessKey string `json:"access_key"` + StreamName string `json:"stream_name"` + Region string `json:"region"` + SecretKey string `json:"secret_key"` + // Type identifier for this endpoint (aws_kinesis_firehose) + Type string `json:"type"` +} + +type _AWSKinesisFirehoseEndpointRequest AWSKinesisFirehoseEndpointRequest + +// NewAWSKinesisFirehoseEndpointRequest instantiates a new AWSKinesisFirehoseEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAWSKinesisFirehoseEndpointRequest(accessKey string, streamName string, region string, secretKey string, type_ string) *AWSKinesisFirehoseEndpointRequest { + this := AWSKinesisFirehoseEndpointRequest{} + this.AccessKey = accessKey + this.StreamName = streamName + this.Region = region + this.SecretKey = secretKey + this.Type = type_ + return &this +} + +// NewAWSKinesisFirehoseEndpointRequestWithDefaults instantiates a new AWSKinesisFirehoseEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAWSKinesisFirehoseEndpointRequestWithDefaults() *AWSKinesisFirehoseEndpointRequest { + this := AWSKinesisFirehoseEndpointRequest{} + return &this +} + +// GetAccessKey returns the AccessKey field value +func (o *AWSKinesisFirehoseEndpointRequest) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpointRequest) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *AWSKinesisFirehoseEndpointRequest) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetStreamName returns the StreamName field value +func (o *AWSKinesisFirehoseEndpointRequest) GetStreamName() string { + if o == nil { + var ret string + return ret + } + + return o.StreamName +} + +// GetStreamNameOk returns a tuple with the StreamName field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpointRequest) GetStreamNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StreamName, true +} + +// SetStreamName sets field value +func (o *AWSKinesisFirehoseEndpointRequest) SetStreamName(v string) { + o.StreamName = v +} + +// GetRegion returns the Region field value +func (o *AWSKinesisFirehoseEndpointRequest) GetRegion() string { + if o == nil { + var ret string + return ret + } + + return o.Region +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpointRequest) GetRegionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Region, true +} + +// SetRegion sets field value +func (o *AWSKinesisFirehoseEndpointRequest) SetRegion(v string) { + o.Region = v +} + +// GetSecretKey returns the SecretKey field value +func (o *AWSKinesisFirehoseEndpointRequest) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpointRequest) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *AWSKinesisFirehoseEndpointRequest) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetType returns the Type field value +func (o *AWSKinesisFirehoseEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AWSKinesisFirehoseEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AWSKinesisFirehoseEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o AWSKinesisFirehoseEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AWSKinesisFirehoseEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_key"] = o.AccessKey + toSerialize["stream_name"] = o.StreamName + toSerialize["region"] = o.Region + toSerialize["secret_key"] = o.SecretKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AWSKinesisFirehoseEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_key", + "stream_name", + "region", + "secret_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAWSKinesisFirehoseEndpointRequest := _AWSKinesisFirehoseEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAWSKinesisFirehoseEndpointRequest) + + if err != nil { + return err + } + + *o = AWSKinesisFirehoseEndpointRequest(varAWSKinesisFirehoseEndpointRequest) + + return err +} + +type NullableAWSKinesisFirehoseEndpointRequest struct { + value *AWSKinesisFirehoseEndpointRequest + isSet bool +} + +func (v NullableAWSKinesisFirehoseEndpointRequest) Get() *AWSKinesisFirehoseEndpointRequest { + return v.value +} + +func (v *NullableAWSKinesisFirehoseEndpointRequest) Set(val *AWSKinesisFirehoseEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAWSKinesisFirehoseEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAWSKinesisFirehoseEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAWSKinesisFirehoseEndpointRequest(val *AWSKinesisFirehoseEndpointRequest) *NullableAWSKinesisFirehoseEndpointRequest { + return &NullableAWSKinesisFirehoseEndpointRequest{value: val, isSet: true} +} + +func (v NullableAWSKinesisFirehoseEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAWSKinesisFirehoseEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_azure_blob_storage_endpoint.go b/azion-api/model_azure_blob_storage_endpoint.go new file mode 100644 index 0000000..6be060d --- /dev/null +++ b/azion-api/model_azure_blob_storage_endpoint.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AzureBlobStorageEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AzureBlobStorageEndpoint{} + +// AzureBlobStorageEndpoint struct for AzureBlobStorageEndpoint +type AzureBlobStorageEndpoint struct { + StorageAccount string `json:"storage_account"` + ContainerName string `json:"container_name"` + BlobSasToken string `json:"blob_sas_token"` + // Type identifier for this endpoint (azure_blob_storage) + Type string `json:"type"` +} + +type _AzureBlobStorageEndpoint AzureBlobStorageEndpoint + +// NewAzureBlobStorageEndpoint instantiates a new AzureBlobStorageEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAzureBlobStorageEndpoint(storageAccount string, containerName string, blobSasToken string, type_ string) *AzureBlobStorageEndpoint { + this := AzureBlobStorageEndpoint{} + this.StorageAccount = storageAccount + this.ContainerName = containerName + this.BlobSasToken = blobSasToken + this.Type = type_ + return &this +} + +// NewAzureBlobStorageEndpointWithDefaults instantiates a new AzureBlobStorageEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAzureBlobStorageEndpointWithDefaults() *AzureBlobStorageEndpoint { + this := AzureBlobStorageEndpoint{} + return &this +} + +// GetStorageAccount returns the StorageAccount field value +func (o *AzureBlobStorageEndpoint) GetStorageAccount() string { + if o == nil { + var ret string + return ret + } + + return o.StorageAccount +} + +// GetStorageAccountOk returns a tuple with the StorageAccount field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpoint) GetStorageAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StorageAccount, true +} + +// SetStorageAccount sets field value +func (o *AzureBlobStorageEndpoint) SetStorageAccount(v string) { + o.StorageAccount = v +} + +// GetContainerName returns the ContainerName field value +func (o *AzureBlobStorageEndpoint) GetContainerName() string { + if o == nil { + var ret string + return ret + } + + return o.ContainerName +} + +// GetContainerNameOk returns a tuple with the ContainerName field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpoint) GetContainerNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContainerName, true +} + +// SetContainerName sets field value +func (o *AzureBlobStorageEndpoint) SetContainerName(v string) { + o.ContainerName = v +} + +// GetBlobSasToken returns the BlobSasToken field value +func (o *AzureBlobStorageEndpoint) GetBlobSasToken() string { + if o == nil { + var ret string + return ret + } + + return o.BlobSasToken +} + +// GetBlobSasTokenOk returns a tuple with the BlobSasToken field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpoint) GetBlobSasTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BlobSasToken, true +} + +// SetBlobSasToken sets field value +func (o *AzureBlobStorageEndpoint) SetBlobSasToken(v string) { + o.BlobSasToken = v +} + +// GetType returns the Type field value +func (o *AzureBlobStorageEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AzureBlobStorageEndpoint) SetType(v string) { + o.Type = v +} + +func (o AzureBlobStorageEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AzureBlobStorageEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["storage_account"] = o.StorageAccount + toSerialize["container_name"] = o.ContainerName + toSerialize["blob_sas_token"] = o.BlobSasToken + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AzureBlobStorageEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "storage_account", + "container_name", + "blob_sas_token", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAzureBlobStorageEndpoint := _AzureBlobStorageEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAzureBlobStorageEndpoint) + + if err != nil { + return err + } + + *o = AzureBlobStorageEndpoint(varAzureBlobStorageEndpoint) + + return err +} + +type NullableAzureBlobStorageEndpoint struct { + value *AzureBlobStorageEndpoint + isSet bool +} + +func (v NullableAzureBlobStorageEndpoint) Get() *AzureBlobStorageEndpoint { + return v.value +} + +func (v *NullableAzureBlobStorageEndpoint) Set(val *AzureBlobStorageEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableAzureBlobStorageEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableAzureBlobStorageEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAzureBlobStorageEndpoint(val *AzureBlobStorageEndpoint) *NullableAzureBlobStorageEndpoint { + return &NullableAzureBlobStorageEndpoint{value: val, isSet: true} +} + +func (v NullableAzureBlobStorageEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAzureBlobStorageEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_azure_blob_storage_endpoint_request.go b/azion-api/model_azure_blob_storage_endpoint_request.go new file mode 100644 index 0000000..cd64034 --- /dev/null +++ b/azion-api/model_azure_blob_storage_endpoint_request.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AzureBlobStorageEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AzureBlobStorageEndpointRequest{} + +// AzureBlobStorageEndpointRequest struct for AzureBlobStorageEndpointRequest +type AzureBlobStorageEndpointRequest struct { + StorageAccount string `json:"storage_account"` + ContainerName string `json:"container_name"` + BlobSasToken string `json:"blob_sas_token"` + // Type identifier for this endpoint (azure_blob_storage) + Type string `json:"type"` +} + +type _AzureBlobStorageEndpointRequest AzureBlobStorageEndpointRequest + +// NewAzureBlobStorageEndpointRequest instantiates a new AzureBlobStorageEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAzureBlobStorageEndpointRequest(storageAccount string, containerName string, blobSasToken string, type_ string) *AzureBlobStorageEndpointRequest { + this := AzureBlobStorageEndpointRequest{} + this.StorageAccount = storageAccount + this.ContainerName = containerName + this.BlobSasToken = blobSasToken + this.Type = type_ + return &this +} + +// NewAzureBlobStorageEndpointRequestWithDefaults instantiates a new AzureBlobStorageEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAzureBlobStorageEndpointRequestWithDefaults() *AzureBlobStorageEndpointRequest { + this := AzureBlobStorageEndpointRequest{} + return &this +} + +// GetStorageAccount returns the StorageAccount field value +func (o *AzureBlobStorageEndpointRequest) GetStorageAccount() string { + if o == nil { + var ret string + return ret + } + + return o.StorageAccount +} + +// GetStorageAccountOk returns a tuple with the StorageAccount field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpointRequest) GetStorageAccountOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StorageAccount, true +} + +// SetStorageAccount sets field value +func (o *AzureBlobStorageEndpointRequest) SetStorageAccount(v string) { + o.StorageAccount = v +} + +// GetContainerName returns the ContainerName field value +func (o *AzureBlobStorageEndpointRequest) GetContainerName() string { + if o == nil { + var ret string + return ret + } + + return o.ContainerName +} + +// GetContainerNameOk returns a tuple with the ContainerName field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpointRequest) GetContainerNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContainerName, true +} + +// SetContainerName sets field value +func (o *AzureBlobStorageEndpointRequest) SetContainerName(v string) { + o.ContainerName = v +} + +// GetBlobSasToken returns the BlobSasToken field value +func (o *AzureBlobStorageEndpointRequest) GetBlobSasToken() string { + if o == nil { + var ret string + return ret + } + + return o.BlobSasToken +} + +// GetBlobSasTokenOk returns a tuple with the BlobSasToken field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpointRequest) GetBlobSasTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BlobSasToken, true +} + +// SetBlobSasToken sets field value +func (o *AzureBlobStorageEndpointRequest) SetBlobSasToken(v string) { + o.BlobSasToken = v +} + +// GetType returns the Type field value +func (o *AzureBlobStorageEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AzureBlobStorageEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AzureBlobStorageEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o AzureBlobStorageEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AzureBlobStorageEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["storage_account"] = o.StorageAccount + toSerialize["container_name"] = o.ContainerName + toSerialize["blob_sas_token"] = o.BlobSasToken + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AzureBlobStorageEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "storage_account", + "container_name", + "blob_sas_token", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAzureBlobStorageEndpointRequest := _AzureBlobStorageEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAzureBlobStorageEndpointRequest) + + if err != nil { + return err + } + + *o = AzureBlobStorageEndpointRequest(varAzureBlobStorageEndpointRequest) + + return err +} + +type NullableAzureBlobStorageEndpointRequest struct { + value *AzureBlobStorageEndpointRequest + isSet bool +} + +func (v NullableAzureBlobStorageEndpointRequest) Get() *AzureBlobStorageEndpointRequest { + return v.value +} + +func (v *NullableAzureBlobStorageEndpointRequest) Set(val *AzureBlobStorageEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAzureBlobStorageEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAzureBlobStorageEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAzureBlobStorageEndpointRequest(val *AzureBlobStorageEndpointRequest) *NullableAzureBlobStorageEndpointRequest { + return &NullableAzureBlobStorageEndpointRequest{value: val, isSet: true} +} + +func (v NullableAzureBlobStorageEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAzureBlobStorageEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_azure_monitor_endpoint.go b/azion-api/model_azure_monitor_endpoint.go new file mode 100644 index 0000000..a3d6d93 --- /dev/null +++ b/azion-api/model_azure_monitor_endpoint.go @@ -0,0 +1,290 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AzureMonitorEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AzureMonitorEndpoint{} + +// AzureMonitorEndpoint struct for AzureMonitorEndpoint +type AzureMonitorEndpoint struct { + LogType string `json:"log_type"` + SharedKey string `json:"shared_key"` + TimeGeneratedField NullableString `json:"time_generated_field,omitempty"` + WorkspaceId string `json:"workspace_id"` + // Type identifier for this endpoint (azure_monitor) + Type string `json:"type"` +} + +type _AzureMonitorEndpoint AzureMonitorEndpoint + +// NewAzureMonitorEndpoint instantiates a new AzureMonitorEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAzureMonitorEndpoint(logType string, sharedKey string, workspaceId string, type_ string) *AzureMonitorEndpoint { + this := AzureMonitorEndpoint{} + this.LogType = logType + this.SharedKey = sharedKey + this.WorkspaceId = workspaceId + this.Type = type_ + return &this +} + +// NewAzureMonitorEndpointWithDefaults instantiates a new AzureMonitorEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAzureMonitorEndpointWithDefaults() *AzureMonitorEndpoint { + this := AzureMonitorEndpoint{} + return &this +} + +// GetLogType returns the LogType field value +func (o *AzureMonitorEndpoint) GetLogType() string { + if o == nil { + var ret string + return ret + } + + return o.LogType +} + +// GetLogTypeOk returns a tuple with the LogType field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpoint) GetLogTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LogType, true +} + +// SetLogType sets field value +func (o *AzureMonitorEndpoint) SetLogType(v string) { + o.LogType = v +} + +// GetSharedKey returns the SharedKey field value +func (o *AzureMonitorEndpoint) GetSharedKey() string { + if o == nil { + var ret string + return ret + } + + return o.SharedKey +} + +// GetSharedKeyOk returns a tuple with the SharedKey field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpoint) GetSharedKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SharedKey, true +} + +// SetSharedKey sets field value +func (o *AzureMonitorEndpoint) SetSharedKey(v string) { + o.SharedKey = v +} + +// GetTimeGeneratedField returns the TimeGeneratedField field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AzureMonitorEndpoint) GetTimeGeneratedField() string { + if o == nil || IsNil(o.TimeGeneratedField.Get()) { + var ret string + return ret + } + return *o.TimeGeneratedField.Get() +} + +// GetTimeGeneratedFieldOk returns a tuple with the TimeGeneratedField field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AzureMonitorEndpoint) GetTimeGeneratedFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TimeGeneratedField.Get(), o.TimeGeneratedField.IsSet() +} + +// HasTimeGeneratedField returns a boolean if a field has been set. +func (o *AzureMonitorEndpoint) HasTimeGeneratedField() bool { + if o != nil && o.TimeGeneratedField.IsSet() { + return true + } + + return false +} + +// SetTimeGeneratedField gets a reference to the given NullableString and assigns it to the TimeGeneratedField field. +func (o *AzureMonitorEndpoint) SetTimeGeneratedField(v string) { + o.TimeGeneratedField.Set(&v) +} +// SetTimeGeneratedFieldNil sets the value for TimeGeneratedField to be an explicit nil +func (o *AzureMonitorEndpoint) SetTimeGeneratedFieldNil() { + o.TimeGeneratedField.Set(nil) +} + +// UnsetTimeGeneratedField ensures that no value is present for TimeGeneratedField, not even an explicit nil +func (o *AzureMonitorEndpoint) UnsetTimeGeneratedField() { + o.TimeGeneratedField.Unset() +} + +// GetWorkspaceId returns the WorkspaceId field value +func (o *AzureMonitorEndpoint) GetWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceId +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpoint) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceId, true +} + +// SetWorkspaceId sets field value +func (o *AzureMonitorEndpoint) SetWorkspaceId(v string) { + o.WorkspaceId = v +} + +// GetType returns the Type field value +func (o *AzureMonitorEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AzureMonitorEndpoint) SetType(v string) { + o.Type = v +} + +func (o AzureMonitorEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AzureMonitorEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["log_type"] = o.LogType + toSerialize["shared_key"] = o.SharedKey + if o.TimeGeneratedField.IsSet() { + toSerialize["time_generated_field"] = o.TimeGeneratedField.Get() + } + toSerialize["workspace_id"] = o.WorkspaceId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AzureMonitorEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "log_type", + "shared_key", + "workspace_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAzureMonitorEndpoint := _AzureMonitorEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAzureMonitorEndpoint) + + if err != nil { + return err + } + + *o = AzureMonitorEndpoint(varAzureMonitorEndpoint) + + return err +} + +type NullableAzureMonitorEndpoint struct { + value *AzureMonitorEndpoint + isSet bool +} + +func (v NullableAzureMonitorEndpoint) Get() *AzureMonitorEndpoint { + return v.value +} + +func (v *NullableAzureMonitorEndpoint) Set(val *AzureMonitorEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableAzureMonitorEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableAzureMonitorEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAzureMonitorEndpoint(val *AzureMonitorEndpoint) *NullableAzureMonitorEndpoint { + return &NullableAzureMonitorEndpoint{value: val, isSet: true} +} + +func (v NullableAzureMonitorEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAzureMonitorEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_azure_monitor_endpoint_request.go b/azion-api/model_azure_monitor_endpoint_request.go new file mode 100644 index 0000000..c1541b6 --- /dev/null +++ b/azion-api/model_azure_monitor_endpoint_request.go @@ -0,0 +1,290 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the AzureMonitorEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &AzureMonitorEndpointRequest{} + +// AzureMonitorEndpointRequest struct for AzureMonitorEndpointRequest +type AzureMonitorEndpointRequest struct { + LogType string `json:"log_type"` + SharedKey string `json:"shared_key"` + TimeGeneratedField NullableString `json:"time_generated_field,omitempty"` + WorkspaceId string `json:"workspace_id"` + // Type identifier for this endpoint (azure_monitor) + Type string `json:"type"` +} + +type _AzureMonitorEndpointRequest AzureMonitorEndpointRequest + +// NewAzureMonitorEndpointRequest instantiates a new AzureMonitorEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewAzureMonitorEndpointRequest(logType string, sharedKey string, workspaceId string, type_ string) *AzureMonitorEndpointRequest { + this := AzureMonitorEndpointRequest{} + this.LogType = logType + this.SharedKey = sharedKey + this.WorkspaceId = workspaceId + this.Type = type_ + return &this +} + +// NewAzureMonitorEndpointRequestWithDefaults instantiates a new AzureMonitorEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewAzureMonitorEndpointRequestWithDefaults() *AzureMonitorEndpointRequest { + this := AzureMonitorEndpointRequest{} + return &this +} + +// GetLogType returns the LogType field value +func (o *AzureMonitorEndpointRequest) GetLogType() string { + if o == nil { + var ret string + return ret + } + + return o.LogType +} + +// GetLogTypeOk returns a tuple with the LogType field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpointRequest) GetLogTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LogType, true +} + +// SetLogType sets field value +func (o *AzureMonitorEndpointRequest) SetLogType(v string) { + o.LogType = v +} + +// GetSharedKey returns the SharedKey field value +func (o *AzureMonitorEndpointRequest) GetSharedKey() string { + if o == nil { + var ret string + return ret + } + + return o.SharedKey +} + +// GetSharedKeyOk returns a tuple with the SharedKey field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpointRequest) GetSharedKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SharedKey, true +} + +// SetSharedKey sets field value +func (o *AzureMonitorEndpointRequest) SetSharedKey(v string) { + o.SharedKey = v +} + +// GetTimeGeneratedField returns the TimeGeneratedField field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *AzureMonitorEndpointRequest) GetTimeGeneratedField() string { + if o == nil || IsNil(o.TimeGeneratedField.Get()) { + var ret string + return ret + } + return *o.TimeGeneratedField.Get() +} + +// GetTimeGeneratedFieldOk returns a tuple with the TimeGeneratedField field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *AzureMonitorEndpointRequest) GetTimeGeneratedFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TimeGeneratedField.Get(), o.TimeGeneratedField.IsSet() +} + +// HasTimeGeneratedField returns a boolean if a field has been set. +func (o *AzureMonitorEndpointRequest) HasTimeGeneratedField() bool { + if o != nil && o.TimeGeneratedField.IsSet() { + return true + } + + return false +} + +// SetTimeGeneratedField gets a reference to the given NullableString and assigns it to the TimeGeneratedField field. +func (o *AzureMonitorEndpointRequest) SetTimeGeneratedField(v string) { + o.TimeGeneratedField.Set(&v) +} +// SetTimeGeneratedFieldNil sets the value for TimeGeneratedField to be an explicit nil +func (o *AzureMonitorEndpointRequest) SetTimeGeneratedFieldNil() { + o.TimeGeneratedField.Set(nil) +} + +// UnsetTimeGeneratedField ensures that no value is present for TimeGeneratedField, not even an explicit nil +func (o *AzureMonitorEndpointRequest) UnsetTimeGeneratedField() { + o.TimeGeneratedField.Unset() +} + +// GetWorkspaceId returns the WorkspaceId field value +func (o *AzureMonitorEndpointRequest) GetWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceId +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpointRequest) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceId, true +} + +// SetWorkspaceId sets field value +func (o *AzureMonitorEndpointRequest) SetWorkspaceId(v string) { + o.WorkspaceId = v +} + +// GetType returns the Type field value +func (o *AzureMonitorEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *AzureMonitorEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *AzureMonitorEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o AzureMonitorEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o AzureMonitorEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["log_type"] = o.LogType + toSerialize["shared_key"] = o.SharedKey + if o.TimeGeneratedField.IsSet() { + toSerialize["time_generated_field"] = o.TimeGeneratedField.Get() + } + toSerialize["workspace_id"] = o.WorkspaceId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *AzureMonitorEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "log_type", + "shared_key", + "workspace_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varAzureMonitorEndpointRequest := _AzureMonitorEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varAzureMonitorEndpointRequest) + + if err != nil { + return err + } + + *o = AzureMonitorEndpointRequest(varAzureMonitorEndpointRequest) + + return err +} + +type NullableAzureMonitorEndpointRequest struct { + value *AzureMonitorEndpointRequest + isSet bool +} + +func (v NullableAzureMonitorEndpointRequest) Get() *AzureMonitorEndpointRequest { + return v.value +} + +func (v *NullableAzureMonitorEndpointRequest) Set(val *AzureMonitorEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableAzureMonitorEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableAzureMonitorEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableAzureMonitorEndpointRequest(val *AzureMonitorEndpointRequest) *NullableAzureMonitorEndpointRequest { + return &NullableAzureMonitorEndpointRequest{value: val, isSet: true} +} + +func (v NullableAzureMonitorEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableAzureMonitorEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_base_query.go b/azion-api/model_base_query.go new file mode 100644 index 0000000..0c70bd4 --- /dev/null +++ b/azion-api/model_base_query.go @@ -0,0 +1,470 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BaseQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseQuery{} + +// BaseQuery Base Serializer for validating and processing queries associated with reports. Contains generic validations applied to all types of reports. +type BaseQuery struct { + Id int64 `json:"id"` + Dataset string `json:"dataset"` + Filters map[string]interface{} `json:"filters,omitempty"` + GroupBy []string `json:"group_by,omitempty"` + Limit int64 `json:"limit"` + AggregatedFields []AggregatedField `json:"aggregated_fields,omitempty"` + CalculatedFields []string `json:"calculated_fields,omitempty"` + // * `asc` - Ascending order, sets the order from smallest to largest. * `desc` - Descending order, sets the order from largest to smallest. + OrderDirection string `json:"order_direction"` + TopX *bool `json:"top_x,omitempty"` + MaxYAxis NullableInt64 `json:"max_y_axis,omitempty"` +} + +type _BaseQuery BaseQuery + +// NewBaseQuery instantiates a new BaseQuery object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBaseQuery(id int64, dataset string, limit int64, orderDirection string) *BaseQuery { + this := BaseQuery{} + this.Id = id + this.Dataset = dataset + this.Limit = limit + this.OrderDirection = orderDirection + return &this +} + +// NewBaseQueryWithDefaults instantiates a new BaseQuery object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBaseQueryWithDefaults() *BaseQuery { + this := BaseQuery{} + return &this +} + +// GetId returns the Id field value +func (o *BaseQuery) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *BaseQuery) SetId(v int64) { + o.Id = v +} + +// GetDataset returns the Dataset field value +func (o *BaseQuery) GetDataset() string { + if o == nil { + var ret string + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Dataset, true +} + +// SetDataset sets field value +func (o *BaseQuery) SetDataset(v string) { + o.Dataset = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *BaseQuery) GetFilters() map[string]interface{} { + if o == nil || IsNil(o.Filters) { + var ret map[string]interface{} + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetFiltersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Filters) { + return map[string]interface{}{}, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *BaseQuery) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given map[string]interface{} and assigns it to the Filters field. +func (o *BaseQuery) SetFilters(v map[string]interface{}) { + o.Filters = v +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *BaseQuery) GetGroupBy() []string { + if o == nil || IsNil(o.GroupBy) { + var ret []string + return ret + } + return o.GroupBy +} + +// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetGroupByOk() ([]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *BaseQuery) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *BaseQuery) SetGroupBy(v []string) { + o.GroupBy = v +} + +// GetLimit returns the Limit field value +func (o *BaseQuery) GetLimit() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *BaseQuery) SetLimit(v int64) { + o.Limit = v +} + +// GetAggregatedFields returns the AggregatedFields field value if set, zero value otherwise. +func (o *BaseQuery) GetAggregatedFields() []AggregatedField { + if o == nil || IsNil(o.AggregatedFields) { + var ret []AggregatedField + return ret + } + return o.AggregatedFields +} + +// GetAggregatedFieldsOk returns a tuple with the AggregatedFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetAggregatedFieldsOk() ([]AggregatedField, bool) { + if o == nil || IsNil(o.AggregatedFields) { + return nil, false + } + return o.AggregatedFields, true +} + +// HasAggregatedFields returns a boolean if a field has been set. +func (o *BaseQuery) HasAggregatedFields() bool { + if o != nil && !IsNil(o.AggregatedFields) { + return true + } + + return false +} + +// SetAggregatedFields gets a reference to the given []AggregatedField and assigns it to the AggregatedFields field. +func (o *BaseQuery) SetAggregatedFields(v []AggregatedField) { + o.AggregatedFields = v +} + +// GetCalculatedFields returns the CalculatedFields field value if set, zero value otherwise. +func (o *BaseQuery) GetCalculatedFields() []string { + if o == nil || IsNil(o.CalculatedFields) { + var ret []string + return ret + } + return o.CalculatedFields +} + +// GetCalculatedFieldsOk returns a tuple with the CalculatedFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetCalculatedFieldsOk() ([]string, bool) { + if o == nil || IsNil(o.CalculatedFields) { + return nil, false + } + return o.CalculatedFields, true +} + +// HasCalculatedFields returns a boolean if a field has been set. +func (o *BaseQuery) HasCalculatedFields() bool { + if o != nil && !IsNil(o.CalculatedFields) { + return true + } + + return false +} + +// SetCalculatedFields gets a reference to the given []string and assigns it to the CalculatedFields field. +func (o *BaseQuery) SetCalculatedFields(v []string) { + o.CalculatedFields = v +} + +// GetOrderDirection returns the OrderDirection field value +func (o *BaseQuery) GetOrderDirection() string { + if o == nil { + var ret string + return ret + } + + return o.OrderDirection +} + +// GetOrderDirectionOk returns a tuple with the OrderDirection field value +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetOrderDirectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrderDirection, true +} + +// SetOrderDirection sets field value +func (o *BaseQuery) SetOrderDirection(v string) { + o.OrderDirection = v +} + +// GetTopX returns the TopX field value if set, zero value otherwise. +func (o *BaseQuery) GetTopX() bool { + if o == nil || IsNil(o.TopX) { + var ret bool + return ret + } + return *o.TopX +} + +// GetTopXOk returns a tuple with the TopX field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQuery) GetTopXOk() (*bool, bool) { + if o == nil || IsNil(o.TopX) { + return nil, false + } + return o.TopX, true +} + +// HasTopX returns a boolean if a field has been set. +func (o *BaseQuery) HasTopX() bool { + if o != nil && !IsNil(o.TopX) { + return true + } + + return false +} + +// SetTopX gets a reference to the given bool and assigns it to the TopX field. +func (o *BaseQuery) SetTopX(v bool) { + o.TopX = &v +} + +// GetMaxYAxis returns the MaxYAxis field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BaseQuery) GetMaxYAxis() int64 { + if o == nil || IsNil(o.MaxYAxis.Get()) { + var ret int64 + return ret + } + return *o.MaxYAxis.Get() +} + +// GetMaxYAxisOk returns a tuple with the MaxYAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BaseQuery) GetMaxYAxisOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxYAxis.Get(), o.MaxYAxis.IsSet() +} + +// HasMaxYAxis returns a boolean if a field has been set. +func (o *BaseQuery) HasMaxYAxis() bool { + if o != nil && o.MaxYAxis.IsSet() { + return true + } + + return false +} + +// SetMaxYAxis gets a reference to the given NullableInt64 and assigns it to the MaxYAxis field. +func (o *BaseQuery) SetMaxYAxis(v int64) { + o.MaxYAxis.Set(&v) +} +// SetMaxYAxisNil sets the value for MaxYAxis to be an explicit nil +func (o *BaseQuery) SetMaxYAxisNil() { + o.MaxYAxis.Set(nil) +} + +// UnsetMaxYAxis ensures that no value is present for MaxYAxis, not even an explicit nil +func (o *BaseQuery) UnsetMaxYAxis() { + o.MaxYAxis.Unset() +} + +func (o BaseQuery) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["dataset"] = o.Dataset + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.GroupBy) { + toSerialize["group_by"] = o.GroupBy + } + toSerialize["limit"] = o.Limit + if !IsNil(o.AggregatedFields) { + toSerialize["aggregated_fields"] = o.AggregatedFields + } + if !IsNil(o.CalculatedFields) { + toSerialize["calculated_fields"] = o.CalculatedFields + } + toSerialize["order_direction"] = o.OrderDirection + if !IsNil(o.TopX) { + toSerialize["top_x"] = o.TopX + } + if o.MaxYAxis.IsSet() { + toSerialize["max_y_axis"] = o.MaxYAxis.Get() + } + return toSerialize, nil +} + +func (o *BaseQuery) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "dataset", + "limit", + "order_direction", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBaseQuery := _BaseQuery{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBaseQuery) + + if err != nil { + return err + } + + *o = BaseQuery(varBaseQuery) + + return err +} + +type NullableBaseQuery struct { + value *BaseQuery + isSet bool +} + +func (v NullableBaseQuery) Get() *BaseQuery { + return v.value +} + +func (v *NullableBaseQuery) Set(val *BaseQuery) { + v.value = val + v.isSet = true +} + +func (v NullableBaseQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseQuery(val *BaseQuery) *NullableBaseQuery { + return &NullableBaseQuery{value: val, isSet: true} +} + +func (v NullableBaseQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_base_query_request.go b/azion-api/model_base_query_request.go new file mode 100644 index 0000000..3dc6290 --- /dev/null +++ b/azion-api/model_base_query_request.go @@ -0,0 +1,442 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BaseQueryRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BaseQueryRequest{} + +// BaseQueryRequest Base Serializer for validating and processing queries associated with reports. Contains generic validations applied to all types of reports. +type BaseQueryRequest struct { + Dataset string `json:"dataset"` + Filters map[string]interface{} `json:"filters,omitempty"` + GroupBy []string `json:"group_by,omitempty"` + Limit int64 `json:"limit"` + AggregatedFields []AggregatedFieldRequest `json:"aggregated_fields,omitempty"` + CalculatedFields []string `json:"calculated_fields,omitempty"` + // * `asc` - Ascending order, sets the order from smallest to largest. * `desc` - Descending order, sets the order from largest to smallest. + OrderDirection string `json:"order_direction"` + TopX *bool `json:"top_x,omitempty"` + MaxYAxis NullableInt64 `json:"max_y_axis,omitempty"` +} + +type _BaseQueryRequest BaseQueryRequest + +// NewBaseQueryRequest instantiates a new BaseQueryRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBaseQueryRequest(dataset string, limit int64, orderDirection string) *BaseQueryRequest { + this := BaseQueryRequest{} + this.Dataset = dataset + this.Limit = limit + this.OrderDirection = orderDirection + return &this +} + +// NewBaseQueryRequestWithDefaults instantiates a new BaseQueryRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBaseQueryRequestWithDefaults() *BaseQueryRequest { + this := BaseQueryRequest{} + return &this +} + +// GetDataset returns the Dataset field value +func (o *BaseQueryRequest) GetDataset() string { + if o == nil { + var ret string + return ret + } + + return o.Dataset +} + +// GetDatasetOk returns a tuple with the Dataset field value +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetDatasetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Dataset, true +} + +// SetDataset sets field value +func (o *BaseQueryRequest) SetDataset(v string) { + o.Dataset = v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *BaseQueryRequest) GetFilters() map[string]interface{} { + if o == nil || IsNil(o.Filters) { + var ret map[string]interface{} + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetFiltersOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Filters) { + return map[string]interface{}{}, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *BaseQueryRequest) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given map[string]interface{} and assigns it to the Filters field. +func (o *BaseQueryRequest) SetFilters(v map[string]interface{}) { + o.Filters = v +} + +// GetGroupBy returns the GroupBy field value if set, zero value otherwise. +func (o *BaseQueryRequest) GetGroupBy() []string { + if o == nil || IsNil(o.GroupBy) { + var ret []string + return ret + } + return o.GroupBy +} + +// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetGroupByOk() ([]string, bool) { + if o == nil || IsNil(o.GroupBy) { + return nil, false + } + return o.GroupBy, true +} + +// HasGroupBy returns a boolean if a field has been set. +func (o *BaseQueryRequest) HasGroupBy() bool { + if o != nil && !IsNil(o.GroupBy) { + return true + } + + return false +} + +// SetGroupBy gets a reference to the given []string and assigns it to the GroupBy field. +func (o *BaseQueryRequest) SetGroupBy(v []string) { + o.GroupBy = v +} + +// GetLimit returns the Limit field value +func (o *BaseQueryRequest) GetLimit() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Limit +} + +// GetLimitOk returns a tuple with the Limit field value +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Limit, true +} + +// SetLimit sets field value +func (o *BaseQueryRequest) SetLimit(v int64) { + o.Limit = v +} + +// GetAggregatedFields returns the AggregatedFields field value if set, zero value otherwise. +func (o *BaseQueryRequest) GetAggregatedFields() []AggregatedFieldRequest { + if o == nil || IsNil(o.AggregatedFields) { + var ret []AggregatedFieldRequest + return ret + } + return o.AggregatedFields +} + +// GetAggregatedFieldsOk returns a tuple with the AggregatedFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetAggregatedFieldsOk() ([]AggregatedFieldRequest, bool) { + if o == nil || IsNil(o.AggregatedFields) { + return nil, false + } + return o.AggregatedFields, true +} + +// HasAggregatedFields returns a boolean if a field has been set. +func (o *BaseQueryRequest) HasAggregatedFields() bool { + if o != nil && !IsNil(o.AggregatedFields) { + return true + } + + return false +} + +// SetAggregatedFields gets a reference to the given []AggregatedFieldRequest and assigns it to the AggregatedFields field. +func (o *BaseQueryRequest) SetAggregatedFields(v []AggregatedFieldRequest) { + o.AggregatedFields = v +} + +// GetCalculatedFields returns the CalculatedFields field value if set, zero value otherwise. +func (o *BaseQueryRequest) GetCalculatedFields() []string { + if o == nil || IsNil(o.CalculatedFields) { + var ret []string + return ret + } + return o.CalculatedFields +} + +// GetCalculatedFieldsOk returns a tuple with the CalculatedFields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetCalculatedFieldsOk() ([]string, bool) { + if o == nil || IsNil(o.CalculatedFields) { + return nil, false + } + return o.CalculatedFields, true +} + +// HasCalculatedFields returns a boolean if a field has been set. +func (o *BaseQueryRequest) HasCalculatedFields() bool { + if o != nil && !IsNil(o.CalculatedFields) { + return true + } + + return false +} + +// SetCalculatedFields gets a reference to the given []string and assigns it to the CalculatedFields field. +func (o *BaseQueryRequest) SetCalculatedFields(v []string) { + o.CalculatedFields = v +} + +// GetOrderDirection returns the OrderDirection field value +func (o *BaseQueryRequest) GetOrderDirection() string { + if o == nil { + var ret string + return ret + } + + return o.OrderDirection +} + +// GetOrderDirectionOk returns a tuple with the OrderDirection field value +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetOrderDirectionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrderDirection, true +} + +// SetOrderDirection sets field value +func (o *BaseQueryRequest) SetOrderDirection(v string) { + o.OrderDirection = v +} + +// GetTopX returns the TopX field value if set, zero value otherwise. +func (o *BaseQueryRequest) GetTopX() bool { + if o == nil || IsNil(o.TopX) { + var ret bool + return ret + } + return *o.TopX +} + +// GetTopXOk returns a tuple with the TopX field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BaseQueryRequest) GetTopXOk() (*bool, bool) { + if o == nil || IsNil(o.TopX) { + return nil, false + } + return o.TopX, true +} + +// HasTopX returns a boolean if a field has been set. +func (o *BaseQueryRequest) HasTopX() bool { + if o != nil && !IsNil(o.TopX) { + return true + } + + return false +} + +// SetTopX gets a reference to the given bool and assigns it to the TopX field. +func (o *BaseQueryRequest) SetTopX(v bool) { + o.TopX = &v +} + +// GetMaxYAxis returns the MaxYAxis field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *BaseQueryRequest) GetMaxYAxis() int64 { + if o == nil || IsNil(o.MaxYAxis.Get()) { + var ret int64 + return ret + } + return *o.MaxYAxis.Get() +} + +// GetMaxYAxisOk returns a tuple with the MaxYAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *BaseQueryRequest) GetMaxYAxisOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxYAxis.Get(), o.MaxYAxis.IsSet() +} + +// HasMaxYAxis returns a boolean if a field has been set. +func (o *BaseQueryRequest) HasMaxYAxis() bool { + if o != nil && o.MaxYAxis.IsSet() { + return true + } + + return false +} + +// SetMaxYAxis gets a reference to the given NullableInt64 and assigns it to the MaxYAxis field. +func (o *BaseQueryRequest) SetMaxYAxis(v int64) { + o.MaxYAxis.Set(&v) +} +// SetMaxYAxisNil sets the value for MaxYAxis to be an explicit nil +func (o *BaseQueryRequest) SetMaxYAxisNil() { + o.MaxYAxis.Set(nil) +} + +// UnsetMaxYAxis ensures that no value is present for MaxYAxis, not even an explicit nil +func (o *BaseQueryRequest) UnsetMaxYAxis() { + o.MaxYAxis.Unset() +} + +func (o BaseQueryRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BaseQueryRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset"] = o.Dataset + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.GroupBy) { + toSerialize["group_by"] = o.GroupBy + } + toSerialize["limit"] = o.Limit + if !IsNil(o.AggregatedFields) { + toSerialize["aggregated_fields"] = o.AggregatedFields + } + if !IsNil(o.CalculatedFields) { + toSerialize["calculated_fields"] = o.CalculatedFields + } + toSerialize["order_direction"] = o.OrderDirection + if !IsNil(o.TopX) { + toSerialize["top_x"] = o.TopX + } + if o.MaxYAxis.IsSet() { + toSerialize["max_y_axis"] = o.MaxYAxis.Get() + } + return toSerialize, nil +} + +func (o *BaseQueryRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset", + "limit", + "order_direction", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBaseQueryRequest := _BaseQueryRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBaseQueryRequest) + + if err != nil { + return err + } + + *o = BaseQueryRequest(varBaseQueryRequest) + + return err +} + +type NullableBaseQueryRequest struct { + value *BaseQueryRequest + isSet bool +} + +func (v NullableBaseQueryRequest) Get() *BaseQueryRequest { + return v.value +} + +func (v *NullableBaseQueryRequest) Set(val *BaseQueryRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBaseQueryRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBaseQueryRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBaseQueryRequest(val *BaseQueryRequest) *NullableBaseQueryRequest { + return &NullableBaseQueryRequest{value: val, isSet: true} +} + +func (v NullableBaseQueryRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBaseQueryRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_behavior_args.go b/azion-api/model_behavior_args.go new file mode 100644 index 0000000..20764c9 --- /dev/null +++ b/azion-api/model_behavior_args.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BehaviorArgs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BehaviorArgs{} + +// BehaviorArgs Behaviors with arguments (string or integer) +type BehaviorArgs struct { + // Behavior type + Type string `json:"type"` + Attributes BehaviorArgsAttributes `json:"attributes"` +} + +type _BehaviorArgs BehaviorArgs + +// NewBehaviorArgs instantiates a new BehaviorArgs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBehaviorArgs(type_ string, attributes BehaviorArgsAttributes) *BehaviorArgs { + this := BehaviorArgs{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewBehaviorArgsWithDefaults instantiates a new BehaviorArgs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBehaviorArgsWithDefaults() *BehaviorArgs { + this := BehaviorArgs{} + return &this +} + +// GetType returns the Type field value +func (o *BehaviorArgs) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BehaviorArgs) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BehaviorArgs) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *BehaviorArgs) GetAttributes() BehaviorArgsAttributes { + if o == nil { + var ret BehaviorArgsAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *BehaviorArgs) GetAttributesOk() (*BehaviorArgsAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *BehaviorArgs) SetAttributes(v BehaviorArgsAttributes) { + o.Attributes = v +} + +func (o BehaviorArgs) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BehaviorArgs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *BehaviorArgs) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBehaviorArgs := _BehaviorArgs{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBehaviorArgs) + + if err != nil { + return err + } + + *o = BehaviorArgs(varBehaviorArgs) + + return err +} + +type NullableBehaviorArgs struct { + value *BehaviorArgs + isSet bool +} + +func (v NullableBehaviorArgs) Get() *BehaviorArgs { + return v.value +} + +func (v *NullableBehaviorArgs) Set(val *BehaviorArgs) { + v.value = val + v.isSet = true +} + +func (v NullableBehaviorArgs) IsSet() bool { + return v.isSet +} + +func (v *NullableBehaviorArgs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBehaviorArgs(val *BehaviorArgs) *NullableBehaviorArgs { + return &NullableBehaviorArgs{value: val, isSet: true} +} + +func (v NullableBehaviorArgs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBehaviorArgs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_behavior_args_attributes.go b/azion-api/model_behavior_args_attributes.go new file mode 100644 index 0000000..05f3481 --- /dev/null +++ b/azion-api/model_behavior_args_attributes.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BehaviorArgsAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BehaviorArgsAttributes{} + +// BehaviorArgsAttributes Behavior attributes containing the value parameter +type BehaviorArgsAttributes struct { + Value BehaviorArgsAttributesValue `json:"value"` +} + +type _BehaviorArgsAttributes BehaviorArgsAttributes + +// NewBehaviorArgsAttributes instantiates a new BehaviorArgsAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBehaviorArgsAttributes(value BehaviorArgsAttributesValue) *BehaviorArgsAttributes { + this := BehaviorArgsAttributes{} + this.Value = value + return &this +} + +// NewBehaviorArgsAttributesWithDefaults instantiates a new BehaviorArgsAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBehaviorArgsAttributesWithDefaults() *BehaviorArgsAttributes { + this := BehaviorArgsAttributes{} + return &this +} + +// GetValue returns the Value field value +func (o *BehaviorArgsAttributes) GetValue() BehaviorArgsAttributesValue { + if o == nil { + var ret BehaviorArgsAttributesValue + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *BehaviorArgsAttributes) GetValueOk() (*BehaviorArgsAttributesValue, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *BehaviorArgsAttributes) SetValue(v BehaviorArgsAttributesValue) { + o.Value = v +} + +func (o BehaviorArgsAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BehaviorArgsAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *BehaviorArgsAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBehaviorArgsAttributes := _BehaviorArgsAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBehaviorArgsAttributes) + + if err != nil { + return err + } + + *o = BehaviorArgsAttributes(varBehaviorArgsAttributes) + + return err +} + +type NullableBehaviorArgsAttributes struct { + value *BehaviorArgsAttributes + isSet bool +} + +func (v NullableBehaviorArgsAttributes) Get() *BehaviorArgsAttributes { + return v.value +} + +func (v *NullableBehaviorArgsAttributes) Set(val *BehaviorArgsAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableBehaviorArgsAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableBehaviorArgsAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBehaviorArgsAttributes(val *BehaviorArgsAttributes) *NullableBehaviorArgsAttributes { + return &NullableBehaviorArgsAttributes{value: val, isSet: true} +} + +func (v NullableBehaviorArgsAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBehaviorArgsAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_behavior_args_attributes_value.go b/azion-api/model_behavior_args_attributes_value.go new file mode 100644 index 0000000..aabeabb --- /dev/null +++ b/azion-api/model_behavior_args_attributes_value.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// BehaviorArgsAttributesValue - Value can be string or integer depending on the behavior type +type BehaviorArgsAttributesValue struct { + Int64 *int64 + String *string +} + +// int64AsBehaviorArgsAttributesValue is a convenience function that returns int64 wrapped in BehaviorArgsAttributesValue +func Int64AsBehaviorArgsAttributesValue(v *int64) BehaviorArgsAttributesValue { + return BehaviorArgsAttributesValue{ + Int64: v, + } +} + +// stringAsBehaviorArgsAttributesValue is a convenience function that returns string wrapped in BehaviorArgsAttributesValue +func StringAsBehaviorArgsAttributesValue(v *string) BehaviorArgsAttributesValue { + return BehaviorArgsAttributesValue{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *BehaviorArgsAttributesValue) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Int64 + err = newStrictDecoder(data).Decode(&dst.Int64) + if err == nil { + jsonInt64, _ := json.Marshal(dst.Int64) + if string(jsonInt64) == "{}" { // empty struct + dst.Int64 = nil + } else { + if err = validator.Validate(dst.Int64); err != nil { + dst.Int64 = nil + } else { + match++ + } + } + } else { + dst.Int64 = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Int64 = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(BehaviorArgsAttributesValue)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(BehaviorArgsAttributesValue)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src BehaviorArgsAttributesValue) MarshalJSON() ([]byte, error) { + if src.Int64 != nil { + return json.Marshal(&src.Int64) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *BehaviorArgsAttributesValue) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Int64 != nil { + return obj.Int64 + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj BehaviorArgsAttributesValue) GetActualInstanceValue() (interface{}) { + if obj.Int64 != nil { + return *obj.Int64 + } + + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableBehaviorArgsAttributesValue struct { + value *BehaviorArgsAttributesValue + isSet bool +} + +func (v NullableBehaviorArgsAttributesValue) Get() *BehaviorArgsAttributesValue { + return v.value +} + +func (v *NullableBehaviorArgsAttributesValue) Set(val *BehaviorArgsAttributesValue) { + v.value = val + v.isSet = true +} + +func (v NullableBehaviorArgsAttributesValue) IsSet() bool { + return v.isSet +} + +func (v *NullableBehaviorArgsAttributesValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBehaviorArgsAttributesValue(val *BehaviorArgsAttributesValue) *NullableBehaviorArgsAttributesValue { + return &NullableBehaviorArgsAttributesValue{value: val, isSet: true} +} + +func (v NullableBehaviorArgsAttributesValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBehaviorArgsAttributesValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_behavior_capture.go b/azion-api/model_behavior_capture.go new file mode 100644 index 0000000..2ac405c --- /dev/null +++ b/azion-api/model_behavior_capture.go @@ -0,0 +1,198 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the BehaviorCapture type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BehaviorCapture{} + +// BehaviorCapture Behaviors for capturing match groups +type BehaviorCapture struct { + Type string `json:"type"` + Attributes BehaviorCaptureMatchGroupsAttributes `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _BehaviorCapture BehaviorCapture + +// NewBehaviorCapture instantiates a new BehaviorCapture object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBehaviorCapture(type_ string, attributes BehaviorCaptureMatchGroupsAttributes) *BehaviorCapture { + this := BehaviorCapture{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewBehaviorCaptureWithDefaults instantiates a new BehaviorCapture object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBehaviorCaptureWithDefaults() *BehaviorCapture { + this := BehaviorCapture{} + return &this +} + +// GetType returns the Type field value +func (o *BehaviorCapture) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BehaviorCapture) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BehaviorCapture) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *BehaviorCapture) GetAttributes() BehaviorCaptureMatchGroupsAttributes { + if o == nil { + var ret BehaviorCaptureMatchGroupsAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *BehaviorCapture) GetAttributesOk() (*BehaviorCaptureMatchGroupsAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *BehaviorCapture) SetAttributes(v BehaviorCaptureMatchGroupsAttributes) { + o.Attributes = v +} + +func (o BehaviorCapture) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BehaviorCapture) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *BehaviorCapture) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBehaviorCapture := _BehaviorCapture{} + + err = json.Unmarshal(data, &varBehaviorCapture) + + if err != nil { + return err + } + + *o = BehaviorCapture(varBehaviorCapture) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableBehaviorCapture struct { + value *BehaviorCapture + isSet bool +} + +func (v NullableBehaviorCapture) Get() *BehaviorCapture { + return v.value +} + +func (v *NullableBehaviorCapture) Set(val *BehaviorCapture) { + v.value = val + v.isSet = true +} + +func (v NullableBehaviorCapture) IsSet() bool { + return v.isSet +} + +func (v *NullableBehaviorCapture) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBehaviorCapture(val *BehaviorCapture) *NullableBehaviorCapture { + return &NullableBehaviorCapture{value: val, isSet: true} +} + +func (v NullableBehaviorCapture) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBehaviorCapture) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_behavior_capture_match_groups_attributes.go b/azion-api/model_behavior_capture_match_groups_attributes.go new file mode 100644 index 0000000..9327d80 --- /dev/null +++ b/azion-api/model_behavior_capture_match_groups_attributes.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BehaviorCaptureMatchGroupsAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BehaviorCaptureMatchGroupsAttributes{} + +// BehaviorCaptureMatchGroupsAttributes struct for BehaviorCaptureMatchGroupsAttributes +type BehaviorCaptureMatchGroupsAttributes struct { + Subject string `json:"subject"` + Regex string `json:"regex"` + CapturedArray string `json:"captured_array"` +} + +type _BehaviorCaptureMatchGroupsAttributes BehaviorCaptureMatchGroupsAttributes + +// NewBehaviorCaptureMatchGroupsAttributes instantiates a new BehaviorCaptureMatchGroupsAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBehaviorCaptureMatchGroupsAttributes(subject string, regex string, capturedArray string) *BehaviorCaptureMatchGroupsAttributes { + this := BehaviorCaptureMatchGroupsAttributes{} + this.Subject = subject + this.Regex = regex + this.CapturedArray = capturedArray + return &this +} + +// NewBehaviorCaptureMatchGroupsAttributesWithDefaults instantiates a new BehaviorCaptureMatchGroupsAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBehaviorCaptureMatchGroupsAttributesWithDefaults() *BehaviorCaptureMatchGroupsAttributes { + this := BehaviorCaptureMatchGroupsAttributes{} + return &this +} + +// GetSubject returns the Subject field value +func (o *BehaviorCaptureMatchGroupsAttributes) GetSubject() string { + if o == nil { + var ret string + return ret + } + + return o.Subject +} + +// GetSubjectOk returns a tuple with the Subject field value +// and a boolean to check if the value has been set. +func (o *BehaviorCaptureMatchGroupsAttributes) GetSubjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Subject, true +} + +// SetSubject sets field value +func (o *BehaviorCaptureMatchGroupsAttributes) SetSubject(v string) { + o.Subject = v +} + +// GetRegex returns the Regex field value +func (o *BehaviorCaptureMatchGroupsAttributes) GetRegex() string { + if o == nil { + var ret string + return ret + } + + return o.Regex +} + +// GetRegexOk returns a tuple with the Regex field value +// and a boolean to check if the value has been set. +func (o *BehaviorCaptureMatchGroupsAttributes) GetRegexOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Regex, true +} + +// SetRegex sets field value +func (o *BehaviorCaptureMatchGroupsAttributes) SetRegex(v string) { + o.Regex = v +} + +// GetCapturedArray returns the CapturedArray field value +func (o *BehaviorCaptureMatchGroupsAttributes) GetCapturedArray() string { + if o == nil { + var ret string + return ret + } + + return o.CapturedArray +} + +// GetCapturedArrayOk returns a tuple with the CapturedArray field value +// and a boolean to check if the value has been set. +func (o *BehaviorCaptureMatchGroupsAttributes) GetCapturedArrayOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CapturedArray, true +} + +// SetCapturedArray sets field value +func (o *BehaviorCaptureMatchGroupsAttributes) SetCapturedArray(v string) { + o.CapturedArray = v +} + +func (o BehaviorCaptureMatchGroupsAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BehaviorCaptureMatchGroupsAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["subject"] = o.Subject + toSerialize["regex"] = o.Regex + toSerialize["captured_array"] = o.CapturedArray + return toSerialize, nil +} + +func (o *BehaviorCaptureMatchGroupsAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "subject", + "regex", + "captured_array", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBehaviorCaptureMatchGroupsAttributes := _BehaviorCaptureMatchGroupsAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBehaviorCaptureMatchGroupsAttributes) + + if err != nil { + return err + } + + *o = BehaviorCaptureMatchGroupsAttributes(varBehaviorCaptureMatchGroupsAttributes) + + return err +} + +type NullableBehaviorCaptureMatchGroupsAttributes struct { + value *BehaviorCaptureMatchGroupsAttributes + isSet bool +} + +func (v NullableBehaviorCaptureMatchGroupsAttributes) Get() *BehaviorCaptureMatchGroupsAttributes { + return v.value +} + +func (v *NullableBehaviorCaptureMatchGroupsAttributes) Set(val *BehaviorCaptureMatchGroupsAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableBehaviorCaptureMatchGroupsAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableBehaviorCaptureMatchGroupsAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBehaviorCaptureMatchGroupsAttributes(val *BehaviorCaptureMatchGroupsAttributes) *NullableBehaviorCaptureMatchGroupsAttributes { + return &NullableBehaviorCaptureMatchGroupsAttributes{value: val, isSet: true} +} + +func (v NullableBehaviorCaptureMatchGroupsAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBehaviorCaptureMatchGroupsAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_behavior_no_args.go b/azion-api/model_behavior_no_args.go new file mode 100644 index 0000000..e638d20 --- /dev/null +++ b/azion-api/model_behavior_no_args.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BehaviorNoArgs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BehaviorNoArgs{} + +// BehaviorNoArgs Behaviors without arguments +type BehaviorNoArgs struct { + // * `deny` - deny * `no_content` - no_content * `deliver` - deliver * `finish_request_phase` - finish_request_phase * `forward_cookies` - forward_cookies * `optimize_images` - optimize_images * `bypass_cache` - bypass_cache * `enable_gzip` - enable_gzip * `redirect_http_to_https` - redirect_http_to_https + Type string `json:"type"` +} + +type _BehaviorNoArgs BehaviorNoArgs + +// NewBehaviorNoArgs instantiates a new BehaviorNoArgs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBehaviorNoArgs(type_ string) *BehaviorNoArgs { + this := BehaviorNoArgs{} + this.Type = type_ + return &this +} + +// NewBehaviorNoArgsWithDefaults instantiates a new BehaviorNoArgs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBehaviorNoArgsWithDefaults() *BehaviorNoArgs { + this := BehaviorNoArgs{} + return &this +} + +// GetType returns the Type field value +func (o *BehaviorNoArgs) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BehaviorNoArgs) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BehaviorNoArgs) SetType(v string) { + o.Type = v +} + +func (o BehaviorNoArgs) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BehaviorNoArgs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *BehaviorNoArgs) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBehaviorNoArgs := _BehaviorNoArgs{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBehaviorNoArgs) + + if err != nil { + return err + } + + *o = BehaviorNoArgs(varBehaviorNoArgs) + + return err +} + +type NullableBehaviorNoArgs struct { + value *BehaviorNoArgs + isSet bool +} + +func (v NullableBehaviorNoArgs) Get() *BehaviorNoArgs { + return v.value +} + +func (v *NullableBehaviorNoArgs) Set(val *BehaviorNoArgs) { + v.value = val + v.isSet = true +} + +func (v NullableBehaviorNoArgs) IsSet() bool { + return v.isSet +} + +func (v *NullableBehaviorNoArgs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBehaviorNoArgs(val *BehaviorNoArgs) *NullableBehaviorNoArgs { + return &NullableBehaviorNoArgs{value: val, isSet: true} +} + +func (v NullableBehaviorNoArgs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBehaviorNoArgs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_big_query_endpoint.go b/azion-api/model_big_query_endpoint.go new file mode 100644 index 0000000..25c1dc4 --- /dev/null +++ b/azion-api/model_big_query_endpoint.go @@ -0,0 +1,272 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BigQueryEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BigQueryEndpoint{} + +// BigQueryEndpoint struct for BigQueryEndpoint +type BigQueryEndpoint struct { + DatasetId string `json:"dataset_id"` + ProjectId string `json:"project_id"` + TableId string `json:"table_id"` + ServiceAccountKey string `json:"service_account_key"` + // Type identifier for this endpoint (big_query) + Type string `json:"type"` +} + +type _BigQueryEndpoint BigQueryEndpoint + +// NewBigQueryEndpoint instantiates a new BigQueryEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBigQueryEndpoint(datasetId string, projectId string, tableId string, serviceAccountKey string, type_ string) *BigQueryEndpoint { + this := BigQueryEndpoint{} + this.DatasetId = datasetId + this.ProjectId = projectId + this.TableId = tableId + this.ServiceAccountKey = serviceAccountKey + this.Type = type_ + return &this +} + +// NewBigQueryEndpointWithDefaults instantiates a new BigQueryEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBigQueryEndpointWithDefaults() *BigQueryEndpoint { + this := BigQueryEndpoint{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *BigQueryEndpoint) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpoint) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *BigQueryEndpoint) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetProjectId returns the ProjectId field value +func (o *BigQueryEndpoint) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpoint) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *BigQueryEndpoint) SetProjectId(v string) { + o.ProjectId = v +} + +// GetTableId returns the TableId field value +func (o *BigQueryEndpoint) GetTableId() string { + if o == nil { + var ret string + return ret + } + + return o.TableId +} + +// GetTableIdOk returns a tuple with the TableId field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpoint) GetTableIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TableId, true +} + +// SetTableId sets field value +func (o *BigQueryEndpoint) SetTableId(v string) { + o.TableId = v +} + +// GetServiceAccountKey returns the ServiceAccountKey field value +func (o *BigQueryEndpoint) GetServiceAccountKey() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceAccountKey +} + +// GetServiceAccountKeyOk returns a tuple with the ServiceAccountKey field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpoint) GetServiceAccountKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceAccountKey, true +} + +// SetServiceAccountKey sets field value +func (o *BigQueryEndpoint) SetServiceAccountKey(v string) { + o.ServiceAccountKey = v +} + +// GetType returns the Type field value +func (o *BigQueryEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BigQueryEndpoint) SetType(v string) { + o.Type = v +} + +func (o BigQueryEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BigQueryEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["project_id"] = o.ProjectId + toSerialize["table_id"] = o.TableId + toSerialize["service_account_key"] = o.ServiceAccountKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *BigQueryEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "project_id", + "table_id", + "service_account_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBigQueryEndpoint := _BigQueryEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBigQueryEndpoint) + + if err != nil { + return err + } + + *o = BigQueryEndpoint(varBigQueryEndpoint) + + return err +} + +type NullableBigQueryEndpoint struct { + value *BigQueryEndpoint + isSet bool +} + +func (v NullableBigQueryEndpoint) Get() *BigQueryEndpoint { + return v.value +} + +func (v *NullableBigQueryEndpoint) Set(val *BigQueryEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableBigQueryEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableBigQueryEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBigQueryEndpoint(val *BigQueryEndpoint) *NullableBigQueryEndpoint { + return &NullableBigQueryEndpoint{value: val, isSet: true} +} + +func (v NullableBigQueryEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBigQueryEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_big_query_endpoint_request.go b/azion-api/model_big_query_endpoint_request.go new file mode 100644 index 0000000..73ced3c --- /dev/null +++ b/azion-api/model_big_query_endpoint_request.go @@ -0,0 +1,272 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BigQueryEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BigQueryEndpointRequest{} + +// BigQueryEndpointRequest struct for BigQueryEndpointRequest +type BigQueryEndpointRequest struct { + DatasetId string `json:"dataset_id"` + ProjectId string `json:"project_id"` + TableId string `json:"table_id"` + ServiceAccountKey string `json:"service_account_key"` + // Type identifier for this endpoint (big_query) + Type string `json:"type"` +} + +type _BigQueryEndpointRequest BigQueryEndpointRequest + +// NewBigQueryEndpointRequest instantiates a new BigQueryEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBigQueryEndpointRequest(datasetId string, projectId string, tableId string, serviceAccountKey string, type_ string) *BigQueryEndpointRequest { + this := BigQueryEndpointRequest{} + this.DatasetId = datasetId + this.ProjectId = projectId + this.TableId = tableId + this.ServiceAccountKey = serviceAccountKey + this.Type = type_ + return &this +} + +// NewBigQueryEndpointRequestWithDefaults instantiates a new BigQueryEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBigQueryEndpointRequestWithDefaults() *BigQueryEndpointRequest { + this := BigQueryEndpointRequest{} + return &this +} + +// GetDatasetId returns the DatasetId field value +func (o *BigQueryEndpointRequest) GetDatasetId() string { + if o == nil { + var ret string + return ret + } + + return o.DatasetId +} + +// GetDatasetIdOk returns a tuple with the DatasetId field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpointRequest) GetDatasetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DatasetId, true +} + +// SetDatasetId sets field value +func (o *BigQueryEndpointRequest) SetDatasetId(v string) { + o.DatasetId = v +} + +// GetProjectId returns the ProjectId field value +func (o *BigQueryEndpointRequest) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpointRequest) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *BigQueryEndpointRequest) SetProjectId(v string) { + o.ProjectId = v +} + +// GetTableId returns the TableId field value +func (o *BigQueryEndpointRequest) GetTableId() string { + if o == nil { + var ret string + return ret + } + + return o.TableId +} + +// GetTableIdOk returns a tuple with the TableId field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpointRequest) GetTableIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TableId, true +} + +// SetTableId sets field value +func (o *BigQueryEndpointRequest) SetTableId(v string) { + o.TableId = v +} + +// GetServiceAccountKey returns the ServiceAccountKey field value +func (o *BigQueryEndpointRequest) GetServiceAccountKey() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceAccountKey +} + +// GetServiceAccountKeyOk returns a tuple with the ServiceAccountKey field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpointRequest) GetServiceAccountKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceAccountKey, true +} + +// SetServiceAccountKey sets field value +func (o *BigQueryEndpointRequest) SetServiceAccountKey(v string) { + o.ServiceAccountKey = v +} + +// GetType returns the Type field value +func (o *BigQueryEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BigQueryEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BigQueryEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o BigQueryEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BigQueryEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dataset_id"] = o.DatasetId + toSerialize["project_id"] = o.ProjectId + toSerialize["table_id"] = o.TableId + toSerialize["service_account_key"] = o.ServiceAccountKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *BigQueryEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dataset_id", + "project_id", + "table_id", + "service_account_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBigQueryEndpointRequest := _BigQueryEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBigQueryEndpointRequest) + + if err != nil { + return err + } + + *o = BigQueryEndpointRequest(varBigQueryEndpointRequest) + + return err +} + +type NullableBigQueryEndpointRequest struct { + value *BigQueryEndpointRequest + isSet bool +} + +func (v NullableBigQueryEndpointRequest) Get() *BigQueryEndpointRequest { + return v.value +} + +func (v *NullableBigQueryEndpointRequest) Set(val *BigQueryEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBigQueryEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBigQueryEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBigQueryEndpointRequest(val *BigQueryEndpointRequest) *NullableBigQueryEndpointRequest { + return &NullableBigQueryEndpointRequest{value: val, isSet: true} +} + +func (v NullableBigQueryEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBigQueryEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_brand.go b/azion-api/model_brand.go new file mode 100644 index 0000000..aa72761 --- /dev/null +++ b/azion-api/model_brand.go @@ -0,0 +1,385 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Brand type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Brand{} + +// Brand struct for Brand +type Brand struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ParentId int64 `json:"parent_id"` + Created time.Time `json:"created"` + Info map[string]interface{} `json:"info"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _Brand Brand + +// NewBrand instantiates a new Brand object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBrand(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, type_ string) *Brand { + this := Brand{} + this.Id = id + this.Name = name + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ParentId = parentId + this.Created = created + this.Info = info + this.Type = type_ + return &this +} + +// NewBrandWithDefaults instantiates a new Brand object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBrandWithDefaults() *Brand { + this := Brand{} + return &this +} + +// GetId returns the Id field value +func (o *Brand) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Brand) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Brand) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Brand) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Brand) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Brand) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *Brand) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Brand) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Brand) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Brand) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Brand) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Brand) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Brand) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Brand) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Brand) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetParentId returns the ParentId field value +func (o *Brand) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *Brand) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *Brand) SetParentId(v int64) { + o.ParentId = v +} + +// GetCreated returns the Created field value +func (o *Brand) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Brand) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Brand) SetCreated(v time.Time) { + o.Created = v +} + +// GetInfo returns the Info field value +func (o *Brand) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *Brand) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *Brand) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetType returns the Type field value +func (o *Brand) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Brand) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Brand) SetType(v string) { + o.Type = v +} + +func (o Brand) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Brand) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["parent_id"] = o.ParentId + toSerialize["created"] = o.Created + toSerialize["info"] = o.Info + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Brand) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "active", + "last_editor", + "last_modified", + "parent_id", + "created", + "info", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBrand := _Brand{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBrand) + + if err != nil { + return err + } + + *o = Brand(varBrand) + + return err +} + +type NullableBrand struct { + value *Brand + isSet bool +} + +func (v NullableBrand) Get() *Brand { + return v.value +} + +func (v *NullableBrand) Set(val *Brand) { + v.value = val + v.isSet = true +} + +func (v NullableBrand) IsSet() bool { + return v.isSet +} + +func (v *NullableBrand) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrand(val *Brand) *NullableBrand { + return &NullableBrand{value: val, isSet: true} +} + +func (v NullableBrand) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrand) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_brand_request.go b/azion-api/model_brand_request.go new file mode 100644 index 0000000..e1d5a3e --- /dev/null +++ b/azion-api/model_brand_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BrandRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrandRequest{} + +// BrandRequest struct for BrandRequest +type BrandRequest struct { + Name string `json:"name"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _BrandRequest BrandRequest + +// NewBrandRequest instantiates a new BrandRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBrandRequest(name string, type_ string) *BrandRequest { + this := BrandRequest{} + this.Name = name + this.Type = type_ + return &this +} + +// NewBrandRequestWithDefaults instantiates a new BrandRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBrandRequestWithDefaults() *BrandRequest { + this := BrandRequest{} + return &this +} + +// GetName returns the Name field value +func (o *BrandRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *BrandRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *BrandRequest) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *BrandRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *BrandRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *BrandRequest) SetType(v string) { + o.Type = v +} + +func (o BrandRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrandRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *BrandRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBrandRequest := _BrandRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBrandRequest) + + if err != nil { + return err + } + + *o = BrandRequest(varBrandRequest) + + return err +} + +type NullableBrandRequest struct { + value *BrandRequest + isSet bool +} + +func (v NullableBrandRequest) Get() *BrandRequest { + return v.value +} + +func (v *NullableBrandRequest) Set(val *BrandRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBrandRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBrandRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrandRequest(val *BrandRequest) *NullableBrandRequest { + return &NullableBrandRequest{value: val, isSet: true} +} + +func (v NullableBrandRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrandRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_browser_cache_module.go b/azion-api/model_browser_cache_module.go new file mode 100644 index 0000000..c282ed4 --- /dev/null +++ b/azion-api/model_browser_cache_module.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the BrowserCacheModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrowserCacheModule{} + +// BrowserCacheModule struct for BrowserCacheModule +type BrowserCacheModule struct { + // * `override` - override * `honor` - honor * `no-cache` - no-cache + Behavior *string `json:"behavior,omitempty"` + MaxAge *int64 `json:"max_age,omitempty"` +} + +// NewBrowserCacheModule instantiates a new BrowserCacheModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBrowserCacheModule() *BrowserCacheModule { + this := BrowserCacheModule{} + return &this +} + +// NewBrowserCacheModuleWithDefaults instantiates a new BrowserCacheModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBrowserCacheModuleWithDefaults() *BrowserCacheModule { + this := BrowserCacheModule{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *BrowserCacheModule) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BrowserCacheModule) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *BrowserCacheModule) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *BrowserCacheModule) SetBehavior(v string) { + o.Behavior = &v +} + +// GetMaxAge returns the MaxAge field value if set, zero value otherwise. +func (o *BrowserCacheModule) GetMaxAge() int64 { + if o == nil || IsNil(o.MaxAge) { + var ret int64 + return ret + } + return *o.MaxAge +} + +// GetMaxAgeOk returns a tuple with the MaxAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BrowserCacheModule) GetMaxAgeOk() (*int64, bool) { + if o == nil || IsNil(o.MaxAge) { + return nil, false + } + return o.MaxAge, true +} + +// HasMaxAge returns a boolean if a field has been set. +func (o *BrowserCacheModule) HasMaxAge() bool { + if o != nil && !IsNil(o.MaxAge) { + return true + } + + return false +} + +// SetMaxAge gets a reference to the given int64 and assigns it to the MaxAge field. +func (o *BrowserCacheModule) SetMaxAge(v int64) { + o.MaxAge = &v +} + +func (o BrowserCacheModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrowserCacheModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.MaxAge) { + toSerialize["max_age"] = o.MaxAge + } + return toSerialize, nil +} + +type NullableBrowserCacheModule struct { + value *BrowserCacheModule + isSet bool +} + +func (v NullableBrowserCacheModule) Get() *BrowserCacheModule { + return v.value +} + +func (v *NullableBrowserCacheModule) Set(val *BrowserCacheModule) { + v.value = val + v.isSet = true +} + +func (v NullableBrowserCacheModule) IsSet() bool { + return v.isSet +} + +func (v *NullableBrowserCacheModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrowserCacheModule(val *BrowserCacheModule) *NullableBrowserCacheModule { + return &NullableBrowserCacheModule{value: val, isSet: true} +} + +func (v NullableBrowserCacheModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrowserCacheModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_browser_cache_module_request.go b/azion-api/model_browser_cache_module_request.go new file mode 100644 index 0000000..b8cbbb9 --- /dev/null +++ b/azion-api/model_browser_cache_module_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the BrowserCacheModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BrowserCacheModuleRequest{} + +// BrowserCacheModuleRequest struct for BrowserCacheModuleRequest +type BrowserCacheModuleRequest struct { + // * `override` - override * `honor` - honor * `no-cache` - no-cache + Behavior *string `json:"behavior,omitempty"` + MaxAge *int64 `json:"max_age,omitempty"` +} + +// NewBrowserCacheModuleRequest instantiates a new BrowserCacheModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBrowserCacheModuleRequest() *BrowserCacheModuleRequest { + this := BrowserCacheModuleRequest{} + return &this +} + +// NewBrowserCacheModuleRequestWithDefaults instantiates a new BrowserCacheModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBrowserCacheModuleRequestWithDefaults() *BrowserCacheModuleRequest { + this := BrowserCacheModuleRequest{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *BrowserCacheModuleRequest) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BrowserCacheModuleRequest) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *BrowserCacheModuleRequest) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *BrowserCacheModuleRequest) SetBehavior(v string) { + o.Behavior = &v +} + +// GetMaxAge returns the MaxAge field value if set, zero value otherwise. +func (o *BrowserCacheModuleRequest) GetMaxAge() int64 { + if o == nil || IsNil(o.MaxAge) { + var ret int64 + return ret + } + return *o.MaxAge +} + +// GetMaxAgeOk returns a tuple with the MaxAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BrowserCacheModuleRequest) GetMaxAgeOk() (*int64, bool) { + if o == nil || IsNil(o.MaxAge) { + return nil, false + } + return o.MaxAge, true +} + +// HasMaxAge returns a boolean if a field has been set. +func (o *BrowserCacheModuleRequest) HasMaxAge() bool { + if o != nil && !IsNil(o.MaxAge) { + return true + } + + return false +} + +// SetMaxAge gets a reference to the given int64 and assigns it to the MaxAge field. +func (o *BrowserCacheModuleRequest) SetMaxAge(v int64) { + o.MaxAge = &v +} + +func (o BrowserCacheModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BrowserCacheModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.MaxAge) { + toSerialize["max_age"] = o.MaxAge + } + return toSerialize, nil +} + +type NullableBrowserCacheModuleRequest struct { + value *BrowserCacheModuleRequest + isSet bool +} + +func (v NullableBrowserCacheModuleRequest) Get() *BrowserCacheModuleRequest { + return v.value +} + +func (v *NullableBrowserCacheModuleRequest) Set(val *BrowserCacheModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBrowserCacheModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBrowserCacheModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBrowserCacheModuleRequest(val *BrowserCacheModuleRequest) *NullableBrowserCacheModuleRequest { + return &NullableBrowserCacheModuleRequest{value: val, isSet: true} +} + +func (v NullableBrowserCacheModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBrowserCacheModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_bucket.go b/azion-api/model_bucket.go new file mode 100644 index 0000000..d772dac --- /dev/null +++ b/azion-api/model_bucket.go @@ -0,0 +1,273 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Bucket type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Bucket{} + +// Bucket struct for Bucket +type Bucket struct { + Name string `json:"name"` + // * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted + WorkloadsAccess string `json:"workloads_access"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ProductVersion string `json:"product_version"` +} + +type _Bucket Bucket + +// NewBucket instantiates a new Bucket object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBucket(name string, workloadsAccess string, lastEditor string, lastModified time.Time, productVersion string) *Bucket { + this := Bucket{} + this.Name = name + this.WorkloadsAccess = workloadsAccess + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + return &this +} + +// NewBucketWithDefaults instantiates a new Bucket object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBucketWithDefaults() *Bucket { + this := Bucket{} + return &this +} + +// GetName returns the Name field value +func (o *Bucket) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Bucket) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Bucket) SetName(v string) { + o.Name = v +} + +// GetWorkloadsAccess returns the WorkloadsAccess field value +func (o *Bucket) GetWorkloadsAccess() string { + if o == nil { + var ret string + return ret + } + + return o.WorkloadsAccess +} + +// GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field value +// and a boolean to check if the value has been set. +func (o *Bucket) GetWorkloadsAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkloadsAccess, true +} + +// SetWorkloadsAccess sets field value +func (o *Bucket) SetWorkloadsAccess(v string) { + o.WorkloadsAccess = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Bucket) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Bucket) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Bucket) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Bucket) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Bucket) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Bucket) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Bucket) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Bucket) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Bucket) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Bucket) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Bucket) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["workloads_access"] = o.WorkloadsAccess + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Bucket) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "workloads_access", + "last_editor", + "last_modified", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBucket := _Bucket{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBucket) + + if err != nil { + return err + } + + *o = Bucket(varBucket) + + return err +} + +type NullableBucket struct { + value *Bucket + isSet bool +} + +func (v NullableBucket) Get() *Bucket { + return v.value +} + +func (v *NullableBucket) Set(val *Bucket) { + v.value = val + v.isSet = true +} + +func (v NullableBucket) IsSet() bool { + return v.isSet +} + +func (v *NullableBucket) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucket(val *Bucket) *NullableBucket { + return &NullableBucket{value: val, isSet: true} +} + +func (v NullableBucket) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucket) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_bucket_create.go b/azion-api/model_bucket_create.go new file mode 100644 index 0000000..ad8063c --- /dev/null +++ b/azion-api/model_bucket_create.go @@ -0,0 +1,273 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the BucketCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketCreate{} + +// BucketCreate struct for BucketCreate +type BucketCreate struct { + Name string `json:"name"` + // * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted + WorkloadsAccess string `json:"workloads_access"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ProductVersion string `json:"product_version"` +} + +type _BucketCreate BucketCreate + +// NewBucketCreate instantiates a new BucketCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBucketCreate(name string, workloadsAccess string, lastEditor string, lastModified time.Time, productVersion string) *BucketCreate { + this := BucketCreate{} + this.Name = name + this.WorkloadsAccess = workloadsAccess + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + return &this +} + +// NewBucketCreateWithDefaults instantiates a new BucketCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBucketCreateWithDefaults() *BucketCreate { + this := BucketCreate{} + return &this +} + +// GetName returns the Name field value +func (o *BucketCreate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *BucketCreate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *BucketCreate) SetName(v string) { + o.Name = v +} + +// GetWorkloadsAccess returns the WorkloadsAccess field value +func (o *BucketCreate) GetWorkloadsAccess() string { + if o == nil { + var ret string + return ret + } + + return o.WorkloadsAccess +} + +// GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field value +// and a boolean to check if the value has been set. +func (o *BucketCreate) GetWorkloadsAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkloadsAccess, true +} + +// SetWorkloadsAccess sets field value +func (o *BucketCreate) SetWorkloadsAccess(v string) { + o.WorkloadsAccess = v +} + +// GetLastEditor returns the LastEditor field value +func (o *BucketCreate) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *BucketCreate) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *BucketCreate) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *BucketCreate) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *BucketCreate) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *BucketCreate) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *BucketCreate) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *BucketCreate) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *BucketCreate) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o BucketCreate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BucketCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["workloads_access"] = o.WorkloadsAccess + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *BucketCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "workloads_access", + "last_editor", + "last_modified", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBucketCreate := _BucketCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBucketCreate) + + if err != nil { + return err + } + + *o = BucketCreate(varBucketCreate) + + return err +} + +type NullableBucketCreate struct { + value *BucketCreate + isSet bool +} + +func (v NullableBucketCreate) Get() *BucketCreate { + return v.value +} + +func (v *NullableBucketCreate) Set(val *BucketCreate) { + v.value = val + v.isSet = true +} + +func (v NullableBucketCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketCreate(val *BucketCreate) *NullableBucketCreate { + return &NullableBucketCreate{value: val, isSet: true} +} + +func (v NullableBucketCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_bucket_create_request.go b/azion-api/model_bucket_create_request.go new file mode 100644 index 0000000..e2e3441 --- /dev/null +++ b/azion-api/model_bucket_create_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BucketCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketCreateRequest{} + +// BucketCreateRequest struct for BucketCreateRequest +type BucketCreateRequest struct { + Name string `json:"name"` + // * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted + WorkloadsAccess string `json:"workloads_access"` +} + +type _BucketCreateRequest BucketCreateRequest + +// NewBucketCreateRequest instantiates a new BucketCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBucketCreateRequest(name string, workloadsAccess string) *BucketCreateRequest { + this := BucketCreateRequest{} + this.Name = name + this.WorkloadsAccess = workloadsAccess + return &this +} + +// NewBucketCreateRequestWithDefaults instantiates a new BucketCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBucketCreateRequestWithDefaults() *BucketCreateRequest { + this := BucketCreateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *BucketCreateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *BucketCreateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *BucketCreateRequest) SetName(v string) { + o.Name = v +} + +// GetWorkloadsAccess returns the WorkloadsAccess field value +func (o *BucketCreateRequest) GetWorkloadsAccess() string { + if o == nil { + var ret string + return ret + } + + return o.WorkloadsAccess +} + +// GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field value +// and a boolean to check if the value has been set. +func (o *BucketCreateRequest) GetWorkloadsAccessOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkloadsAccess, true +} + +// SetWorkloadsAccess sets field value +func (o *BucketCreateRequest) SetWorkloadsAccess(v string) { + o.WorkloadsAccess = v +} + +func (o BucketCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BucketCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["workloads_access"] = o.WorkloadsAccess + return toSerialize, nil +} + +func (o *BucketCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "workloads_access", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBucketCreateRequest := _BucketCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBucketCreateRequest) + + if err != nil { + return err + } + + *o = BucketCreateRequest(varBucketCreateRequest) + + return err +} + +type NullableBucketCreateRequest struct { + value *BucketCreateRequest + isSet bool +} + +func (v NullableBucketCreateRequest) Get() *BucketCreateRequest { + return v.value +} + +func (v *NullableBucketCreateRequest) Set(val *BucketCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBucketCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketCreateRequest(val *BucketCreateRequest) *NullableBucketCreateRequest { + return &NullableBucketCreateRequest{value: val, isSet: true} +} + +func (v NullableBucketCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_bucket_create_response.go b/azion-api/model_bucket_create_response.go new file mode 100644 index 0000000..02bc4bf --- /dev/null +++ b/azion-api/model_bucket_create_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BucketCreateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketCreateResponse{} + +// BucketCreateResponse struct for BucketCreateResponse +type BucketCreateResponse struct { + State *string `json:"state,omitempty"` + Data BucketCreate `json:"data"` +} + +type _BucketCreateResponse BucketCreateResponse + +// NewBucketCreateResponse instantiates a new BucketCreateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBucketCreateResponse(data BucketCreate) *BucketCreateResponse { + this := BucketCreateResponse{} + this.Data = data + return &this +} + +// NewBucketCreateResponseWithDefaults instantiates a new BucketCreateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBucketCreateResponseWithDefaults() *BucketCreateResponse { + this := BucketCreateResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *BucketCreateResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BucketCreateResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *BucketCreateResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *BucketCreateResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *BucketCreateResponse) GetData() BucketCreate { + if o == nil { + var ret BucketCreate + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *BucketCreateResponse) GetDataOk() (*BucketCreate, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *BucketCreateResponse) SetData(v BucketCreate) { + o.Data = v +} + +func (o BucketCreateResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BucketCreateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *BucketCreateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBucketCreateResponse := _BucketCreateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBucketCreateResponse) + + if err != nil { + return err + } + + *o = BucketCreateResponse(varBucketCreateResponse) + + return err +} + +type NullableBucketCreateResponse struct { + value *BucketCreateResponse + isSet bool +} + +func (v NullableBucketCreateResponse) Get() *BucketCreateResponse { + return v.value +} + +func (v *NullableBucketCreateResponse) Set(val *BucketCreateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableBucketCreateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketCreateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketCreateResponse(val *BucketCreateResponse) *NullableBucketCreateResponse { + return &NullableBucketCreateResponse{value: val, isSet: true} +} + +func (v NullableBucketCreateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketCreateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_bucket_object.go b/azion-api/model_bucket_object.go new file mode 100644 index 0000000..c0542d8 --- /dev/null +++ b/azion-api/model_bucket_object.go @@ -0,0 +1,246 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the BucketObject type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BucketObject{} + +// BucketObject struct for BucketObject +type BucketObject struct { + Key string `json:"key"` + LastModified time.Time `json:"last_modified"` + // Size of the object in bytes + Size int64 `json:"size"` + // Whether this entry represents a folder + IsFolder bool `json:"is_folder"` +} + +type _BucketObject BucketObject + +// NewBucketObject instantiates a new BucketObject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBucketObject(key string, lastModified time.Time, size int64, isFolder bool) *BucketObject { + this := BucketObject{} + this.Key = key + this.LastModified = lastModified + this.Size = size + this.IsFolder = isFolder + return &this +} + +// NewBucketObjectWithDefaults instantiates a new BucketObject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBucketObjectWithDefaults() *BucketObject { + this := BucketObject{} + return &this +} + +// GetKey returns the Key field value +func (o *BucketObject) GetKey() string { + if o == nil { + var ret string + return ret + } + + return o.Key +} + +// GetKeyOk returns a tuple with the Key field value +// and a boolean to check if the value has been set. +func (o *BucketObject) GetKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Key, true +} + +// SetKey sets field value +func (o *BucketObject) SetKey(v string) { + o.Key = v +} + +// GetLastModified returns the LastModified field value +func (o *BucketObject) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *BucketObject) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *BucketObject) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetSize returns the Size field value +func (o *BucketObject) GetSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Size +} + +// GetSizeOk returns a tuple with the Size field value +// and a boolean to check if the value has been set. +func (o *BucketObject) GetSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Size, true +} + +// SetSize sets field value +func (o *BucketObject) SetSize(v int64) { + o.Size = v +} + +// GetIsFolder returns the IsFolder field value +func (o *BucketObject) GetIsFolder() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsFolder +} + +// GetIsFolderOk returns a tuple with the IsFolder field value +// and a boolean to check if the value has been set. +func (o *BucketObject) GetIsFolderOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsFolder, true +} + +// SetIsFolder sets field value +func (o *BucketObject) SetIsFolder(v bool) { + o.IsFolder = v +} + +func (o BucketObject) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BucketObject) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["key"] = o.Key + toSerialize["last_modified"] = o.LastModified + toSerialize["size"] = o.Size + toSerialize["is_folder"] = o.IsFolder + return toSerialize, nil +} + +func (o *BucketObject) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "key", + "last_modified", + "size", + "is_folder", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBucketObject := _BucketObject{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBucketObject) + + if err != nil { + return err + } + + *o = BucketObject(varBucketObject) + + return err +} + +type NullableBucketObject struct { + value *BucketObject + isSet bool +} + +func (v NullableBucketObject) Get() *BucketObject { + return v.value +} + +func (v *NullableBucketObject) Set(val *BucketObject) { + v.value = val + v.isSet = true +} + +func (v NullableBucketObject) IsSet() bool { + return v.isSet +} + +func (v *NullableBucketObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBucketObject(val *BucketObject) *NullableBucketObject { + return &NullableBucketObject{value: val, isSet: true} +} + +func (v NullableBucketObject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBucketObject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_build_context_field.go b/azion-api/model_build_context_field.go new file mode 100644 index 0000000..09d2443 --- /dev/null +++ b/azion-api/model_build_context_field.go @@ -0,0 +1,223 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BuildContextField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BuildContextField{} + +// BuildContextField struct for BuildContextField +type BuildContextField struct { + Field string `json:"field"` + Value string `json:"value"` + InstantiationDataPath *string `json:"instantiation_data_path,omitempty"` +} + +type _BuildContextField BuildContextField + +// NewBuildContextField instantiates a new BuildContextField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBuildContextField(field string, value string) *BuildContextField { + this := BuildContextField{} + this.Field = field + this.Value = value + return &this +} + +// NewBuildContextFieldWithDefaults instantiates a new BuildContextField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBuildContextFieldWithDefaults() *BuildContextField { + this := BuildContextField{} + return &this +} + +// GetField returns the Field field value +func (o *BuildContextField) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *BuildContextField) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *BuildContextField) SetField(v string) { + o.Field = v +} + +// GetValue returns the Value field value +func (o *BuildContextField) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *BuildContextField) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *BuildContextField) SetValue(v string) { + o.Value = v +} + +// GetInstantiationDataPath returns the InstantiationDataPath field value if set, zero value otherwise. +func (o *BuildContextField) GetInstantiationDataPath() string { + if o == nil || IsNil(o.InstantiationDataPath) { + var ret string + return ret + } + return *o.InstantiationDataPath +} + +// GetInstantiationDataPathOk returns a tuple with the InstantiationDataPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BuildContextField) GetInstantiationDataPathOk() (*string, bool) { + if o == nil || IsNil(o.InstantiationDataPath) { + return nil, false + } + return o.InstantiationDataPath, true +} + +// HasInstantiationDataPath returns a boolean if a field has been set. +func (o *BuildContextField) HasInstantiationDataPath() bool { + if o != nil && !IsNil(o.InstantiationDataPath) { + return true + } + + return false +} + +// SetInstantiationDataPath gets a reference to the given string and assigns it to the InstantiationDataPath field. +func (o *BuildContextField) SetInstantiationDataPath(v string) { + o.InstantiationDataPath = &v +} + +func (o BuildContextField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BuildContextField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + toSerialize["value"] = o.Value + if !IsNil(o.InstantiationDataPath) { + toSerialize["instantiation_data_path"] = o.InstantiationDataPath + } + return toSerialize, nil +} + +func (o *BuildContextField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "field", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBuildContextField := _BuildContextField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBuildContextField) + + if err != nil { + return err + } + + *o = BuildContextField(varBuildContextField) + + return err +} + +type NullableBuildContextField struct { + value *BuildContextField + isSet bool +} + +func (v NullableBuildContextField) Get() *BuildContextField { + return v.value +} + +func (v *NullableBuildContextField) Set(val *BuildContextField) { + v.value = val + v.isSet = true +} + +func (v NullableBuildContextField) IsSet() bool { + return v.isSet +} + +func (v *NullableBuildContextField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBuildContextField(val *BuildContextField) *NullableBuildContextField { + return &NullableBuildContextField{value: val, isSet: true} +} + +func (v NullableBuildContextField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBuildContextField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_build_context_field_request.go b/azion-api/model_build_context_field_request.go new file mode 100644 index 0000000..08e2e09 --- /dev/null +++ b/azion-api/model_build_context_field_request.go @@ -0,0 +1,223 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the BuildContextFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BuildContextFieldRequest{} + +// BuildContextFieldRequest struct for BuildContextFieldRequest +type BuildContextFieldRequest struct { + Field string `json:"field"` + Value string `json:"value"` + InstantiationDataPath *string `json:"instantiation_data_path,omitempty"` +} + +type _BuildContextFieldRequest BuildContextFieldRequest + +// NewBuildContextFieldRequest instantiates a new BuildContextFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBuildContextFieldRequest(field string, value string) *BuildContextFieldRequest { + this := BuildContextFieldRequest{} + this.Field = field + this.Value = value + return &this +} + +// NewBuildContextFieldRequestWithDefaults instantiates a new BuildContextFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBuildContextFieldRequestWithDefaults() *BuildContextFieldRequest { + this := BuildContextFieldRequest{} + return &this +} + +// GetField returns the Field field value +func (o *BuildContextFieldRequest) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *BuildContextFieldRequest) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *BuildContextFieldRequest) SetField(v string) { + o.Field = v +} + +// GetValue returns the Value field value +func (o *BuildContextFieldRequest) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *BuildContextFieldRequest) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *BuildContextFieldRequest) SetValue(v string) { + o.Value = v +} + +// GetInstantiationDataPath returns the InstantiationDataPath field value if set, zero value otherwise. +func (o *BuildContextFieldRequest) GetInstantiationDataPath() string { + if o == nil || IsNil(o.InstantiationDataPath) { + var ret string + return ret + } + return *o.InstantiationDataPath +} + +// GetInstantiationDataPathOk returns a tuple with the InstantiationDataPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BuildContextFieldRequest) GetInstantiationDataPathOk() (*string, bool) { + if o == nil || IsNil(o.InstantiationDataPath) { + return nil, false + } + return o.InstantiationDataPath, true +} + +// HasInstantiationDataPath returns a boolean if a field has been set. +func (o *BuildContextFieldRequest) HasInstantiationDataPath() bool { + if o != nil && !IsNil(o.InstantiationDataPath) { + return true + } + + return false +} + +// SetInstantiationDataPath gets a reference to the given string and assigns it to the InstantiationDataPath field. +func (o *BuildContextFieldRequest) SetInstantiationDataPath(v string) { + o.InstantiationDataPath = &v +} + +func (o BuildContextFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BuildContextFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + toSerialize["value"] = o.Value + if !IsNil(o.InstantiationDataPath) { + toSerialize["instantiation_data_path"] = o.InstantiationDataPath + } + return toSerialize, nil +} + +func (o *BuildContextFieldRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "field", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varBuildContextFieldRequest := _BuildContextFieldRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varBuildContextFieldRequest) + + if err != nil { + return err + } + + *o = BuildContextFieldRequest(varBuildContextFieldRequest) + + return err +} + +type NullableBuildContextFieldRequest struct { + value *BuildContextFieldRequest + isSet bool +} + +func (v NullableBuildContextFieldRequest) Get() *BuildContextFieldRequest { + return v.value +} + +func (v *NullableBuildContextFieldRequest) Set(val *BuildContextFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableBuildContextFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableBuildContextFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBuildContextFieldRequest(val *BuildContextFieldRequest) *NullableBuildContextFieldRequest { + return &NullableBuildContextFieldRequest{value: val, isSet: true} +} + +func (v NullableBuildContextFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBuildContextFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_module.go b/azion-api/model_cache_module.go new file mode 100644 index 0000000..1fd1559 --- /dev/null +++ b/azion-api/model_cache_module.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheModule{} + +// CacheModule struct for CacheModule +type CacheModule struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewCacheModule instantiates a new CacheModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheModule() *CacheModule { + this := CacheModule{} + return &this +} + +// NewCacheModuleWithDefaults instantiates a new CacheModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheModuleWithDefaults() *CacheModule { + this := CacheModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *CacheModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *CacheModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *CacheModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o CacheModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableCacheModule struct { + value *CacheModule + isSet bool +} + +func (v NullableCacheModule) Get() *CacheModule { + return v.value +} + +func (v *NullableCacheModule) Set(val *CacheModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheModule(val *CacheModule) *NullableCacheModule { + return &NullableCacheModule{value: val, isSet: true} +} + +func (v NullableCacheModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_module_request.go b/azion-api/model_cache_module_request.go new file mode 100644 index 0000000..a386934 --- /dev/null +++ b/azion-api/model_cache_module_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheModuleRequest{} + +// CacheModuleRequest struct for CacheModuleRequest +type CacheModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewCacheModuleRequest instantiates a new CacheModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheModuleRequest() *CacheModuleRequest { + this := CacheModuleRequest{} + return &this +} + +// NewCacheModuleRequestWithDefaults instantiates a new CacheModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheModuleRequestWithDefaults() *CacheModuleRequest { + this := CacheModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *CacheModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *CacheModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *CacheModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o CacheModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableCacheModuleRequest struct { + value *CacheModuleRequest + isSet bool +} + +func (v NullableCacheModuleRequest) Get() *CacheModuleRequest { + return v.value +} + +func (v *NullableCacheModuleRequest) Set(val *CacheModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheModuleRequest(val *CacheModuleRequest) *NullableCacheModuleRequest { + return &NullableCacheModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_setting.go b/azion-api/model_cache_setting.go new file mode 100644 index 0000000..d05739f --- /dev/null +++ b/azion-api/model_cache_setting.go @@ -0,0 +1,259 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CacheSetting type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSetting{} + +// CacheSetting struct for CacheSetting +type CacheSetting struct { + Id int64 `json:"id"` + Name string `json:"name"` + BrowserCache *BrowserCacheModule `json:"browser_cache,omitempty"` + Modules *CacheSettingsModules `json:"modules,omitempty"` +} + +type _CacheSetting CacheSetting + +// NewCacheSetting instantiates a new CacheSetting object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSetting(id int64, name string) *CacheSetting { + this := CacheSetting{} + this.Id = id + this.Name = name + return &this +} + +// NewCacheSettingWithDefaults instantiates a new CacheSetting object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingWithDefaults() *CacheSetting { + this := CacheSetting{} + return &this +} + +// GetId returns the Id field value +func (o *CacheSetting) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CacheSetting) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CacheSetting) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CacheSetting) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CacheSetting) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CacheSetting) SetName(v string) { + o.Name = v +} + +// GetBrowserCache returns the BrowserCache field value if set, zero value otherwise. +func (o *CacheSetting) GetBrowserCache() BrowserCacheModule { + if o == nil || IsNil(o.BrowserCache) { + var ret BrowserCacheModule + return ret + } + return *o.BrowserCache +} + +// GetBrowserCacheOk returns a tuple with the BrowserCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSetting) GetBrowserCacheOk() (*BrowserCacheModule, bool) { + if o == nil || IsNil(o.BrowserCache) { + return nil, false + } + return o.BrowserCache, true +} + +// HasBrowserCache returns a boolean if a field has been set. +func (o *CacheSetting) HasBrowserCache() bool { + if o != nil && !IsNil(o.BrowserCache) { + return true + } + + return false +} + +// SetBrowserCache gets a reference to the given BrowserCacheModule and assigns it to the BrowserCache field. +func (o *CacheSetting) SetBrowserCache(v BrowserCacheModule) { + o.BrowserCache = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *CacheSetting) GetModules() CacheSettingsModules { + if o == nil || IsNil(o.Modules) { + var ret CacheSettingsModules + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSetting) GetModulesOk() (*CacheSettingsModules, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *CacheSetting) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given CacheSettingsModules and assigns it to the Modules field. +func (o *CacheSetting) SetModules(v CacheSettingsModules) { + o.Modules = &v +} + +func (o CacheSetting) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSetting) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.BrowserCache) { + toSerialize["browser_cache"] = o.BrowserCache + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +func (o *CacheSetting) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCacheSetting := _CacheSetting{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCacheSetting) + + if err != nil { + return err + } + + *o = CacheSetting(varCacheSetting) + + return err +} + +type NullableCacheSetting struct { + value *CacheSetting + isSet bool +} + +func (v NullableCacheSetting) Get() *CacheSetting { + return v.value +} + +func (v *NullableCacheSetting) Set(val *CacheSetting) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSetting) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSetting) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSetting(val *CacheSetting) *NullableCacheSetting { + return &NullableCacheSetting{value: val, isSet: true} +} + +func (v NullableCacheSetting) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSetting) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_setting_request.go b/azion-api/model_cache_setting_request.go new file mode 100644 index 0000000..7ce547f --- /dev/null +++ b/azion-api/model_cache_setting_request.go @@ -0,0 +1,231 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CacheSettingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingRequest{} + +// CacheSettingRequest struct for CacheSettingRequest +type CacheSettingRequest struct { + Name string `json:"name"` + BrowserCache *BrowserCacheModuleRequest `json:"browser_cache,omitempty"` + Modules *CacheSettingsModulesRequest `json:"modules,omitempty"` +} + +type _CacheSettingRequest CacheSettingRequest + +// NewCacheSettingRequest instantiates a new CacheSettingRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingRequest(name string) *CacheSettingRequest { + this := CacheSettingRequest{} + this.Name = name + return &this +} + +// NewCacheSettingRequestWithDefaults instantiates a new CacheSettingRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingRequestWithDefaults() *CacheSettingRequest { + this := CacheSettingRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CacheSettingRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CacheSettingRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CacheSettingRequest) SetName(v string) { + o.Name = v +} + +// GetBrowserCache returns the BrowserCache field value if set, zero value otherwise. +func (o *CacheSettingRequest) GetBrowserCache() BrowserCacheModuleRequest { + if o == nil || IsNil(o.BrowserCache) { + var ret BrowserCacheModuleRequest + return ret + } + return *o.BrowserCache +} + +// GetBrowserCacheOk returns a tuple with the BrowserCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingRequest) GetBrowserCacheOk() (*BrowserCacheModuleRequest, bool) { + if o == nil || IsNil(o.BrowserCache) { + return nil, false + } + return o.BrowserCache, true +} + +// HasBrowserCache returns a boolean if a field has been set. +func (o *CacheSettingRequest) HasBrowserCache() bool { + if o != nil && !IsNil(o.BrowserCache) { + return true + } + + return false +} + +// SetBrowserCache gets a reference to the given BrowserCacheModuleRequest and assigns it to the BrowserCache field. +func (o *CacheSettingRequest) SetBrowserCache(v BrowserCacheModuleRequest) { + o.BrowserCache = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *CacheSettingRequest) GetModules() CacheSettingsModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret CacheSettingsModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingRequest) GetModulesOk() (*CacheSettingsModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *CacheSettingRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given CacheSettingsModulesRequest and assigns it to the Modules field. +func (o *CacheSettingRequest) SetModules(v CacheSettingsModulesRequest) { + o.Modules = &v +} + +func (o CacheSettingRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.BrowserCache) { + toSerialize["browser_cache"] = o.BrowserCache + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +func (o *CacheSettingRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCacheSettingRequest := _CacheSettingRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCacheSettingRequest) + + if err != nil { + return err + } + + *o = CacheSettingRequest(varCacheSettingRequest) + + return err +} + +type NullableCacheSettingRequest struct { + value *CacheSettingRequest + isSet bool +} + +func (v NullableCacheSettingRequest) Get() *CacheSettingRequest { + return v.value +} + +func (v *NullableCacheSettingRequest) Set(val *CacheSettingRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingRequest(val *CacheSettingRequest) *NullableCacheSettingRequest { + return &NullableCacheSettingRequest{value: val, isSet: true} +} + +func (v NullableCacheSettingRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_setting_response.go b/azion-api/model_cache_setting_response.go new file mode 100644 index 0000000..0ab1e7f --- /dev/null +++ b/azion-api/model_cache_setting_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CacheSettingResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingResponse{} + +// CacheSettingResponse struct for CacheSettingResponse +type CacheSettingResponse struct { + State *string `json:"state,omitempty"` + Data CacheSetting `json:"data"` +} + +type _CacheSettingResponse CacheSettingResponse + +// NewCacheSettingResponse instantiates a new CacheSettingResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingResponse(data CacheSetting) *CacheSettingResponse { + this := CacheSettingResponse{} + this.Data = data + return &this +} + +// NewCacheSettingResponseWithDefaults instantiates a new CacheSettingResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingResponseWithDefaults() *CacheSettingResponse { + this := CacheSettingResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *CacheSettingResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *CacheSettingResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *CacheSettingResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *CacheSettingResponse) GetData() CacheSetting { + if o == nil { + var ret CacheSetting + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *CacheSettingResponse) GetDataOk() (*CacheSetting, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *CacheSettingResponse) SetData(v CacheSetting) { + o.Data = v +} + +func (o CacheSettingResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *CacheSettingResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCacheSettingResponse := _CacheSettingResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCacheSettingResponse) + + if err != nil { + return err + } + + *o = CacheSettingResponse(varCacheSettingResponse) + + return err +} + +type NullableCacheSettingResponse struct { + value *CacheSettingResponse + isSet bool +} + +func (v NullableCacheSettingResponse) Get() *CacheSettingResponse { + return v.value +} + +func (v *NullableCacheSettingResponse) Set(val *CacheSettingResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingResponse(val *CacheSettingResponse) *NullableCacheSettingResponse { + return &NullableCacheSettingResponse{value: val, isSet: true} +} + +func (v NullableCacheSettingResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_application_accelerator_module.go b/azion-api/model_cache_settings_application_accelerator_module.go new file mode 100644 index 0000000..5fa16ef --- /dev/null +++ b/azion-api/model_cache_settings_application_accelerator_module.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsApplicationAcceleratorModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsApplicationAcceleratorModule{} + +// CacheSettingsApplicationAcceleratorModule struct for CacheSettingsApplicationAcceleratorModule +type CacheSettingsApplicationAcceleratorModule struct { + CacheVaryByMethod []string `json:"cache_vary_by_method,omitempty"` + CacheVaryByQuerystring *CacheVaryByQuerystringModule `json:"cache_vary_by_querystring,omitempty"` + CacheVaryByCookies *CacheVaryByCookiesModule `json:"cache_vary_by_cookies,omitempty"` + CacheVaryByDevices *CacheVaryByDevicesModule `json:"cache_vary_by_devices,omitempty"` +} + +// NewCacheSettingsApplicationAcceleratorModule instantiates a new CacheSettingsApplicationAcceleratorModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsApplicationAcceleratorModule() *CacheSettingsApplicationAcceleratorModule { + this := CacheSettingsApplicationAcceleratorModule{} + return &this +} + +// NewCacheSettingsApplicationAcceleratorModuleWithDefaults instantiates a new CacheSettingsApplicationAcceleratorModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsApplicationAcceleratorModuleWithDefaults() *CacheSettingsApplicationAcceleratorModule { + this := CacheSettingsApplicationAcceleratorModule{} + return &this +} + +// GetCacheVaryByMethod returns the CacheVaryByMethod field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByMethod() []string { + if o == nil || IsNil(o.CacheVaryByMethod) { + var ret []string + return ret + } + return o.CacheVaryByMethod +} + +// GetCacheVaryByMethodOk returns a tuple with the CacheVaryByMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByMethodOk() ([]string, bool) { + if o == nil || IsNil(o.CacheVaryByMethod) { + return nil, false + } + return o.CacheVaryByMethod, true +} + +// HasCacheVaryByMethod returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByMethod() bool { + if o != nil && !IsNil(o.CacheVaryByMethod) { + return true + } + + return false +} + +// SetCacheVaryByMethod gets a reference to the given []string and assigns it to the CacheVaryByMethod field. +func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByMethod(v []string) { + o.CacheVaryByMethod = v +} + +// GetCacheVaryByQuerystring returns the CacheVaryByQuerystring field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByQuerystring() CacheVaryByQuerystringModule { + if o == nil || IsNil(o.CacheVaryByQuerystring) { + var ret CacheVaryByQuerystringModule + return ret + } + return *o.CacheVaryByQuerystring +} + +// GetCacheVaryByQuerystringOk returns a tuple with the CacheVaryByQuerystring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByQuerystringOk() (*CacheVaryByQuerystringModule, bool) { + if o == nil || IsNil(o.CacheVaryByQuerystring) { + return nil, false + } + return o.CacheVaryByQuerystring, true +} + +// HasCacheVaryByQuerystring returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByQuerystring() bool { + if o != nil && !IsNil(o.CacheVaryByQuerystring) { + return true + } + + return false +} + +// SetCacheVaryByQuerystring gets a reference to the given CacheVaryByQuerystringModule and assigns it to the CacheVaryByQuerystring field. +func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByQuerystring(v CacheVaryByQuerystringModule) { + o.CacheVaryByQuerystring = &v +} + +// GetCacheVaryByCookies returns the CacheVaryByCookies field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByCookies() CacheVaryByCookiesModule { + if o == nil || IsNil(o.CacheVaryByCookies) { + var ret CacheVaryByCookiesModule + return ret + } + return *o.CacheVaryByCookies +} + +// GetCacheVaryByCookiesOk returns a tuple with the CacheVaryByCookies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByCookiesOk() (*CacheVaryByCookiesModule, bool) { + if o == nil || IsNil(o.CacheVaryByCookies) { + return nil, false + } + return o.CacheVaryByCookies, true +} + +// HasCacheVaryByCookies returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByCookies() bool { + if o != nil && !IsNil(o.CacheVaryByCookies) { + return true + } + + return false +} + +// SetCacheVaryByCookies gets a reference to the given CacheVaryByCookiesModule and assigns it to the CacheVaryByCookies field. +func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByCookies(v CacheVaryByCookiesModule) { + o.CacheVaryByCookies = &v +} + +// GetCacheVaryByDevices returns the CacheVaryByDevices field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByDevices() CacheVaryByDevicesModule { + if o == nil || IsNil(o.CacheVaryByDevices) { + var ret CacheVaryByDevicesModule + return ret + } + return *o.CacheVaryByDevices +} + +// GetCacheVaryByDevicesOk returns a tuple with the CacheVaryByDevices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModule) GetCacheVaryByDevicesOk() (*CacheVaryByDevicesModule, bool) { + if o == nil || IsNil(o.CacheVaryByDevices) { + return nil, false + } + return o.CacheVaryByDevices, true +} + +// HasCacheVaryByDevices returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModule) HasCacheVaryByDevices() bool { + if o != nil && !IsNil(o.CacheVaryByDevices) { + return true + } + + return false +} + +// SetCacheVaryByDevices gets a reference to the given CacheVaryByDevicesModule and assigns it to the CacheVaryByDevices field. +func (o *CacheSettingsApplicationAcceleratorModule) SetCacheVaryByDevices(v CacheVaryByDevicesModule) { + o.CacheVaryByDevices = &v +} + +func (o CacheSettingsApplicationAcceleratorModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsApplicationAcceleratorModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CacheVaryByMethod) { + toSerialize["cache_vary_by_method"] = o.CacheVaryByMethod + } + if !IsNil(o.CacheVaryByQuerystring) { + toSerialize["cache_vary_by_querystring"] = o.CacheVaryByQuerystring + } + if !IsNil(o.CacheVaryByCookies) { + toSerialize["cache_vary_by_cookies"] = o.CacheVaryByCookies + } + if !IsNil(o.CacheVaryByDevices) { + toSerialize["cache_vary_by_devices"] = o.CacheVaryByDevices + } + return toSerialize, nil +} + +type NullableCacheSettingsApplicationAcceleratorModule struct { + value *CacheSettingsApplicationAcceleratorModule + isSet bool +} + +func (v NullableCacheSettingsApplicationAcceleratorModule) Get() *CacheSettingsApplicationAcceleratorModule { + return v.value +} + +func (v *NullableCacheSettingsApplicationAcceleratorModule) Set(val *CacheSettingsApplicationAcceleratorModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsApplicationAcceleratorModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsApplicationAcceleratorModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsApplicationAcceleratorModule(val *CacheSettingsApplicationAcceleratorModule) *NullableCacheSettingsApplicationAcceleratorModule { + return &NullableCacheSettingsApplicationAcceleratorModule{value: val, isSet: true} +} + +func (v NullableCacheSettingsApplicationAcceleratorModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsApplicationAcceleratorModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_application_accelerator_module_request.go b/azion-api/model_cache_settings_application_accelerator_module_request.go new file mode 100644 index 0000000..4b27038 --- /dev/null +++ b/azion-api/model_cache_settings_application_accelerator_module_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsApplicationAcceleratorModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsApplicationAcceleratorModuleRequest{} + +// CacheSettingsApplicationAcceleratorModuleRequest struct for CacheSettingsApplicationAcceleratorModuleRequest +type CacheSettingsApplicationAcceleratorModuleRequest struct { + CacheVaryByMethod []string `json:"cache_vary_by_method,omitempty"` + CacheVaryByQuerystring *CacheVaryByQuerystringModuleRequest `json:"cache_vary_by_querystring,omitempty"` + CacheVaryByCookies *CacheVaryByCookiesModuleRequest `json:"cache_vary_by_cookies,omitempty"` + CacheVaryByDevices *CacheVaryByDevicesModuleRequest `json:"cache_vary_by_devices,omitempty"` +} + +// NewCacheSettingsApplicationAcceleratorModuleRequest instantiates a new CacheSettingsApplicationAcceleratorModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsApplicationAcceleratorModuleRequest() *CacheSettingsApplicationAcceleratorModuleRequest { + this := CacheSettingsApplicationAcceleratorModuleRequest{} + return &this +} + +// NewCacheSettingsApplicationAcceleratorModuleRequestWithDefaults instantiates a new CacheSettingsApplicationAcceleratorModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsApplicationAcceleratorModuleRequestWithDefaults() *CacheSettingsApplicationAcceleratorModuleRequest { + this := CacheSettingsApplicationAcceleratorModuleRequest{} + return &this +} + +// GetCacheVaryByMethod returns the CacheVaryByMethod field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByMethod() []string { + if o == nil || IsNil(o.CacheVaryByMethod) { + var ret []string + return ret + } + return o.CacheVaryByMethod +} + +// GetCacheVaryByMethodOk returns a tuple with the CacheVaryByMethod field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByMethodOk() ([]string, bool) { + if o == nil || IsNil(o.CacheVaryByMethod) { + return nil, false + } + return o.CacheVaryByMethod, true +} + +// HasCacheVaryByMethod returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByMethod() bool { + if o != nil && !IsNil(o.CacheVaryByMethod) { + return true + } + + return false +} + +// SetCacheVaryByMethod gets a reference to the given []string and assigns it to the CacheVaryByMethod field. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByMethod(v []string) { + o.CacheVaryByMethod = v +} + +// GetCacheVaryByQuerystring returns the CacheVaryByQuerystring field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByQuerystring() CacheVaryByQuerystringModuleRequest { + if o == nil || IsNil(o.CacheVaryByQuerystring) { + var ret CacheVaryByQuerystringModuleRequest + return ret + } + return *o.CacheVaryByQuerystring +} + +// GetCacheVaryByQuerystringOk returns a tuple with the CacheVaryByQuerystring field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByQuerystringOk() (*CacheVaryByQuerystringModuleRequest, bool) { + if o == nil || IsNil(o.CacheVaryByQuerystring) { + return nil, false + } + return o.CacheVaryByQuerystring, true +} + +// HasCacheVaryByQuerystring returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByQuerystring() bool { + if o != nil && !IsNil(o.CacheVaryByQuerystring) { + return true + } + + return false +} + +// SetCacheVaryByQuerystring gets a reference to the given CacheVaryByQuerystringModuleRequest and assigns it to the CacheVaryByQuerystring field. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByQuerystring(v CacheVaryByQuerystringModuleRequest) { + o.CacheVaryByQuerystring = &v +} + +// GetCacheVaryByCookies returns the CacheVaryByCookies field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByCookies() CacheVaryByCookiesModuleRequest { + if o == nil || IsNil(o.CacheVaryByCookies) { + var ret CacheVaryByCookiesModuleRequest + return ret + } + return *o.CacheVaryByCookies +} + +// GetCacheVaryByCookiesOk returns a tuple with the CacheVaryByCookies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByCookiesOk() (*CacheVaryByCookiesModuleRequest, bool) { + if o == nil || IsNil(o.CacheVaryByCookies) { + return nil, false + } + return o.CacheVaryByCookies, true +} + +// HasCacheVaryByCookies returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByCookies() bool { + if o != nil && !IsNil(o.CacheVaryByCookies) { + return true + } + + return false +} + +// SetCacheVaryByCookies gets a reference to the given CacheVaryByCookiesModuleRequest and assigns it to the CacheVaryByCookies field. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByCookies(v CacheVaryByCookiesModuleRequest) { + o.CacheVaryByCookies = &v +} + +// GetCacheVaryByDevices returns the CacheVaryByDevices field value if set, zero value otherwise. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByDevices() CacheVaryByDevicesModuleRequest { + if o == nil || IsNil(o.CacheVaryByDevices) { + var ret CacheVaryByDevicesModuleRequest + return ret + } + return *o.CacheVaryByDevices +} + +// GetCacheVaryByDevicesOk returns a tuple with the CacheVaryByDevices field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) GetCacheVaryByDevicesOk() (*CacheVaryByDevicesModuleRequest, bool) { + if o == nil || IsNil(o.CacheVaryByDevices) { + return nil, false + } + return o.CacheVaryByDevices, true +} + +// HasCacheVaryByDevices returns a boolean if a field has been set. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) HasCacheVaryByDevices() bool { + if o != nil && !IsNil(o.CacheVaryByDevices) { + return true + } + + return false +} + +// SetCacheVaryByDevices gets a reference to the given CacheVaryByDevicesModuleRequest and assigns it to the CacheVaryByDevices field. +func (o *CacheSettingsApplicationAcceleratorModuleRequest) SetCacheVaryByDevices(v CacheVaryByDevicesModuleRequest) { + o.CacheVaryByDevices = &v +} + +func (o CacheSettingsApplicationAcceleratorModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsApplicationAcceleratorModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CacheVaryByMethod) { + toSerialize["cache_vary_by_method"] = o.CacheVaryByMethod + } + if !IsNil(o.CacheVaryByQuerystring) { + toSerialize["cache_vary_by_querystring"] = o.CacheVaryByQuerystring + } + if !IsNil(o.CacheVaryByCookies) { + toSerialize["cache_vary_by_cookies"] = o.CacheVaryByCookies + } + if !IsNil(o.CacheVaryByDevices) { + toSerialize["cache_vary_by_devices"] = o.CacheVaryByDevices + } + return toSerialize, nil +} + +type NullableCacheSettingsApplicationAcceleratorModuleRequest struct { + value *CacheSettingsApplicationAcceleratorModuleRequest + isSet bool +} + +func (v NullableCacheSettingsApplicationAcceleratorModuleRequest) Get() *CacheSettingsApplicationAcceleratorModuleRequest { + return v.value +} + +func (v *NullableCacheSettingsApplicationAcceleratorModuleRequest) Set(val *CacheSettingsApplicationAcceleratorModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsApplicationAcceleratorModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsApplicationAcceleratorModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsApplicationAcceleratorModuleRequest(val *CacheSettingsApplicationAcceleratorModuleRequest) *NullableCacheSettingsApplicationAcceleratorModuleRequest { + return &NullableCacheSettingsApplicationAcceleratorModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheSettingsApplicationAcceleratorModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsApplicationAcceleratorModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_cache_module.go b/azion-api/model_cache_settings_cache_module.go new file mode 100644 index 0000000..e3465b5 --- /dev/null +++ b/azion-api/model_cache_settings_cache_module.go @@ -0,0 +1,283 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsCacheModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsCacheModule{} + +// CacheSettingsCacheModule struct for CacheSettingsCacheModule +type CacheSettingsCacheModule struct { + // * `honor` - Honor Origin Cache Settings * `override` - Override Cache Settings + Behavior *string `json:"behavior,omitempty"` + // To use a value lower than 60s, the Application Acceleration module must be enabled on the Application. + MaxAge *int64 `json:"max_age,omitempty"` + StaleCache *StateCacheModule `json:"stale_cache,omitempty"` + LargeFileCache *LargeFileCacheModule `json:"large_file_cache,omitempty"` + TieredCache NullableCacheSettingsTieredCacheModule `json:"tiered_cache,omitempty"` +} + +// NewCacheSettingsCacheModule instantiates a new CacheSettingsCacheModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsCacheModule() *CacheSettingsCacheModule { + this := CacheSettingsCacheModule{} + return &this +} + +// NewCacheSettingsCacheModuleWithDefaults instantiates a new CacheSettingsCacheModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsCacheModuleWithDefaults() *CacheSettingsCacheModule { + this := CacheSettingsCacheModule{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheSettingsCacheModule) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModule) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheSettingsCacheModule) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheSettingsCacheModule) SetBehavior(v string) { + o.Behavior = &v +} + +// GetMaxAge returns the MaxAge field value if set, zero value otherwise. +func (o *CacheSettingsCacheModule) GetMaxAge() int64 { + if o == nil || IsNil(o.MaxAge) { + var ret int64 + return ret + } + return *o.MaxAge +} + +// GetMaxAgeOk returns a tuple with the MaxAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModule) GetMaxAgeOk() (*int64, bool) { + if o == nil || IsNil(o.MaxAge) { + return nil, false + } + return o.MaxAge, true +} + +// HasMaxAge returns a boolean if a field has been set. +func (o *CacheSettingsCacheModule) HasMaxAge() bool { + if o != nil && !IsNil(o.MaxAge) { + return true + } + + return false +} + +// SetMaxAge gets a reference to the given int64 and assigns it to the MaxAge field. +func (o *CacheSettingsCacheModule) SetMaxAge(v int64) { + o.MaxAge = &v +} + +// GetStaleCache returns the StaleCache field value if set, zero value otherwise. +func (o *CacheSettingsCacheModule) GetStaleCache() StateCacheModule { + if o == nil || IsNil(o.StaleCache) { + var ret StateCacheModule + return ret + } + return *o.StaleCache +} + +// GetStaleCacheOk returns a tuple with the StaleCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModule) GetStaleCacheOk() (*StateCacheModule, bool) { + if o == nil || IsNil(o.StaleCache) { + return nil, false + } + return o.StaleCache, true +} + +// HasStaleCache returns a boolean if a field has been set. +func (o *CacheSettingsCacheModule) HasStaleCache() bool { + if o != nil && !IsNil(o.StaleCache) { + return true + } + + return false +} + +// SetStaleCache gets a reference to the given StateCacheModule and assigns it to the StaleCache field. +func (o *CacheSettingsCacheModule) SetStaleCache(v StateCacheModule) { + o.StaleCache = &v +} + +// GetLargeFileCache returns the LargeFileCache field value if set, zero value otherwise. +func (o *CacheSettingsCacheModule) GetLargeFileCache() LargeFileCacheModule { + if o == nil || IsNil(o.LargeFileCache) { + var ret LargeFileCacheModule + return ret + } + return *o.LargeFileCache +} + +// GetLargeFileCacheOk returns a tuple with the LargeFileCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModule) GetLargeFileCacheOk() (*LargeFileCacheModule, bool) { + if o == nil || IsNil(o.LargeFileCache) { + return nil, false + } + return o.LargeFileCache, true +} + +// HasLargeFileCache returns a boolean if a field has been set. +func (o *CacheSettingsCacheModule) HasLargeFileCache() bool { + if o != nil && !IsNil(o.LargeFileCache) { + return true + } + + return false +} + +// SetLargeFileCache gets a reference to the given LargeFileCacheModule and assigns it to the LargeFileCache field. +func (o *CacheSettingsCacheModule) SetLargeFileCache(v LargeFileCacheModule) { + o.LargeFileCache = &v +} + +// GetTieredCache returns the TieredCache field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CacheSettingsCacheModule) GetTieredCache() CacheSettingsTieredCacheModule { + if o == nil || IsNil(o.TieredCache.Get()) { + var ret CacheSettingsTieredCacheModule + return ret + } + return *o.TieredCache.Get() +} + +// GetTieredCacheOk returns a tuple with the TieredCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CacheSettingsCacheModule) GetTieredCacheOk() (*CacheSettingsTieredCacheModule, bool) { + if o == nil { + return nil, false + } + return o.TieredCache.Get(), o.TieredCache.IsSet() +} + +// HasTieredCache returns a boolean if a field has been set. +func (o *CacheSettingsCacheModule) HasTieredCache() bool { + if o != nil && o.TieredCache.IsSet() { + return true + } + + return false +} + +// SetTieredCache gets a reference to the given NullableCacheSettingsTieredCacheModule and assigns it to the TieredCache field. +func (o *CacheSettingsCacheModule) SetTieredCache(v CacheSettingsTieredCacheModule) { + o.TieredCache.Set(&v) +} +// SetTieredCacheNil sets the value for TieredCache to be an explicit nil +func (o *CacheSettingsCacheModule) SetTieredCacheNil() { + o.TieredCache.Set(nil) +} + +// UnsetTieredCache ensures that no value is present for TieredCache, not even an explicit nil +func (o *CacheSettingsCacheModule) UnsetTieredCache() { + o.TieredCache.Unset() +} + +func (o CacheSettingsCacheModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsCacheModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.MaxAge) { + toSerialize["max_age"] = o.MaxAge + } + if !IsNil(o.StaleCache) { + toSerialize["stale_cache"] = o.StaleCache + } + if !IsNil(o.LargeFileCache) { + toSerialize["large_file_cache"] = o.LargeFileCache + } + if o.TieredCache.IsSet() { + toSerialize["tiered_cache"] = o.TieredCache.Get() + } + return toSerialize, nil +} + +type NullableCacheSettingsCacheModule struct { + value *CacheSettingsCacheModule + isSet bool +} + +func (v NullableCacheSettingsCacheModule) Get() *CacheSettingsCacheModule { + return v.value +} + +func (v *NullableCacheSettingsCacheModule) Set(val *CacheSettingsCacheModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsCacheModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsCacheModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsCacheModule(val *CacheSettingsCacheModule) *NullableCacheSettingsCacheModule { + return &NullableCacheSettingsCacheModule{value: val, isSet: true} +} + +func (v NullableCacheSettingsCacheModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsCacheModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_cache_module_request.go b/azion-api/model_cache_settings_cache_module_request.go new file mode 100644 index 0000000..e2d0881 --- /dev/null +++ b/azion-api/model_cache_settings_cache_module_request.go @@ -0,0 +1,283 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsCacheModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsCacheModuleRequest{} + +// CacheSettingsCacheModuleRequest struct for CacheSettingsCacheModuleRequest +type CacheSettingsCacheModuleRequest struct { + // * `honor` - Honor Origin Cache Settings * `override` - Override Cache Settings + Behavior *string `json:"behavior,omitempty"` + // To use a value lower than 60s, the Application Acceleration module must be enabled on the Application. + MaxAge *int64 `json:"max_age,omitempty"` + StaleCache *StateCacheModuleRequest `json:"stale_cache,omitempty"` + LargeFileCache *LargeFileCacheModuleRequest `json:"large_file_cache,omitempty"` + TieredCache NullableCacheSettingsTieredCacheModuleRequest `json:"tiered_cache,omitempty"` +} + +// NewCacheSettingsCacheModuleRequest instantiates a new CacheSettingsCacheModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsCacheModuleRequest() *CacheSettingsCacheModuleRequest { + this := CacheSettingsCacheModuleRequest{} + return &this +} + +// NewCacheSettingsCacheModuleRequestWithDefaults instantiates a new CacheSettingsCacheModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsCacheModuleRequestWithDefaults() *CacheSettingsCacheModuleRequest { + this := CacheSettingsCacheModuleRequest{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheSettingsCacheModuleRequest) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModuleRequest) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheSettingsCacheModuleRequest) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheSettingsCacheModuleRequest) SetBehavior(v string) { + o.Behavior = &v +} + +// GetMaxAge returns the MaxAge field value if set, zero value otherwise. +func (o *CacheSettingsCacheModuleRequest) GetMaxAge() int64 { + if o == nil || IsNil(o.MaxAge) { + var ret int64 + return ret + } + return *o.MaxAge +} + +// GetMaxAgeOk returns a tuple with the MaxAge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModuleRequest) GetMaxAgeOk() (*int64, bool) { + if o == nil || IsNil(o.MaxAge) { + return nil, false + } + return o.MaxAge, true +} + +// HasMaxAge returns a boolean if a field has been set. +func (o *CacheSettingsCacheModuleRequest) HasMaxAge() bool { + if o != nil && !IsNil(o.MaxAge) { + return true + } + + return false +} + +// SetMaxAge gets a reference to the given int64 and assigns it to the MaxAge field. +func (o *CacheSettingsCacheModuleRequest) SetMaxAge(v int64) { + o.MaxAge = &v +} + +// GetStaleCache returns the StaleCache field value if set, zero value otherwise. +func (o *CacheSettingsCacheModuleRequest) GetStaleCache() StateCacheModuleRequest { + if o == nil || IsNil(o.StaleCache) { + var ret StateCacheModuleRequest + return ret + } + return *o.StaleCache +} + +// GetStaleCacheOk returns a tuple with the StaleCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModuleRequest) GetStaleCacheOk() (*StateCacheModuleRequest, bool) { + if o == nil || IsNil(o.StaleCache) { + return nil, false + } + return o.StaleCache, true +} + +// HasStaleCache returns a boolean if a field has been set. +func (o *CacheSettingsCacheModuleRequest) HasStaleCache() bool { + if o != nil && !IsNil(o.StaleCache) { + return true + } + + return false +} + +// SetStaleCache gets a reference to the given StateCacheModuleRequest and assigns it to the StaleCache field. +func (o *CacheSettingsCacheModuleRequest) SetStaleCache(v StateCacheModuleRequest) { + o.StaleCache = &v +} + +// GetLargeFileCache returns the LargeFileCache field value if set, zero value otherwise. +func (o *CacheSettingsCacheModuleRequest) GetLargeFileCache() LargeFileCacheModuleRequest { + if o == nil || IsNil(o.LargeFileCache) { + var ret LargeFileCacheModuleRequest + return ret + } + return *o.LargeFileCache +} + +// GetLargeFileCacheOk returns a tuple with the LargeFileCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsCacheModuleRequest) GetLargeFileCacheOk() (*LargeFileCacheModuleRequest, bool) { + if o == nil || IsNil(o.LargeFileCache) { + return nil, false + } + return o.LargeFileCache, true +} + +// HasLargeFileCache returns a boolean if a field has been set. +func (o *CacheSettingsCacheModuleRequest) HasLargeFileCache() bool { + if o != nil && !IsNil(o.LargeFileCache) { + return true + } + + return false +} + +// SetLargeFileCache gets a reference to the given LargeFileCacheModuleRequest and assigns it to the LargeFileCache field. +func (o *CacheSettingsCacheModuleRequest) SetLargeFileCache(v LargeFileCacheModuleRequest) { + o.LargeFileCache = &v +} + +// GetTieredCache returns the TieredCache field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CacheSettingsCacheModuleRequest) GetTieredCache() CacheSettingsTieredCacheModuleRequest { + if o == nil || IsNil(o.TieredCache.Get()) { + var ret CacheSettingsTieredCacheModuleRequest + return ret + } + return *o.TieredCache.Get() +} + +// GetTieredCacheOk returns a tuple with the TieredCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CacheSettingsCacheModuleRequest) GetTieredCacheOk() (*CacheSettingsTieredCacheModuleRequest, bool) { + if o == nil { + return nil, false + } + return o.TieredCache.Get(), o.TieredCache.IsSet() +} + +// HasTieredCache returns a boolean if a field has been set. +func (o *CacheSettingsCacheModuleRequest) HasTieredCache() bool { + if o != nil && o.TieredCache.IsSet() { + return true + } + + return false +} + +// SetTieredCache gets a reference to the given NullableCacheSettingsTieredCacheModuleRequest and assigns it to the TieredCache field. +func (o *CacheSettingsCacheModuleRequest) SetTieredCache(v CacheSettingsTieredCacheModuleRequest) { + o.TieredCache.Set(&v) +} +// SetTieredCacheNil sets the value for TieredCache to be an explicit nil +func (o *CacheSettingsCacheModuleRequest) SetTieredCacheNil() { + o.TieredCache.Set(nil) +} + +// UnsetTieredCache ensures that no value is present for TieredCache, not even an explicit nil +func (o *CacheSettingsCacheModuleRequest) UnsetTieredCache() { + o.TieredCache.Unset() +} + +func (o CacheSettingsCacheModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsCacheModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.MaxAge) { + toSerialize["max_age"] = o.MaxAge + } + if !IsNil(o.StaleCache) { + toSerialize["stale_cache"] = o.StaleCache + } + if !IsNil(o.LargeFileCache) { + toSerialize["large_file_cache"] = o.LargeFileCache + } + if o.TieredCache.IsSet() { + toSerialize["tiered_cache"] = o.TieredCache.Get() + } + return toSerialize, nil +} + +type NullableCacheSettingsCacheModuleRequest struct { + value *CacheSettingsCacheModuleRequest + isSet bool +} + +func (v NullableCacheSettingsCacheModuleRequest) Get() *CacheSettingsCacheModuleRequest { + return v.value +} + +func (v *NullableCacheSettingsCacheModuleRequest) Set(val *CacheSettingsCacheModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsCacheModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsCacheModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsCacheModuleRequest(val *CacheSettingsCacheModuleRequest) *NullableCacheSettingsCacheModuleRequest { + return &NullableCacheSettingsCacheModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheSettingsCacheModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsCacheModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_modules.go b/azion-api/model_cache_settings_modules.go new file mode 100644 index 0000000..0490735 --- /dev/null +++ b/azion-api/model_cache_settings_modules.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsModules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsModules{} + +// CacheSettingsModules struct for CacheSettingsModules +type CacheSettingsModules struct { + Cache *CacheSettingsCacheModule `json:"cache,omitempty"` + ApplicationAccelerator *CacheSettingsApplicationAcceleratorModule `json:"application_accelerator,omitempty"` +} + +// NewCacheSettingsModules instantiates a new CacheSettingsModules object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsModules() *CacheSettingsModules { + this := CacheSettingsModules{} + return &this +} + +// NewCacheSettingsModulesWithDefaults instantiates a new CacheSettingsModules object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsModulesWithDefaults() *CacheSettingsModules { + this := CacheSettingsModules{} + return &this +} + +// GetCache returns the Cache field value if set, zero value otherwise. +func (o *CacheSettingsModules) GetCache() CacheSettingsCacheModule { + if o == nil || IsNil(o.Cache) { + var ret CacheSettingsCacheModule + return ret + } + return *o.Cache +} + +// GetCacheOk returns a tuple with the Cache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsModules) GetCacheOk() (*CacheSettingsCacheModule, bool) { + if o == nil || IsNil(o.Cache) { + return nil, false + } + return o.Cache, true +} + +// HasCache returns a boolean if a field has been set. +func (o *CacheSettingsModules) HasCache() bool { + if o != nil && !IsNil(o.Cache) { + return true + } + + return false +} + +// SetCache gets a reference to the given CacheSettingsCacheModule and assigns it to the Cache field. +func (o *CacheSettingsModules) SetCache(v CacheSettingsCacheModule) { + o.Cache = &v +} + +// GetApplicationAccelerator returns the ApplicationAccelerator field value if set, zero value otherwise. +func (o *CacheSettingsModules) GetApplicationAccelerator() CacheSettingsApplicationAcceleratorModule { + if o == nil || IsNil(o.ApplicationAccelerator) { + var ret CacheSettingsApplicationAcceleratorModule + return ret + } + return *o.ApplicationAccelerator +} + +// GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsModules) GetApplicationAcceleratorOk() (*CacheSettingsApplicationAcceleratorModule, bool) { + if o == nil || IsNil(o.ApplicationAccelerator) { + return nil, false + } + return o.ApplicationAccelerator, true +} + +// HasApplicationAccelerator returns a boolean if a field has been set. +func (o *CacheSettingsModules) HasApplicationAccelerator() bool { + if o != nil && !IsNil(o.ApplicationAccelerator) { + return true + } + + return false +} + +// SetApplicationAccelerator gets a reference to the given CacheSettingsApplicationAcceleratorModule and assigns it to the ApplicationAccelerator field. +func (o *CacheSettingsModules) SetApplicationAccelerator(v CacheSettingsApplicationAcceleratorModule) { + o.ApplicationAccelerator = &v +} + +func (o CacheSettingsModules) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsModules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cache) { + toSerialize["cache"] = o.Cache + } + if !IsNil(o.ApplicationAccelerator) { + toSerialize["application_accelerator"] = o.ApplicationAccelerator + } + return toSerialize, nil +} + +type NullableCacheSettingsModules struct { + value *CacheSettingsModules + isSet bool +} + +func (v NullableCacheSettingsModules) Get() *CacheSettingsModules { + return v.value +} + +func (v *NullableCacheSettingsModules) Set(val *CacheSettingsModules) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsModules) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsModules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsModules(val *CacheSettingsModules) *NullableCacheSettingsModules { + return &NullableCacheSettingsModules{value: val, isSet: true} +} + +func (v NullableCacheSettingsModules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsModules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_modules_request.go b/azion-api/model_cache_settings_modules_request.go new file mode 100644 index 0000000..73e9590 --- /dev/null +++ b/azion-api/model_cache_settings_modules_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsModulesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsModulesRequest{} + +// CacheSettingsModulesRequest struct for CacheSettingsModulesRequest +type CacheSettingsModulesRequest struct { + Cache *CacheSettingsCacheModuleRequest `json:"cache,omitempty"` + ApplicationAccelerator *CacheSettingsApplicationAcceleratorModuleRequest `json:"application_accelerator,omitempty"` +} + +// NewCacheSettingsModulesRequest instantiates a new CacheSettingsModulesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsModulesRequest() *CacheSettingsModulesRequest { + this := CacheSettingsModulesRequest{} + return &this +} + +// NewCacheSettingsModulesRequestWithDefaults instantiates a new CacheSettingsModulesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsModulesRequestWithDefaults() *CacheSettingsModulesRequest { + this := CacheSettingsModulesRequest{} + return &this +} + +// GetCache returns the Cache field value if set, zero value otherwise. +func (o *CacheSettingsModulesRequest) GetCache() CacheSettingsCacheModuleRequest { + if o == nil || IsNil(o.Cache) { + var ret CacheSettingsCacheModuleRequest + return ret + } + return *o.Cache +} + +// GetCacheOk returns a tuple with the Cache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsModulesRequest) GetCacheOk() (*CacheSettingsCacheModuleRequest, bool) { + if o == nil || IsNil(o.Cache) { + return nil, false + } + return o.Cache, true +} + +// HasCache returns a boolean if a field has been set. +func (o *CacheSettingsModulesRequest) HasCache() bool { + if o != nil && !IsNil(o.Cache) { + return true + } + + return false +} + +// SetCache gets a reference to the given CacheSettingsCacheModuleRequest and assigns it to the Cache field. +func (o *CacheSettingsModulesRequest) SetCache(v CacheSettingsCacheModuleRequest) { + o.Cache = &v +} + +// GetApplicationAccelerator returns the ApplicationAccelerator field value if set, zero value otherwise. +func (o *CacheSettingsModulesRequest) GetApplicationAccelerator() CacheSettingsApplicationAcceleratorModuleRequest { + if o == nil || IsNil(o.ApplicationAccelerator) { + var ret CacheSettingsApplicationAcceleratorModuleRequest + return ret + } + return *o.ApplicationAccelerator +} + +// GetApplicationAcceleratorOk returns a tuple with the ApplicationAccelerator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsModulesRequest) GetApplicationAcceleratorOk() (*CacheSettingsApplicationAcceleratorModuleRequest, bool) { + if o == nil || IsNil(o.ApplicationAccelerator) { + return nil, false + } + return o.ApplicationAccelerator, true +} + +// HasApplicationAccelerator returns a boolean if a field has been set. +func (o *CacheSettingsModulesRequest) HasApplicationAccelerator() bool { + if o != nil && !IsNil(o.ApplicationAccelerator) { + return true + } + + return false +} + +// SetApplicationAccelerator gets a reference to the given CacheSettingsApplicationAcceleratorModuleRequest and assigns it to the ApplicationAccelerator field. +func (o *CacheSettingsModulesRequest) SetApplicationAccelerator(v CacheSettingsApplicationAcceleratorModuleRequest) { + o.ApplicationAccelerator = &v +} + +func (o CacheSettingsModulesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsModulesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cache) { + toSerialize["cache"] = o.Cache + } + if !IsNil(o.ApplicationAccelerator) { + toSerialize["application_accelerator"] = o.ApplicationAccelerator + } + return toSerialize, nil +} + +type NullableCacheSettingsModulesRequest struct { + value *CacheSettingsModulesRequest + isSet bool +} + +func (v NullableCacheSettingsModulesRequest) Get() *CacheSettingsModulesRequest { + return v.value +} + +func (v *NullableCacheSettingsModulesRequest) Set(val *CacheSettingsModulesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsModulesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsModulesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsModulesRequest(val *CacheSettingsModulesRequest) *NullableCacheSettingsModulesRequest { + return &NullableCacheSettingsModulesRequest{value: val, isSet: true} +} + +func (v NullableCacheSettingsModulesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsModulesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_tiered_cache_module.go b/azion-api/model_cache_settings_tiered_cache_module.go new file mode 100644 index 0000000..e883349 --- /dev/null +++ b/azion-api/model_cache_settings_tiered_cache_module.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsTieredCacheModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsTieredCacheModule{} + +// CacheSettingsTieredCacheModule struct for CacheSettingsTieredCacheModule +type CacheSettingsTieredCacheModule struct { + // * `nearest-region` - nearest-region * `br-east-1` - br-east-1 * `us-east-1` - us-east-1 + Topology *string `json:"topology,omitempty"` + Enabled *bool `json:"enabled,omitempty"` +} + +// NewCacheSettingsTieredCacheModule instantiates a new CacheSettingsTieredCacheModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsTieredCacheModule() *CacheSettingsTieredCacheModule { + this := CacheSettingsTieredCacheModule{} + return &this +} + +// NewCacheSettingsTieredCacheModuleWithDefaults instantiates a new CacheSettingsTieredCacheModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsTieredCacheModuleWithDefaults() *CacheSettingsTieredCacheModule { + this := CacheSettingsTieredCacheModule{} + return &this +} + +// GetTopology returns the Topology field value if set, zero value otherwise. +func (o *CacheSettingsTieredCacheModule) GetTopology() string { + if o == nil || IsNil(o.Topology) { + var ret string + return ret + } + return *o.Topology +} + +// GetTopologyOk returns a tuple with the Topology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsTieredCacheModule) GetTopologyOk() (*string, bool) { + if o == nil || IsNil(o.Topology) { + return nil, false + } + return o.Topology, true +} + +// HasTopology returns a boolean if a field has been set. +func (o *CacheSettingsTieredCacheModule) HasTopology() bool { + if o != nil && !IsNil(o.Topology) { + return true + } + + return false +} + +// SetTopology gets a reference to the given string and assigns it to the Topology field. +func (o *CacheSettingsTieredCacheModule) SetTopology(v string) { + o.Topology = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *CacheSettingsTieredCacheModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsTieredCacheModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *CacheSettingsTieredCacheModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *CacheSettingsTieredCacheModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o CacheSettingsTieredCacheModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsTieredCacheModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Topology) { + toSerialize["topology"] = o.Topology + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableCacheSettingsTieredCacheModule struct { + value *CacheSettingsTieredCacheModule + isSet bool +} + +func (v NullableCacheSettingsTieredCacheModule) Get() *CacheSettingsTieredCacheModule { + return v.value +} + +func (v *NullableCacheSettingsTieredCacheModule) Set(val *CacheSettingsTieredCacheModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsTieredCacheModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsTieredCacheModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsTieredCacheModule(val *CacheSettingsTieredCacheModule) *NullableCacheSettingsTieredCacheModule { + return &NullableCacheSettingsTieredCacheModule{value: val, isSet: true} +} + +func (v NullableCacheSettingsTieredCacheModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsTieredCacheModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_settings_tiered_cache_module_request.go b/azion-api/model_cache_settings_tiered_cache_module_request.go new file mode 100644 index 0000000..485c1e4 --- /dev/null +++ b/azion-api/model_cache_settings_tiered_cache_module_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheSettingsTieredCacheModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheSettingsTieredCacheModuleRequest{} + +// CacheSettingsTieredCacheModuleRequest struct for CacheSettingsTieredCacheModuleRequest +type CacheSettingsTieredCacheModuleRequest struct { + // * `nearest-region` - nearest-region * `br-east-1` - br-east-1 * `us-east-1` - us-east-1 + Topology *string `json:"topology,omitempty"` + Enabled *bool `json:"enabled,omitempty"` +} + +// NewCacheSettingsTieredCacheModuleRequest instantiates a new CacheSettingsTieredCacheModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheSettingsTieredCacheModuleRequest() *CacheSettingsTieredCacheModuleRequest { + this := CacheSettingsTieredCacheModuleRequest{} + return &this +} + +// NewCacheSettingsTieredCacheModuleRequestWithDefaults instantiates a new CacheSettingsTieredCacheModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheSettingsTieredCacheModuleRequestWithDefaults() *CacheSettingsTieredCacheModuleRequest { + this := CacheSettingsTieredCacheModuleRequest{} + return &this +} + +// GetTopology returns the Topology field value if set, zero value otherwise. +func (o *CacheSettingsTieredCacheModuleRequest) GetTopology() string { + if o == nil || IsNil(o.Topology) { + var ret string + return ret + } + return *o.Topology +} + +// GetTopologyOk returns a tuple with the Topology field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsTieredCacheModuleRequest) GetTopologyOk() (*string, bool) { + if o == nil || IsNil(o.Topology) { + return nil, false + } + return o.Topology, true +} + +// HasTopology returns a boolean if a field has been set. +func (o *CacheSettingsTieredCacheModuleRequest) HasTopology() bool { + if o != nil && !IsNil(o.Topology) { + return true + } + + return false +} + +// SetTopology gets a reference to the given string and assigns it to the Topology field. +func (o *CacheSettingsTieredCacheModuleRequest) SetTopology(v string) { + o.Topology = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *CacheSettingsTieredCacheModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheSettingsTieredCacheModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *CacheSettingsTieredCacheModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *CacheSettingsTieredCacheModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o CacheSettingsTieredCacheModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheSettingsTieredCacheModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Topology) { + toSerialize["topology"] = o.Topology + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableCacheSettingsTieredCacheModuleRequest struct { + value *CacheSettingsTieredCacheModuleRequest + isSet bool +} + +func (v NullableCacheSettingsTieredCacheModuleRequest) Get() *CacheSettingsTieredCacheModuleRequest { + return v.value +} + +func (v *NullableCacheSettingsTieredCacheModuleRequest) Set(val *CacheSettingsTieredCacheModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheSettingsTieredCacheModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheSettingsTieredCacheModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheSettingsTieredCacheModuleRequest(val *CacheSettingsTieredCacheModuleRequest) *NullableCacheSettingsTieredCacheModuleRequest { + return &NullableCacheSettingsTieredCacheModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheSettingsTieredCacheModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheSettingsTieredCacheModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_vary_by_cookies_module.go b/azion-api/model_cache_vary_by_cookies_module.go new file mode 100644 index 0000000..7782903 --- /dev/null +++ b/azion-api/model_cache_vary_by_cookies_module.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheVaryByCookiesModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheVaryByCookiesModule{} + +// CacheVaryByCookiesModule struct for CacheVaryByCookiesModule +type CacheVaryByCookiesModule struct { + // * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist + Behavior *string `json:"behavior,omitempty"` + CookieNames []string `json:"cookie_names,omitempty"` +} + +// NewCacheVaryByCookiesModule instantiates a new CacheVaryByCookiesModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheVaryByCookiesModule() *CacheVaryByCookiesModule { + this := CacheVaryByCookiesModule{} + return &this +} + +// NewCacheVaryByCookiesModuleWithDefaults instantiates a new CacheVaryByCookiesModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheVaryByCookiesModuleWithDefaults() *CacheVaryByCookiesModule { + this := CacheVaryByCookiesModule{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheVaryByCookiesModule) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByCookiesModule) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheVaryByCookiesModule) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheVaryByCookiesModule) SetBehavior(v string) { + o.Behavior = &v +} + +// GetCookieNames returns the CookieNames field value if set, zero value otherwise. +func (o *CacheVaryByCookiesModule) GetCookieNames() []string { + if o == nil || IsNil(o.CookieNames) { + var ret []string + return ret + } + return o.CookieNames +} + +// GetCookieNamesOk returns a tuple with the CookieNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByCookiesModule) GetCookieNamesOk() ([]string, bool) { + if o == nil || IsNil(o.CookieNames) { + return nil, false + } + return o.CookieNames, true +} + +// HasCookieNames returns a boolean if a field has been set. +func (o *CacheVaryByCookiesModule) HasCookieNames() bool { + if o != nil && !IsNil(o.CookieNames) { + return true + } + + return false +} + +// SetCookieNames gets a reference to the given []string and assigns it to the CookieNames field. +func (o *CacheVaryByCookiesModule) SetCookieNames(v []string) { + o.CookieNames = v +} + +func (o CacheVaryByCookiesModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheVaryByCookiesModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.CookieNames) { + toSerialize["cookie_names"] = o.CookieNames + } + return toSerialize, nil +} + +type NullableCacheVaryByCookiesModule struct { + value *CacheVaryByCookiesModule + isSet bool +} + +func (v NullableCacheVaryByCookiesModule) Get() *CacheVaryByCookiesModule { + return v.value +} + +func (v *NullableCacheVaryByCookiesModule) Set(val *CacheVaryByCookiesModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheVaryByCookiesModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheVaryByCookiesModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheVaryByCookiesModule(val *CacheVaryByCookiesModule) *NullableCacheVaryByCookiesModule { + return &NullableCacheVaryByCookiesModule{value: val, isSet: true} +} + +func (v NullableCacheVaryByCookiesModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheVaryByCookiesModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_vary_by_cookies_module_request.go b/azion-api/model_cache_vary_by_cookies_module_request.go new file mode 100644 index 0000000..75eb8ff --- /dev/null +++ b/azion-api/model_cache_vary_by_cookies_module_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheVaryByCookiesModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheVaryByCookiesModuleRequest{} + +// CacheVaryByCookiesModuleRequest struct for CacheVaryByCookiesModuleRequest +type CacheVaryByCookiesModuleRequest struct { + // * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist + Behavior *string `json:"behavior,omitempty"` + CookieNames []string `json:"cookie_names,omitempty"` +} + +// NewCacheVaryByCookiesModuleRequest instantiates a new CacheVaryByCookiesModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheVaryByCookiesModuleRequest() *CacheVaryByCookiesModuleRequest { + this := CacheVaryByCookiesModuleRequest{} + return &this +} + +// NewCacheVaryByCookiesModuleRequestWithDefaults instantiates a new CacheVaryByCookiesModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheVaryByCookiesModuleRequestWithDefaults() *CacheVaryByCookiesModuleRequest { + this := CacheVaryByCookiesModuleRequest{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheVaryByCookiesModuleRequest) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByCookiesModuleRequest) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheVaryByCookiesModuleRequest) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheVaryByCookiesModuleRequest) SetBehavior(v string) { + o.Behavior = &v +} + +// GetCookieNames returns the CookieNames field value if set, zero value otherwise. +func (o *CacheVaryByCookiesModuleRequest) GetCookieNames() []string { + if o == nil || IsNil(o.CookieNames) { + var ret []string + return ret + } + return o.CookieNames +} + +// GetCookieNamesOk returns a tuple with the CookieNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByCookiesModuleRequest) GetCookieNamesOk() ([]string, bool) { + if o == nil || IsNil(o.CookieNames) { + return nil, false + } + return o.CookieNames, true +} + +// HasCookieNames returns a boolean if a field has been set. +func (o *CacheVaryByCookiesModuleRequest) HasCookieNames() bool { + if o != nil && !IsNil(o.CookieNames) { + return true + } + + return false +} + +// SetCookieNames gets a reference to the given []string and assigns it to the CookieNames field. +func (o *CacheVaryByCookiesModuleRequest) SetCookieNames(v []string) { + o.CookieNames = v +} + +func (o CacheVaryByCookiesModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheVaryByCookiesModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.CookieNames) { + toSerialize["cookie_names"] = o.CookieNames + } + return toSerialize, nil +} + +type NullableCacheVaryByCookiesModuleRequest struct { + value *CacheVaryByCookiesModuleRequest + isSet bool +} + +func (v NullableCacheVaryByCookiesModuleRequest) Get() *CacheVaryByCookiesModuleRequest { + return v.value +} + +func (v *NullableCacheVaryByCookiesModuleRequest) Set(val *CacheVaryByCookiesModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheVaryByCookiesModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheVaryByCookiesModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheVaryByCookiesModuleRequest(val *CacheVaryByCookiesModuleRequest) *NullableCacheVaryByCookiesModuleRequest { + return &NullableCacheVaryByCookiesModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheVaryByCookiesModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheVaryByCookiesModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_vary_by_devices_module.go b/azion-api/model_cache_vary_by_devices_module.go new file mode 100644 index 0000000..7051a14 --- /dev/null +++ b/azion-api/model_cache_vary_by_devices_module.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheVaryByDevicesModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheVaryByDevicesModule{} + +// CacheVaryByDevicesModule struct for CacheVaryByDevicesModule +type CacheVaryByDevicesModule struct { + // * `ignore` - ignore * `allowlist` - allowlist + Behavior *string `json:"behavior,omitempty"` + DeviceGroup []int64 `json:"device_group,omitempty"` +} + +// NewCacheVaryByDevicesModule instantiates a new CacheVaryByDevicesModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheVaryByDevicesModule() *CacheVaryByDevicesModule { + this := CacheVaryByDevicesModule{} + return &this +} + +// NewCacheVaryByDevicesModuleWithDefaults instantiates a new CacheVaryByDevicesModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheVaryByDevicesModuleWithDefaults() *CacheVaryByDevicesModule { + this := CacheVaryByDevicesModule{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheVaryByDevicesModule) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByDevicesModule) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheVaryByDevicesModule) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheVaryByDevicesModule) SetBehavior(v string) { + o.Behavior = &v +} + +// GetDeviceGroup returns the DeviceGroup field value if set, zero value otherwise. +func (o *CacheVaryByDevicesModule) GetDeviceGroup() []int64 { + if o == nil || IsNil(o.DeviceGroup) { + var ret []int64 + return ret + } + return o.DeviceGroup +} + +// GetDeviceGroupOk returns a tuple with the DeviceGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByDevicesModule) GetDeviceGroupOk() ([]int64, bool) { + if o == nil || IsNil(o.DeviceGroup) { + return nil, false + } + return o.DeviceGroup, true +} + +// HasDeviceGroup returns a boolean if a field has been set. +func (o *CacheVaryByDevicesModule) HasDeviceGroup() bool { + if o != nil && !IsNil(o.DeviceGroup) { + return true + } + + return false +} + +// SetDeviceGroup gets a reference to the given []int64 and assigns it to the DeviceGroup field. +func (o *CacheVaryByDevicesModule) SetDeviceGroup(v []int64) { + o.DeviceGroup = v +} + +func (o CacheVaryByDevicesModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheVaryByDevicesModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.DeviceGroup) { + toSerialize["device_group"] = o.DeviceGroup + } + return toSerialize, nil +} + +type NullableCacheVaryByDevicesModule struct { + value *CacheVaryByDevicesModule + isSet bool +} + +func (v NullableCacheVaryByDevicesModule) Get() *CacheVaryByDevicesModule { + return v.value +} + +func (v *NullableCacheVaryByDevicesModule) Set(val *CacheVaryByDevicesModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheVaryByDevicesModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheVaryByDevicesModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheVaryByDevicesModule(val *CacheVaryByDevicesModule) *NullableCacheVaryByDevicesModule { + return &NullableCacheVaryByDevicesModule{value: val, isSet: true} +} + +func (v NullableCacheVaryByDevicesModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheVaryByDevicesModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_vary_by_devices_module_request.go b/azion-api/model_cache_vary_by_devices_module_request.go new file mode 100644 index 0000000..e275f3d --- /dev/null +++ b/azion-api/model_cache_vary_by_devices_module_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheVaryByDevicesModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheVaryByDevicesModuleRequest{} + +// CacheVaryByDevicesModuleRequest struct for CacheVaryByDevicesModuleRequest +type CacheVaryByDevicesModuleRequest struct { + // * `ignore` - ignore * `allowlist` - allowlist + Behavior *string `json:"behavior,omitempty"` + DeviceGroup []int64 `json:"device_group,omitempty"` +} + +// NewCacheVaryByDevicesModuleRequest instantiates a new CacheVaryByDevicesModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheVaryByDevicesModuleRequest() *CacheVaryByDevicesModuleRequest { + this := CacheVaryByDevicesModuleRequest{} + return &this +} + +// NewCacheVaryByDevicesModuleRequestWithDefaults instantiates a new CacheVaryByDevicesModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheVaryByDevicesModuleRequestWithDefaults() *CacheVaryByDevicesModuleRequest { + this := CacheVaryByDevicesModuleRequest{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheVaryByDevicesModuleRequest) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByDevicesModuleRequest) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheVaryByDevicesModuleRequest) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheVaryByDevicesModuleRequest) SetBehavior(v string) { + o.Behavior = &v +} + +// GetDeviceGroup returns the DeviceGroup field value if set, zero value otherwise. +func (o *CacheVaryByDevicesModuleRequest) GetDeviceGroup() []int64 { + if o == nil || IsNil(o.DeviceGroup) { + var ret []int64 + return ret + } + return o.DeviceGroup +} + +// GetDeviceGroupOk returns a tuple with the DeviceGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByDevicesModuleRequest) GetDeviceGroupOk() ([]int64, bool) { + if o == nil || IsNil(o.DeviceGroup) { + return nil, false + } + return o.DeviceGroup, true +} + +// HasDeviceGroup returns a boolean if a field has been set. +func (o *CacheVaryByDevicesModuleRequest) HasDeviceGroup() bool { + if o != nil && !IsNil(o.DeviceGroup) { + return true + } + + return false +} + +// SetDeviceGroup gets a reference to the given []int64 and assigns it to the DeviceGroup field. +func (o *CacheVaryByDevicesModuleRequest) SetDeviceGroup(v []int64) { + o.DeviceGroup = v +} + +func (o CacheVaryByDevicesModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheVaryByDevicesModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.DeviceGroup) { + toSerialize["device_group"] = o.DeviceGroup + } + return toSerialize, nil +} + +type NullableCacheVaryByDevicesModuleRequest struct { + value *CacheVaryByDevicesModuleRequest + isSet bool +} + +func (v NullableCacheVaryByDevicesModuleRequest) Get() *CacheVaryByDevicesModuleRequest { + return v.value +} + +func (v *NullableCacheVaryByDevicesModuleRequest) Set(val *CacheVaryByDevicesModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheVaryByDevicesModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheVaryByDevicesModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheVaryByDevicesModuleRequest(val *CacheVaryByDevicesModuleRequest) *NullableCacheVaryByDevicesModuleRequest { + return &NullableCacheVaryByDevicesModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheVaryByDevicesModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheVaryByDevicesModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_vary_by_querystring_module.go b/azion-api/model_cache_vary_by_querystring_module.go new file mode 100644 index 0000000..20acd09 --- /dev/null +++ b/azion-api/model_cache_vary_by_querystring_module.go @@ -0,0 +1,200 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheVaryByQuerystringModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheVaryByQuerystringModule{} + +// CacheVaryByQuerystringModule struct for CacheVaryByQuerystringModule +type CacheVaryByQuerystringModule struct { + // * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist + Behavior *string `json:"behavior,omitempty"` + Fields []string `json:"fields,omitempty"` + SortEnabled *bool `json:"sort_enabled,omitempty"` +} + +// NewCacheVaryByQuerystringModule instantiates a new CacheVaryByQuerystringModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheVaryByQuerystringModule() *CacheVaryByQuerystringModule { + this := CacheVaryByQuerystringModule{} + return &this +} + +// NewCacheVaryByQuerystringModuleWithDefaults instantiates a new CacheVaryByQuerystringModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheVaryByQuerystringModuleWithDefaults() *CacheVaryByQuerystringModule { + this := CacheVaryByQuerystringModule{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheVaryByQuerystringModule) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByQuerystringModule) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheVaryByQuerystringModule) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheVaryByQuerystringModule) SetBehavior(v string) { + o.Behavior = &v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *CacheVaryByQuerystringModule) GetFields() []string { + if o == nil || IsNil(o.Fields) { + var ret []string + return ret + } + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByQuerystringModule) GetFieldsOk() ([]string, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *CacheVaryByQuerystringModule) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given []string and assigns it to the Fields field. +func (o *CacheVaryByQuerystringModule) SetFields(v []string) { + o.Fields = v +} + +// GetSortEnabled returns the SortEnabled field value if set, zero value otherwise. +func (o *CacheVaryByQuerystringModule) GetSortEnabled() bool { + if o == nil || IsNil(o.SortEnabled) { + var ret bool + return ret + } + return *o.SortEnabled +} + +// GetSortEnabledOk returns a tuple with the SortEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByQuerystringModule) GetSortEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.SortEnabled) { + return nil, false + } + return o.SortEnabled, true +} + +// HasSortEnabled returns a boolean if a field has been set. +func (o *CacheVaryByQuerystringModule) HasSortEnabled() bool { + if o != nil && !IsNil(o.SortEnabled) { + return true + } + + return false +} + +// SetSortEnabled gets a reference to the given bool and assigns it to the SortEnabled field. +func (o *CacheVaryByQuerystringModule) SetSortEnabled(v bool) { + o.SortEnabled = &v +} + +func (o CacheVaryByQuerystringModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheVaryByQuerystringModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + if !IsNil(o.SortEnabled) { + toSerialize["sort_enabled"] = o.SortEnabled + } + return toSerialize, nil +} + +type NullableCacheVaryByQuerystringModule struct { + value *CacheVaryByQuerystringModule + isSet bool +} + +func (v NullableCacheVaryByQuerystringModule) Get() *CacheVaryByQuerystringModule { + return v.value +} + +func (v *NullableCacheVaryByQuerystringModule) Set(val *CacheVaryByQuerystringModule) { + v.value = val + v.isSet = true +} + +func (v NullableCacheVaryByQuerystringModule) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheVaryByQuerystringModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheVaryByQuerystringModule(val *CacheVaryByQuerystringModule) *NullableCacheVaryByQuerystringModule { + return &NullableCacheVaryByQuerystringModule{value: val, isSet: true} +} + +func (v NullableCacheVaryByQuerystringModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheVaryByQuerystringModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_cache_vary_by_querystring_module_request.go b/azion-api/model_cache_vary_by_querystring_module_request.go new file mode 100644 index 0000000..b1624bd --- /dev/null +++ b/azion-api/model_cache_vary_by_querystring_module_request.go @@ -0,0 +1,200 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the CacheVaryByQuerystringModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CacheVaryByQuerystringModuleRequest{} + +// CacheVaryByQuerystringModuleRequest struct for CacheVaryByQuerystringModuleRequest +type CacheVaryByQuerystringModuleRequest struct { + // * `ignore` - ignore * `all` - all * `allowlist` - allowlist * `denylist` - denylist + Behavior *string `json:"behavior,omitempty"` + Fields []string `json:"fields,omitempty"` + SortEnabled *bool `json:"sort_enabled,omitempty"` +} + +// NewCacheVaryByQuerystringModuleRequest instantiates a new CacheVaryByQuerystringModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCacheVaryByQuerystringModuleRequest() *CacheVaryByQuerystringModuleRequest { + this := CacheVaryByQuerystringModuleRequest{} + return &this +} + +// NewCacheVaryByQuerystringModuleRequestWithDefaults instantiates a new CacheVaryByQuerystringModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCacheVaryByQuerystringModuleRequestWithDefaults() *CacheVaryByQuerystringModuleRequest { + this := CacheVaryByQuerystringModuleRequest{} + return &this +} + +// GetBehavior returns the Behavior field value if set, zero value otherwise. +func (o *CacheVaryByQuerystringModuleRequest) GetBehavior() string { + if o == nil || IsNil(o.Behavior) { + var ret string + return ret + } + return *o.Behavior +} + +// GetBehaviorOk returns a tuple with the Behavior field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByQuerystringModuleRequest) GetBehaviorOk() (*string, bool) { + if o == nil || IsNil(o.Behavior) { + return nil, false + } + return o.Behavior, true +} + +// HasBehavior returns a boolean if a field has been set. +func (o *CacheVaryByQuerystringModuleRequest) HasBehavior() bool { + if o != nil && !IsNil(o.Behavior) { + return true + } + + return false +} + +// SetBehavior gets a reference to the given string and assigns it to the Behavior field. +func (o *CacheVaryByQuerystringModuleRequest) SetBehavior(v string) { + o.Behavior = &v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *CacheVaryByQuerystringModuleRequest) GetFields() []string { + if o == nil || IsNil(o.Fields) { + var ret []string + return ret + } + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByQuerystringModuleRequest) GetFieldsOk() ([]string, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *CacheVaryByQuerystringModuleRequest) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given []string and assigns it to the Fields field. +func (o *CacheVaryByQuerystringModuleRequest) SetFields(v []string) { + o.Fields = v +} + +// GetSortEnabled returns the SortEnabled field value if set, zero value otherwise. +func (o *CacheVaryByQuerystringModuleRequest) GetSortEnabled() bool { + if o == nil || IsNil(o.SortEnabled) { + var ret bool + return ret + } + return *o.SortEnabled +} + +// GetSortEnabledOk returns a tuple with the SortEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CacheVaryByQuerystringModuleRequest) GetSortEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.SortEnabled) { + return nil, false + } + return o.SortEnabled, true +} + +// HasSortEnabled returns a boolean if a field has been set. +func (o *CacheVaryByQuerystringModuleRequest) HasSortEnabled() bool { + if o != nil && !IsNil(o.SortEnabled) { + return true + } + + return false +} + +// SetSortEnabled gets a reference to the given bool and assigns it to the SortEnabled field. +func (o *CacheVaryByQuerystringModuleRequest) SetSortEnabled(v bool) { + o.SortEnabled = &v +} + +func (o CacheVaryByQuerystringModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CacheVaryByQuerystringModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Behavior) { + toSerialize["behavior"] = o.Behavior + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + if !IsNil(o.SortEnabled) { + toSerialize["sort_enabled"] = o.SortEnabled + } + return toSerialize, nil +} + +type NullableCacheVaryByQuerystringModuleRequest struct { + value *CacheVaryByQuerystringModuleRequest + isSet bool +} + +func (v NullableCacheVaryByQuerystringModuleRequest) Get() *CacheVaryByQuerystringModuleRequest { + return v.value +} + +func (v *NullableCacheVaryByQuerystringModuleRequest) Set(val *CacheVaryByQuerystringModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCacheVaryByQuerystringModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCacheVaryByQuerystringModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCacheVaryByQuerystringModuleRequest(val *CacheVaryByQuerystringModuleRequest) *NullableCacheVaryByQuerystringModuleRequest { + return &NullableCacheVaryByQuerystringModuleRequest{value: val, isSet: true} +} + +func (v NullableCacheVaryByQuerystringModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCacheVaryByQuerystringModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_certificate.go b/azion-api/model_certificate.go new file mode 100644 index 0000000..25a320f --- /dev/null +++ b/azion-api/model_certificate.go @@ -0,0 +1,758 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Certificate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Certificate{} + +// Certificate struct for Certificate +type Certificate struct { + Id int64 `json:"id"` + Name string `json:"name"` + Certificate NullableString `json:"certificate,omitempty"` + PrivateKey NullableString `json:"private_key,omitempty"` + Issuer NullableString `json:"issuer"` + SubjectName []string `json:"subject_name"` + Validity NullableString `json:"validity"` + // The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate + Type *string `json:"type,omitempty"` + Managed bool `json:"managed"` + // * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed + Status string `json:"status"` + StatusDetail string `json:"status_detail"` + Csr NullableString `json:"csr"` + // * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. + Challenge string `json:"challenge"` + // * `lets_encrypt` - lets_encrypt + Authority string `json:"authority"` + KeyAlgorithm string `json:"key_algorithm"` + Active *bool `json:"active,omitempty"` + ProductVersion string `json:"product_version"` + LastEditor string `json:"last_editor"` + // Timestamp of the last modification made to the certificate content on the platform. + LastModified time.Time `json:"last_modified"` + // Timestamp indicating when the managed certificate was renewed on our platform. + RenewedAt NullableTime `json:"renewed_at"` +} + +type _Certificate Certificate + +// NewCertificate instantiates a new Certificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificate(id int64, name string, issuer NullableString, subjectName []string, validity NullableString, managed bool, status string, statusDetail string, csr NullableString, challenge string, authority string, keyAlgorithm string, productVersion string, lastEditor string, lastModified time.Time, renewedAt NullableTime) *Certificate { + this := Certificate{} + this.Id = id + this.Name = name + this.Issuer = issuer + this.SubjectName = subjectName + this.Validity = validity + this.Managed = managed + this.Status = status + this.StatusDetail = statusDetail + this.Csr = csr + this.Challenge = challenge + this.Authority = authority + this.KeyAlgorithm = keyAlgorithm + this.ProductVersion = productVersion + this.LastEditor = lastEditor + this.LastModified = lastModified + this.RenewedAt = renewedAt + return &this +} + +// NewCertificateWithDefaults instantiates a new Certificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateWithDefaults() *Certificate { + this := Certificate{} + return &this +} + +// GetId returns the Id field value +func (o *Certificate) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Certificate) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Certificate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Certificate) SetName(v string) { + o.Name = v +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Certificate) GetCertificate() string { + if o == nil || IsNil(o.Certificate.Get()) { + var ret string + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Certificate) GetCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *Certificate) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableString and assigns it to the Certificate field. +func (o *Certificate) SetCertificate(v string) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *Certificate) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *Certificate) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Certificate) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey.Get()) { + var ret string + return ret + } + return *o.PrivateKey.Get() +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Certificate) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrivateKey.Get(), o.PrivateKey.IsSet() +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *Certificate) HasPrivateKey() bool { + if o != nil && o.PrivateKey.IsSet() { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given NullableString and assigns it to the PrivateKey field. +func (o *Certificate) SetPrivateKey(v string) { + o.PrivateKey.Set(&v) +} +// SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil +func (o *Certificate) SetPrivateKeyNil() { + o.PrivateKey.Set(nil) +} + +// UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +func (o *Certificate) UnsetPrivateKey() { + o.PrivateKey.Unset() +} + +// GetIssuer returns the Issuer field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Certificate) GetIssuer() string { + if o == nil || o.Issuer.Get() == nil { + var ret string + return ret + } + + return *o.Issuer.Get() +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Certificate) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Issuer.Get(), o.Issuer.IsSet() +} + +// SetIssuer sets field value +func (o *Certificate) SetIssuer(v string) { + o.Issuer.Set(&v) +} + +// GetSubjectName returns the SubjectName field value +func (o *Certificate) GetSubjectName() []string { + if o == nil { + var ret []string + return ret + } + + return o.SubjectName +} + +// GetSubjectNameOk returns a tuple with the SubjectName field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetSubjectNameOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SubjectName, true +} + +// SetSubjectName sets field value +func (o *Certificate) SetSubjectName(v []string) { + o.SubjectName = v +} + +// GetValidity returns the Validity field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Certificate) GetValidity() string { + if o == nil || o.Validity.Get() == nil { + var ret string + return ret + } + + return *o.Validity.Get() +} + +// GetValidityOk returns a tuple with the Validity field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Certificate) GetValidityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Validity.Get(), o.Validity.IsSet() +} + +// SetValidity sets field value +func (o *Certificate) SetValidity(v string) { + o.Validity.Set(&v) +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Certificate) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Certificate) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Certificate) SetType(v string) { + o.Type = &v +} + +// GetManaged returns the Managed field value +func (o *Certificate) GetManaged() bool { + if o == nil { + var ret bool + return ret + } + + return o.Managed +} + +// GetManagedOk returns a tuple with the Managed field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetManagedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Managed, true +} + +// SetManaged sets field value +func (o *Certificate) SetManaged(v bool) { + o.Managed = v +} + +// GetStatus returns the Status field value +func (o *Certificate) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Certificate) SetStatus(v string) { + o.Status = v +} + +// GetStatusDetail returns the StatusDetail field value +func (o *Certificate) GetStatusDetail() string { + if o == nil { + var ret string + return ret + } + + return o.StatusDetail +} + +// GetStatusDetailOk returns a tuple with the StatusDetail field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetStatusDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StatusDetail, true +} + +// SetStatusDetail sets field value +func (o *Certificate) SetStatusDetail(v string) { + o.StatusDetail = v +} + +// GetCsr returns the Csr field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Certificate) GetCsr() string { + if o == nil || o.Csr.Get() == nil { + var ret string + return ret + } + + return *o.Csr.Get() +} + +// GetCsrOk returns a tuple with the Csr field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Certificate) GetCsrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Csr.Get(), o.Csr.IsSet() +} + +// SetCsr sets field value +func (o *Certificate) SetCsr(v string) { + o.Csr.Set(&v) +} + +// GetChallenge returns the Challenge field value +func (o *Certificate) GetChallenge() string { + if o == nil { + var ret string + return ret + } + + return o.Challenge +} + +// GetChallengeOk returns a tuple with the Challenge field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetChallengeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Challenge, true +} + +// SetChallenge sets field value +func (o *Certificate) SetChallenge(v string) { + o.Challenge = v +} + +// GetAuthority returns the Authority field value +func (o *Certificate) GetAuthority() string { + if o == nil { + var ret string + return ret + } + + return o.Authority +} + +// GetAuthorityOk returns a tuple with the Authority field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetAuthorityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Authority, true +} + +// SetAuthority sets field value +func (o *Certificate) SetAuthority(v string) { + o.Authority = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value +func (o *Certificate) GetKeyAlgorithm() string { + if o == nil { + var ret string + return ret + } + + return o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetKeyAlgorithmOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KeyAlgorithm, true +} + +// SetKeyAlgorithm sets field value +func (o *Certificate) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Certificate) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Certificate) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Certificate) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Certificate) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Certificate) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Certificate) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Certificate) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Certificate) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Certificate) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Certificate) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Certificate) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetRenewedAt returns the RenewedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *Certificate) GetRenewedAt() time.Time { + if o == nil || o.RenewedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.RenewedAt.Get() +} + +// GetRenewedAtOk returns a tuple with the RenewedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Certificate) GetRenewedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RenewedAt.Get(), o.RenewedAt.IsSet() +} + +// SetRenewedAt sets field value +func (o *Certificate) SetRenewedAt(v time.Time) { + o.RenewedAt.Set(&v) +} + +func (o Certificate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Certificate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if o.PrivateKey.IsSet() { + toSerialize["private_key"] = o.PrivateKey.Get() + } + toSerialize["issuer"] = o.Issuer.Get() + toSerialize["subject_name"] = o.SubjectName + toSerialize["validity"] = o.Validity.Get() + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["managed"] = o.Managed + toSerialize["status"] = o.Status + toSerialize["status_detail"] = o.StatusDetail + toSerialize["csr"] = o.Csr.Get() + toSerialize["challenge"] = o.Challenge + toSerialize["authority"] = o.Authority + toSerialize["key_algorithm"] = o.KeyAlgorithm + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["product_version"] = o.ProductVersion + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["renewed_at"] = o.RenewedAt.Get() + return toSerialize, nil +} + +func (o *Certificate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "issuer", + "subject_name", + "validity", + "managed", + "status", + "status_detail", + "csr", + "challenge", + "authority", + "key_algorithm", + "product_version", + "last_editor", + "last_modified", + "renewed_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificate := _Certificate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificate) + + if err != nil { + return err + } + + *o = Certificate(varCertificate) + + return err +} + +type NullableCertificate struct { + value *Certificate + isSet bool +} + +func (v NullableCertificate) Get() *Certificate { + return v.value +} + +func (v *NullableCertificate) Set(val *Certificate) { + v.value = val + v.isSet = true +} + +func (v NullableCertificate) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificate(val *Certificate) *NullableCertificate { + return &NullableCertificate{value: val, isSet: true} +} + +func (v NullableCertificate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_certificate_request.go b/azion-api/model_certificate_request.go new file mode 100644 index 0000000..88085d7 --- /dev/null +++ b/azion-api/model_certificate_request.go @@ -0,0 +1,877 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the CertificateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateRequest{} + +// CertificateRequest struct for CertificateRequest +type CertificateRequest struct { + Id int64 `json:"id"` + Name string `json:"name"` + Certificate NullableString `json:"certificate,omitempty"` + PrivateKey NullableString `json:"private_key,omitempty"` + Issuer NullableString `json:"issuer"` + SubjectName []string `json:"subject_name"` + Validity NullableString `json:"validity"` + // The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate + Type *string `json:"type,omitempty"` + Managed bool `json:"managed"` + // * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed + Status string `json:"status"` + StatusDetail string `json:"status_detail"` + Csr NullableString `json:"csr"` + // * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. + Challenge string `json:"challenge"` + // * `lets_encrypt` - lets_encrypt + Authority string `json:"authority"` + // * `rsa_2048` - 2048-bit RSA * `rsa_4096` - 4096-bit RSA * `ecc_384` - 384-bit Prime Field Curve + KeyAlgorithm *string `json:"key_algorithm,omitempty"` + Active *bool `json:"active,omitempty"` + ProductVersion string `json:"product_version"` + LastEditor string `json:"last_editor"` + // Timestamp of the last modification made to the certificate content on the platform. + LastModified time.Time `json:"last_modified"` + // Timestamp indicating when the managed certificate was renewed on our platform. + RenewedAt NullableTime `json:"renewed_at"` + CommonName string `json:"common_name"` + AlternativeNames []string `json:"alternative_names,omitempty"` + SourceCertificate NullableInt64 `json:"source_certificate,omitempty"` +} + +type _CertificateRequest CertificateRequest + +// NewCertificateRequest instantiates a new CertificateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateRequest(id int64, name string, issuer NullableString, subjectName []string, validity NullableString, managed bool, status string, statusDetail string, csr NullableString, challenge string, authority string, productVersion string, lastEditor string, lastModified time.Time, renewedAt NullableTime, commonName string) *CertificateRequest { + this := CertificateRequest{} + this.Id = id + this.Name = name + this.Issuer = issuer + this.SubjectName = subjectName + this.Validity = validity + this.Managed = managed + this.Status = status + this.StatusDetail = statusDetail + this.Csr = csr + this.Challenge = challenge + this.Authority = authority + this.ProductVersion = productVersion + this.LastEditor = lastEditor + this.LastModified = lastModified + this.RenewedAt = renewedAt + this.CommonName = commonName + return &this +} + +// NewCertificateRequestWithDefaults instantiates a new CertificateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateRequestWithDefaults() *CertificateRequest { + this := CertificateRequest{} + return &this +} + +// GetId returns the Id field value +func (o *CertificateRequest) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CertificateRequest) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CertificateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertificateRequest) SetName(v string) { + o.Name = v +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateRequest) GetCertificate() string { + if o == nil || IsNil(o.Certificate.Get()) { + var ret string + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *CertificateRequest) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableString and assigns it to the Certificate field. +func (o *CertificateRequest) SetCertificate(v string) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *CertificateRequest) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *CertificateRequest) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateRequest) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey.Get()) { + var ret string + return ret + } + return *o.PrivateKey.Get() +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrivateKey.Get(), o.PrivateKey.IsSet() +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *CertificateRequest) HasPrivateKey() bool { + if o != nil && o.PrivateKey.IsSet() { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given NullableString and assigns it to the PrivateKey field. +func (o *CertificateRequest) SetPrivateKey(v string) { + o.PrivateKey.Set(&v) +} +// SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil +func (o *CertificateRequest) SetPrivateKeyNil() { + o.PrivateKey.Set(nil) +} + +// UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +func (o *CertificateRequest) UnsetPrivateKey() { + o.PrivateKey.Unset() +} + +// GetIssuer returns the Issuer field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CertificateRequest) GetIssuer() string { + if o == nil || o.Issuer.Get() == nil { + var ret string + return ret + } + + return *o.Issuer.Get() +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Issuer.Get(), o.Issuer.IsSet() +} + +// SetIssuer sets field value +func (o *CertificateRequest) SetIssuer(v string) { + o.Issuer.Set(&v) +} + +// GetSubjectName returns the SubjectName field value +func (o *CertificateRequest) GetSubjectName() []string { + if o == nil { + var ret []string + return ret + } + + return o.SubjectName +} + +// GetSubjectNameOk returns a tuple with the SubjectName field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetSubjectNameOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SubjectName, true +} + +// SetSubjectName sets field value +func (o *CertificateRequest) SetSubjectName(v []string) { + o.SubjectName = v +} + +// GetValidity returns the Validity field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CertificateRequest) GetValidity() string { + if o == nil || o.Validity.Get() == nil { + var ret string + return ret + } + + return *o.Validity.Get() +} + +// GetValidityOk returns a tuple with the Validity field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetValidityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Validity.Get(), o.Validity.IsSet() +} + +// SetValidity sets field value +func (o *CertificateRequest) SetValidity(v string) { + o.Validity.Set(&v) +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CertificateRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CertificateRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CertificateRequest) SetType(v string) { + o.Type = &v +} + +// GetManaged returns the Managed field value +func (o *CertificateRequest) GetManaged() bool { + if o == nil { + var ret bool + return ret + } + + return o.Managed +} + +// GetManagedOk returns a tuple with the Managed field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetManagedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Managed, true +} + +// SetManaged sets field value +func (o *CertificateRequest) SetManaged(v bool) { + o.Managed = v +} + +// GetStatus returns the Status field value +func (o *CertificateRequest) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CertificateRequest) SetStatus(v string) { + o.Status = v +} + +// GetStatusDetail returns the StatusDetail field value +func (o *CertificateRequest) GetStatusDetail() string { + if o == nil { + var ret string + return ret + } + + return o.StatusDetail +} + +// GetStatusDetailOk returns a tuple with the StatusDetail field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetStatusDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StatusDetail, true +} + +// SetStatusDetail sets field value +func (o *CertificateRequest) SetStatusDetail(v string) { + o.StatusDetail = v +} + +// GetCsr returns the Csr field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CertificateRequest) GetCsr() string { + if o == nil || o.Csr.Get() == nil { + var ret string + return ret + } + + return *o.Csr.Get() +} + +// GetCsrOk returns a tuple with the Csr field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetCsrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Csr.Get(), o.Csr.IsSet() +} + +// SetCsr sets field value +func (o *CertificateRequest) SetCsr(v string) { + o.Csr.Set(&v) +} + +// GetChallenge returns the Challenge field value +func (o *CertificateRequest) GetChallenge() string { + if o == nil { + var ret string + return ret + } + + return o.Challenge +} + +// GetChallengeOk returns a tuple with the Challenge field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetChallengeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Challenge, true +} + +// SetChallenge sets field value +func (o *CertificateRequest) SetChallenge(v string) { + o.Challenge = v +} + +// GetAuthority returns the Authority field value +func (o *CertificateRequest) GetAuthority() string { + if o == nil { + var ret string + return ret + } + + return o.Authority +} + +// GetAuthorityOk returns a tuple with the Authority field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetAuthorityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Authority, true +} + +// SetAuthority sets field value +func (o *CertificateRequest) SetAuthority(v string) { + o.Authority = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value if set, zero value otherwise. +func (o *CertificateRequest) GetKeyAlgorithm() string { + if o == nil || IsNil(o.KeyAlgorithm) { + var ret string + return ret + } + return *o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetKeyAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.KeyAlgorithm) { + return nil, false + } + return o.KeyAlgorithm, true +} + +// HasKeyAlgorithm returns a boolean if a field has been set. +func (o *CertificateRequest) HasKeyAlgorithm() bool { + if o != nil && !IsNil(o.KeyAlgorithm) { + return true + } + + return false +} + +// SetKeyAlgorithm gets a reference to the given string and assigns it to the KeyAlgorithm field. +func (o *CertificateRequest) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *CertificateRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *CertificateRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *CertificateRequest) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *CertificateRequest) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *CertificateRequest) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetLastEditor returns the LastEditor field value +func (o *CertificateRequest) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *CertificateRequest) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *CertificateRequest) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *CertificateRequest) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetRenewedAt returns the RenewedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *CertificateRequest) GetRenewedAt() time.Time { + if o == nil || o.RenewedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.RenewedAt.Get() +} + +// GetRenewedAtOk returns a tuple with the RenewedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetRenewedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RenewedAt.Get(), o.RenewedAt.IsSet() +} + +// SetRenewedAt sets field value +func (o *CertificateRequest) SetRenewedAt(v time.Time) { + o.RenewedAt.Set(&v) +} + +// GetCommonName returns the CommonName field value +func (o *CertificateRequest) GetCommonName() string { + if o == nil { + var ret string + return ret + } + + return o.CommonName +} + +// GetCommonNameOk returns a tuple with the CommonName field value +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetCommonNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommonName, true +} + +// SetCommonName sets field value +func (o *CertificateRequest) SetCommonName(v string) { + o.CommonName = v +} + +// GetAlternativeNames returns the AlternativeNames field value if set, zero value otherwise. +func (o *CertificateRequest) GetAlternativeNames() []string { + if o == nil || IsNil(o.AlternativeNames) { + var ret []string + return ret + } + return o.AlternativeNames +} + +// GetAlternativeNamesOk returns a tuple with the AlternativeNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateRequest) GetAlternativeNamesOk() ([]string, bool) { + if o == nil || IsNil(o.AlternativeNames) { + return nil, false + } + return o.AlternativeNames, true +} + +// HasAlternativeNames returns a boolean if a field has been set. +func (o *CertificateRequest) HasAlternativeNames() bool { + if o != nil && !IsNil(o.AlternativeNames) { + return true + } + + return false +} + +// SetAlternativeNames gets a reference to the given []string and assigns it to the AlternativeNames field. +func (o *CertificateRequest) SetAlternativeNames(v []string) { + o.AlternativeNames = v +} + +// GetSourceCertificate returns the SourceCertificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateRequest) GetSourceCertificate() int64 { + if o == nil || IsNil(o.SourceCertificate.Get()) { + var ret int64 + return ret + } + return *o.SourceCertificate.Get() +} + +// GetSourceCertificateOk returns a tuple with the SourceCertificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateRequest) GetSourceCertificateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.SourceCertificate.Get(), o.SourceCertificate.IsSet() +} + +// HasSourceCertificate returns a boolean if a field has been set. +func (o *CertificateRequest) HasSourceCertificate() bool { + if o != nil && o.SourceCertificate.IsSet() { + return true + } + + return false +} + +// SetSourceCertificate gets a reference to the given NullableInt64 and assigns it to the SourceCertificate field. +func (o *CertificateRequest) SetSourceCertificate(v int64) { + o.SourceCertificate.Set(&v) +} +// SetSourceCertificateNil sets the value for SourceCertificate to be an explicit nil +func (o *CertificateRequest) SetSourceCertificateNil() { + o.SourceCertificate.Set(nil) +} + +// UnsetSourceCertificate ensures that no value is present for SourceCertificate, not even an explicit nil +func (o *CertificateRequest) UnsetSourceCertificate() { + o.SourceCertificate.Unset() +} + +func (o CertificateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if o.PrivateKey.IsSet() { + toSerialize["private_key"] = o.PrivateKey.Get() + } + toSerialize["issuer"] = o.Issuer.Get() + toSerialize["subject_name"] = o.SubjectName + toSerialize["validity"] = o.Validity.Get() + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["managed"] = o.Managed + toSerialize["status"] = o.Status + toSerialize["status_detail"] = o.StatusDetail + toSerialize["csr"] = o.Csr.Get() + toSerialize["challenge"] = o.Challenge + toSerialize["authority"] = o.Authority + if !IsNil(o.KeyAlgorithm) { + toSerialize["key_algorithm"] = o.KeyAlgorithm + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["product_version"] = o.ProductVersion + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["renewed_at"] = o.RenewedAt.Get() + toSerialize["common_name"] = o.CommonName + if !IsNil(o.AlternativeNames) { + toSerialize["alternative_names"] = o.AlternativeNames + } + if o.SourceCertificate.IsSet() { + toSerialize["source_certificate"] = o.SourceCertificate.Get() + } + return toSerialize, nil +} + +func (o *CertificateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "issuer", + "subject_name", + "validity", + "managed", + "status", + "status_detail", + "csr", + "challenge", + "authority", + "product_version", + "last_editor", + "last_modified", + "renewed_at", + "common_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateRequest := _CertificateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateRequest) + + if err != nil { + return err + } + + *o = CertificateRequest(varCertificateRequest) + + return err +} + +type NullableCertificateRequest struct { + value *CertificateRequest + isSet bool +} + +func (v NullableCertificateRequest) Get() *CertificateRequest { + return v.value +} + +func (v *NullableCertificateRequest) Set(val *CertificateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateRequest(val *CertificateRequest) *NullableCertificateRequest { + return &NullableCertificateRequest{value: val, isSet: true} +} + +func (v NullableCertificateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_certificate_response.go b/azion-api/model_certificate_response.go new file mode 100644 index 0000000..48d2368 --- /dev/null +++ b/azion-api/model_certificate_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CertificateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateResponse{} + +// CertificateResponse struct for CertificateResponse +type CertificateResponse struct { + State *string `json:"state,omitempty"` + Data Certificate `json:"data"` +} + +type _CertificateResponse CertificateResponse + +// NewCertificateResponse instantiates a new CertificateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateResponse(data Certificate) *CertificateResponse { + this := CertificateResponse{} + this.Data = data + return &this +} + +// NewCertificateResponseWithDefaults instantiates a new CertificateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateResponseWithDefaults() *CertificateResponse { + this := CertificateResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *CertificateResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *CertificateResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *CertificateResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *CertificateResponse) GetData() Certificate { + if o == nil { + var ret Certificate + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *CertificateResponse) GetDataOk() (*Certificate, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *CertificateResponse) SetData(v Certificate) { + o.Data = v +} + +func (o CertificateResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *CertificateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateResponse := _CertificateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateResponse) + + if err != nil { + return err + } + + *o = CertificateResponse(varCertificateResponse) + + return err +} + +type NullableCertificateResponse struct { + value *CertificateResponse + isSet bool +} + +func (v NullableCertificateResponse) Get() *CertificateResponse { + return v.value +} + +func (v *NullableCertificateResponse) Set(val *CertificateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateResponse(val *CertificateResponse) *NullableCertificateResponse { + return &NullableCertificateResponse{value: val, isSet: true} +} + +func (v NullableCertificateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_certificate_revocation_list.go b/azion-api/model_certificate_revocation_list.go new file mode 100644 index 0000000..cd5362a --- /dev/null +++ b/azion-api/model_certificate_revocation_list.go @@ -0,0 +1,424 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the CertificateRevocationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateRevocationList{} + +// CertificateRevocationList struct for CertificateRevocationList +type CertificateRevocationList struct { + Id int64 `json:"id"` + Name string `json:"name"` + // Indicates if the certificate revocation list is active. This field cannot be set to false. + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + // Timestamp of the last modification made to the certificate content on the platform. + LastModified time.Time `json:"last_modified"` + ProductVersion string `json:"product_version"` + Issuer string `json:"issuer"` + // Timestamp of the last update issued by the certification revocation list issuer. + LastUpdate time.Time `json:"last_update"` + // Timestamp of the next scheduled update from the certification revocation list issuer. + NextUpdate time.Time `json:"next_update"` + Crl string `json:"crl"` +} + +type _CertificateRevocationList CertificateRevocationList + +// NewCertificateRevocationList instantiates a new CertificateRevocationList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateRevocationList(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, issuer string, lastUpdate time.Time, nextUpdate time.Time, crl string) *CertificateRevocationList { + this := CertificateRevocationList{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + this.Issuer = issuer + this.LastUpdate = lastUpdate + this.NextUpdate = nextUpdate + this.Crl = crl + return &this +} + +// NewCertificateRevocationListWithDefaults instantiates a new CertificateRevocationList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateRevocationListWithDefaults() *CertificateRevocationList { + this := CertificateRevocationList{} + return &this +} + +// GetId returns the Id field value +func (o *CertificateRevocationList) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CertificateRevocationList) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CertificateRevocationList) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertificateRevocationList) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *CertificateRevocationList) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *CertificateRevocationList) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *CertificateRevocationList) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *CertificateRevocationList) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *CertificateRevocationList) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *CertificateRevocationList) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *CertificateRevocationList) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *CertificateRevocationList) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *CertificateRevocationList) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetIssuer returns the Issuer field value +func (o *CertificateRevocationList) GetIssuer() string { + if o == nil { + var ret string + return ret + } + + return o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Issuer, true +} + +// SetIssuer sets field value +func (o *CertificateRevocationList) SetIssuer(v string) { + o.Issuer = v +} + +// GetLastUpdate returns the LastUpdate field value +func (o *CertificateRevocationList) GetLastUpdate() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastUpdate +} + +// GetLastUpdateOk returns a tuple with the LastUpdate field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetLastUpdateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastUpdate, true +} + +// SetLastUpdate sets field value +func (o *CertificateRevocationList) SetLastUpdate(v time.Time) { + o.LastUpdate = v +} + +// GetNextUpdate returns the NextUpdate field value +func (o *CertificateRevocationList) GetNextUpdate() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.NextUpdate +} + +// GetNextUpdateOk returns a tuple with the NextUpdate field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetNextUpdateOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.NextUpdate, true +} + +// SetNextUpdate sets field value +func (o *CertificateRevocationList) SetNextUpdate(v time.Time) { + o.NextUpdate = v +} + +// GetCrl returns the Crl field value +func (o *CertificateRevocationList) GetCrl() string { + if o == nil { + var ret string + return ret + } + + return o.Crl +} + +// GetCrlOk returns a tuple with the Crl field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationList) GetCrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Crl, true +} + +// SetCrl sets field value +func (o *CertificateRevocationList) SetCrl(v string) { + o.Crl = v +} + +func (o CertificateRevocationList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateRevocationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["product_version"] = o.ProductVersion + toSerialize["issuer"] = o.Issuer + toSerialize["last_update"] = o.LastUpdate + toSerialize["next_update"] = o.NextUpdate + toSerialize["crl"] = o.Crl + return toSerialize, nil +} + +func (o *CertificateRevocationList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + "issuer", + "last_update", + "next_update", + "crl", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateRevocationList := _CertificateRevocationList{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateRevocationList) + + if err != nil { + return err + } + + *o = CertificateRevocationList(varCertificateRevocationList) + + return err +} + +type NullableCertificateRevocationList struct { + value *CertificateRevocationList + isSet bool +} + +func (v NullableCertificateRevocationList) Get() *CertificateRevocationList { + return v.value +} + +func (v *NullableCertificateRevocationList) Set(val *CertificateRevocationList) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateRevocationList) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateRevocationList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateRevocationList(val *CertificateRevocationList) *NullableCertificateRevocationList { + return &NullableCertificateRevocationList{value: val, isSet: true} +} + +func (v NullableCertificateRevocationList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateRevocationList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_certificate_revocation_list_response.go b/azion-api/model_certificate_revocation_list_response.go new file mode 100644 index 0000000..a595928 --- /dev/null +++ b/azion-api/model_certificate_revocation_list_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CertificateRevocationListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateRevocationListResponse{} + +// CertificateRevocationListResponse struct for CertificateRevocationListResponse +type CertificateRevocationListResponse struct { + State *string `json:"state,omitempty"` + Data CertificateRevocationList `json:"data"` +} + +type _CertificateRevocationListResponse CertificateRevocationListResponse + +// NewCertificateRevocationListResponse instantiates a new CertificateRevocationListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateRevocationListResponse(data CertificateRevocationList) *CertificateRevocationListResponse { + this := CertificateRevocationListResponse{} + this.Data = data + return &this +} + +// NewCertificateRevocationListResponseWithDefaults instantiates a new CertificateRevocationListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateRevocationListResponseWithDefaults() *CertificateRevocationListResponse { + this := CertificateRevocationListResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *CertificateRevocationListResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateRevocationListResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *CertificateRevocationListResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *CertificateRevocationListResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *CertificateRevocationListResponse) GetData() CertificateRevocationList { + if o == nil { + var ret CertificateRevocationList + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *CertificateRevocationListResponse) GetDataOk() (*CertificateRevocationList, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *CertificateRevocationListResponse) SetData(v CertificateRevocationList) { + o.Data = v +} + +func (o CertificateRevocationListResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateRevocationListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *CertificateRevocationListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateRevocationListResponse := _CertificateRevocationListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateRevocationListResponse) + + if err != nil { + return err + } + + *o = CertificateRevocationListResponse(varCertificateRevocationListResponse) + + return err +} + +type NullableCertificateRevocationListResponse struct { + value *CertificateRevocationListResponse + isSet bool +} + +func (v NullableCertificateRevocationListResponse) Get() *CertificateRevocationListResponse { + return v.value +} + +func (v *NullableCertificateRevocationListResponse) Set(val *CertificateRevocationListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateRevocationListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateRevocationListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateRevocationListResponse(val *CertificateRevocationListResponse) *NullableCertificateRevocationListResponse { + return &NullableCertificateRevocationListResponse{value: val, isSet: true} +} + +func (v NullableCertificateRevocationListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateRevocationListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_certificate_signing_request.go b/azion-api/model_certificate_signing_request.go new file mode 100644 index 0000000..97fc87e --- /dev/null +++ b/azion-api/model_certificate_signing_request.go @@ -0,0 +1,999 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the CertificateSigningRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CertificateSigningRequest{} + +// CertificateSigningRequest struct for CertificateSigningRequest +type CertificateSigningRequest struct { + Id int64 `json:"id"` + Name string `json:"name"` + Certificate NullableString `json:"certificate,omitempty"` + PrivateKey NullableString `json:"private_key,omitempty"` + Issuer NullableString `json:"issuer"` + SubjectName []string `json:"subject_name"` + Validity NullableString `json:"validity"` + // The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate + Type *string `json:"type,omitempty"` + Managed bool `json:"managed"` + // * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed + Status string `json:"status"` + StatusDetail string `json:"status_detail"` + Csr NullableString `json:"csr"` + // * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. + Challenge string `json:"challenge"` + // * `lets_encrypt` - lets_encrypt + Authority string `json:"authority"` + // * `rsa_2048` - 2048-bit RSA * `rsa_4096` - 4096-bit RSA * `ecc_384` - 384-bit Prime Field Curve + KeyAlgorithm *string `json:"key_algorithm,omitempty"` + Active *bool `json:"active,omitempty"` + ProductVersion string `json:"product_version"` + LastEditor string `json:"last_editor"` + // Timestamp of the last modification made to the certificate content on the platform. + LastModified time.Time `json:"last_modified"` + // Timestamp indicating when the managed certificate was renewed on our platform. + RenewedAt NullableTime `json:"renewed_at"` + CommonName string `json:"common_name"` + AlternativeNames []string `json:"alternative_names,omitempty"` + Country string `json:"country"` + State string `json:"state"` + Locality string `json:"locality"` + Organization string `json:"organization"` + OrganizationUnity string `json:"organization_unity"` + Email string `json:"email"` +} + +type _CertificateSigningRequest CertificateSigningRequest + +// NewCertificateSigningRequest instantiates a new CertificateSigningRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCertificateSigningRequest(id int64, name string, issuer NullableString, subjectName []string, validity NullableString, managed bool, status string, statusDetail string, csr NullableString, challenge string, authority string, productVersion string, lastEditor string, lastModified time.Time, renewedAt NullableTime, commonName string, country string, state string, locality string, organization string, organizationUnity string, email string) *CertificateSigningRequest { + this := CertificateSigningRequest{} + this.Id = id + this.Name = name + this.Issuer = issuer + this.SubjectName = subjectName + this.Validity = validity + this.Managed = managed + this.Status = status + this.StatusDetail = statusDetail + this.Csr = csr + this.Challenge = challenge + this.Authority = authority + this.ProductVersion = productVersion + this.LastEditor = lastEditor + this.LastModified = lastModified + this.RenewedAt = renewedAt + this.CommonName = commonName + this.Country = country + this.State = state + this.Locality = locality + this.Organization = organization + this.OrganizationUnity = organizationUnity + this.Email = email + return &this +} + +// NewCertificateSigningRequestWithDefaults instantiates a new CertificateSigningRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCertificateSigningRequestWithDefaults() *CertificateSigningRequest { + this := CertificateSigningRequest{} + return &this +} + +// GetId returns the Id field value +func (o *CertificateSigningRequest) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CertificateSigningRequest) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CertificateSigningRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CertificateSigningRequest) SetName(v string) { + o.Name = v +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateSigningRequest) GetCertificate() string { + if o == nil || IsNil(o.Certificate.Get()) { + var ret string + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateSigningRequest) GetCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *CertificateSigningRequest) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableString and assigns it to the Certificate field. +func (o *CertificateSigningRequest) SetCertificate(v string) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *CertificateSigningRequest) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *CertificateSigningRequest) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *CertificateSigningRequest) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey.Get()) { + var ret string + return ret + } + return *o.PrivateKey.Get() +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateSigningRequest) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrivateKey.Get(), o.PrivateKey.IsSet() +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *CertificateSigningRequest) HasPrivateKey() bool { + if o != nil && o.PrivateKey.IsSet() { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given NullableString and assigns it to the PrivateKey field. +func (o *CertificateSigningRequest) SetPrivateKey(v string) { + o.PrivateKey.Set(&v) +} +// SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil +func (o *CertificateSigningRequest) SetPrivateKeyNil() { + o.PrivateKey.Set(nil) +} + +// UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +func (o *CertificateSigningRequest) UnsetPrivateKey() { + o.PrivateKey.Unset() +} + +// GetIssuer returns the Issuer field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CertificateSigningRequest) GetIssuer() string { + if o == nil || o.Issuer.Get() == nil { + var ret string + return ret + } + + return *o.Issuer.Get() +} + +// GetIssuerOk returns a tuple with the Issuer field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateSigningRequest) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Issuer.Get(), o.Issuer.IsSet() +} + +// SetIssuer sets field value +func (o *CertificateSigningRequest) SetIssuer(v string) { + o.Issuer.Set(&v) +} + +// GetSubjectName returns the SubjectName field value +func (o *CertificateSigningRequest) GetSubjectName() []string { + if o == nil { + var ret []string + return ret + } + + return o.SubjectName +} + +// GetSubjectNameOk returns a tuple with the SubjectName field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetSubjectNameOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.SubjectName, true +} + +// SetSubjectName sets field value +func (o *CertificateSigningRequest) SetSubjectName(v []string) { + o.SubjectName = v +} + +// GetValidity returns the Validity field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CertificateSigningRequest) GetValidity() string { + if o == nil || o.Validity.Get() == nil { + var ret string + return ret + } + + return *o.Validity.Get() +} + +// GetValidityOk returns a tuple with the Validity field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateSigningRequest) GetValidityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Validity.Get(), o.Validity.IsSet() +} + +// SetValidity sets field value +func (o *CertificateSigningRequest) SetValidity(v string) { + o.Validity.Set(&v) +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *CertificateSigningRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CertificateSigningRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CertificateSigningRequest) SetType(v string) { + o.Type = &v +} + +// GetManaged returns the Managed field value +func (o *CertificateSigningRequest) GetManaged() bool { + if o == nil { + var ret bool + return ret + } + + return o.Managed +} + +// GetManagedOk returns a tuple with the Managed field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetManagedOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Managed, true +} + +// SetManaged sets field value +func (o *CertificateSigningRequest) SetManaged(v bool) { + o.Managed = v +} + +// GetStatus returns the Status field value +func (o *CertificateSigningRequest) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *CertificateSigningRequest) SetStatus(v string) { + o.Status = v +} + +// GetStatusDetail returns the StatusDetail field value +func (o *CertificateSigningRequest) GetStatusDetail() string { + if o == nil { + var ret string + return ret + } + + return o.StatusDetail +} + +// GetStatusDetailOk returns a tuple with the StatusDetail field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetStatusDetailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StatusDetail, true +} + +// SetStatusDetail sets field value +func (o *CertificateSigningRequest) SetStatusDetail(v string) { + o.StatusDetail = v +} + +// GetCsr returns the Csr field value +// If the value is explicit nil, the zero value for string will be returned +func (o *CertificateSigningRequest) GetCsr() string { + if o == nil || o.Csr.Get() == nil { + var ret string + return ret + } + + return *o.Csr.Get() +} + +// GetCsrOk returns a tuple with the Csr field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateSigningRequest) GetCsrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Csr.Get(), o.Csr.IsSet() +} + +// SetCsr sets field value +func (o *CertificateSigningRequest) SetCsr(v string) { + o.Csr.Set(&v) +} + +// GetChallenge returns the Challenge field value +func (o *CertificateSigningRequest) GetChallenge() string { + if o == nil { + var ret string + return ret + } + + return o.Challenge +} + +// GetChallengeOk returns a tuple with the Challenge field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetChallengeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Challenge, true +} + +// SetChallenge sets field value +func (o *CertificateSigningRequest) SetChallenge(v string) { + o.Challenge = v +} + +// GetAuthority returns the Authority field value +func (o *CertificateSigningRequest) GetAuthority() string { + if o == nil { + var ret string + return ret + } + + return o.Authority +} + +// GetAuthorityOk returns a tuple with the Authority field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetAuthorityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Authority, true +} + +// SetAuthority sets field value +func (o *CertificateSigningRequest) SetAuthority(v string) { + o.Authority = v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value if set, zero value otherwise. +func (o *CertificateSigningRequest) GetKeyAlgorithm() string { + if o == nil || IsNil(o.KeyAlgorithm) { + var ret string + return ret + } + return *o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetKeyAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.KeyAlgorithm) { + return nil, false + } + return o.KeyAlgorithm, true +} + +// HasKeyAlgorithm returns a boolean if a field has been set. +func (o *CertificateSigningRequest) HasKeyAlgorithm() bool { + if o != nil && !IsNil(o.KeyAlgorithm) { + return true + } + + return false +} + +// SetKeyAlgorithm gets a reference to the given string and assigns it to the KeyAlgorithm field. +func (o *CertificateSigningRequest) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *CertificateSigningRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *CertificateSigningRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *CertificateSigningRequest) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *CertificateSigningRequest) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *CertificateSigningRequest) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetLastEditor returns the LastEditor field value +func (o *CertificateSigningRequest) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *CertificateSigningRequest) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *CertificateSigningRequest) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *CertificateSigningRequest) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetRenewedAt returns the RenewedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *CertificateSigningRequest) GetRenewedAt() time.Time { + if o == nil || o.RenewedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.RenewedAt.Get() +} + +// GetRenewedAtOk returns a tuple with the RenewedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *CertificateSigningRequest) GetRenewedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RenewedAt.Get(), o.RenewedAt.IsSet() +} + +// SetRenewedAt sets field value +func (o *CertificateSigningRequest) SetRenewedAt(v time.Time) { + o.RenewedAt.Set(&v) +} + +// GetCommonName returns the CommonName field value +func (o *CertificateSigningRequest) GetCommonName() string { + if o == nil { + var ret string + return ret + } + + return o.CommonName +} + +// GetCommonNameOk returns a tuple with the CommonName field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetCommonNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CommonName, true +} + +// SetCommonName sets field value +func (o *CertificateSigningRequest) SetCommonName(v string) { + o.CommonName = v +} + +// GetAlternativeNames returns the AlternativeNames field value if set, zero value otherwise. +func (o *CertificateSigningRequest) GetAlternativeNames() []string { + if o == nil || IsNil(o.AlternativeNames) { + var ret []string + return ret + } + return o.AlternativeNames +} + +// GetAlternativeNamesOk returns a tuple with the AlternativeNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetAlternativeNamesOk() ([]string, bool) { + if o == nil || IsNil(o.AlternativeNames) { + return nil, false + } + return o.AlternativeNames, true +} + +// HasAlternativeNames returns a boolean if a field has been set. +func (o *CertificateSigningRequest) HasAlternativeNames() bool { + if o != nil && !IsNil(o.AlternativeNames) { + return true + } + + return false +} + +// SetAlternativeNames gets a reference to the given []string and assigns it to the AlternativeNames field. +func (o *CertificateSigningRequest) SetAlternativeNames(v []string) { + o.AlternativeNames = v +} + +// GetCountry returns the Country field value +func (o *CertificateSigningRequest) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *CertificateSigningRequest) SetCountry(v string) { + o.Country = v +} + +// GetState returns the State field value +func (o *CertificateSigningRequest) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *CertificateSigningRequest) SetState(v string) { + o.State = v +} + +// GetLocality returns the Locality field value +func (o *CertificateSigningRequest) GetLocality() string { + if o == nil { + var ret string + return ret + } + + return o.Locality +} + +// GetLocalityOk returns a tuple with the Locality field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetLocalityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Locality, true +} + +// SetLocality sets field value +func (o *CertificateSigningRequest) SetLocality(v string) { + o.Locality = v +} + +// GetOrganization returns the Organization field value +func (o *CertificateSigningRequest) GetOrganization() string { + if o == nil { + var ret string + return ret + } + + return o.Organization +} + +// GetOrganizationOk returns a tuple with the Organization field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetOrganizationOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Organization, true +} + +// SetOrganization sets field value +func (o *CertificateSigningRequest) SetOrganization(v string) { + o.Organization = v +} + +// GetOrganizationUnity returns the OrganizationUnity field value +func (o *CertificateSigningRequest) GetOrganizationUnity() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationUnity +} + +// GetOrganizationUnityOk returns a tuple with the OrganizationUnity field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetOrganizationUnityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationUnity, true +} + +// SetOrganizationUnity sets field value +func (o *CertificateSigningRequest) SetOrganizationUnity(v string) { + o.OrganizationUnity = v +} + +// GetEmail returns the Email field value +func (o *CertificateSigningRequest) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *CertificateSigningRequest) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *CertificateSigningRequest) SetEmail(v string) { + o.Email = v +} + +func (o CertificateSigningRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CertificateSigningRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if o.PrivateKey.IsSet() { + toSerialize["private_key"] = o.PrivateKey.Get() + } + toSerialize["issuer"] = o.Issuer.Get() + toSerialize["subject_name"] = o.SubjectName + toSerialize["validity"] = o.Validity.Get() + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["managed"] = o.Managed + toSerialize["status"] = o.Status + toSerialize["status_detail"] = o.StatusDetail + toSerialize["csr"] = o.Csr.Get() + toSerialize["challenge"] = o.Challenge + toSerialize["authority"] = o.Authority + if !IsNil(o.KeyAlgorithm) { + toSerialize["key_algorithm"] = o.KeyAlgorithm + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["product_version"] = o.ProductVersion + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["renewed_at"] = o.RenewedAt.Get() + toSerialize["common_name"] = o.CommonName + if !IsNil(o.AlternativeNames) { + toSerialize["alternative_names"] = o.AlternativeNames + } + toSerialize["country"] = o.Country + toSerialize["state"] = o.State + toSerialize["locality"] = o.Locality + toSerialize["organization"] = o.Organization + toSerialize["organization_unity"] = o.OrganizationUnity + toSerialize["email"] = o.Email + return toSerialize, nil +} + +func (o *CertificateSigningRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "issuer", + "subject_name", + "validity", + "managed", + "status", + "status_detail", + "csr", + "challenge", + "authority", + "product_version", + "last_editor", + "last_modified", + "renewed_at", + "common_name", + "country", + "state", + "locality", + "organization", + "organization_unity", + "email", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCertificateSigningRequest := _CertificateSigningRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCertificateSigningRequest) + + if err != nil { + return err + } + + *o = CertificateSigningRequest(varCertificateSigningRequest) + + return err +} + +type NullableCertificateSigningRequest struct { + value *CertificateSigningRequest + isSet bool +} + +func (v NullableCertificateSigningRequest) Get() *CertificateSigningRequest { + return v.value +} + +func (v *NullableCertificateSigningRequest) Set(val *CertificateSigningRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCertificateSigningRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCertificateSigningRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCertificateSigningRequest(val *CertificateSigningRequest) *NullableCertificateSigningRequest { + return &NullableCertificateSigningRequest{value: val, isSet: true} +} + +func (v NullableCertificateSigningRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCertificateSigningRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_chat_thread.go b/azion-api/model_chat_thread.go new file mode 100644 index 0000000..f26d793 --- /dev/null +++ b/azion-api/model_chat_thread.go @@ -0,0 +1,318 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ChatThread type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatThread{} + +// ChatThread struct for ChatThread +type ChatThread struct { + ThreadId int64 `json:"thread_id"` + AccountId NullableInt64 `json:"account_id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + LastModified time.Time `json:"last_modified"` + LastEditor string `json:"last_editor"` +} + +type _ChatThread ChatThread + +// NewChatThread instantiates a new ChatThread object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatThread(threadId int64, accountId NullableInt64, lastModified time.Time, lastEditor string) *ChatThread { + this := ChatThread{} + this.ThreadId = threadId + this.AccountId = accountId + this.LastModified = lastModified + this.LastEditor = lastEditor + return &this +} + +// NewChatThreadWithDefaults instantiates a new ChatThread object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatThreadWithDefaults() *ChatThread { + this := ChatThread{} + return &this +} + +// GetThreadId returns the ThreadId field value +func (o *ChatThread) GetThreadId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ThreadId +} + +// GetThreadIdOk returns a tuple with the ThreadId field value +// and a boolean to check if the value has been set. +func (o *ChatThread) GetThreadIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ThreadId, true +} + +// SetThreadId sets field value +func (o *ChatThread) SetThreadId(v int64) { + o.ThreadId = v +} + +// GetAccountId returns the AccountId field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *ChatThread) GetAccountId() int64 { + if o == nil || o.AccountId.Get() == nil { + var ret int64 + return ret + } + + return *o.AccountId.Get() +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChatThread) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AccountId.Get(), o.AccountId.IsSet() +} + +// SetAccountId sets field value +func (o *ChatThread) SetAccountId(v int64) { + o.AccountId.Set(&v) +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ChatThread) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatThread) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ChatThread) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ChatThread) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ChatThread) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatThread) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ChatThread) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ChatThread) SetDescription(v string) { + o.Description = &v +} + +// GetLastModified returns the LastModified field value +func (o *ChatThread) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ChatThread) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ChatThread) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ChatThread) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ChatThread) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ChatThread) SetLastEditor(v string) { + o.LastEditor = v +} + +func (o ChatThread) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatThread) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["thread_id"] = o.ThreadId + toSerialize["account_id"] = o.AccountId.Get() + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["last_modified"] = o.LastModified + toSerialize["last_editor"] = o.LastEditor + return toSerialize, nil +} + +func (o *ChatThread) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "thread_id", + "account_id", + "last_modified", + "last_editor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChatThread := _ChatThread{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChatThread) + + if err != nil { + return err + } + + *o = ChatThread(varChatThread) + + return err +} + +type NullableChatThread struct { + value *ChatThread + isSet bool +} + +func (v NullableChatThread) Get() *ChatThread { + return v.value +} + +func (v *NullableChatThread) Set(val *ChatThread) { + v.value = val + v.isSet = true +} + +func (v NullableChatThread) IsSet() bool { + return v.isSet +} + +func (v *NullableChatThread) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatThread(val *ChatThread) *NullableChatThread { + return &NullableChatThread{value: val, isSet: true} +} + +func (v NullableChatThread) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatThread) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_chat_thread_request.go b/azion-api/model_chat_thread_request.go new file mode 100644 index 0000000..556c3b1 --- /dev/null +++ b/azion-api/model_chat_thread_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ChatThreadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChatThreadRequest{} + +// ChatThreadRequest struct for ChatThreadRequest +type ChatThreadRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewChatThreadRequest instantiates a new ChatThreadRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChatThreadRequest() *ChatThreadRequest { + this := ChatThreadRequest{} + return &this +} + +// NewChatThreadRequestWithDefaults instantiates a new ChatThreadRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChatThreadRequestWithDefaults() *ChatThreadRequest { + this := ChatThreadRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ChatThreadRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatThreadRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ChatThreadRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ChatThreadRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ChatThreadRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChatThreadRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ChatThreadRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ChatThreadRequest) SetDescription(v string) { + o.Description = &v +} + +func (o ChatThreadRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChatThreadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullableChatThreadRequest struct { + value *ChatThreadRequest + isSet bool +} + +func (v NullableChatThreadRequest) Get() *ChatThreadRequest { + return v.value +} + +func (v *NullableChatThreadRequest) Set(val *ChatThreadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableChatThreadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableChatThreadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChatThreadRequest(val *ChatThreadRequest) *NullableChatThreadRequest { + return &NullableChatThreadRequest{value: val, isSet: true} +} + +func (v NullableChatThreadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChatThreadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_chunk.go b/azion-api/model_chunk.go new file mode 100644 index 0000000..6638fe4 --- /dev/null +++ b/azion-api/model_chunk.go @@ -0,0 +1,359 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Chunk type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Chunk{} + +// Chunk struct for Chunk +type Chunk struct { + ChunkId int64 `json:"chunk_id"` + DocumentId int64 `json:"document_id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Embedding map[string]interface{} `json:"embedding,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Content string `json:"content"` +} + +type _Chunk Chunk + +// NewChunk instantiates a new Chunk object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChunk(chunkId int64, documentId int64, content string) *Chunk { + this := Chunk{} + this.ChunkId = chunkId + this.DocumentId = documentId + this.Content = content + return &this +} + +// NewChunkWithDefaults instantiates a new Chunk object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChunkWithDefaults() *Chunk { + this := Chunk{} + return &this +} + +// GetChunkId returns the ChunkId field value +func (o *Chunk) GetChunkId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ChunkId +} + +// GetChunkIdOk returns a tuple with the ChunkId field value +// and a boolean to check if the value has been set. +func (o *Chunk) GetChunkIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ChunkId, true +} + +// SetChunkId sets field value +func (o *Chunk) SetChunkId(v int64) { + o.ChunkId = v +} + +// GetDocumentId returns the DocumentId field value +func (o *Chunk) GetDocumentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.DocumentId +} + +// GetDocumentIdOk returns a tuple with the DocumentId field value +// and a boolean to check if the value has been set. +func (o *Chunk) GetDocumentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.DocumentId, true +} + +// SetDocumentId sets field value +func (o *Chunk) SetDocumentId(v int64) { + o.DocumentId = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Chunk) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Chunk) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Chunk) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Chunk) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Chunk) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Chunk) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Chunk) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Chunk) SetDescription(v string) { + o.Description = &v +} + +// GetEmbedding returns the Embedding field value if set, zero value otherwise. +func (o *Chunk) GetEmbedding() map[string]interface{} { + if o == nil || IsNil(o.Embedding) { + var ret map[string]interface{} + return ret + } + return o.Embedding +} + +// GetEmbeddingOk returns a tuple with the Embedding field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Chunk) GetEmbeddingOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Embedding) { + return map[string]interface{}{}, false + } + return o.Embedding, true +} + +// HasEmbedding returns a boolean if a field has been set. +func (o *Chunk) HasEmbedding() bool { + if o != nil && !IsNil(o.Embedding) { + return true + } + + return false +} + +// SetEmbedding gets a reference to the given map[string]interface{} and assigns it to the Embedding field. +func (o *Chunk) SetEmbedding(v map[string]interface{}) { + o.Embedding = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *Chunk) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Chunk) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *Chunk) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *Chunk) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetContent returns the Content field value +func (o *Chunk) GetContent() string { + if o == nil { + var ret string + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *Chunk) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *Chunk) SetContent(v string) { + o.Content = v +} + +func (o Chunk) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Chunk) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chunk_id"] = o.ChunkId + toSerialize["document_id"] = o.DocumentId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Embedding) { + toSerialize["embedding"] = o.Embedding + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + toSerialize["content"] = o.Content + return toSerialize, nil +} + +func (o *Chunk) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "chunk_id", + "document_id", + "content", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChunk := _Chunk{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChunk) + + if err != nil { + return err + } + + *o = Chunk(varChunk) + + return err +} + +type NullableChunk struct { + value *Chunk + isSet bool +} + +func (v NullableChunk) Get() *Chunk { + return v.value +} + +func (v *NullableChunk) Set(val *Chunk) { + v.value = val + v.isSet = true +} + +func (v NullableChunk) IsSet() bool { + return v.isSet +} + +func (v *NullableChunk) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChunk(val *Chunk) *NullableChunk { + return &NullableChunk{value: val, isSet: true} +} + +func (v NullableChunk) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChunk) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_clone_application_request.go b/azion-api/model_clone_application_request.go new file mode 100644 index 0000000..73a211a --- /dev/null +++ b/azion-api/model_clone_application_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CloneApplicationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneApplicationRequest{} + +// CloneApplicationRequest struct for CloneApplicationRequest +type CloneApplicationRequest struct { + Name string `json:"name"` +} + +type _CloneApplicationRequest CloneApplicationRequest + +// NewCloneApplicationRequest instantiates a new CloneApplicationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCloneApplicationRequest(name string) *CloneApplicationRequest { + this := CloneApplicationRequest{} + this.Name = name + return &this +} + +// NewCloneApplicationRequestWithDefaults instantiates a new CloneApplicationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCloneApplicationRequestWithDefaults() *CloneApplicationRequest { + this := CloneApplicationRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CloneApplicationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CloneApplicationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CloneApplicationRequest) SetName(v string) { + o.Name = v +} + +func (o CloneApplicationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneApplicationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CloneApplicationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCloneApplicationRequest := _CloneApplicationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCloneApplicationRequest) + + if err != nil { + return err + } + + *o = CloneApplicationRequest(varCloneApplicationRequest) + + return err +} + +type NullableCloneApplicationRequest struct { + value *CloneApplicationRequest + isSet bool +} + +func (v NullableCloneApplicationRequest) Get() *CloneApplicationRequest { + return v.value +} + +func (v *NullableCloneApplicationRequest) Set(val *CloneApplicationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCloneApplicationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneApplicationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneApplicationRequest(val *CloneApplicationRequest) *NullableCloneApplicationRequest { + return &NullableCloneApplicationRequest{value: val, isSet: true} +} + +func (v NullableCloneApplicationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneApplicationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_clone_firewall_request.go b/azion-api/model_clone_firewall_request.go new file mode 100644 index 0000000..135bcbd --- /dev/null +++ b/azion-api/model_clone_firewall_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CloneFirewallRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneFirewallRequest{} + +// CloneFirewallRequest struct for CloneFirewallRequest +type CloneFirewallRequest struct { + Name string `json:"name"` +} + +type _CloneFirewallRequest CloneFirewallRequest + +// NewCloneFirewallRequest instantiates a new CloneFirewallRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCloneFirewallRequest(name string) *CloneFirewallRequest { + this := CloneFirewallRequest{} + this.Name = name + return &this +} + +// NewCloneFirewallRequestWithDefaults instantiates a new CloneFirewallRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCloneFirewallRequestWithDefaults() *CloneFirewallRequest { + this := CloneFirewallRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CloneFirewallRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CloneFirewallRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CloneFirewallRequest) SetName(v string) { + o.Name = v +} + +func (o CloneFirewallRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneFirewallRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CloneFirewallRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCloneFirewallRequest := _CloneFirewallRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCloneFirewallRequest) + + if err != nil { + return err + } + + *o = CloneFirewallRequest(varCloneFirewallRequest) + + return err +} + +type NullableCloneFirewallRequest struct { + value *CloneFirewallRequest + isSet bool +} + +func (v NullableCloneFirewallRequest) Get() *CloneFirewallRequest { + return v.value +} + +func (v *NullableCloneFirewallRequest) Set(val *CloneFirewallRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCloneFirewallRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneFirewallRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneFirewallRequest(val *CloneFirewallRequest) *NullableCloneFirewallRequest { + return &NullableCloneFirewallRequest{value: val, isSet: true} +} + +func (v NullableCloneFirewallRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneFirewallRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_clone_waf_request.go b/azion-api/model_clone_waf_request.go new file mode 100644 index 0000000..ee0dd03 --- /dev/null +++ b/azion-api/model_clone_waf_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CloneWAFRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneWAFRequest{} + +// CloneWAFRequest struct for CloneWAFRequest +type CloneWAFRequest struct { + Name string `json:"name"` +} + +type _CloneWAFRequest CloneWAFRequest + +// NewCloneWAFRequest instantiates a new CloneWAFRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCloneWAFRequest(name string) *CloneWAFRequest { + this := CloneWAFRequest{} + this.Name = name + return &this +} + +// NewCloneWAFRequestWithDefaults instantiates a new CloneWAFRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCloneWAFRequestWithDefaults() *CloneWAFRequest { + this := CloneWAFRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CloneWAFRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CloneWAFRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CloneWAFRequest) SetName(v string) { + o.Name = v +} + +func (o CloneWAFRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneWAFRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *CloneWAFRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCloneWAFRequest := _CloneWAFRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCloneWAFRequest) + + if err != nil { + return err + } + + *o = CloneWAFRequest(varCloneWAFRequest) + + return err +} + +type NullableCloneWAFRequest struct { + value *CloneWAFRequest + isSet bool +} + +func (v NullableCloneWAFRequest) Get() *CloneWAFRequest { + return v.value +} + +func (v *NullableCloneWAFRequest) Set(val *CloneWAFRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCloneWAFRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneWAFRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneWAFRequest(val *CloneWAFRequest) *NullableCloneWAFRequest { + return &NullableCloneWAFRequest{value: val, isSet: true} +} + +func (v NullableCloneWAFRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneWAFRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector.go b/azion-api/model_connector.go new file mode 100644 index 0000000..6f1cb57 --- /dev/null +++ b/azion-api/model_connector.go @@ -0,0 +1,365 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Connector type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Connector{} + +// Connector struct for Connector +type Connector struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + ProductVersion string `json:"product_version"` + // Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest + Type string `json:"type"` + Attributes ConnectorStorageAttributes `json:"attributes"` +} + +type _Connector Connector + +// NewConnector instantiates a new Connector object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnector(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, type_ string, attributes ConnectorStorageAttributes) *Connector { + this := Connector{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewConnectorWithDefaults instantiates a new Connector object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorWithDefaults() *Connector { + this := Connector{} + return &this +} + +// GetId returns the Id field value +func (o *Connector) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Connector) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Connector) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Connector) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Connector) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Connector) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Connector) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Connector) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Connector) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Connector) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Connector) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Connector) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Connector) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Connector) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Connector) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Connector) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Connector) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Connector) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Connector) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetType returns the Type field value +func (o *Connector) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Connector) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Connector) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *Connector) GetAttributes() ConnectorStorageAttributes { + if o == nil { + var ret ConnectorStorageAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *Connector) GetAttributesOk() (*ConnectorStorageAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *Connector) SetAttributes(v ConnectorStorageAttributes) { + o.Attributes = v +} + +func (o Connector) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Connector) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["product_version"] = o.ProductVersion + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *Connector) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnector := _Connector{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnector) + + if err != nil { + return err + } + + *o = Connector(varConnector) + + return err +} + +type NullableConnector struct { + value *Connector + isSet bool +} + +func (v NullableConnector) Get() *Connector { + return v.value +} + +func (v *NullableConnector) Set(val *Connector) { + v.value = val + v.isSet = true +} + +func (v NullableConnector) IsSet() bool { + return v.isSet +} + +func (v *NullableConnector) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnector(val *Connector) *NullableConnector { + return &NullableConnector{value: val, isSet: true} +} + +func (v NullableConnector) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnector) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector2.go b/azion-api/model_connector2.go new file mode 100644 index 0000000..91edb1b --- /dev/null +++ b/azion-api/model_connector2.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// Connector2 - struct for Connector2 +type Connector2 struct { + Connector *Connector + ConnectorHTTP *ConnectorHTTP +} + +// ConnectorAsConnector2 is a convenience function that returns Connector wrapped in Connector2 +func ConnectorAsConnector2(v *Connector) Connector2 { + return Connector2{ + Connector: v, + } +} + +// ConnectorHTTPAsConnector2 is a convenience function that returns ConnectorHTTP wrapped in Connector2 +func ConnectorHTTPAsConnector2(v *ConnectorHTTP) Connector2 { + return Connector2{ + ConnectorHTTP: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Connector2) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Connector + err = newStrictDecoder(data).Decode(&dst.Connector) + if err == nil { + jsonConnector, _ := json.Marshal(dst.Connector) + if string(jsonConnector) == "{}" { // empty struct + dst.Connector = nil + } else { + if err = validator.Validate(dst.Connector); err != nil { + dst.Connector = nil + } else { + match++ + } + } + } else { + dst.Connector = nil + } + + // try to unmarshal data into ConnectorHTTP + err = newStrictDecoder(data).Decode(&dst.ConnectorHTTP) + if err == nil { + jsonConnectorHTTP, _ := json.Marshal(dst.ConnectorHTTP) + if string(jsonConnectorHTTP) == "{}" { // empty struct + dst.ConnectorHTTP = nil + } else { + if err = validator.Validate(dst.ConnectorHTTP); err != nil { + dst.ConnectorHTTP = nil + } else { + match++ + } + } + } else { + dst.ConnectorHTTP = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Connector = nil + dst.ConnectorHTTP = nil + + return fmt.Errorf("data matches more than one schema in oneOf(Connector2)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(Connector2)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Connector2) MarshalJSON() ([]byte, error) { + if src.Connector != nil { + return json.Marshal(&src.Connector) + } + + if src.ConnectorHTTP != nil { + return json.Marshal(&src.ConnectorHTTP) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Connector2) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Connector != nil { + return obj.Connector + } + + if obj.ConnectorHTTP != nil { + return obj.ConnectorHTTP + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj Connector2) GetActualInstanceValue() (interface{}) { + if obj.Connector != nil { + return *obj.Connector + } + + if obj.ConnectorHTTP != nil { + return *obj.ConnectorHTTP + } + + // all schemas are nil + return nil +} + +type NullableConnector2 struct { + value *Connector2 + isSet bool +} + +func (v NullableConnector2) Get() *Connector2 { + return v.value +} + +func (v *NullableConnector2) Set(val *Connector2) { + v.value = val + v.isSet = true +} + +func (v NullableConnector2) IsSet() bool { + return v.isSet +} + +func (v *NullableConnector2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnector2(val *Connector2) *NullableConnector2 { + return &NullableConnector2{value: val, isSet: true} +} + +func (v NullableConnector2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnector2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_http.go b/azion-api/model_connector_http.go new file mode 100644 index 0000000..71653e6 --- /dev/null +++ b/azion-api/model_connector_http.go @@ -0,0 +1,365 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ConnectorHTTP type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorHTTP{} + +// ConnectorHTTP struct for ConnectorHTTP +type ConnectorHTTP struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + ProductVersion string `json:"product_version"` + // Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest + Type string `json:"type"` + Attributes ConnectorHTTPAttributes `json:"attributes"` +} + +type _ConnectorHTTP ConnectorHTTP + +// NewConnectorHTTP instantiates a new ConnectorHTTP object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorHTTP(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, type_ string, attributes ConnectorHTTPAttributes) *ConnectorHTTP { + this := ConnectorHTTP{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewConnectorHTTPWithDefaults instantiates a new ConnectorHTTP object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorHTTPWithDefaults() *ConnectorHTTP { + this := ConnectorHTTP{} + return &this +} + +// GetId returns the Id field value +func (o *ConnectorHTTP) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ConnectorHTTP) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ConnectorHTTP) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorHTTP) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ConnectorHTTP) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ConnectorHTTP) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ConnectorHTTP) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ConnectorHTTP) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ConnectorHTTP) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ConnectorHTTP) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ConnectorHTTP) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *ConnectorHTTP) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *ConnectorHTTP) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetType returns the Type field value +func (o *ConnectorHTTP) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ConnectorHTTP) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *ConnectorHTTP) GetAttributes() ConnectorHTTPAttributes { + if o == nil { + var ret ConnectorHTTPAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTP) GetAttributesOk() (*ConnectorHTTPAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *ConnectorHTTP) SetAttributes(v ConnectorHTTPAttributes) { + o.Attributes = v +} + +func (o ConnectorHTTP) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorHTTP) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["product_version"] = o.ProductVersion + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *ConnectorHTTP) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorHTTP := _ConnectorHTTP{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorHTTP) + + if err != nil { + return err + } + + *o = ConnectorHTTP(varConnectorHTTP) + + return err +} + +type NullableConnectorHTTP struct { + value *ConnectorHTTP + isSet bool +} + +func (v NullableConnectorHTTP) Get() *ConnectorHTTP { + return v.value +} + +func (v *NullableConnectorHTTP) Set(val *ConnectorHTTP) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorHTTP) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorHTTP) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorHTTP(val *ConnectorHTTP) *NullableConnectorHTTP { + return &NullableConnectorHTTP{value: val, isSet: true} +} + +func (v NullableConnectorHTTP) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorHTTP) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_http_attributes.go b/azion-api/model_connector_http_attributes.go new file mode 100644 index 0000000..bb5a86a --- /dev/null +++ b/azion-api/model_connector_http_attributes.go @@ -0,0 +1,231 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorHTTPAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorHTTPAttributes{} + +// ConnectorHTTPAttributes struct for ConnectorHTTPAttributes +type ConnectorHTTPAttributes struct { + Addresses []Address `json:"addresses"` + ConnectionOptions *HTTPConnectionOptions `json:"connection_options,omitempty"` + Modules *HTTPModules `json:"modules,omitempty"` +} + +type _ConnectorHTTPAttributes ConnectorHTTPAttributes + +// NewConnectorHTTPAttributes instantiates a new ConnectorHTTPAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorHTTPAttributes(addresses []Address) *ConnectorHTTPAttributes { + this := ConnectorHTTPAttributes{} + this.Addresses = addresses + return &this +} + +// NewConnectorHTTPAttributesWithDefaults instantiates a new ConnectorHTTPAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorHTTPAttributesWithDefaults() *ConnectorHTTPAttributes { + this := ConnectorHTTPAttributes{} + return &this +} + +// GetAddresses returns the Addresses field value +func (o *ConnectorHTTPAttributes) GetAddresses() []Address { + if o == nil { + var ret []Address + return ret + } + + return o.Addresses +} + +// GetAddressesOk returns a tuple with the Addresses field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPAttributes) GetAddressesOk() ([]Address, bool) { + if o == nil { + return nil, false + } + return o.Addresses, true +} + +// SetAddresses sets field value +func (o *ConnectorHTTPAttributes) SetAddresses(v []Address) { + o.Addresses = v +} + +// GetConnectionOptions returns the ConnectionOptions field value if set, zero value otherwise. +func (o *ConnectorHTTPAttributes) GetConnectionOptions() HTTPConnectionOptions { + if o == nil || IsNil(o.ConnectionOptions) { + var ret HTTPConnectionOptions + return ret + } + return *o.ConnectionOptions +} + +// GetConnectionOptionsOk returns a tuple with the ConnectionOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPAttributes) GetConnectionOptionsOk() (*HTTPConnectionOptions, bool) { + if o == nil || IsNil(o.ConnectionOptions) { + return nil, false + } + return o.ConnectionOptions, true +} + +// HasConnectionOptions returns a boolean if a field has been set. +func (o *ConnectorHTTPAttributes) HasConnectionOptions() bool { + if o != nil && !IsNil(o.ConnectionOptions) { + return true + } + + return false +} + +// SetConnectionOptions gets a reference to the given HTTPConnectionOptions and assigns it to the ConnectionOptions field. +func (o *ConnectorHTTPAttributes) SetConnectionOptions(v HTTPConnectionOptions) { + o.ConnectionOptions = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *ConnectorHTTPAttributes) GetModules() HTTPModules { + if o == nil || IsNil(o.Modules) { + var ret HTTPModules + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPAttributes) GetModulesOk() (*HTTPModules, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *ConnectorHTTPAttributes) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given HTTPModules and assigns it to the Modules field. +func (o *ConnectorHTTPAttributes) SetModules(v HTTPModules) { + o.Modules = &v +} + +func (o ConnectorHTTPAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorHTTPAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["addresses"] = o.Addresses + if !IsNil(o.ConnectionOptions) { + toSerialize["connection_options"] = o.ConnectionOptions + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +func (o *ConnectorHTTPAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "addresses", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorHTTPAttributes := _ConnectorHTTPAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorHTTPAttributes) + + if err != nil { + return err + } + + *o = ConnectorHTTPAttributes(varConnectorHTTPAttributes) + + return err +} + +type NullableConnectorHTTPAttributes struct { + value *ConnectorHTTPAttributes + isSet bool +} + +func (v NullableConnectorHTTPAttributes) Get() *ConnectorHTTPAttributes { + return v.value +} + +func (v *NullableConnectorHTTPAttributes) Set(val *ConnectorHTTPAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorHTTPAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorHTTPAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorHTTPAttributes(val *ConnectorHTTPAttributes) *NullableConnectorHTTPAttributes { + return &NullableConnectorHTTPAttributes{value: val, isSet: true} +} + +func (v NullableConnectorHTTPAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorHTTPAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_http_attributes_request.go b/azion-api/model_connector_http_attributes_request.go new file mode 100644 index 0000000..441f45f --- /dev/null +++ b/azion-api/model_connector_http_attributes_request.go @@ -0,0 +1,231 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorHTTPAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorHTTPAttributesRequest{} + +// ConnectorHTTPAttributesRequest struct for ConnectorHTTPAttributesRequest +type ConnectorHTTPAttributesRequest struct { + Addresses []AddressRequest `json:"addresses"` + ConnectionOptions *HTTPConnectionOptionsRequest `json:"connection_options,omitempty"` + Modules *HTTPModulesRequest `json:"modules,omitempty"` +} + +type _ConnectorHTTPAttributesRequest ConnectorHTTPAttributesRequest + +// NewConnectorHTTPAttributesRequest instantiates a new ConnectorHTTPAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorHTTPAttributesRequest(addresses []AddressRequest) *ConnectorHTTPAttributesRequest { + this := ConnectorHTTPAttributesRequest{} + this.Addresses = addresses + return &this +} + +// NewConnectorHTTPAttributesRequestWithDefaults instantiates a new ConnectorHTTPAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorHTTPAttributesRequestWithDefaults() *ConnectorHTTPAttributesRequest { + this := ConnectorHTTPAttributesRequest{} + return &this +} + +// GetAddresses returns the Addresses field value +func (o *ConnectorHTTPAttributesRequest) GetAddresses() []AddressRequest { + if o == nil { + var ret []AddressRequest + return ret + } + + return o.Addresses +} + +// GetAddressesOk returns a tuple with the Addresses field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPAttributesRequest) GetAddressesOk() ([]AddressRequest, bool) { + if o == nil { + return nil, false + } + return o.Addresses, true +} + +// SetAddresses sets field value +func (o *ConnectorHTTPAttributesRequest) SetAddresses(v []AddressRequest) { + o.Addresses = v +} + +// GetConnectionOptions returns the ConnectionOptions field value if set, zero value otherwise. +func (o *ConnectorHTTPAttributesRequest) GetConnectionOptions() HTTPConnectionOptionsRequest { + if o == nil || IsNil(o.ConnectionOptions) { + var ret HTTPConnectionOptionsRequest + return ret + } + return *o.ConnectionOptions +} + +// GetConnectionOptionsOk returns a tuple with the ConnectionOptions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPAttributesRequest) GetConnectionOptionsOk() (*HTTPConnectionOptionsRequest, bool) { + if o == nil || IsNil(o.ConnectionOptions) { + return nil, false + } + return o.ConnectionOptions, true +} + +// HasConnectionOptions returns a boolean if a field has been set. +func (o *ConnectorHTTPAttributesRequest) HasConnectionOptions() bool { + if o != nil && !IsNil(o.ConnectionOptions) { + return true + } + + return false +} + +// SetConnectionOptions gets a reference to the given HTTPConnectionOptionsRequest and assigns it to the ConnectionOptions field. +func (o *ConnectorHTTPAttributesRequest) SetConnectionOptions(v HTTPConnectionOptionsRequest) { + o.ConnectionOptions = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *ConnectorHTTPAttributesRequest) GetModules() HTTPModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret HTTPModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPAttributesRequest) GetModulesOk() (*HTTPModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *ConnectorHTTPAttributesRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given HTTPModulesRequest and assigns it to the Modules field. +func (o *ConnectorHTTPAttributesRequest) SetModules(v HTTPModulesRequest) { + o.Modules = &v +} + +func (o ConnectorHTTPAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorHTTPAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["addresses"] = o.Addresses + if !IsNil(o.ConnectionOptions) { + toSerialize["connection_options"] = o.ConnectionOptions + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +func (o *ConnectorHTTPAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "addresses", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorHTTPAttributesRequest := _ConnectorHTTPAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorHTTPAttributesRequest) + + if err != nil { + return err + } + + *o = ConnectorHTTPAttributesRequest(varConnectorHTTPAttributesRequest) + + return err +} + +type NullableConnectorHTTPAttributesRequest struct { + value *ConnectorHTTPAttributesRequest + isSet bool +} + +func (v NullableConnectorHTTPAttributesRequest) Get() *ConnectorHTTPAttributesRequest { + return v.value +} + +func (v *NullableConnectorHTTPAttributesRequest) Set(val *ConnectorHTTPAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorHTTPAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorHTTPAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorHTTPAttributesRequest(val *ConnectorHTTPAttributesRequest) *NullableConnectorHTTPAttributesRequest { + return &NullableConnectorHTTPAttributesRequest{value: val, isSet: true} +} + +func (v NullableConnectorHTTPAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorHTTPAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_http_request.go b/azion-api/model_connector_http_request.go new file mode 100644 index 0000000..c1cabfa --- /dev/null +++ b/azion-api/model_connector_http_request.go @@ -0,0 +1,252 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorHTTPRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorHTTPRequest{} + +// ConnectorHTTPRequest struct for ConnectorHTTPRequest +type ConnectorHTTPRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + // Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest + Type string `json:"type"` + Attributes ConnectorHTTPAttributesRequest `json:"attributes"` +} + +type _ConnectorHTTPRequest ConnectorHTTPRequest + +// NewConnectorHTTPRequest instantiates a new ConnectorHTTPRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorHTTPRequest(name string, type_ string, attributes ConnectorHTTPAttributesRequest) *ConnectorHTTPRequest { + this := ConnectorHTTPRequest{} + this.Name = name + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewConnectorHTTPRequestWithDefaults instantiates a new ConnectorHTTPRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorHTTPRequestWithDefaults() *ConnectorHTTPRequest { + this := ConnectorHTTPRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ConnectorHTTPRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorHTTPRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ConnectorHTTPRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ConnectorHTTPRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ConnectorHTTPRequest) SetActive(v bool) { + o.Active = &v +} + +// GetType returns the Type field value +func (o *ConnectorHTTPRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ConnectorHTTPRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *ConnectorHTTPRequest) GetAttributes() ConnectorHTTPAttributesRequest { + if o == nil { + var ret ConnectorHTTPAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *ConnectorHTTPRequest) GetAttributesOk() (*ConnectorHTTPAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *ConnectorHTTPRequest) SetAttributes(v ConnectorHTTPAttributesRequest) { + o.Attributes = v +} + +func (o ConnectorHTTPRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorHTTPRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *ConnectorHTTPRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorHTTPRequest := _ConnectorHTTPRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorHTTPRequest) + + if err != nil { + return err + } + + *o = ConnectorHTTPRequest(varConnectorHTTPRequest) + + return err +} + +type NullableConnectorHTTPRequest struct { + value *ConnectorHTTPRequest + isSet bool +} + +func (v NullableConnectorHTTPRequest) Get() *ConnectorHTTPRequest { + return v.value +} + +func (v *NullableConnectorHTTPRequest) Set(val *ConnectorHTTPRequest) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorHTTPRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorHTTPRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorHTTPRequest(val *ConnectorHTTPRequest) *NullableConnectorHTTPRequest { + return &NullableConnectorHTTPRequest{value: val, isSet: true} +} + +func (v NullableConnectorHTTPRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorHTTPRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_request.go b/azion-api/model_connector_request.go new file mode 100644 index 0000000..2e1ce39 --- /dev/null +++ b/azion-api/model_connector_request.go @@ -0,0 +1,252 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorRequest{} + +// ConnectorRequest struct for ConnectorRequest +type ConnectorRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + // Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest + Type string `json:"type"` + Attributes ConnectorStorageAttributesRequest `json:"attributes"` +} + +type _ConnectorRequest ConnectorRequest + +// NewConnectorRequest instantiates a new ConnectorRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorRequest(name string, type_ string, attributes ConnectorStorageAttributesRequest) *ConnectorRequest { + this := ConnectorRequest{} + this.Name = name + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewConnectorRequestWithDefaults instantiates a new ConnectorRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorRequestWithDefaults() *ConnectorRequest { + this := ConnectorRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ConnectorRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ConnectorRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ConnectorRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ConnectorRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ConnectorRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ConnectorRequest) SetActive(v bool) { + o.Active = &v +} + +// GetType returns the Type field value +func (o *ConnectorRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ConnectorRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ConnectorRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *ConnectorRequest) GetAttributes() ConnectorStorageAttributesRequest { + if o == nil { + var ret ConnectorStorageAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *ConnectorRequest) GetAttributesOk() (*ConnectorStorageAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *ConnectorRequest) SetAttributes(v ConnectorStorageAttributesRequest) { + o.Attributes = v +} + +func (o ConnectorRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *ConnectorRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorRequest := _ConnectorRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorRequest) + + if err != nil { + return err + } + + *o = ConnectorRequest(varConnectorRequest) + + return err +} + +type NullableConnectorRequest struct { + value *ConnectorRequest + isSet bool +} + +func (v NullableConnectorRequest) Get() *ConnectorRequest { + return v.value +} + +func (v *NullableConnectorRequest) Set(val *ConnectorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorRequest(val *ConnectorRequest) *NullableConnectorRequest { + return &NullableConnectorRequest{value: val, isSet: true} +} + +func (v NullableConnectorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_request2.go b/azion-api/model_connector_request2.go new file mode 100644 index 0000000..ea4b6f4 --- /dev/null +++ b/azion-api/model_connector_request2.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ConnectorRequest2 - struct for ConnectorRequest2 +type ConnectorRequest2 struct { + ConnectorHTTPRequest *ConnectorHTTPRequest + ConnectorRequest *ConnectorRequest +} + +// ConnectorHTTPRequestAsConnectorRequest2 is a convenience function that returns ConnectorHTTPRequest wrapped in ConnectorRequest2 +func ConnectorHTTPRequestAsConnectorRequest2(v *ConnectorHTTPRequest) ConnectorRequest2 { + return ConnectorRequest2{ + ConnectorHTTPRequest: v, + } +} + +// ConnectorRequestAsConnectorRequest2 is a convenience function that returns ConnectorRequest wrapped in ConnectorRequest2 +func ConnectorRequestAsConnectorRequest2(v *ConnectorRequest) ConnectorRequest2 { + return ConnectorRequest2{ + ConnectorRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ConnectorRequest2) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into ConnectorHTTPRequest + err = newStrictDecoder(data).Decode(&dst.ConnectorHTTPRequest) + if err == nil { + jsonConnectorHTTPRequest, _ := json.Marshal(dst.ConnectorHTTPRequest) + if string(jsonConnectorHTTPRequest) == "{}" { // empty struct + dst.ConnectorHTTPRequest = nil + } else { + if err = validator.Validate(dst.ConnectorHTTPRequest); err != nil { + dst.ConnectorHTTPRequest = nil + } else { + match++ + } + } + } else { + dst.ConnectorHTTPRequest = nil + } + + // try to unmarshal data into ConnectorRequest + err = newStrictDecoder(data).Decode(&dst.ConnectorRequest) + if err == nil { + jsonConnectorRequest, _ := json.Marshal(dst.ConnectorRequest) + if string(jsonConnectorRequest) == "{}" { // empty struct + dst.ConnectorRequest = nil + } else { + if err = validator.Validate(dst.ConnectorRequest); err != nil { + dst.ConnectorRequest = nil + } else { + match++ + } + } + } else { + dst.ConnectorRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.ConnectorHTTPRequest = nil + dst.ConnectorRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ConnectorRequest2)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ConnectorRequest2)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ConnectorRequest2) MarshalJSON() ([]byte, error) { + if src.ConnectorHTTPRequest != nil { + return json.Marshal(&src.ConnectorHTTPRequest) + } + + if src.ConnectorRequest != nil { + return json.Marshal(&src.ConnectorRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ConnectorRequest2) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.ConnectorHTTPRequest != nil { + return obj.ConnectorHTTPRequest + } + + if obj.ConnectorRequest != nil { + return obj.ConnectorRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ConnectorRequest2) GetActualInstanceValue() (interface{}) { + if obj.ConnectorHTTPRequest != nil { + return *obj.ConnectorHTTPRequest + } + + if obj.ConnectorRequest != nil { + return *obj.ConnectorRequest + } + + // all schemas are nil + return nil +} + +type NullableConnectorRequest2 struct { + value *ConnectorRequest2 + isSet bool +} + +func (v NullableConnectorRequest2) Get() *ConnectorRequest2 { + return v.value +} + +func (v *NullableConnectorRequest2) Set(val *ConnectorRequest2) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorRequest2) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorRequest2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorRequest2(val *ConnectorRequest2) *NullableConnectorRequest2 { + return &NullableConnectorRequest2{value: val, isSet: true} +} + +func (v NullableConnectorRequest2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorRequest2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_response.go b/azion-api/model_connector_response.go new file mode 100644 index 0000000..17efc8d --- /dev/null +++ b/azion-api/model_connector_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorResponse{} + +// ConnectorResponse struct for ConnectorResponse +type ConnectorResponse struct { + State *string `json:"state,omitempty"` + Data Connector2 `json:"data"` +} + +type _ConnectorResponse ConnectorResponse + +// NewConnectorResponse instantiates a new ConnectorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorResponse(data Connector2) *ConnectorResponse { + this := ConnectorResponse{} + this.Data = data + return &this +} + +// NewConnectorResponseWithDefaults instantiates a new ConnectorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorResponseWithDefaults() *ConnectorResponse { + this := ConnectorResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ConnectorResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ConnectorResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ConnectorResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ConnectorResponse) GetData() Connector2 { + if o == nil { + var ret Connector2 + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ConnectorResponse) GetDataOk() (*Connector2, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ConnectorResponse) SetData(v Connector2) { + o.Data = v +} + +func (o ConnectorResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ConnectorResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorResponse := _ConnectorResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorResponse) + + if err != nil { + return err + } + + *o = ConnectorResponse(varConnectorResponse) + + return err +} + +type NullableConnectorResponse struct { + value *ConnectorResponse + isSet bool +} + +func (v NullableConnectorResponse) Get() *ConnectorResponse { + return v.value +} + +func (v *NullableConnectorResponse) Set(val *ConnectorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorResponse(val *ConnectorResponse) *NullableConnectorResponse { + return &NullableConnectorResponse{value: val, isSet: true} +} + +func (v NullableConnectorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_storage_attributes.go b/azion-api/model_connector_storage_attributes.go new file mode 100644 index 0000000..f1665f4 --- /dev/null +++ b/azion-api/model_connector_storage_attributes.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorStorageAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorStorageAttributes{} + +// ConnectorStorageAttributes struct for ConnectorStorageAttributes +type ConnectorStorageAttributes struct { + Bucket string `json:"bucket"` + Prefix *string `json:"prefix,omitempty"` +} + +type _ConnectorStorageAttributes ConnectorStorageAttributes + +// NewConnectorStorageAttributes instantiates a new ConnectorStorageAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorStorageAttributes(bucket string) *ConnectorStorageAttributes { + this := ConnectorStorageAttributes{} + this.Bucket = bucket + return &this +} + +// NewConnectorStorageAttributesWithDefaults instantiates a new ConnectorStorageAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorStorageAttributesWithDefaults() *ConnectorStorageAttributes { + this := ConnectorStorageAttributes{} + return &this +} + +// GetBucket returns the Bucket field value +func (o *ConnectorStorageAttributes) GetBucket() string { + if o == nil { + var ret string + return ret + } + + return o.Bucket +} + +// GetBucketOk returns a tuple with the Bucket field value +// and a boolean to check if the value has been set. +func (o *ConnectorStorageAttributes) GetBucketOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Bucket, true +} + +// SetBucket sets field value +func (o *ConnectorStorageAttributes) SetBucket(v string) { + o.Bucket = v +} + +// GetPrefix returns the Prefix field value if set, zero value otherwise. +func (o *ConnectorStorageAttributes) GetPrefix() string { + if o == nil || IsNil(o.Prefix) { + var ret string + return ret + } + return *o.Prefix +} + +// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorStorageAttributes) GetPrefixOk() (*string, bool) { + if o == nil || IsNil(o.Prefix) { + return nil, false + } + return o.Prefix, true +} + +// HasPrefix returns a boolean if a field has been set. +func (o *ConnectorStorageAttributes) HasPrefix() bool { + if o != nil && !IsNil(o.Prefix) { + return true + } + + return false +} + +// SetPrefix gets a reference to the given string and assigns it to the Prefix field. +func (o *ConnectorStorageAttributes) SetPrefix(v string) { + o.Prefix = &v +} + +func (o ConnectorStorageAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorStorageAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["bucket"] = o.Bucket + if !IsNil(o.Prefix) { + toSerialize["prefix"] = o.Prefix + } + return toSerialize, nil +} + +func (o *ConnectorStorageAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "bucket", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorStorageAttributes := _ConnectorStorageAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorStorageAttributes) + + if err != nil { + return err + } + + *o = ConnectorStorageAttributes(varConnectorStorageAttributes) + + return err +} + +type NullableConnectorStorageAttributes struct { + value *ConnectorStorageAttributes + isSet bool +} + +func (v NullableConnectorStorageAttributes) Get() *ConnectorStorageAttributes { + return v.value +} + +func (v *NullableConnectorStorageAttributes) Set(val *ConnectorStorageAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorStorageAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorStorageAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorStorageAttributes(val *ConnectorStorageAttributes) *NullableConnectorStorageAttributes { + return &NullableConnectorStorageAttributes{value: val, isSet: true} +} + +func (v NullableConnectorStorageAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorStorageAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_connector_storage_attributes_request.go b/azion-api/model_connector_storage_attributes_request.go new file mode 100644 index 0000000..beebcec --- /dev/null +++ b/azion-api/model_connector_storage_attributes_request.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ConnectorStorageAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ConnectorStorageAttributesRequest{} + +// ConnectorStorageAttributesRequest struct for ConnectorStorageAttributesRequest +type ConnectorStorageAttributesRequest struct { + Bucket string `json:"bucket"` + Prefix *string `json:"prefix,omitempty"` +} + +type _ConnectorStorageAttributesRequest ConnectorStorageAttributesRequest + +// NewConnectorStorageAttributesRequest instantiates a new ConnectorStorageAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewConnectorStorageAttributesRequest(bucket string) *ConnectorStorageAttributesRequest { + this := ConnectorStorageAttributesRequest{} + this.Bucket = bucket + return &this +} + +// NewConnectorStorageAttributesRequestWithDefaults instantiates a new ConnectorStorageAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewConnectorStorageAttributesRequestWithDefaults() *ConnectorStorageAttributesRequest { + this := ConnectorStorageAttributesRequest{} + return &this +} + +// GetBucket returns the Bucket field value +func (o *ConnectorStorageAttributesRequest) GetBucket() string { + if o == nil { + var ret string + return ret + } + + return o.Bucket +} + +// GetBucketOk returns a tuple with the Bucket field value +// and a boolean to check if the value has been set. +func (o *ConnectorStorageAttributesRequest) GetBucketOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Bucket, true +} + +// SetBucket sets field value +func (o *ConnectorStorageAttributesRequest) SetBucket(v string) { + o.Bucket = v +} + +// GetPrefix returns the Prefix field value if set, zero value otherwise. +func (o *ConnectorStorageAttributesRequest) GetPrefix() string { + if o == nil || IsNil(o.Prefix) { + var ret string + return ret + } + return *o.Prefix +} + +// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ConnectorStorageAttributesRequest) GetPrefixOk() (*string, bool) { + if o == nil || IsNil(o.Prefix) { + return nil, false + } + return o.Prefix, true +} + +// HasPrefix returns a boolean if a field has been set. +func (o *ConnectorStorageAttributesRequest) HasPrefix() bool { + if o != nil && !IsNil(o.Prefix) { + return true + } + + return false +} + +// SetPrefix gets a reference to the given string and assigns it to the Prefix field. +func (o *ConnectorStorageAttributesRequest) SetPrefix(v string) { + o.Prefix = &v +} + +func (o ConnectorStorageAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ConnectorStorageAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["bucket"] = o.Bucket + if !IsNil(o.Prefix) { + toSerialize["prefix"] = o.Prefix + } + return toSerialize, nil +} + +func (o *ConnectorStorageAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "bucket", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varConnectorStorageAttributesRequest := _ConnectorStorageAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varConnectorStorageAttributesRequest) + + if err != nil { + return err + } + + *o = ConnectorStorageAttributesRequest(varConnectorStorageAttributesRequest) + + return err +} + +type NullableConnectorStorageAttributesRequest struct { + value *ConnectorStorageAttributesRequest + isSet bool +} + +func (v NullableConnectorStorageAttributesRequest) Get() *ConnectorStorageAttributesRequest { + return v.value +} + +func (v *NullableConnectorStorageAttributesRequest) Set(val *ConnectorStorageAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableConnectorStorageAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableConnectorStorageAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableConnectorStorageAttributesRequest(val *ConnectorStorageAttributesRequest) *NullableConnectorStorageAttributesRequest { + return &NullableConnectorStorageAttributesRequest{value: val, isSet: true} +} + +func (v NullableConnectorStorageAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableConnectorStorageAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_content.go b/azion-api/model_content.go new file mode 100644 index 0000000..c381f5a --- /dev/null +++ b/azion-api/model_content.go @@ -0,0 +1,299 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Content type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Content{} + +// Content struct for Content +type Content struct { + Id int64 `json:"id"` + Name string `json:"name"` + ContentType string `json:"content_type"` + ContentHash string `json:"content_hash"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` +} + +type _Content Content + +// NewContent instantiates a new Content object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContent(id int64, name string, contentType string, contentHash string, lastEditor string, lastModified string) *Content { + this := Content{} + this.Id = id + this.Name = name + this.ContentType = contentType + this.ContentHash = contentHash + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewContentWithDefaults instantiates a new Content object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentWithDefaults() *Content { + this := Content{} + return &this +} + +// GetId returns the Id field value +func (o *Content) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Content) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Content) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Content) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Content) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Content) SetName(v string) { + o.Name = v +} + +// GetContentType returns the ContentType field value +func (o *Content) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *Content) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *Content) SetContentType(v string) { + o.ContentType = v +} + +// GetContentHash returns the ContentHash field value +func (o *Content) GetContentHash() string { + if o == nil { + var ret string + return ret + } + + return o.ContentHash +} + +// GetContentHashOk returns a tuple with the ContentHash field value +// and a boolean to check if the value has been set. +func (o *Content) GetContentHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentHash, true +} + +// SetContentHash sets field value +func (o *Content) SetContentHash(v string) { + o.ContentHash = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Content) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Content) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Content) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Content) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Content) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Content) SetLastModified(v string) { + o.LastModified = v +} + +func (o Content) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Content) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["content_type"] = o.ContentType + toSerialize["content_hash"] = o.ContentHash + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *Content) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "content_type", + "content_hash", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varContent := _Content{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varContent) + + if err != nil { + return err + } + + *o = Content(varContent) + + return err +} + +type NullableContent struct { + value *Content + isSet bool +} + +func (v NullableContent) Get() *Content { + return v.value +} + +func (v *NullableContent) Set(val *Content) { + v.value = val + v.isSet = true +} + +func (v NullableContent) IsSet() bool { + return v.isSet +} + +func (v *NullableContent) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContent(val *Content) *NullableContent { + return &NullableContent{value: val, isSet: true} +} + +func (v NullableContent) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContent) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_content_request.go b/azion-api/model_content_request.go new file mode 100644 index 0000000..47afa7e --- /dev/null +++ b/azion-api/model_content_request.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ContentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContentRequest{} + +// ContentRequest struct for ContentRequest +type ContentRequest struct { + Name string `json:"name"` + ContentType string `json:"content_type"` + ContentHash string `json:"content_hash"` +} + +type _ContentRequest ContentRequest + +// NewContentRequest instantiates a new ContentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContentRequest(name string, contentType string, contentHash string) *ContentRequest { + this := ContentRequest{} + this.Name = name + this.ContentType = contentType + this.ContentHash = contentHash + return &this +} + +// NewContentRequestWithDefaults instantiates a new ContentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContentRequestWithDefaults() *ContentRequest { + this := ContentRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ContentRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContentRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContentRequest) SetName(v string) { + o.Name = v +} + +// GetContentType returns the ContentType field value +func (o *ContentRequest) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *ContentRequest) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *ContentRequest) SetContentType(v string) { + o.ContentType = v +} + +// GetContentHash returns the ContentHash field value +func (o *ContentRequest) GetContentHash() string { + if o == nil { + var ret string + return ret + } + + return o.ContentHash +} + +// GetContentHashOk returns a tuple with the ContentHash field value +// and a boolean to check if the value has been set. +func (o *ContentRequest) GetContentHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentHash, true +} + +// SetContentHash sets field value +func (o *ContentRequest) SetContentHash(v string) { + o.ContentHash = v +} + +func (o ContentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["content_type"] = o.ContentType + toSerialize["content_hash"] = o.ContentHash + return toSerialize, nil +} + +func (o *ContentRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "content_type", + "content_hash", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varContentRequest := _ContentRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varContentRequest) + + if err != nil { + return err + } + + *o = ContentRequest(varContentRequest) + + return err +} + +type NullableContentRequest struct { + value *ContentRequest + isSet bool +} + +func (v NullableContentRequest) Get() *ContentRequest { + return v.value +} + +func (v *NullableContentRequest) Set(val *ContentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableContentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableContentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContentRequest(val *ContentRequest) *NullableContentRequest { + return &NullableContentRequest{value: val, isSet: true} +} + +func (v NullableContentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_continuous_deployment.go b/azion-api/model_continuous_deployment.go new file mode 100644 index 0000000..70a30e6 --- /dev/null +++ b/azion-api/model_continuous_deployment.go @@ -0,0 +1,457 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContinuousDeployment{} + +// ContinuousDeployment struct for ContinuousDeployment +type ContinuousDeployment struct { + Id int64 `json:"id"` + Name string `json:"name"` + Repository string `json:"repository"` + Branch string `json:"branch"` + BuildContext []BuildContextField `json:"build_context"` + DeployContext map[string]interface{} `json:"deploy_context,omitempty"` + Integration Integration `json:"integration"` + ExecutionScript ExecutionScript `json:"execution_script"` + // Created date of the continuous deployment. + Created NullableTime `json:"created"` + // Last editor of the continuous deployment. + LastEditor NullableString `json:"last_editor"` + // Last modified date of the continuous deployment. + LastModified NullableTime `json:"last_modified"` +} + +type _ContinuousDeployment ContinuousDeployment + +// NewContinuousDeployment instantiates a new ContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContinuousDeployment(id int64, name string, repository string, branch string, buildContext []BuildContextField, integration Integration, executionScript ExecutionScript, created NullableTime, lastEditor NullableString, lastModified NullableTime) *ContinuousDeployment { + this := ContinuousDeployment{} + this.Id = id + this.Name = name + this.Repository = repository + this.Branch = branch + this.BuildContext = buildContext + this.Integration = integration + this.ExecutionScript = executionScript + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewContinuousDeploymentWithDefaults instantiates a new ContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContinuousDeploymentWithDefaults() *ContinuousDeployment { + this := ContinuousDeployment{} + return &this +} + +// GetId returns the Id field value +func (o *ContinuousDeployment) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ContinuousDeployment) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ContinuousDeployment) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContinuousDeployment) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value +func (o *ContinuousDeployment) GetRepository() string { + if o == nil { + var ret string + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *ContinuousDeployment) SetRepository(v string) { + o.Repository = v +} + +// GetBranch returns the Branch field value +func (o *ContinuousDeployment) GetBranch() string { + if o == nil { + var ret string + return ret + } + + return o.Branch +} + +// GetBranchOk returns a tuple with the Branch field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetBranchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Branch, true +} + +// SetBranch sets field value +func (o *ContinuousDeployment) SetBranch(v string) { + o.Branch = v +} + +// GetBuildContext returns the BuildContext field value +func (o *ContinuousDeployment) GetBuildContext() []BuildContextField { + if o == nil { + var ret []BuildContextField + return ret + } + + return o.BuildContext +} + +// GetBuildContextOk returns a tuple with the BuildContext field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetBuildContextOk() ([]BuildContextField, bool) { + if o == nil { + return nil, false + } + return o.BuildContext, true +} + +// SetBuildContext sets field value +func (o *ContinuousDeployment) SetBuildContext(v []BuildContextField) { + o.BuildContext = v +} + +// GetDeployContext returns the DeployContext field value if set, zero value otherwise. +func (o *ContinuousDeployment) GetDeployContext() map[string]interface{} { + if o == nil || IsNil(o.DeployContext) { + var ret map[string]interface{} + return ret + } + return o.DeployContext +} + +// GetDeployContextOk returns a tuple with the DeployContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetDeployContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DeployContext) { + return map[string]interface{}{}, false + } + return o.DeployContext, true +} + +// HasDeployContext returns a boolean if a field has been set. +func (o *ContinuousDeployment) HasDeployContext() bool { + if o != nil && !IsNil(o.DeployContext) { + return true + } + + return false +} + +// SetDeployContext gets a reference to the given map[string]interface{} and assigns it to the DeployContext field. +func (o *ContinuousDeployment) SetDeployContext(v map[string]interface{}) { + o.DeployContext = v +} + +// GetIntegration returns the Integration field value +func (o *ContinuousDeployment) GetIntegration() Integration { + if o == nil { + var ret Integration + return ret + } + + return o.Integration +} + +// GetIntegrationOk returns a tuple with the Integration field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetIntegrationOk() (*Integration, bool) { + if o == nil { + return nil, false + } + return &o.Integration, true +} + +// SetIntegration sets field value +func (o *ContinuousDeployment) SetIntegration(v Integration) { + o.Integration = v +} + +// GetExecutionScript returns the ExecutionScript field value +func (o *ContinuousDeployment) GetExecutionScript() ExecutionScript { + if o == nil { + var ret ExecutionScript + return ret + } + + return o.ExecutionScript +} + +// GetExecutionScriptOk returns a tuple with the ExecutionScript field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeployment) GetExecutionScriptOk() (*ExecutionScript, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionScript, true +} + +// SetExecutionScript sets field value +func (o *ContinuousDeployment) SetExecutionScript(v ExecutionScript) { + o.ExecutionScript = v +} + +// GetCreated returns the Created field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ContinuousDeployment) GetCreated() time.Time { + if o == nil || o.Created.Get() == nil { + var ret time.Time + return ret + } + + return *o.Created.Get() +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContinuousDeployment) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Created.Get(), o.Created.IsSet() +} + +// SetCreated sets field value +func (o *ContinuousDeployment) SetCreated(v time.Time) { + o.Created.Set(&v) +} + +// GetLastEditor returns the LastEditor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ContinuousDeployment) GetLastEditor() string { + if o == nil || o.LastEditor.Get() == nil { + var ret string + return ret + } + + return *o.LastEditor.Get() +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContinuousDeployment) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastEditor.Get(), o.LastEditor.IsSet() +} + +// SetLastEditor sets field value +func (o *ContinuousDeployment) SetLastEditor(v string) { + o.LastEditor.Set(&v) +} + +// GetLastModified returns the LastModified field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ContinuousDeployment) GetLastModified() time.Time { + if o == nil || o.LastModified.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastModified.Get() +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ContinuousDeployment) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastModified.Get(), o.LastModified.IsSet() +} + +// SetLastModified sets field value +func (o *ContinuousDeployment) SetLastModified(v time.Time) { + o.LastModified.Set(&v) +} + +func (o ContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["repository"] = o.Repository + toSerialize["branch"] = o.Branch + toSerialize["build_context"] = o.BuildContext + if !IsNil(o.DeployContext) { + toSerialize["deploy_context"] = o.DeployContext + } + toSerialize["integration"] = o.Integration + toSerialize["execution_script"] = o.ExecutionScript + toSerialize["created"] = o.Created.Get() + toSerialize["last_editor"] = o.LastEditor.Get() + toSerialize["last_modified"] = o.LastModified.Get() + return toSerialize, nil +} + +func (o *ContinuousDeployment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "repository", + "branch", + "build_context", + "integration", + "execution_script", + "created", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varContinuousDeployment := _ContinuousDeployment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varContinuousDeployment) + + if err != nil { + return err + } + + *o = ContinuousDeployment(varContinuousDeployment) + + return err +} + +type NullableContinuousDeployment struct { + value *ContinuousDeployment + isSet bool +} + +func (v NullableContinuousDeployment) Get() *ContinuousDeployment { + return v.value +} + +func (v *NullableContinuousDeployment) Set(val *ContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContinuousDeployment(val *ContinuousDeployment) *NullableContinuousDeployment { + return &NullableContinuousDeployment{value: val, isSet: true} +} + +func (v NullableContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_continuous_deployment_request.go b/azion-api/model_continuous_deployment_request.go new file mode 100644 index 0000000..ff9e224 --- /dev/null +++ b/azion-api/model_continuous_deployment_request.go @@ -0,0 +1,335 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ContinuousDeploymentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ContinuousDeploymentRequest{} + +// ContinuousDeploymentRequest struct for ContinuousDeploymentRequest +type ContinuousDeploymentRequest struct { + Name string `json:"name"` + Repository string `json:"repository"` + Branch string `json:"branch"` + BuildContext []BuildContextFieldRequest `json:"build_context"` + DeployContext map[string]interface{} `json:"deploy_context,omitempty"` + IntegrationId int64 `json:"integration_id"` + ExecutionScriptId int64 `json:"execution_script_id"` +} + +type _ContinuousDeploymentRequest ContinuousDeploymentRequest + +// NewContinuousDeploymentRequest instantiates a new ContinuousDeploymentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewContinuousDeploymentRequest(name string, repository string, branch string, buildContext []BuildContextFieldRequest, integrationId int64, executionScriptId int64) *ContinuousDeploymentRequest { + this := ContinuousDeploymentRequest{} + this.Name = name + this.Repository = repository + this.Branch = branch + this.BuildContext = buildContext + this.IntegrationId = integrationId + this.ExecutionScriptId = executionScriptId + return &this +} + +// NewContinuousDeploymentRequestWithDefaults instantiates a new ContinuousDeploymentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewContinuousDeploymentRequestWithDefaults() *ContinuousDeploymentRequest { + this := ContinuousDeploymentRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ContinuousDeploymentRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ContinuousDeploymentRequest) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value +func (o *ContinuousDeploymentRequest) GetRepository() string { + if o == nil { + var ret string + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *ContinuousDeploymentRequest) SetRepository(v string) { + o.Repository = v +} + +// GetBranch returns the Branch field value +func (o *ContinuousDeploymentRequest) GetBranch() string { + if o == nil { + var ret string + return ret + } + + return o.Branch +} + +// GetBranchOk returns a tuple with the Branch field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetBranchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Branch, true +} + +// SetBranch sets field value +func (o *ContinuousDeploymentRequest) SetBranch(v string) { + o.Branch = v +} + +// GetBuildContext returns the BuildContext field value +func (o *ContinuousDeploymentRequest) GetBuildContext() []BuildContextFieldRequest { + if o == nil { + var ret []BuildContextFieldRequest + return ret + } + + return o.BuildContext +} + +// GetBuildContextOk returns a tuple with the BuildContext field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetBuildContextOk() ([]BuildContextFieldRequest, bool) { + if o == nil { + return nil, false + } + return o.BuildContext, true +} + +// SetBuildContext sets field value +func (o *ContinuousDeploymentRequest) SetBuildContext(v []BuildContextFieldRequest) { + o.BuildContext = v +} + +// GetDeployContext returns the DeployContext field value if set, zero value otherwise. +func (o *ContinuousDeploymentRequest) GetDeployContext() map[string]interface{} { + if o == nil || IsNil(o.DeployContext) { + var ret map[string]interface{} + return ret + } + return o.DeployContext +} + +// GetDeployContextOk returns a tuple with the DeployContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetDeployContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DeployContext) { + return map[string]interface{}{}, false + } + return o.DeployContext, true +} + +// HasDeployContext returns a boolean if a field has been set. +func (o *ContinuousDeploymentRequest) HasDeployContext() bool { + if o != nil && !IsNil(o.DeployContext) { + return true + } + + return false +} + +// SetDeployContext gets a reference to the given map[string]interface{} and assigns it to the DeployContext field. +func (o *ContinuousDeploymentRequest) SetDeployContext(v map[string]interface{}) { + o.DeployContext = v +} + +// GetIntegrationId returns the IntegrationId field value +func (o *ContinuousDeploymentRequest) GetIntegrationId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.IntegrationId +} + +// GetIntegrationIdOk returns a tuple with the IntegrationId field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetIntegrationIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationId, true +} + +// SetIntegrationId sets field value +func (o *ContinuousDeploymentRequest) SetIntegrationId(v int64) { + o.IntegrationId = v +} + +// GetExecutionScriptId returns the ExecutionScriptId field value +func (o *ContinuousDeploymentRequest) GetExecutionScriptId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ExecutionScriptId +} + +// GetExecutionScriptIdOk returns a tuple with the ExecutionScriptId field value +// and a boolean to check if the value has been set. +func (o *ContinuousDeploymentRequest) GetExecutionScriptIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionScriptId, true +} + +// SetExecutionScriptId sets field value +func (o *ContinuousDeploymentRequest) SetExecutionScriptId(v int64) { + o.ExecutionScriptId = v +} + +func (o ContinuousDeploymentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ContinuousDeploymentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["repository"] = o.Repository + toSerialize["branch"] = o.Branch + toSerialize["build_context"] = o.BuildContext + if !IsNil(o.DeployContext) { + toSerialize["deploy_context"] = o.DeployContext + } + toSerialize["integration_id"] = o.IntegrationId + toSerialize["execution_script_id"] = o.ExecutionScriptId + return toSerialize, nil +} + +func (o *ContinuousDeploymentRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "repository", + "branch", + "build_context", + "integration_id", + "execution_script_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varContinuousDeploymentRequest := _ContinuousDeploymentRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varContinuousDeploymentRequest) + + if err != nil { + return err + } + + *o = ContinuousDeploymentRequest(varContinuousDeploymentRequest) + + return err +} + +type NullableContinuousDeploymentRequest struct { + value *ContinuousDeploymentRequest + isSet bool +} + +func (v NullableContinuousDeploymentRequest) Get() *ContinuousDeploymentRequest { + return v.value +} + +func (v *NullableContinuousDeploymentRequest) Set(val *ContinuousDeploymentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableContinuousDeploymentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableContinuousDeploymentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableContinuousDeploymentRequest(val *ContinuousDeploymentRequest) *NullableContinuousDeploymentRequest { + return &NullableContinuousDeploymentRequest{value: val, isSet: true} +} + +func (v NullableContinuousDeploymentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableContinuousDeploymentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_create_account_request.go b/azion-api/model_create_account_request.go new file mode 100644 index 0000000..fa7c89f --- /dev/null +++ b/azion-api/model_create_account_request.go @@ -0,0 +1,248 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// CreateAccountRequest - struct for CreateAccountRequest +type CreateAccountRequest struct { + CreateBrandRequest *CreateBrandRequest + CreateOrganizationRequest *CreateOrganizationRequest + CreateResellerRequest *CreateResellerRequest + CreateWorkspaceRequest *CreateWorkspaceRequest +} + +// CreateBrandRequestAsCreateAccountRequest is a convenience function that returns CreateBrandRequest wrapped in CreateAccountRequest +func CreateBrandRequestAsCreateAccountRequest(v *CreateBrandRequest) CreateAccountRequest { + return CreateAccountRequest{ + CreateBrandRequest: v, + } +} + +// CreateOrganizationRequestAsCreateAccountRequest is a convenience function that returns CreateOrganizationRequest wrapped in CreateAccountRequest +func CreateOrganizationRequestAsCreateAccountRequest(v *CreateOrganizationRequest) CreateAccountRequest { + return CreateAccountRequest{ + CreateOrganizationRequest: v, + } +} + +// CreateResellerRequestAsCreateAccountRequest is a convenience function that returns CreateResellerRequest wrapped in CreateAccountRequest +func CreateResellerRequestAsCreateAccountRequest(v *CreateResellerRequest) CreateAccountRequest { + return CreateAccountRequest{ + CreateResellerRequest: v, + } +} + +// CreateWorkspaceRequestAsCreateAccountRequest is a convenience function that returns CreateWorkspaceRequest wrapped in CreateAccountRequest +func CreateWorkspaceRequestAsCreateAccountRequest(v *CreateWorkspaceRequest) CreateAccountRequest { + return CreateAccountRequest{ + CreateWorkspaceRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateAccountRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into CreateBrandRequest + err = newStrictDecoder(data).Decode(&dst.CreateBrandRequest) + if err == nil { + jsonCreateBrandRequest, _ := json.Marshal(dst.CreateBrandRequest) + if string(jsonCreateBrandRequest) == "{}" { // empty struct + dst.CreateBrandRequest = nil + } else { + if err = validator.Validate(dst.CreateBrandRequest); err != nil { + dst.CreateBrandRequest = nil + } else { + match++ + } + } + } else { + dst.CreateBrandRequest = nil + } + + // try to unmarshal data into CreateOrganizationRequest + err = newStrictDecoder(data).Decode(&dst.CreateOrganizationRequest) + if err == nil { + jsonCreateOrganizationRequest, _ := json.Marshal(dst.CreateOrganizationRequest) + if string(jsonCreateOrganizationRequest) == "{}" { // empty struct + dst.CreateOrganizationRequest = nil + } else { + if err = validator.Validate(dst.CreateOrganizationRequest); err != nil { + dst.CreateOrganizationRequest = nil + } else { + match++ + } + } + } else { + dst.CreateOrganizationRequest = nil + } + + // try to unmarshal data into CreateResellerRequest + err = newStrictDecoder(data).Decode(&dst.CreateResellerRequest) + if err == nil { + jsonCreateResellerRequest, _ := json.Marshal(dst.CreateResellerRequest) + if string(jsonCreateResellerRequest) == "{}" { // empty struct + dst.CreateResellerRequest = nil + } else { + if err = validator.Validate(dst.CreateResellerRequest); err != nil { + dst.CreateResellerRequest = nil + } else { + match++ + } + } + } else { + dst.CreateResellerRequest = nil + } + + // try to unmarshal data into CreateWorkspaceRequest + err = newStrictDecoder(data).Decode(&dst.CreateWorkspaceRequest) + if err == nil { + jsonCreateWorkspaceRequest, _ := json.Marshal(dst.CreateWorkspaceRequest) + if string(jsonCreateWorkspaceRequest) == "{}" { // empty struct + dst.CreateWorkspaceRequest = nil + } else { + if err = validator.Validate(dst.CreateWorkspaceRequest); err != nil { + dst.CreateWorkspaceRequest = nil + } else { + match++ + } + } + } else { + dst.CreateWorkspaceRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.CreateBrandRequest = nil + dst.CreateOrganizationRequest = nil + dst.CreateResellerRequest = nil + dst.CreateWorkspaceRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CreateAccountRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CreateAccountRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateAccountRequest) MarshalJSON() ([]byte, error) { + if src.CreateBrandRequest != nil { + return json.Marshal(&src.CreateBrandRequest) + } + + if src.CreateOrganizationRequest != nil { + return json.Marshal(&src.CreateOrganizationRequest) + } + + if src.CreateResellerRequest != nil { + return json.Marshal(&src.CreateResellerRequest) + } + + if src.CreateWorkspaceRequest != nil { + return json.Marshal(&src.CreateWorkspaceRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CreateAccountRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.CreateBrandRequest != nil { + return obj.CreateBrandRequest + } + + if obj.CreateOrganizationRequest != nil { + return obj.CreateOrganizationRequest + } + + if obj.CreateResellerRequest != nil { + return obj.CreateResellerRequest + } + + if obj.CreateWorkspaceRequest != nil { + return obj.CreateWorkspaceRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj CreateAccountRequest) GetActualInstanceValue() (interface{}) { + if obj.CreateBrandRequest != nil { + return *obj.CreateBrandRequest + } + + if obj.CreateOrganizationRequest != nil { + return *obj.CreateOrganizationRequest + } + + if obj.CreateResellerRequest != nil { + return *obj.CreateResellerRequest + } + + if obj.CreateWorkspaceRequest != nil { + return *obj.CreateWorkspaceRequest + } + + // all schemas are nil + return nil +} + +type NullableCreateAccountRequest struct { + value *CreateAccountRequest + isSet bool +} + +func (v NullableCreateAccountRequest) Get() *CreateAccountRequest { + return v.value +} + +func (v *NullableCreateAccountRequest) Set(val *CreateAccountRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateAccountRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateAccountRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateAccountRequest(val *CreateAccountRequest) *NullableCreateAccountRequest { + return &NullableCreateAccountRequest{value: val, isSet: true} +} + +func (v NullableCreateAccountRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateAccountRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_create_brand_request.go b/azion-api/model_create_brand_request.go new file mode 100644 index 0000000..b286443 --- /dev/null +++ b/azion-api/model_create_brand_request.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CreateBrandRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateBrandRequest{} + +// CreateBrandRequest Mixin to validate parent-child relationships between different account types. Rules: - Brand: Can only have Reseller children and no parent - Reseller: Can only have Organization children and Brand parent - Organization: Can only have Workspace children and Reseller parent - Workspace: Cannot have children, parent must be an Organization +type CreateBrandRequest struct { + Name string `json:"name"` + ParentId int64 `json:"parent_id"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _CreateBrandRequest CreateBrandRequest + +// NewCreateBrandRequest instantiates a new CreateBrandRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateBrandRequest(name string, parentId int64, type_ string) *CreateBrandRequest { + this := CreateBrandRequest{} + this.Name = name + this.ParentId = parentId + this.Type = type_ + return &this +} + +// NewCreateBrandRequestWithDefaults instantiates a new CreateBrandRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateBrandRequestWithDefaults() *CreateBrandRequest { + this := CreateBrandRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CreateBrandRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateBrandRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateBrandRequest) SetName(v string) { + o.Name = v +} + +// GetParentId returns the ParentId field value +func (o *CreateBrandRequest) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *CreateBrandRequest) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *CreateBrandRequest) SetParentId(v int64) { + o.ParentId = v +} + +// GetType returns the Type field value +func (o *CreateBrandRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateBrandRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateBrandRequest) SetType(v string) { + o.Type = v +} + +func (o CreateBrandRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateBrandRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *CreateBrandRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "parent_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateBrandRequest := _CreateBrandRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateBrandRequest) + + if err != nil { + return err + } + + *o = CreateBrandRequest(varCreateBrandRequest) + + return err +} + +type NullableCreateBrandRequest struct { + value *CreateBrandRequest + isSet bool +} + +func (v NullableCreateBrandRequest) Get() *CreateBrandRequest { + return v.value +} + +func (v *NullableCreateBrandRequest) Set(val *CreateBrandRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateBrandRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateBrandRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateBrandRequest(val *CreateBrandRequest) *NullableCreateBrandRequest { + return &NullableCreateBrandRequest{value: val, isSet: true} +} + +func (v NullableCreateBrandRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateBrandRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_create_organization_request.go b/azion-api/model_create_organization_request.go new file mode 100644 index 0000000..904f559 --- /dev/null +++ b/azion-api/model_create_organization_request.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CreateOrganizationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateOrganizationRequest{} + +// CreateOrganizationRequest Mixin to validate parent-child relationships between different account types. Rules: - Brand: Can only have Reseller children and no parent - Reseller: Can only have Organization children and Brand parent - Organization: Can only have Workspace children and Reseller parent - Workspace: Cannot have children, parent must be an Organization +type CreateOrganizationRequest struct { + Name string `json:"name"` + ParentId int64 `json:"parent_id"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _CreateOrganizationRequest CreateOrganizationRequest + +// NewCreateOrganizationRequest instantiates a new CreateOrganizationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateOrganizationRequest(name string, parentId int64, type_ string) *CreateOrganizationRequest { + this := CreateOrganizationRequest{} + this.Name = name + this.ParentId = parentId + this.Type = type_ + return &this +} + +// NewCreateOrganizationRequestWithDefaults instantiates a new CreateOrganizationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateOrganizationRequestWithDefaults() *CreateOrganizationRequest { + this := CreateOrganizationRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CreateOrganizationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateOrganizationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateOrganizationRequest) SetName(v string) { + o.Name = v +} + +// GetParentId returns the ParentId field value +func (o *CreateOrganizationRequest) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *CreateOrganizationRequest) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *CreateOrganizationRequest) SetParentId(v int64) { + o.ParentId = v +} + +// GetType returns the Type field value +func (o *CreateOrganizationRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateOrganizationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateOrganizationRequest) SetType(v string) { + o.Type = v +} + +func (o CreateOrganizationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateOrganizationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *CreateOrganizationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "parent_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateOrganizationRequest := _CreateOrganizationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateOrganizationRequest) + + if err != nil { + return err + } + + *o = CreateOrganizationRequest(varCreateOrganizationRequest) + + return err +} + +type NullableCreateOrganizationRequest struct { + value *CreateOrganizationRequest + isSet bool +} + +func (v NullableCreateOrganizationRequest) Get() *CreateOrganizationRequest { + return v.value +} + +func (v *NullableCreateOrganizationRequest) Set(val *CreateOrganizationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateOrganizationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateOrganizationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateOrganizationRequest(val *CreateOrganizationRequest) *NullableCreateOrganizationRequest { + return &NullableCreateOrganizationRequest{value: val, isSet: true} +} + +func (v NullableCreateOrganizationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateOrganizationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_create_reseller_request.go b/azion-api/model_create_reseller_request.go new file mode 100644 index 0000000..fbabe42 --- /dev/null +++ b/azion-api/model_create_reseller_request.go @@ -0,0 +1,281 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CreateResellerRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResellerRequest{} + +// CreateResellerRequest Mixin to validate parent-child relationships between different account types. Rules: - Brand: Can only have Reseller children and no parent - Reseller: Can only have Organization children and Brand parent - Organization: Can only have Workspace children and Reseller parent - Workspace: Cannot have children, parent must be an Organization +type CreateResellerRequest struct { + Name string `json:"name"` + ParentId int64 `json:"parent_id"` + // * `USD` - USD * `BRL` - BRL + CurrencyIsoCode string `json:"currency_iso_code"` + TermsOfServiceUrl *string `json:"terms_of_service_url,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _CreateResellerRequest CreateResellerRequest + +// NewCreateResellerRequest instantiates a new CreateResellerRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateResellerRequest(name string, parentId int64, currencyIsoCode string, type_ string) *CreateResellerRequest { + this := CreateResellerRequest{} + this.Name = name + this.ParentId = parentId + this.CurrencyIsoCode = currencyIsoCode + this.Type = type_ + return &this +} + +// NewCreateResellerRequestWithDefaults instantiates a new CreateResellerRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateResellerRequestWithDefaults() *CreateResellerRequest { + this := CreateResellerRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CreateResellerRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateResellerRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateResellerRequest) SetName(v string) { + o.Name = v +} + +// GetParentId returns the ParentId field value +func (o *CreateResellerRequest) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *CreateResellerRequest) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *CreateResellerRequest) SetParentId(v int64) { + o.ParentId = v +} + +// GetCurrencyIsoCode returns the CurrencyIsoCode field value +func (o *CreateResellerRequest) GetCurrencyIsoCode() string { + if o == nil { + var ret string + return ret + } + + return o.CurrencyIsoCode +} + +// GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field value +// and a boolean to check if the value has been set. +func (o *CreateResellerRequest) GetCurrencyIsoCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurrencyIsoCode, true +} + +// SetCurrencyIsoCode sets field value +func (o *CreateResellerRequest) SetCurrencyIsoCode(v string) { + o.CurrencyIsoCode = v +} + +// GetTermsOfServiceUrl returns the TermsOfServiceUrl field value if set, zero value otherwise. +func (o *CreateResellerRequest) GetTermsOfServiceUrl() string { + if o == nil || IsNil(o.TermsOfServiceUrl) { + var ret string + return ret + } + return *o.TermsOfServiceUrl +} + +// GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateResellerRequest) GetTermsOfServiceUrlOk() (*string, bool) { + if o == nil || IsNil(o.TermsOfServiceUrl) { + return nil, false + } + return o.TermsOfServiceUrl, true +} + +// HasTermsOfServiceUrl returns a boolean if a field has been set. +func (o *CreateResellerRequest) HasTermsOfServiceUrl() bool { + if o != nil && !IsNil(o.TermsOfServiceUrl) { + return true + } + + return false +} + +// SetTermsOfServiceUrl gets a reference to the given string and assigns it to the TermsOfServiceUrl field. +func (o *CreateResellerRequest) SetTermsOfServiceUrl(v string) { + o.TermsOfServiceUrl = &v +} + +// GetType returns the Type field value +func (o *CreateResellerRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateResellerRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateResellerRequest) SetType(v string) { + o.Type = v +} + +func (o CreateResellerRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResellerRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId + toSerialize["currency_iso_code"] = o.CurrencyIsoCode + if !IsNil(o.TermsOfServiceUrl) { + toSerialize["terms_of_service_url"] = o.TermsOfServiceUrl + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *CreateResellerRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "parent_id", + "currency_iso_code", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateResellerRequest := _CreateResellerRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateResellerRequest) + + if err != nil { + return err + } + + *o = CreateResellerRequest(varCreateResellerRequest) + + return err +} + +type NullableCreateResellerRequest struct { + value *CreateResellerRequest + isSet bool +} + +func (v NullableCreateResellerRequest) Get() *CreateResellerRequest { + return v.value +} + +func (v *NullableCreateResellerRequest) Set(val *CreateResellerRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateResellerRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateResellerRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateResellerRequest(val *CreateResellerRequest) *NullableCreateResellerRequest { + return &NullableCreateResellerRequest{value: val, isSet: true} +} + +func (v NullableCreateResellerRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateResellerRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_create_workspace_request.go b/azion-api/model_create_workspace_request.go new file mode 100644 index 0000000..ab1b0fd --- /dev/null +++ b/azion-api/model_create_workspace_request.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CreateWorkspaceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkspaceRequest{} + +// CreateWorkspaceRequest Mixin to validate parent-child relationships between different account types. Rules: - Brand: Can only have Reseller children and no parent - Reseller: Can only have Organization children and Brand parent - Organization: Can only have Workspace children and Reseller parent - Workspace: Cannot have children, parent must be an Organization +type CreateWorkspaceRequest struct { + Name string `json:"name"` + ParentId int64 `json:"parent_id"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _CreateWorkspaceRequest CreateWorkspaceRequest + +// NewCreateWorkspaceRequest instantiates a new CreateWorkspaceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkspaceRequest(name string, parentId int64, type_ string) *CreateWorkspaceRequest { + this := CreateWorkspaceRequest{} + this.Name = name + this.ParentId = parentId + this.Type = type_ + return &this +} + +// NewCreateWorkspaceRequestWithDefaults instantiates a new CreateWorkspaceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkspaceRequestWithDefaults() *CreateWorkspaceRequest { + this := CreateWorkspaceRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CreateWorkspaceRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateWorkspaceRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateWorkspaceRequest) SetName(v string) { + o.Name = v +} + +// GetParentId returns the ParentId field value +func (o *CreateWorkspaceRequest) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *CreateWorkspaceRequest) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *CreateWorkspaceRequest) SetParentId(v int64) { + o.ParentId = v +} + +// GetType returns the Type field value +func (o *CreateWorkspaceRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateWorkspaceRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateWorkspaceRequest) SetType(v string) { + o.Type = v +} + +func (o CreateWorkspaceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkspaceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *CreateWorkspaceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "parent_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateWorkspaceRequest := _CreateWorkspaceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateWorkspaceRequest) + + if err != nil { + return err + } + + *o = CreateWorkspaceRequest(varCreateWorkspaceRequest) + + return err +} + +type NullableCreateWorkspaceRequest struct { + value *CreateWorkspaceRequest + isSet bool +} + +func (v NullableCreateWorkspaceRequest) Get() *CreateWorkspaceRequest { + return v.value +} + +func (v *NullableCreateWorkspaceRequest) Set(val *CreateWorkspaceRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkspaceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkspaceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkspaceRequest(val *CreateWorkspaceRequest) *NullableCreateWorkspaceRequest { + return &NullableCreateWorkspaceRequest{value: val, isSet: true} +} + +func (v NullableCreateWorkspaceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkspaceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_credential.go b/azion-api/model_credential.go new file mode 100644 index 0000000..f60eb6d --- /dev/null +++ b/azion-api/model_credential.go @@ -0,0 +1,366 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Credential type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Credential{} + +// Credential struct for Credential +type Credential struct { + Name string `json:"name"` + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` + Capabilities []string `json:"capabilities"` + Buckets []string `json:"buckets"` + ExpirationDate *time.Time `json:"expiration_date,omitempty"` + LastEditor NullableString `json:"last_editor"` + LastModified time.Time `json:"last_modified"` +} + +type _Credential Credential + +// NewCredential instantiates a new Credential object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredential(name string, accessKey string, secretKey string, capabilities []string, buckets []string, lastEditor NullableString, lastModified time.Time) *Credential { + this := Credential{} + this.Name = name + this.AccessKey = accessKey + this.SecretKey = secretKey + this.Capabilities = capabilities + this.Buckets = buckets + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewCredentialWithDefaults instantiates a new Credential object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCredentialWithDefaults() *Credential { + this := Credential{} + return &this +} + +// GetName returns the Name field value +func (o *Credential) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Credential) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Credential) SetName(v string) { + o.Name = v +} + +// GetAccessKey returns the AccessKey field value +func (o *Credential) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *Credential) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *Credential) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *Credential) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *Credential) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *Credential) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetCapabilities returns the Capabilities field value +func (o *Credential) GetCapabilities() []string { + if o == nil { + var ret []string + return ret + } + + return o.Capabilities +} + +// GetCapabilitiesOk returns a tuple with the Capabilities field value +// and a boolean to check if the value has been set. +func (o *Credential) GetCapabilitiesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Capabilities, true +} + +// SetCapabilities sets field value +func (o *Credential) SetCapabilities(v []string) { + o.Capabilities = v +} + +// GetBuckets returns the Buckets field value +func (o *Credential) GetBuckets() []string { + if o == nil { + var ret []string + return ret + } + + return o.Buckets +} + +// GetBucketsOk returns a tuple with the Buckets field value +// and a boolean to check if the value has been set. +func (o *Credential) GetBucketsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Buckets, true +} + +// SetBuckets sets field value +func (o *Credential) SetBuckets(v []string) { + o.Buckets = v +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *Credential) GetExpirationDate() time.Time { + if o == nil || IsNil(o.ExpirationDate) { + var ret time.Time + return ret + } + return *o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Credential) GetExpirationDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *Credential) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +func (o *Credential) SetExpirationDate(v time.Time) { + o.ExpirationDate = &v +} + +// GetLastEditor returns the LastEditor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *Credential) GetLastEditor() string { + if o == nil || o.LastEditor.Get() == nil { + var ret string + return ret + } + + return *o.LastEditor.Get() +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Credential) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastEditor.Get(), o.LastEditor.IsSet() +} + +// SetLastEditor sets field value +func (o *Credential) SetLastEditor(v string) { + o.LastEditor.Set(&v) +} + +// GetLastModified returns the LastModified field value +func (o *Credential) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Credential) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Credential) SetLastModified(v time.Time) { + o.LastModified = v +} + +func (o Credential) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Credential) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + toSerialize["capabilities"] = o.Capabilities + toSerialize["buckets"] = o.Buckets + if !IsNil(o.ExpirationDate) { + toSerialize["expiration_date"] = o.ExpirationDate + } + toSerialize["last_editor"] = o.LastEditor.Get() + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *Credential) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "access_key", + "secret_key", + "capabilities", + "buckets", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCredential := _Credential{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCredential) + + if err != nil { + return err + } + + *o = Credential(varCredential) + + return err +} + +type NullableCredential struct { + value *Credential + isSet bool +} + +func (v NullableCredential) Get() *Credential { + return v.value +} + +func (v *NullableCredential) Set(val *Credential) { + v.value = val + v.isSet = true +} + +func (v NullableCredential) IsSet() bool { + return v.isSet +} + +func (v *NullableCredential) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredential(val *Credential) *NullableCredential { + return &NullableCredential{value: val, isSet: true} +} + +func (v NullableCredential) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredential) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_credential_create_request.go b/azion-api/model_credential_create_request.go new file mode 100644 index 0000000..1c7e472 --- /dev/null +++ b/azion-api/model_credential_create_request.go @@ -0,0 +1,261 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the CredentialCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialCreateRequest{} + +// CredentialCreateRequest struct for CredentialCreateRequest +type CredentialCreateRequest struct { + Name string `json:"name"` + Capabilities []string `json:"capabilities"` + // List of bucket names to associate with this credential. + Buckets []string `json:"buckets,omitempty"` + ExpirationDate *time.Time `json:"expiration_date,omitempty"` +} + +type _CredentialCreateRequest CredentialCreateRequest + +// NewCredentialCreateRequest instantiates a new CredentialCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredentialCreateRequest(name string, capabilities []string) *CredentialCreateRequest { + this := CredentialCreateRequest{} + this.Name = name + this.Capabilities = capabilities + return &this +} + +// NewCredentialCreateRequestWithDefaults instantiates a new CredentialCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCredentialCreateRequestWithDefaults() *CredentialCreateRequest { + this := CredentialCreateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CredentialCreateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CredentialCreateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CredentialCreateRequest) SetName(v string) { + o.Name = v +} + +// GetCapabilities returns the Capabilities field value +func (o *CredentialCreateRequest) GetCapabilities() []string { + if o == nil { + var ret []string + return ret + } + + return o.Capabilities +} + +// GetCapabilitiesOk returns a tuple with the Capabilities field value +// and a boolean to check if the value has been set. +func (o *CredentialCreateRequest) GetCapabilitiesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Capabilities, true +} + +// SetCapabilities sets field value +func (o *CredentialCreateRequest) SetCapabilities(v []string) { + o.Capabilities = v +} + +// GetBuckets returns the Buckets field value if set, zero value otherwise. +func (o *CredentialCreateRequest) GetBuckets() []string { + if o == nil || IsNil(o.Buckets) { + var ret []string + return ret + } + return o.Buckets +} + +// GetBucketsOk returns a tuple with the Buckets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialCreateRequest) GetBucketsOk() ([]string, bool) { + if o == nil || IsNil(o.Buckets) { + return nil, false + } + return o.Buckets, true +} + +// HasBuckets returns a boolean if a field has been set. +func (o *CredentialCreateRequest) HasBuckets() bool { + if o != nil && !IsNil(o.Buckets) { + return true + } + + return false +} + +// SetBuckets gets a reference to the given []string and assigns it to the Buckets field. +func (o *CredentialCreateRequest) SetBuckets(v []string) { + o.Buckets = v +} + +// GetExpirationDate returns the ExpirationDate field value if set, zero value otherwise. +func (o *CredentialCreateRequest) GetExpirationDate() time.Time { + if o == nil || IsNil(o.ExpirationDate) { + var ret time.Time + return ret + } + return *o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialCreateRequest) GetExpirationDateOk() (*time.Time, bool) { + if o == nil || IsNil(o.ExpirationDate) { + return nil, false + } + return o.ExpirationDate, true +} + +// HasExpirationDate returns a boolean if a field has been set. +func (o *CredentialCreateRequest) HasExpirationDate() bool { + if o != nil && !IsNil(o.ExpirationDate) { + return true + } + + return false +} + +// SetExpirationDate gets a reference to the given time.Time and assigns it to the ExpirationDate field. +func (o *CredentialCreateRequest) SetExpirationDate(v time.Time) { + o.ExpirationDate = &v +} + +func (o CredentialCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["capabilities"] = o.Capabilities + if !IsNil(o.Buckets) { + toSerialize["buckets"] = o.Buckets + } + if !IsNil(o.ExpirationDate) { + toSerialize["expiration_date"] = o.ExpirationDate + } + return toSerialize, nil +} + +func (o *CredentialCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "capabilities", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCredentialCreateRequest := _CredentialCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCredentialCreateRequest) + + if err != nil { + return err + } + + *o = CredentialCreateRequest(varCredentialCreateRequest) + + return err +} + +type NullableCredentialCreateRequest struct { + value *CredentialCreateRequest + isSet bool +} + +func (v NullableCredentialCreateRequest) Get() *CredentialCreateRequest { + return v.value +} + +func (v *NullableCredentialCreateRequest) Set(val *CredentialCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialCreateRequest(val *CredentialCreateRequest) *NullableCredentialCreateRequest { + return &NullableCredentialCreateRequest{value: val, isSet: true} +} + +func (v NullableCredentialCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_credential_response.go b/azion-api/model_credential_response.go new file mode 100644 index 0000000..e1c4090 --- /dev/null +++ b/azion-api/model_credential_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CredentialResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CredentialResponse{} + +// CredentialResponse struct for CredentialResponse +type CredentialResponse struct { + State *string `json:"state,omitempty"` + Data Credential `json:"data"` +} + +type _CredentialResponse CredentialResponse + +// NewCredentialResponse instantiates a new CredentialResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredentialResponse(data Credential) *CredentialResponse { + this := CredentialResponse{} + this.Data = data + return &this +} + +// NewCredentialResponseWithDefaults instantiates a new CredentialResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCredentialResponseWithDefaults() *CredentialResponse { + this := CredentialResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *CredentialResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CredentialResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *CredentialResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *CredentialResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *CredentialResponse) GetData() Credential { + if o == nil { + var ret Credential + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *CredentialResponse) GetDataOk() (*Credential, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *CredentialResponse) SetData(v Credential) { + o.Data = v +} + +func (o CredentialResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CredentialResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *CredentialResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCredentialResponse := _CredentialResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCredentialResponse) + + if err != nil { + return err + } + + *o = CredentialResponse(varCredentialResponse) + + return err +} + +type NullableCredentialResponse struct { + value *CredentialResponse + isSet bool +} + +func (v NullableCredentialResponse) Get() *CredentialResponse { + return v.value +} + +func (v *NullableCredentialResponse) Set(val *CredentialResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCredentialResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCredentialResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredentialResponse(val *CredentialResponse) *NullableCredentialResponse { + return &NullableCredentialResponse{value: val, isSet: true} +} + +func (v NullableCredentialResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredentialResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_credit.go b/azion-api/model_credit.go new file mode 100644 index 0000000..51f83bd --- /dev/null +++ b/azion-api/model_credit.go @@ -0,0 +1,355 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Credit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Credit{} + +// Credit struct for Credit +type Credit struct { + Amount float64 `json:"amount"` + ClientId string `json:"client_id"` + Currency string `json:"currency"` + EntryType string `json:"entry_type"` + ExpirationDate string `json:"expiration_date"` + Created string `json:"created"` + CustomerStripeId string `json:"customer_stripe_id"` + Description string `json:"description"` +} + +type _Credit Credit + +// NewCredit instantiates a new Credit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCredit(amount float64, clientId string, currency string, entryType string, expirationDate string, created string, customerStripeId string, description string) *Credit { + this := Credit{} + this.Amount = amount + this.ClientId = clientId + this.Currency = currency + this.EntryType = entryType + this.ExpirationDate = expirationDate + this.Created = created + this.CustomerStripeId = customerStripeId + this.Description = description + return &this +} + +// NewCreditWithDefaults instantiates a new Credit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreditWithDefaults() *Credit { + this := Credit{} + return &this +} + +// GetAmount returns the Amount field value +func (o *Credit) GetAmount() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *Credit) GetAmountOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *Credit) SetAmount(v float64) { + o.Amount = v +} + +// GetClientId returns the ClientId field value +func (o *Credit) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *Credit) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *Credit) SetClientId(v string) { + o.ClientId = v +} + +// GetCurrency returns the Currency field value +func (o *Credit) GetCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.Currency +} + +// GetCurrencyOk returns a tuple with the Currency field value +// and a boolean to check if the value has been set. +func (o *Credit) GetCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Currency, true +} + +// SetCurrency sets field value +func (o *Credit) SetCurrency(v string) { + o.Currency = v +} + +// GetEntryType returns the EntryType field value +func (o *Credit) GetEntryType() string { + if o == nil { + var ret string + return ret + } + + return o.EntryType +} + +// GetEntryTypeOk returns a tuple with the EntryType field value +// and a boolean to check if the value has been set. +func (o *Credit) GetEntryTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.EntryType, true +} + +// SetEntryType sets field value +func (o *Credit) SetEntryType(v string) { + o.EntryType = v +} + +// GetExpirationDate returns the ExpirationDate field value +func (o *Credit) GetExpirationDate() string { + if o == nil { + var ret string + return ret + } + + return o.ExpirationDate +} + +// GetExpirationDateOk returns a tuple with the ExpirationDate field value +// and a boolean to check if the value has been set. +func (o *Credit) GetExpirationDateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExpirationDate, true +} + +// SetExpirationDate sets field value +func (o *Credit) SetExpirationDate(v string) { + o.ExpirationDate = v +} + +// GetCreated returns the Created field value +func (o *Credit) GetCreated() string { + if o == nil { + var ret string + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Credit) GetCreatedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Credit) SetCreated(v string) { + o.Created = v +} + +// GetCustomerStripeId returns the CustomerStripeId field value +func (o *Credit) GetCustomerStripeId() string { + if o == nil { + var ret string + return ret + } + + return o.CustomerStripeId +} + +// GetCustomerStripeIdOk returns a tuple with the CustomerStripeId field value +// and a boolean to check if the value has been set. +func (o *Credit) GetCustomerStripeIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CustomerStripeId, true +} + +// SetCustomerStripeId sets field value +func (o *Credit) SetCustomerStripeId(v string) { + o.CustomerStripeId = v +} + +// GetDescription returns the Description field value +func (o *Credit) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Credit) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *Credit) SetDescription(v string) { + o.Description = v +} + +func (o Credit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Credit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + toSerialize["client_id"] = o.ClientId + toSerialize["currency"] = o.Currency + toSerialize["entry_type"] = o.EntryType + toSerialize["expiration_date"] = o.ExpirationDate + toSerialize["created"] = o.Created + toSerialize["customer_stripe_id"] = o.CustomerStripeId + toSerialize["description"] = o.Description + return toSerialize, nil +} + +func (o *Credit) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "client_id", + "currency", + "entry_type", + "expiration_date", + "created", + "customer_stripe_id", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCredit := _Credit{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCredit) + + if err != nil { + return err + } + + *o = Credit(varCredit) + + return err +} + +type NullableCredit struct { + value *Credit + isSet bool +} + +func (v NullableCredit) Get() *Credit { + return v.value +} + +func (v *NullableCredit) Set(val *Credit) { + v.value = val + v.isSet = true +} + +func (v NullableCredit) IsSet() bool { + return v.isSet +} + +func (v *NullableCredit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCredit(val *Credit) *NullableCredit { + return &NullableCredit{value: val, isSet: true} +} + +func (v NullableCredit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCredit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_credit_request.go b/azion-api/model_credit_request.go new file mode 100644 index 0000000..bb5441a --- /dev/null +++ b/azion-api/model_credit_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CreditRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreditRequest{} + +// CreditRequest struct for CreditRequest +type CreditRequest struct { + Amount float64 `json:"amount"` +} + +type _CreditRequest CreditRequest + +// NewCreditRequest instantiates a new CreditRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreditRequest(amount float64) *CreditRequest { + this := CreditRequest{} + this.Amount = amount + return &this +} + +// NewCreditRequestWithDefaults instantiates a new CreditRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreditRequestWithDefaults() *CreditRequest { + this := CreditRequest{} + return &this +} + +// GetAmount returns the Amount field value +func (o *CreditRequest) GetAmount() float64 { + if o == nil { + var ret float64 + return ret + } + + return o.Amount +} + +// GetAmountOk returns a tuple with the Amount field value +// and a boolean to check if the value has been set. +func (o *CreditRequest) GetAmountOk() (*float64, bool) { + if o == nil { + return nil, false + } + return &o.Amount, true +} + +// SetAmount sets field value +func (o *CreditRequest) SetAmount(v float64) { + o.Amount = v +} + +func (o CreditRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreditRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount"] = o.Amount + return toSerialize, nil +} + +func (o *CreditRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreditRequest := _CreditRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreditRequest) + + if err != nil { + return err + } + + *o = CreditRequest(varCreditRequest) + + return err +} + +type NullableCreditRequest struct { + value *CreditRequest + isSet bool +} + +func (v NullableCreditRequest) Get() *CreditRequest { + return v.value +} + +func (v *NullableCreditRequest) Set(val *CreditRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreditRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreditRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreditRequest(val *CreditRequest) *NullableCreditRequest { + return &NullableCreditRequest{value: val, isSet: true} +} + +func (v NullableCreditRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreditRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_custom_page.go b/azion-api/model_custom_page.go new file mode 100644 index 0000000..29f01d3 --- /dev/null +++ b/azion-api/model_custom_page.go @@ -0,0 +1,336 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the CustomPage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomPage{} + +// CustomPage struct for CustomPage +type CustomPage struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + ProductVersion string `json:"product_version"` + Pages []Page `json:"pages"` +} + +type _CustomPage CustomPage + +// NewCustomPage instantiates a new CustomPage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCustomPage(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, pages []Page) *CustomPage { + this := CustomPage{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + this.Pages = pages + return &this +} + +// NewCustomPageWithDefaults instantiates a new CustomPage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCustomPageWithDefaults() *CustomPage { + this := CustomPage{} + return &this +} + +// GetId returns the Id field value +func (o *CustomPage) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CustomPage) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CustomPage) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CustomPage) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CustomPage) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CustomPage) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *CustomPage) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *CustomPage) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *CustomPage) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *CustomPage) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *CustomPage) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *CustomPage) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *CustomPage) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPage) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *CustomPage) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *CustomPage) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value +func (o *CustomPage) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *CustomPage) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *CustomPage) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetPages returns the Pages field value +func (o *CustomPage) GetPages() []Page { + if o == nil { + var ret []Page + return ret + } + + return o.Pages +} + +// GetPagesOk returns a tuple with the Pages field value +// and a boolean to check if the value has been set. +func (o *CustomPage) GetPagesOk() ([]Page, bool) { + if o == nil { + return nil, false + } + return o.Pages, true +} + +// SetPages sets field value +func (o *CustomPage) SetPages(v []Page) { + o.Pages = v +} + +func (o CustomPage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomPage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["product_version"] = o.ProductVersion + toSerialize["pages"] = o.Pages + return toSerialize, nil +} + +func (o *CustomPage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + "pages", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomPage := _CustomPage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCustomPage) + + if err != nil { + return err + } + + *o = CustomPage(varCustomPage) + + return err +} + +type NullableCustomPage struct { + value *CustomPage + isSet bool +} + +func (v NullableCustomPage) Get() *CustomPage { + return v.value +} + +func (v *NullableCustomPage) Set(val *CustomPage) { + v.value = val + v.isSet = true +} + +func (v NullableCustomPage) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomPage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomPage(val *CustomPage) *NullableCustomPage { + return &NullableCustomPage{value: val, isSet: true} +} + +func (v NullableCustomPage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomPage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_custom_page_request.go b/azion-api/model_custom_page_request.go new file mode 100644 index 0000000..600db6d --- /dev/null +++ b/azion-api/model_custom_page_request.go @@ -0,0 +1,223 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CustomPageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomPageRequest{} + +// CustomPageRequest struct for CustomPageRequest +type CustomPageRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Pages []PageRequest `json:"pages"` +} + +type _CustomPageRequest CustomPageRequest + +// NewCustomPageRequest instantiates a new CustomPageRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCustomPageRequest(name string, pages []PageRequest) *CustomPageRequest { + this := CustomPageRequest{} + this.Name = name + this.Pages = pages + return &this +} + +// NewCustomPageRequestWithDefaults instantiates a new CustomPageRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCustomPageRequestWithDefaults() *CustomPageRequest { + this := CustomPageRequest{} + return &this +} + +// GetName returns the Name field value +func (o *CustomPageRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CustomPageRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CustomPageRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *CustomPageRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPageRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *CustomPageRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *CustomPageRequest) SetActive(v bool) { + o.Active = &v +} + +// GetPages returns the Pages field value +func (o *CustomPageRequest) GetPages() []PageRequest { + if o == nil { + var ret []PageRequest + return ret + } + + return o.Pages +} + +// GetPagesOk returns a tuple with the Pages field value +// and a boolean to check if the value has been set. +func (o *CustomPageRequest) GetPagesOk() ([]PageRequest, bool) { + if o == nil { + return nil, false + } + return o.Pages, true +} + +// SetPages sets field value +func (o *CustomPageRequest) SetPages(v []PageRequest) { + o.Pages = v +} + +func (o CustomPageRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomPageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["pages"] = o.Pages + return toSerialize, nil +} + +func (o *CustomPageRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "pages", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomPageRequest := _CustomPageRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCustomPageRequest) + + if err != nil { + return err + } + + *o = CustomPageRequest(varCustomPageRequest) + + return err +} + +type NullableCustomPageRequest struct { + value *CustomPageRequest + isSet bool +} + +func (v NullableCustomPageRequest) Get() *CustomPageRequest { + return v.value +} + +func (v *NullableCustomPageRequest) Set(val *CustomPageRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCustomPageRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomPageRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomPageRequest(val *CustomPageRequest) *NullableCustomPageRequest { + return &NullableCustomPageRequest{value: val, isSet: true} +} + +func (v NullableCustomPageRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomPageRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_custom_page_response.go b/azion-api/model_custom_page_response.go new file mode 100644 index 0000000..7c2f310 --- /dev/null +++ b/azion-api/model_custom_page_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the CustomPageResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CustomPageResponse{} + +// CustomPageResponse struct for CustomPageResponse +type CustomPageResponse struct { + State *string `json:"state,omitempty"` + Data CustomPage `json:"data"` +} + +type _CustomPageResponse CustomPageResponse + +// NewCustomPageResponse instantiates a new CustomPageResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCustomPageResponse(data CustomPage) *CustomPageResponse { + this := CustomPageResponse{} + this.Data = data + return &this +} + +// NewCustomPageResponseWithDefaults instantiates a new CustomPageResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCustomPageResponseWithDefaults() *CustomPageResponse { + this := CustomPageResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *CustomPageResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomPageResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *CustomPageResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *CustomPageResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *CustomPageResponse) GetData() CustomPage { + if o == nil { + var ret CustomPage + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *CustomPageResponse) GetDataOk() (*CustomPage, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *CustomPageResponse) SetData(v CustomPage) { + o.Data = v +} + +func (o CustomPageResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CustomPageResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *CustomPageResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomPageResponse := _CustomPageResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCustomPageResponse) + + if err != nil { + return err + } + + *o = CustomPageResponse(varCustomPageResponse) + + return err +} + +type NullableCustomPageResponse struct { + value *CustomPageResponse + isSet bool +} + +func (v NullableCustomPageResponse) Get() *CustomPageResponse { + return v.value +} + +func (v *NullableCustomPageResponse) Set(val *CustomPageResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCustomPageResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCustomPageResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCustomPageResponse(val *CustomPageResponse) *NullableCustomPageResponse { + return &NullableCustomPageResponse{value: val, isSet: true} +} + +func (v NullableCustomPageResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCustomPageResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_dashboard.go b/azion-api/model_dashboard.go new file mode 100644 index 0000000..ad56ba1 --- /dev/null +++ b/azion-api/model_dashboard.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Dashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Dashboard{} + +// Dashboard struct for Dashboard +type Dashboard struct { + Id int64 `json:"id"` + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` + FolderId int64 `json:"folder_id"` +} + +type _Dashboard Dashboard + +// NewDashboard instantiates a new Dashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboard(id int64, name string, scope string, folderId int64) *Dashboard { + this := Dashboard{} + this.Id = id + this.Name = name + this.Scope = scope + this.FolderId = folderId + return &this +} + +// NewDashboardWithDefaults instantiates a new Dashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardWithDefaults() *Dashboard { + this := Dashboard{} + return &this +} + +// GetId returns the Id field value +func (o *Dashboard) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Dashboard) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Dashboard) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Dashboard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Dashboard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Dashboard) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *Dashboard) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *Dashboard) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *Dashboard) SetScope(v string) { + o.Scope = v +} + +// GetFolderId returns the FolderId field value +func (o *Dashboard) GetFolderId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.FolderId +} + +// GetFolderIdOk returns a tuple with the FolderId field value +// and a boolean to check if the value has been set. +func (o *Dashboard) GetFolderIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FolderId, true +} + +// SetFolderId sets field value +func (o *Dashboard) SetFolderId(v int64) { + o.FolderId = v +} + +func (o Dashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Dashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + toSerialize["folder_id"] = o.FolderId + return toSerialize, nil +} + +func (o *Dashboard) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "scope", + "folder_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDashboard := _Dashboard{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDashboard) + + if err != nil { + return err + } + + *o = Dashboard(varDashboard) + + return err +} + +type NullableDashboard struct { + value *Dashboard + isSet bool +} + +func (v NullableDashboard) Get() *Dashboard { + return v.value +} + +func (v *NullableDashboard) Set(val *Dashboard) { + v.value = val + v.isSet = true +} + +func (v NullableDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboard(val *Dashboard) *NullableDashboard { + return &NullableDashboard{value: val, isSet: true} +} + +func (v NullableDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_dashboard_request.go b/azion-api/model_dashboard_request.go new file mode 100644 index 0000000..ec3fde6 --- /dev/null +++ b/azion-api/model_dashboard_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DashboardRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DashboardRequest{} + +// DashboardRequest struct for DashboardRequest +type DashboardRequest struct { + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` +} + +type _DashboardRequest DashboardRequest + +// NewDashboardRequest instantiates a new DashboardRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDashboardRequest(name string, scope string) *DashboardRequest { + this := DashboardRequest{} + this.Name = name + this.Scope = scope + return &this +} + +// NewDashboardRequestWithDefaults instantiates a new DashboardRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDashboardRequestWithDefaults() *DashboardRequest { + this := DashboardRequest{} + return &this +} + +// GetName returns the Name field value +func (o *DashboardRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DashboardRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DashboardRequest) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *DashboardRequest) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *DashboardRequest) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *DashboardRequest) SetScope(v string) { + o.Scope = v +} + +func (o DashboardRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DashboardRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + return toSerialize, nil +} + +func (o *DashboardRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "scope", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDashboardRequest := _DashboardRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDashboardRequest) + + if err != nil { + return err + } + + *o = DashboardRequest(varDashboardRequest) + + return err +} + +type NullableDashboardRequest struct { + value *DashboardRequest + isSet bool +} + +func (v NullableDashboardRequest) Get() *DashboardRequest { + return v.value +} + +func (v *NullableDashboardRequest) Set(val *DashboardRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDashboardRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDashboardRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDashboardRequest(val *DashboardRequest) *NullableDashboardRequest { + return &NullableDashboardRequest{value: val, isSet: true} +} + +func (v NullableDashboardRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDashboardRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_data_source.go b/azion-api/model_data_source.go new file mode 100644 index 0000000..e087c1b --- /dev/null +++ b/azion-api/model_data_source.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DataSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataSource{} + +// DataSource struct for DataSource +type DataSource struct { + Slug string `json:"slug"` + Name string `json:"name"` + Active bool `json:"active"` +} + +type _DataSource DataSource + +// NewDataSource instantiates a new DataSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataSource(slug string, name string, active bool) *DataSource { + this := DataSource{} + this.Slug = slug + this.Name = name + this.Active = active + return &this +} + +// NewDataSourceWithDefaults instantiates a new DataSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDataSourceWithDefaults() *DataSource { + this := DataSource{} + return &this +} + +// GetSlug returns the Slug field value +func (o *DataSource) GetSlug() string { + if o == nil { + var ret string + return ret + } + + return o.Slug +} + +// GetSlugOk returns a tuple with the Slug field value +// and a boolean to check if the value has been set. +func (o *DataSource) GetSlugOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Slug, true +} + +// SetSlug sets field value +func (o *DataSource) SetSlug(v string) { + o.Slug = v +} + +// GetName returns the Name field value +func (o *DataSource) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DataSource) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DataSource) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *DataSource) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *DataSource) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *DataSource) SetActive(v bool) { + o.Active = v +} + +func (o DataSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["slug"] = o.Slug + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + return toSerialize, nil +} + +func (o *DataSource) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "slug", + "name", + "active", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataSource := _DataSource{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataSource) + + if err != nil { + return err + } + + *o = DataSource(varDataSource) + + return err +} + +type NullableDataSource struct { + value *DataSource + isSet bool +} + +func (v NullableDataSource) Get() *DataSource { + return v.value +} + +func (v *NullableDataSource) Set(val *DataSource) { + v.value = val + v.isSet = true +} + +func (v NullableDataSource) IsSet() bool { + return v.isSet +} + +func (v *NullableDataSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataSource(val *DataSource) *NullableDataSource { + return &NullableDataSource{value: val, isSet: true} +} + +func (v NullableDataSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_data_stream.go b/azion-api/model_data_stream.go new file mode 100644 index 0000000..ac74aa3 --- /dev/null +++ b/azion-api/model_data_stream.go @@ -0,0 +1,392 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the DataStream type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataStream{} + +// DataStream struct for DataStream +type DataStream struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ProductVersion string `json:"product_version"` + Active *bool `json:"active,omitempty"` + Inputs []InputInputDataSourceAttributes `json:"inputs"` + Transform []Transform `json:"transform"` + Outputs []Output `json:"outputs"` +} + +type _DataStream DataStream + +// NewDataStream instantiates a new DataStream object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataStream(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, inputs []InputInputDataSourceAttributes, transform []Transform, outputs []Output) *DataStream { + this := DataStream{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + this.Inputs = inputs + this.Transform = transform + this.Outputs = outputs + return &this +} + +// NewDataStreamWithDefaults instantiates a new DataStream object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDataStreamWithDefaults() *DataStream { + this := DataStream{} + return &this +} + +// GetId returns the Id field value +func (o *DataStream) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DataStream) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DataStream) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DataStream) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *DataStream) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *DataStream) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *DataStream) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *DataStream) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *DataStream) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *DataStream) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *DataStream) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataStream) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *DataStream) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *DataStream) SetActive(v bool) { + o.Active = &v +} + +// GetInputs returns the Inputs field value +func (o *DataStream) GetInputs() []InputInputDataSourceAttributes { + if o == nil { + var ret []InputInputDataSourceAttributes + return ret + } + + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetInputsOk() ([]InputInputDataSourceAttributes, bool) { + if o == nil { + return nil, false + } + return o.Inputs, true +} + +// SetInputs sets field value +func (o *DataStream) SetInputs(v []InputInputDataSourceAttributes) { + o.Inputs = v +} + +// GetTransform returns the Transform field value +func (o *DataStream) GetTransform() []Transform { + if o == nil { + var ret []Transform + return ret + } + + return o.Transform +} + +// GetTransformOk returns a tuple with the Transform field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetTransformOk() ([]Transform, bool) { + if o == nil { + return nil, false + } + return o.Transform, true +} + +// SetTransform sets field value +func (o *DataStream) SetTransform(v []Transform) { + o.Transform = v +} + +// GetOutputs returns the Outputs field value +func (o *DataStream) GetOutputs() []Output { + if o == nil { + var ret []Output + return ret + } + + return o.Outputs +} + +// GetOutputsOk returns a tuple with the Outputs field value +// and a boolean to check if the value has been set. +func (o *DataStream) GetOutputsOk() ([]Output, bool) { + if o == nil { + return nil, false + } + return o.Outputs, true +} + +// SetOutputs sets field value +func (o *DataStream) SetOutputs(v []Output) { + o.Outputs = v +} + +func (o DataStream) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataStream) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["product_version"] = o.ProductVersion + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["inputs"] = o.Inputs + toSerialize["transform"] = o.Transform + toSerialize["outputs"] = o.Outputs + return toSerialize, nil +} + +func (o *DataStream) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + "inputs", + "transform", + "outputs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataStream := _DataStream{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataStream) + + if err != nil { + return err + } + + *o = DataStream(varDataStream) + + return err +} + +type NullableDataStream struct { + value *DataStream + isSet bool +} + +func (v NullableDataStream) Get() *DataStream { + return v.value +} + +func (v *NullableDataStream) Set(val *DataStream) { + v.value = val + v.isSet = true +} + +func (v NullableDataStream) IsSet() bool { + return v.isSet +} + +func (v *NullableDataStream) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataStream(val *DataStream) *NullableDataStream { + return &NullableDataStream{value: val, isSet: true} +} + +func (v NullableDataStream) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataStream) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_data_stream_request.go b/azion-api/model_data_stream_request.go new file mode 100644 index 0000000..b385d47 --- /dev/null +++ b/azion-api/model_data_stream_request.go @@ -0,0 +1,279 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DataStreamRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataStreamRequest{} + +// DataStreamRequest struct for DataStreamRequest +type DataStreamRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Inputs []InputInputDataSourceAttributesRequest `json:"inputs"` + Transform []TransformRequest `json:"transform"` + Outputs []OutputRequest `json:"outputs"` +} + +type _DataStreamRequest DataStreamRequest + +// NewDataStreamRequest instantiates a new DataStreamRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataStreamRequest(name string, inputs []InputInputDataSourceAttributesRequest, transform []TransformRequest, outputs []OutputRequest) *DataStreamRequest { + this := DataStreamRequest{} + this.Name = name + this.Inputs = inputs + this.Transform = transform + this.Outputs = outputs + return &this +} + +// NewDataStreamRequestWithDefaults instantiates a new DataStreamRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDataStreamRequestWithDefaults() *DataStreamRequest { + this := DataStreamRequest{} + return &this +} + +// GetName returns the Name field value +func (o *DataStreamRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DataStreamRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DataStreamRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *DataStreamRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataStreamRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *DataStreamRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *DataStreamRequest) SetActive(v bool) { + o.Active = &v +} + +// GetInputs returns the Inputs field value +func (o *DataStreamRequest) GetInputs() []InputInputDataSourceAttributesRequest { + if o == nil { + var ret []InputInputDataSourceAttributesRequest + return ret + } + + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *DataStreamRequest) GetInputsOk() ([]InputInputDataSourceAttributesRequest, bool) { + if o == nil { + return nil, false + } + return o.Inputs, true +} + +// SetInputs sets field value +func (o *DataStreamRequest) SetInputs(v []InputInputDataSourceAttributesRequest) { + o.Inputs = v +} + +// GetTransform returns the Transform field value +func (o *DataStreamRequest) GetTransform() []TransformRequest { + if o == nil { + var ret []TransformRequest + return ret + } + + return o.Transform +} + +// GetTransformOk returns a tuple with the Transform field value +// and a boolean to check if the value has been set. +func (o *DataStreamRequest) GetTransformOk() ([]TransformRequest, bool) { + if o == nil { + return nil, false + } + return o.Transform, true +} + +// SetTransform sets field value +func (o *DataStreamRequest) SetTransform(v []TransformRequest) { + o.Transform = v +} + +// GetOutputs returns the Outputs field value +func (o *DataStreamRequest) GetOutputs() []OutputRequest { + if o == nil { + var ret []OutputRequest + return ret + } + + return o.Outputs +} + +// GetOutputsOk returns a tuple with the Outputs field value +// and a boolean to check if the value has been set. +func (o *DataStreamRequest) GetOutputsOk() ([]OutputRequest, bool) { + if o == nil { + return nil, false + } + return o.Outputs, true +} + +// SetOutputs sets field value +func (o *DataStreamRequest) SetOutputs(v []OutputRequest) { + o.Outputs = v +} + +func (o DataStreamRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataStreamRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["inputs"] = o.Inputs + toSerialize["transform"] = o.Transform + toSerialize["outputs"] = o.Outputs + return toSerialize, nil +} + +func (o *DataStreamRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "inputs", + "transform", + "outputs", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataStreamRequest := _DataStreamRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataStreamRequest) + + if err != nil { + return err + } + + *o = DataStreamRequest(varDataStreamRequest) + + return err +} + +type NullableDataStreamRequest struct { + value *DataStreamRequest + isSet bool +} + +func (v NullableDataStreamRequest) Get() *DataStreamRequest { + return v.value +} + +func (v *NullableDataStreamRequest) Set(val *DataStreamRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDataStreamRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDataStreamRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataStreamRequest(val *DataStreamRequest) *NullableDataStreamRequest { + return &NullableDataStreamRequest{value: val, isSet: true} +} + +func (v NullableDataStreamRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataStreamRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_data_stream_response.go b/azion-api/model_data_stream_response.go new file mode 100644 index 0000000..5c1dbfe --- /dev/null +++ b/azion-api/model_data_stream_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DataStreamResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataStreamResponse{} + +// DataStreamResponse struct for DataStreamResponse +type DataStreamResponse struct { + State *string `json:"state,omitempty"` + Data DataStream `json:"data"` +} + +type _DataStreamResponse DataStreamResponse + +// NewDataStreamResponse instantiates a new DataStreamResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDataStreamResponse(data DataStream) *DataStreamResponse { + this := DataStreamResponse{} + this.Data = data + return &this +} + +// NewDataStreamResponseWithDefaults instantiates a new DataStreamResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDataStreamResponseWithDefaults() *DataStreamResponse { + this := DataStreamResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *DataStreamResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataStreamResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *DataStreamResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *DataStreamResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *DataStreamResponse) GetData() DataStream { + if o == nil { + var ret DataStream + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *DataStreamResponse) GetDataOk() (*DataStream, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *DataStreamResponse) SetData(v DataStream) { + o.Data = v +} + +func (o DataStreamResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataStreamResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *DataStreamResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDataStreamResponse := _DataStreamResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDataStreamResponse) + + if err != nil { + return err + } + + *o = DataStreamResponse(varDataStreamResponse) + + return err +} + +type NullableDataStreamResponse struct { + value *DataStreamResponse + isSet bool +} + +func (v NullableDataStreamResponse) Get() *DataStreamResponse { + return v.value +} + +func (v *NullableDataStreamResponse) Set(val *DataStreamResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDataStreamResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDataStreamResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataStreamResponse(val *DataStreamResponse) *NullableDataStreamResponse { + return &NullableDataStreamResponse{value: val, isSet: true} +} + +func (v NullableDataStreamResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataStreamResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_database_detail.go b/azion-api/model_database_detail.go new file mode 100644 index 0000000..71753f9 --- /dev/null +++ b/azion-api/model_database_detail.go @@ -0,0 +1,345 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the DatabaseDetail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseDetail{} + +// DatabaseDetail Detailed database representation with extended status information. +type DatabaseDetail struct { + // Unique identifier for the database + Id int64 `json:"id"` + // Name of the database + Name string `json:"name"` + // Current status of the database * `creating` - creating * `created` - created * `deleting` - deleting + Status string `json:"status"` + // Whether the database is active + Active *bool `json:"active,omitempty"` + // Last modification timestamp + LastModified time.Time `json:"last_modified"` + // Last editor of the schema. + LastEditor NullableString `json:"last_editor"` + // Product version + ProductVersion string `json:"product_version"` +} + +type _DatabaseDetail DatabaseDetail + +// NewDatabaseDetail instantiates a new DatabaseDetail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatabaseDetail(id int64, name string, status string, lastModified time.Time, lastEditor NullableString, productVersion string) *DatabaseDetail { + this := DatabaseDetail{} + this.Id = id + this.Name = name + this.Status = status + this.LastModified = lastModified + this.LastEditor = lastEditor + this.ProductVersion = productVersion + return &this +} + +// NewDatabaseDetailWithDefaults instantiates a new DatabaseDetail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatabaseDetailWithDefaults() *DatabaseDetail { + this := DatabaseDetail{} + return &this +} + +// GetId returns the Id field value +func (o *DatabaseDetail) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DatabaseDetail) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DatabaseDetail) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DatabaseDetail) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatabaseDetail) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatabaseDetail) SetName(v string) { + o.Name = v +} + +// GetStatus returns the Status field value +func (o *DatabaseDetail) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DatabaseDetail) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DatabaseDetail) SetStatus(v string) { + o.Status = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *DatabaseDetail) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseDetail) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *DatabaseDetail) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *DatabaseDetail) SetActive(v bool) { + o.Active = &v +} + +// GetLastModified returns the LastModified field value +func (o *DatabaseDetail) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *DatabaseDetail) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *DatabaseDetail) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetLastEditor returns the LastEditor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DatabaseDetail) GetLastEditor() string { + if o == nil || o.LastEditor.Get() == nil { + var ret string + return ret + } + + return *o.LastEditor.Get() +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DatabaseDetail) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastEditor.Get(), o.LastEditor.IsSet() +} + +// SetLastEditor sets field value +func (o *DatabaseDetail) SetLastEditor(v string) { + o.LastEditor.Set(&v) +} + +// GetProductVersion returns the ProductVersion field value +func (o *DatabaseDetail) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *DatabaseDetail) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *DatabaseDetail) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o DatabaseDetail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseDetail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["status"] = o.Status + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_modified"] = o.LastModified + toSerialize["last_editor"] = o.LastEditor.Get() + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *DatabaseDetail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "status", + "last_modified", + "last_editor", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatabaseDetail := _DatabaseDetail{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatabaseDetail) + + if err != nil { + return err + } + + *o = DatabaseDetail(varDatabaseDetail) + + return err +} + +type NullableDatabaseDetail struct { + value *DatabaseDetail + isSet bool +} + +func (v NullableDatabaseDetail) Get() *DatabaseDetail { + return v.value +} + +func (v *NullableDatabaseDetail) Set(val *DatabaseDetail) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseDetail) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseDetail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseDetail(val *DatabaseDetail) *NullableDatabaseDetail { + return &NullableDatabaseDetail{value: val, isSet: true} +} + +func (v NullableDatabaseDetail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseDetail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_database_detail_response.go b/azion-api/model_database_detail_response.go new file mode 100644 index 0000000..bfaba46 --- /dev/null +++ b/azion-api/model_database_detail_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DatabaseDetailResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseDetailResponse{} + +// DatabaseDetailResponse struct for DatabaseDetailResponse +type DatabaseDetailResponse struct { + State *string `json:"state,omitempty"` + Data DatabaseDetail `json:"data"` +} + +type _DatabaseDetailResponse DatabaseDetailResponse + +// NewDatabaseDetailResponse instantiates a new DatabaseDetailResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatabaseDetailResponse(data DatabaseDetail) *DatabaseDetailResponse { + this := DatabaseDetailResponse{} + this.Data = data + return &this +} + +// NewDatabaseDetailResponseWithDefaults instantiates a new DatabaseDetailResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatabaseDetailResponseWithDefaults() *DatabaseDetailResponse { + this := DatabaseDetailResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *DatabaseDetailResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseDetailResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *DatabaseDetailResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *DatabaseDetailResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *DatabaseDetailResponse) GetData() DatabaseDetail { + if o == nil { + var ret DatabaseDetail + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *DatabaseDetailResponse) GetDataOk() (*DatabaseDetail, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *DatabaseDetailResponse) SetData(v DatabaseDetail) { + o.Data = v +} + +func (o DatabaseDetailResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseDetailResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *DatabaseDetailResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatabaseDetailResponse := _DatabaseDetailResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatabaseDetailResponse) + + if err != nil { + return err + } + + *o = DatabaseDetailResponse(varDatabaseDetailResponse) + + return err +} + +type NullableDatabaseDetailResponse struct { + value *DatabaseDetailResponse + isSet bool +} + +func (v NullableDatabaseDetailResponse) Get() *DatabaseDetailResponse { + return v.value +} + +func (v *NullableDatabaseDetailResponse) Set(val *DatabaseDetailResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseDetailResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseDetailResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseDetailResponse(val *DatabaseDetailResponse) *NullableDatabaseDetailResponse { + return &NullableDatabaseDetailResponse{value: val, isSet: true} +} + +func (v NullableDatabaseDetailResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseDetailResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_database_request.go b/azion-api/model_database_request.go new file mode 100644 index 0000000..144704b --- /dev/null +++ b/azion-api/model_database_request.go @@ -0,0 +1,197 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DatabaseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatabaseRequest{} + +// DatabaseRequest struct for DatabaseRequest +type DatabaseRequest struct { + // Name of the database + Name string `json:"name"` + // Whether the database is active + Active *bool `json:"active,omitempty"` +} + +type _DatabaseRequest DatabaseRequest + +// NewDatabaseRequest instantiates a new DatabaseRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatabaseRequest(name string) *DatabaseRequest { + this := DatabaseRequest{} + this.Name = name + return &this +} + +// NewDatabaseRequestWithDefaults instantiates a new DatabaseRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatabaseRequestWithDefaults() *DatabaseRequest { + this := DatabaseRequest{} + return &this +} + +// GetName returns the Name field value +func (o *DatabaseRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DatabaseRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DatabaseRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *DatabaseRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DatabaseRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *DatabaseRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *DatabaseRequest) SetActive(v bool) { + o.Active = &v +} + +func (o DatabaseRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatabaseRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *DatabaseRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatabaseRequest := _DatabaseRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatabaseRequest) + + if err != nil { + return err + } + + *o = DatabaseRequest(varDatabaseRequest) + + return err +} + +type NullableDatabaseRequest struct { + value *DatabaseRequest + isSet bool +} + +func (v NullableDatabaseRequest) Get() *DatabaseRequest { + return v.value +} + +func (v *NullableDatabaseRequest) Set(val *DatabaseRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatabaseRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatabaseRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatabaseRequest(val *DatabaseRequest) *NullableDatabaseRequest { + return &NullableDatabaseRequest{value: val, isSet: true} +} + +func (v NullableDatabaseRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatabaseRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_datadog_endpoint.go b/azion-api/model_datadog_endpoint.go new file mode 100644 index 0000000..81eaffb --- /dev/null +++ b/azion-api/model_datadog_endpoint.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DatadogEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatadogEndpoint{} + +// DatadogEndpoint struct for DatadogEndpoint +type DatadogEndpoint struct { + Url string `json:"url"` + ApiKey string `json:"api_key"` + // Type identifier for this endpoint (datadog) + Type string `json:"type"` +} + +type _DatadogEndpoint DatadogEndpoint + +// NewDatadogEndpoint instantiates a new DatadogEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatadogEndpoint(url string, apiKey string, type_ string) *DatadogEndpoint { + this := DatadogEndpoint{} + this.Url = url + this.ApiKey = apiKey + this.Type = type_ + return &this +} + +// NewDatadogEndpointWithDefaults instantiates a new DatadogEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatadogEndpointWithDefaults() *DatadogEndpoint { + this := DatadogEndpoint{} + return &this +} + +// GetUrl returns the Url field value +func (o *DatadogEndpoint) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *DatadogEndpoint) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *DatadogEndpoint) SetUrl(v string) { + o.Url = v +} + +// GetApiKey returns the ApiKey field value +func (o *DatadogEndpoint) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *DatadogEndpoint) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *DatadogEndpoint) SetApiKey(v string) { + o.ApiKey = v +} + +// GetType returns the Type field value +func (o *DatadogEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DatadogEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DatadogEndpoint) SetType(v string) { + o.Type = v +} + +func (o DatadogEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatadogEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["api_key"] = o.ApiKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *DatadogEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "api_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatadogEndpoint := _DatadogEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatadogEndpoint) + + if err != nil { + return err + } + + *o = DatadogEndpoint(varDatadogEndpoint) + + return err +} + +type NullableDatadogEndpoint struct { + value *DatadogEndpoint + isSet bool +} + +func (v NullableDatadogEndpoint) Get() *DatadogEndpoint { + return v.value +} + +func (v *NullableDatadogEndpoint) Set(val *DatadogEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableDatadogEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableDatadogEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatadogEndpoint(val *DatadogEndpoint) *NullableDatadogEndpoint { + return &NullableDatadogEndpoint{value: val, isSet: true} +} + +func (v NullableDatadogEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatadogEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_datadog_endpoint_request.go b/azion-api/model_datadog_endpoint_request.go new file mode 100644 index 0000000..2ee4ab2 --- /dev/null +++ b/azion-api/model_datadog_endpoint_request.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DatadogEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DatadogEndpointRequest{} + +// DatadogEndpointRequest struct for DatadogEndpointRequest +type DatadogEndpointRequest struct { + Url string `json:"url"` + ApiKey string `json:"api_key"` + // Type identifier for this endpoint (datadog) + Type string `json:"type"` +} + +type _DatadogEndpointRequest DatadogEndpointRequest + +// NewDatadogEndpointRequest instantiates a new DatadogEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDatadogEndpointRequest(url string, apiKey string, type_ string) *DatadogEndpointRequest { + this := DatadogEndpointRequest{} + this.Url = url + this.ApiKey = apiKey + this.Type = type_ + return &this +} + +// NewDatadogEndpointRequestWithDefaults instantiates a new DatadogEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDatadogEndpointRequestWithDefaults() *DatadogEndpointRequest { + this := DatadogEndpointRequest{} + return &this +} + +// GetUrl returns the Url field value +func (o *DatadogEndpointRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *DatadogEndpointRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *DatadogEndpointRequest) SetUrl(v string) { + o.Url = v +} + +// GetApiKey returns the ApiKey field value +func (o *DatadogEndpointRequest) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *DatadogEndpointRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *DatadogEndpointRequest) SetApiKey(v string) { + o.ApiKey = v +} + +// GetType returns the Type field value +func (o *DatadogEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DatadogEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DatadogEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o DatadogEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DatadogEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["api_key"] = o.ApiKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *DatadogEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "api_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDatadogEndpointRequest := _DatadogEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDatadogEndpointRequest) + + if err != nil { + return err + } + + *o = DatadogEndpointRequest(varDatadogEndpointRequest) + + return err +} + +type NullableDatadogEndpointRequest struct { + value *DatadogEndpointRequest + isSet bool +} + +func (v NullableDatadogEndpointRequest) Get() *DatadogEndpointRequest { + return v.value +} + +func (v *NullableDatadogEndpointRequest) Set(val *DatadogEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDatadogEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDatadogEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDatadogEndpointRequest(val *DatadogEndpointRequest) *NullableDatadogEndpointRequest { + return &NullableDatadogEndpointRequest{value: val, isSet: true} +} + +func (v NullableDatadogEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDatadogEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_default_deployment_strategy.go b/azion-api/model_default_deployment_strategy.go new file mode 100644 index 0000000..a7329d4 --- /dev/null +++ b/azion-api/model_default_deployment_strategy.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the DefaultDeploymentStrategy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DefaultDeploymentStrategy{} + +// DefaultDeploymentStrategy struct for DefaultDeploymentStrategy +type DefaultDeploymentStrategy struct { + Attributes DefaultDeploymentStrategyAttrs `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _DefaultDeploymentStrategy DefaultDeploymentStrategy + +// NewDefaultDeploymentStrategy instantiates a new DefaultDeploymentStrategy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultDeploymentStrategy(attributes DefaultDeploymentStrategyAttrs) *DefaultDeploymentStrategy { + this := DefaultDeploymentStrategy{} + this.Attributes = attributes + return &this +} + +// NewDefaultDeploymentStrategyWithDefaults instantiates a new DefaultDeploymentStrategy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultDeploymentStrategyWithDefaults() *DefaultDeploymentStrategy { + this := DefaultDeploymentStrategy{} + return &this +} + +// GetAttributes returns the Attributes field value +func (o *DefaultDeploymentStrategy) GetAttributes() DefaultDeploymentStrategyAttrs { + if o == nil { + var ret DefaultDeploymentStrategyAttrs + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *DefaultDeploymentStrategy) GetAttributesOk() (*DefaultDeploymentStrategyAttrs, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *DefaultDeploymentStrategy) SetAttributes(v DefaultDeploymentStrategyAttrs) { + o.Attributes = v +} + +func (o DefaultDeploymentStrategy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultDeploymentStrategy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DefaultDeploymentStrategy) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDefaultDeploymentStrategy := _DefaultDeploymentStrategy{} + + err = json.Unmarshal(data, &varDefaultDeploymentStrategy) + + if err != nil { + return err + } + + *o = DefaultDeploymentStrategy(varDefaultDeploymentStrategy) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDefaultDeploymentStrategy struct { + value *DefaultDeploymentStrategy + isSet bool +} + +func (v NullableDefaultDeploymentStrategy) Get() *DefaultDeploymentStrategy { + return v.value +} + +func (v *NullableDefaultDeploymentStrategy) Set(val *DefaultDeploymentStrategy) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultDeploymentStrategy) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultDeploymentStrategy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultDeploymentStrategy(val *DefaultDeploymentStrategy) *NullableDefaultDeploymentStrategy { + return &NullableDefaultDeploymentStrategy{value: val, isSet: true} +} + +func (v NullableDefaultDeploymentStrategy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultDeploymentStrategy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_default_deployment_strategy_attrs.go b/azion-api/model_default_deployment_strategy_attrs.go new file mode 100644 index 0000000..64dd5b3 --- /dev/null +++ b/azion-api/model_default_deployment_strategy_attrs.go @@ -0,0 +1,251 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DefaultDeploymentStrategyAttrs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DefaultDeploymentStrategyAttrs{} + +// DefaultDeploymentStrategyAttrs struct for DefaultDeploymentStrategyAttrs +type DefaultDeploymentStrategyAttrs struct { + Application int64 `json:"application"` + Firewall NullableInt64 `json:"firewall,omitempty"` + CustomPage NullableInt64 `json:"custom_page,omitempty"` +} + +type _DefaultDeploymentStrategyAttrs DefaultDeploymentStrategyAttrs + +// NewDefaultDeploymentStrategyAttrs instantiates a new DefaultDeploymentStrategyAttrs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultDeploymentStrategyAttrs(application int64) *DefaultDeploymentStrategyAttrs { + this := DefaultDeploymentStrategyAttrs{} + this.Application = application + return &this +} + +// NewDefaultDeploymentStrategyAttrsWithDefaults instantiates a new DefaultDeploymentStrategyAttrs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultDeploymentStrategyAttrsWithDefaults() *DefaultDeploymentStrategyAttrs { + this := DefaultDeploymentStrategyAttrs{} + return &this +} + +// GetApplication returns the Application field value +func (o *DefaultDeploymentStrategyAttrs) GetApplication() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Application +} + +// GetApplicationOk returns a tuple with the Application field value +// and a boolean to check if the value has been set. +func (o *DefaultDeploymentStrategyAttrs) GetApplicationOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Application, true +} + +// SetApplication sets field value +func (o *DefaultDeploymentStrategyAttrs) SetApplication(v int64) { + o.Application = v +} + +// GetFirewall returns the Firewall field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultDeploymentStrategyAttrs) GetFirewall() int64 { + if o == nil || IsNil(o.Firewall.Get()) { + var ret int64 + return ret + } + return *o.Firewall.Get() +} + +// GetFirewallOk returns a tuple with the Firewall field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultDeploymentStrategyAttrs) GetFirewallOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Firewall.Get(), o.Firewall.IsSet() +} + +// HasFirewall returns a boolean if a field has been set. +func (o *DefaultDeploymentStrategyAttrs) HasFirewall() bool { + if o != nil && o.Firewall.IsSet() { + return true + } + + return false +} + +// SetFirewall gets a reference to the given NullableInt64 and assigns it to the Firewall field. +func (o *DefaultDeploymentStrategyAttrs) SetFirewall(v int64) { + o.Firewall.Set(&v) +} +// SetFirewallNil sets the value for Firewall to be an explicit nil +func (o *DefaultDeploymentStrategyAttrs) SetFirewallNil() { + o.Firewall.Set(nil) +} + +// UnsetFirewall ensures that no value is present for Firewall, not even an explicit nil +func (o *DefaultDeploymentStrategyAttrs) UnsetFirewall() { + o.Firewall.Unset() +} + +// GetCustomPage returns the CustomPage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultDeploymentStrategyAttrs) GetCustomPage() int64 { + if o == nil || IsNil(o.CustomPage.Get()) { + var ret int64 + return ret + } + return *o.CustomPage.Get() +} + +// GetCustomPageOk returns a tuple with the CustomPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultDeploymentStrategyAttrs) GetCustomPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.CustomPage.Get(), o.CustomPage.IsSet() +} + +// HasCustomPage returns a boolean if a field has been set. +func (o *DefaultDeploymentStrategyAttrs) HasCustomPage() bool { + if o != nil && o.CustomPage.IsSet() { + return true + } + + return false +} + +// SetCustomPage gets a reference to the given NullableInt64 and assigns it to the CustomPage field. +func (o *DefaultDeploymentStrategyAttrs) SetCustomPage(v int64) { + o.CustomPage.Set(&v) +} +// SetCustomPageNil sets the value for CustomPage to be an explicit nil +func (o *DefaultDeploymentStrategyAttrs) SetCustomPageNil() { + o.CustomPage.Set(nil) +} + +// UnsetCustomPage ensures that no value is present for CustomPage, not even an explicit nil +func (o *DefaultDeploymentStrategyAttrs) UnsetCustomPage() { + o.CustomPage.Unset() +} + +func (o DefaultDeploymentStrategyAttrs) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultDeploymentStrategyAttrs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["application"] = o.Application + if o.Firewall.IsSet() { + toSerialize["firewall"] = o.Firewall.Get() + } + if o.CustomPage.IsSet() { + toSerialize["custom_page"] = o.CustomPage.Get() + } + return toSerialize, nil +} + +func (o *DefaultDeploymentStrategyAttrs) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "application", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDefaultDeploymentStrategyAttrs := _DefaultDeploymentStrategyAttrs{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDefaultDeploymentStrategyAttrs) + + if err != nil { + return err + } + + *o = DefaultDeploymentStrategyAttrs(varDefaultDeploymentStrategyAttrs) + + return err +} + +type NullableDefaultDeploymentStrategyAttrs struct { + value *DefaultDeploymentStrategyAttrs + isSet bool +} + +func (v NullableDefaultDeploymentStrategyAttrs) Get() *DefaultDeploymentStrategyAttrs { + return v.value +} + +func (v *NullableDefaultDeploymentStrategyAttrs) Set(val *DefaultDeploymentStrategyAttrs) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultDeploymentStrategyAttrs) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultDeploymentStrategyAttrs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultDeploymentStrategyAttrs(val *DefaultDeploymentStrategyAttrs) *NullableDefaultDeploymentStrategyAttrs { + return &NullableDefaultDeploymentStrategyAttrs{value: val, isSet: true} +} + +func (v NullableDefaultDeploymentStrategyAttrs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultDeploymentStrategyAttrs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_default_deployment_strategy_attrs_request.go b/azion-api/model_default_deployment_strategy_attrs_request.go new file mode 100644 index 0000000..0bde348 --- /dev/null +++ b/azion-api/model_default_deployment_strategy_attrs_request.go @@ -0,0 +1,251 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DefaultDeploymentStrategyAttrsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DefaultDeploymentStrategyAttrsRequest{} + +// DefaultDeploymentStrategyAttrsRequest struct for DefaultDeploymentStrategyAttrsRequest +type DefaultDeploymentStrategyAttrsRequest struct { + Application int64 `json:"application"` + Firewall NullableInt64 `json:"firewall,omitempty"` + CustomPage NullableInt64 `json:"custom_page,omitempty"` +} + +type _DefaultDeploymentStrategyAttrsRequest DefaultDeploymentStrategyAttrsRequest + +// NewDefaultDeploymentStrategyAttrsRequest instantiates a new DefaultDeploymentStrategyAttrsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultDeploymentStrategyAttrsRequest(application int64) *DefaultDeploymentStrategyAttrsRequest { + this := DefaultDeploymentStrategyAttrsRequest{} + this.Application = application + return &this +} + +// NewDefaultDeploymentStrategyAttrsRequestWithDefaults instantiates a new DefaultDeploymentStrategyAttrsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultDeploymentStrategyAttrsRequestWithDefaults() *DefaultDeploymentStrategyAttrsRequest { + this := DefaultDeploymentStrategyAttrsRequest{} + return &this +} + +// GetApplication returns the Application field value +func (o *DefaultDeploymentStrategyAttrsRequest) GetApplication() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Application +} + +// GetApplicationOk returns a tuple with the Application field value +// and a boolean to check if the value has been set. +func (o *DefaultDeploymentStrategyAttrsRequest) GetApplicationOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Application, true +} + +// SetApplication sets field value +func (o *DefaultDeploymentStrategyAttrsRequest) SetApplication(v int64) { + o.Application = v +} + +// GetFirewall returns the Firewall field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultDeploymentStrategyAttrsRequest) GetFirewall() int64 { + if o == nil || IsNil(o.Firewall.Get()) { + var ret int64 + return ret + } + return *o.Firewall.Get() +} + +// GetFirewallOk returns a tuple with the Firewall field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultDeploymentStrategyAttrsRequest) GetFirewallOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Firewall.Get(), o.Firewall.IsSet() +} + +// HasFirewall returns a boolean if a field has been set. +func (o *DefaultDeploymentStrategyAttrsRequest) HasFirewall() bool { + if o != nil && o.Firewall.IsSet() { + return true + } + + return false +} + +// SetFirewall gets a reference to the given NullableInt64 and assigns it to the Firewall field. +func (o *DefaultDeploymentStrategyAttrsRequest) SetFirewall(v int64) { + o.Firewall.Set(&v) +} +// SetFirewallNil sets the value for Firewall to be an explicit nil +func (o *DefaultDeploymentStrategyAttrsRequest) SetFirewallNil() { + o.Firewall.Set(nil) +} + +// UnsetFirewall ensures that no value is present for Firewall, not even an explicit nil +func (o *DefaultDeploymentStrategyAttrsRequest) UnsetFirewall() { + o.Firewall.Unset() +} + +// GetCustomPage returns the CustomPage field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DefaultDeploymentStrategyAttrsRequest) GetCustomPage() int64 { + if o == nil || IsNil(o.CustomPage.Get()) { + var ret int64 + return ret + } + return *o.CustomPage.Get() +} + +// GetCustomPageOk returns a tuple with the CustomPage field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DefaultDeploymentStrategyAttrsRequest) GetCustomPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.CustomPage.Get(), o.CustomPage.IsSet() +} + +// HasCustomPage returns a boolean if a field has been set. +func (o *DefaultDeploymentStrategyAttrsRequest) HasCustomPage() bool { + if o != nil && o.CustomPage.IsSet() { + return true + } + + return false +} + +// SetCustomPage gets a reference to the given NullableInt64 and assigns it to the CustomPage field. +func (o *DefaultDeploymentStrategyAttrsRequest) SetCustomPage(v int64) { + o.CustomPage.Set(&v) +} +// SetCustomPageNil sets the value for CustomPage to be an explicit nil +func (o *DefaultDeploymentStrategyAttrsRequest) SetCustomPageNil() { + o.CustomPage.Set(nil) +} + +// UnsetCustomPage ensures that no value is present for CustomPage, not even an explicit nil +func (o *DefaultDeploymentStrategyAttrsRequest) UnsetCustomPage() { + o.CustomPage.Unset() +} + +func (o DefaultDeploymentStrategyAttrsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultDeploymentStrategyAttrsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["application"] = o.Application + if o.Firewall.IsSet() { + toSerialize["firewall"] = o.Firewall.Get() + } + if o.CustomPage.IsSet() { + toSerialize["custom_page"] = o.CustomPage.Get() + } + return toSerialize, nil +} + +func (o *DefaultDeploymentStrategyAttrsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "application", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDefaultDeploymentStrategyAttrsRequest := _DefaultDeploymentStrategyAttrsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDefaultDeploymentStrategyAttrsRequest) + + if err != nil { + return err + } + + *o = DefaultDeploymentStrategyAttrsRequest(varDefaultDeploymentStrategyAttrsRequest) + + return err +} + +type NullableDefaultDeploymentStrategyAttrsRequest struct { + value *DefaultDeploymentStrategyAttrsRequest + isSet bool +} + +func (v NullableDefaultDeploymentStrategyAttrsRequest) Get() *DefaultDeploymentStrategyAttrsRequest { + return v.value +} + +func (v *NullableDefaultDeploymentStrategyAttrsRequest) Set(val *DefaultDeploymentStrategyAttrsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultDeploymentStrategyAttrsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultDeploymentStrategyAttrsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultDeploymentStrategyAttrsRequest(val *DefaultDeploymentStrategyAttrsRequest) *NullableDefaultDeploymentStrategyAttrsRequest { + return &NullableDefaultDeploymentStrategyAttrsRequest{value: val, isSet: true} +} + +func (v NullableDefaultDeploymentStrategyAttrsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultDeploymentStrategyAttrsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_default_deployment_strategy_request.go b/azion-api/model_default_deployment_strategy_request.go new file mode 100644 index 0000000..64dbf3a --- /dev/null +++ b/azion-api/model_default_deployment_strategy_request.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the DefaultDeploymentStrategyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DefaultDeploymentStrategyRequest{} + +// DefaultDeploymentStrategyRequest struct for DefaultDeploymentStrategyRequest +type DefaultDeploymentStrategyRequest struct { + Attributes DefaultDeploymentStrategyAttrsRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _DefaultDeploymentStrategyRequest DefaultDeploymentStrategyRequest + +// NewDefaultDeploymentStrategyRequest instantiates a new DefaultDeploymentStrategyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDefaultDeploymentStrategyRequest(attributes DefaultDeploymentStrategyAttrsRequest) *DefaultDeploymentStrategyRequest { + this := DefaultDeploymentStrategyRequest{} + this.Attributes = attributes + return &this +} + +// NewDefaultDeploymentStrategyRequestWithDefaults instantiates a new DefaultDeploymentStrategyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDefaultDeploymentStrategyRequestWithDefaults() *DefaultDeploymentStrategyRequest { + this := DefaultDeploymentStrategyRequest{} + return &this +} + +// GetAttributes returns the Attributes field value +func (o *DefaultDeploymentStrategyRequest) GetAttributes() DefaultDeploymentStrategyAttrsRequest { + if o == nil { + var ret DefaultDeploymentStrategyAttrsRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *DefaultDeploymentStrategyRequest) GetAttributesOk() (*DefaultDeploymentStrategyAttrsRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *DefaultDeploymentStrategyRequest) SetAttributes(v DefaultDeploymentStrategyAttrsRequest) { + o.Attributes = v +} + +func (o DefaultDeploymentStrategyRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DefaultDeploymentStrategyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DefaultDeploymentStrategyRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDefaultDeploymentStrategyRequest := _DefaultDeploymentStrategyRequest{} + + err = json.Unmarshal(data, &varDefaultDeploymentStrategyRequest) + + if err != nil { + return err + } + + *o = DefaultDeploymentStrategyRequest(varDefaultDeploymentStrategyRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDefaultDeploymentStrategyRequest struct { + value *DefaultDeploymentStrategyRequest + isSet bool +} + +func (v NullableDefaultDeploymentStrategyRequest) Get() *DefaultDeploymentStrategyRequest { + return v.value +} + +func (v *NullableDefaultDeploymentStrategyRequest) Set(val *DefaultDeploymentStrategyRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDefaultDeploymentStrategyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDefaultDeploymentStrategyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDefaultDeploymentStrategyRequest(val *DefaultDeploymentStrategyRequest) *NullableDefaultDeploymentStrategyRequest { + return &NullableDefaultDeploymentStrategyRequest{value: val, isSet: true} +} + +func (v NullableDefaultDeploymentStrategyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDefaultDeploymentStrategyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_delegation_signer.go b/azion-api/model_delegation_signer.go new file mode 100644 index 0000000..98b2d69 --- /dev/null +++ b/azion-api/model_delegation_signer.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DelegationSigner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DelegationSigner{} + +// DelegationSigner struct for DelegationSigner +type DelegationSigner struct { + AlgorithmType AlgType `json:"algorithm_type"` + Digest string `json:"digest"` + DigestType AlgType `json:"digest_type"` + KeyTag int64 `json:"key_tag"` +} + +type _DelegationSigner DelegationSigner + +// NewDelegationSigner instantiates a new DelegationSigner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDelegationSigner(algorithmType AlgType, digest string, digestType AlgType, keyTag int64) *DelegationSigner { + this := DelegationSigner{} + this.AlgorithmType = algorithmType + this.Digest = digest + this.DigestType = digestType + this.KeyTag = keyTag + return &this +} + +// NewDelegationSignerWithDefaults instantiates a new DelegationSigner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDelegationSignerWithDefaults() *DelegationSigner { + this := DelegationSigner{} + return &this +} + +// GetAlgorithmType returns the AlgorithmType field value +func (o *DelegationSigner) GetAlgorithmType() AlgType { + if o == nil { + var ret AlgType + return ret + } + + return o.AlgorithmType +} + +// GetAlgorithmTypeOk returns a tuple with the AlgorithmType field value +// and a boolean to check if the value has been set. +func (o *DelegationSigner) GetAlgorithmTypeOk() (*AlgType, bool) { + if o == nil { + return nil, false + } + return &o.AlgorithmType, true +} + +// SetAlgorithmType sets field value +func (o *DelegationSigner) SetAlgorithmType(v AlgType) { + o.AlgorithmType = v +} + +// GetDigest returns the Digest field value +func (o *DelegationSigner) GetDigest() string { + if o == nil { + var ret string + return ret + } + + return o.Digest +} + +// GetDigestOk returns a tuple with the Digest field value +// and a boolean to check if the value has been set. +func (o *DelegationSigner) GetDigestOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Digest, true +} + +// SetDigest sets field value +func (o *DelegationSigner) SetDigest(v string) { + o.Digest = v +} + +// GetDigestType returns the DigestType field value +func (o *DelegationSigner) GetDigestType() AlgType { + if o == nil { + var ret AlgType + return ret + } + + return o.DigestType +} + +// GetDigestTypeOk returns a tuple with the DigestType field value +// and a boolean to check if the value has been set. +func (o *DelegationSigner) GetDigestTypeOk() (*AlgType, bool) { + if o == nil { + return nil, false + } + return &o.DigestType, true +} + +// SetDigestType sets field value +func (o *DelegationSigner) SetDigestType(v AlgType) { + o.DigestType = v +} + +// GetKeyTag returns the KeyTag field value +func (o *DelegationSigner) GetKeyTag() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.KeyTag +} + +// GetKeyTagOk returns a tuple with the KeyTag field value +// and a boolean to check if the value has been set. +func (o *DelegationSigner) GetKeyTagOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.KeyTag, true +} + +// SetKeyTag sets field value +func (o *DelegationSigner) SetKeyTag(v int64) { + o.KeyTag = v +} + +func (o DelegationSigner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DelegationSigner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["algorithm_type"] = o.AlgorithmType + toSerialize["digest"] = o.Digest + toSerialize["digest_type"] = o.DigestType + toSerialize["key_tag"] = o.KeyTag + return toSerialize, nil +} + +func (o *DelegationSigner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "algorithm_type", + "digest", + "digest_type", + "key_tag", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDelegationSigner := _DelegationSigner{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDelegationSigner) + + if err != nil { + return err + } + + *o = DelegationSigner(varDelegationSigner) + + return err +} + +type NullableDelegationSigner struct { + value *DelegationSigner + isSet bool +} + +func (v NullableDelegationSigner) Get() *DelegationSigner { + return v.value +} + +func (v *NullableDelegationSigner) Set(val *DelegationSigner) { + v.value = val + v.isSet = true +} + +func (v NullableDelegationSigner) IsSet() bool { + return v.isSet +} + +func (v *NullableDelegationSigner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDelegationSigner(val *DelegationSigner) *NullableDelegationSigner { + return &NullableDelegationSigner{value: val, isSet: true} +} + +func (v NullableDelegationSigner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDelegationSigner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_delete_response.go b/azion-api/model_delete_response.go new file mode 100644 index 0000000..a29341e --- /dev/null +++ b/azion-api/model_delete_response.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the DeleteResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeleteResponse{} + +// DeleteResponse struct for DeleteResponse +type DeleteResponse struct { + State *string `json:"state,omitempty"` +} + +// NewDeleteResponse instantiates a new DeleteResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeleteResponse() *DeleteResponse { + this := DeleteResponse{} + return &this +} + +// NewDeleteResponseWithDefaults instantiates a new DeleteResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeleteResponseWithDefaults() *DeleteResponse { + this := DeleteResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *DeleteResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeleteResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *DeleteResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *DeleteResponse) SetState(v string) { + o.State = &v +} + +func (o DeleteResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeleteResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableDeleteResponse struct { + value *DeleteResponse + isSet bool +} + +func (v NullableDeleteResponse) Get() *DeleteResponse { + return v.value +} + +func (v *NullableDeleteResponse) Set(val *DeleteResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeleteResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeleteResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeleteResponse(val *DeleteResponse) *NullableDeleteResponse { + return &NullableDeleteResponse{value: val, isSet: true} +} + +func (v NullableDeleteResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeleteResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_deployment_strategy_default_deployment_strategy.go b/azion-api/model_deployment_strategy_default_deployment_strategy.go new file mode 100644 index 0000000..f7b2ef5 --- /dev/null +++ b/azion-api/model_deployment_strategy_default_deployment_strategy.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DeploymentStrategyDefaultDeploymentStrategy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeploymentStrategyDefaultDeploymentStrategy{} + +// DeploymentStrategyDefaultDeploymentStrategy struct for DeploymentStrategyDefaultDeploymentStrategy +type DeploymentStrategyDefaultDeploymentStrategy struct { + // Discriminator field for DeploymentStrategy + Type string `json:"type"` + Attributes DefaultDeploymentStrategyAttrs `json:"attributes"` +} + +type _DeploymentStrategyDefaultDeploymentStrategy DeploymentStrategyDefaultDeploymentStrategy + +// NewDeploymentStrategyDefaultDeploymentStrategy instantiates a new DeploymentStrategyDefaultDeploymentStrategy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeploymentStrategyDefaultDeploymentStrategy(type_ string, attributes DefaultDeploymentStrategyAttrs) *DeploymentStrategyDefaultDeploymentStrategy { + this := DeploymentStrategyDefaultDeploymentStrategy{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewDeploymentStrategyDefaultDeploymentStrategyWithDefaults instantiates a new DeploymentStrategyDefaultDeploymentStrategy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeploymentStrategyDefaultDeploymentStrategyWithDefaults() *DeploymentStrategyDefaultDeploymentStrategy { + this := DeploymentStrategyDefaultDeploymentStrategy{} + return &this +} + +// GetType returns the Type field value +func (o *DeploymentStrategyDefaultDeploymentStrategy) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DeploymentStrategyDefaultDeploymentStrategy) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DeploymentStrategyDefaultDeploymentStrategy) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *DeploymentStrategyDefaultDeploymentStrategy) GetAttributes() DefaultDeploymentStrategyAttrs { + if o == nil { + var ret DefaultDeploymentStrategyAttrs + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *DeploymentStrategyDefaultDeploymentStrategy) GetAttributesOk() (*DefaultDeploymentStrategyAttrs, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *DeploymentStrategyDefaultDeploymentStrategy) SetAttributes(v DefaultDeploymentStrategyAttrs) { + o.Attributes = v +} + +func (o DeploymentStrategyDefaultDeploymentStrategy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeploymentStrategyDefaultDeploymentStrategy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *DeploymentStrategyDefaultDeploymentStrategy) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeploymentStrategyDefaultDeploymentStrategy := _DeploymentStrategyDefaultDeploymentStrategy{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeploymentStrategyDefaultDeploymentStrategy) + + if err != nil { + return err + } + + *o = DeploymentStrategyDefaultDeploymentStrategy(varDeploymentStrategyDefaultDeploymentStrategy) + + return err +} + +type NullableDeploymentStrategyDefaultDeploymentStrategy struct { + value *DeploymentStrategyDefaultDeploymentStrategy + isSet bool +} + +func (v NullableDeploymentStrategyDefaultDeploymentStrategy) Get() *DeploymentStrategyDefaultDeploymentStrategy { + return v.value +} + +func (v *NullableDeploymentStrategyDefaultDeploymentStrategy) Set(val *DeploymentStrategyDefaultDeploymentStrategy) { + v.value = val + v.isSet = true +} + +func (v NullableDeploymentStrategyDefaultDeploymentStrategy) IsSet() bool { + return v.isSet +} + +func (v *NullableDeploymentStrategyDefaultDeploymentStrategy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeploymentStrategyDefaultDeploymentStrategy(val *DeploymentStrategyDefaultDeploymentStrategy) *NullableDeploymentStrategyDefaultDeploymentStrategy { + return &NullableDeploymentStrategyDefaultDeploymentStrategy{value: val, isSet: true} +} + +func (v NullableDeploymentStrategyDefaultDeploymentStrategy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeploymentStrategyDefaultDeploymentStrategy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_deployment_strategy_default_deployment_strategy_request.go b/azion-api/model_deployment_strategy_default_deployment_strategy_request.go new file mode 100644 index 0000000..c95a23b --- /dev/null +++ b/azion-api/model_deployment_strategy_default_deployment_strategy_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DeploymentStrategyDefaultDeploymentStrategyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeploymentStrategyDefaultDeploymentStrategyRequest{} + +// DeploymentStrategyDefaultDeploymentStrategyRequest struct for DeploymentStrategyDefaultDeploymentStrategyRequest +type DeploymentStrategyDefaultDeploymentStrategyRequest struct { + // Discriminator field for DeploymentStrategyRequest + Type string `json:"type"` + Attributes DefaultDeploymentStrategyAttrsRequest `json:"attributes"` +} + +type _DeploymentStrategyDefaultDeploymentStrategyRequest DeploymentStrategyDefaultDeploymentStrategyRequest + +// NewDeploymentStrategyDefaultDeploymentStrategyRequest instantiates a new DeploymentStrategyDefaultDeploymentStrategyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeploymentStrategyDefaultDeploymentStrategyRequest(type_ string, attributes DefaultDeploymentStrategyAttrsRequest) *DeploymentStrategyDefaultDeploymentStrategyRequest { + this := DeploymentStrategyDefaultDeploymentStrategyRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewDeploymentStrategyDefaultDeploymentStrategyRequestWithDefaults instantiates a new DeploymentStrategyDefaultDeploymentStrategyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeploymentStrategyDefaultDeploymentStrategyRequestWithDefaults() *DeploymentStrategyDefaultDeploymentStrategyRequest { + this := DeploymentStrategyDefaultDeploymentStrategyRequest{} + return &this +} + +// GetType returns the Type field value +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetAttributes() DefaultDeploymentStrategyAttrsRequest { + if o == nil { + var ret DefaultDeploymentStrategyAttrsRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) GetAttributesOk() (*DefaultDeploymentStrategyAttrsRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) SetAttributes(v DefaultDeploymentStrategyAttrsRequest) { + o.Attributes = v +} + +func (o DeploymentStrategyDefaultDeploymentStrategyRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeploymentStrategyDefaultDeploymentStrategyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *DeploymentStrategyDefaultDeploymentStrategyRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeploymentStrategyDefaultDeploymentStrategyRequest := _DeploymentStrategyDefaultDeploymentStrategyRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeploymentStrategyDefaultDeploymentStrategyRequest) + + if err != nil { + return err + } + + *o = DeploymentStrategyDefaultDeploymentStrategyRequest(varDeploymentStrategyDefaultDeploymentStrategyRequest) + + return err +} + +type NullableDeploymentStrategyDefaultDeploymentStrategyRequest struct { + value *DeploymentStrategyDefaultDeploymentStrategyRequest + isSet bool +} + +func (v NullableDeploymentStrategyDefaultDeploymentStrategyRequest) Get() *DeploymentStrategyDefaultDeploymentStrategyRequest { + return v.value +} + +func (v *NullableDeploymentStrategyDefaultDeploymentStrategyRequest) Set(val *DeploymentStrategyDefaultDeploymentStrategyRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDeploymentStrategyDefaultDeploymentStrategyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDeploymentStrategyDefaultDeploymentStrategyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeploymentStrategyDefaultDeploymentStrategyRequest(val *DeploymentStrategyDefaultDeploymentStrategyRequest) *NullableDeploymentStrategyDefaultDeploymentStrategyRequest { + return &NullableDeploymentStrategyDefaultDeploymentStrategyRequest{value: val, isSet: true} +} + +func (v NullableDeploymentStrategyDefaultDeploymentStrategyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeploymentStrategyDefaultDeploymentStrategyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_deployment_strategy_shared.go b/azion-api/model_deployment_strategy_shared.go new file mode 100644 index 0000000..7b5e4c7 --- /dev/null +++ b/azion-api/model_deployment_strategy_shared.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the DeploymentStrategyShared type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeploymentStrategyShared{} + +// DeploymentStrategyShared Deployment strategy. +type DeploymentStrategyShared struct { + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _DeploymentStrategyShared DeploymentStrategyShared + +// NewDeploymentStrategyShared instantiates a new DeploymentStrategyShared object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeploymentStrategyShared(type_ string) *DeploymentStrategyShared { + this := DeploymentStrategyShared{} + this.Type = type_ + return &this +} + +// NewDeploymentStrategySharedWithDefaults instantiates a new DeploymentStrategyShared object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeploymentStrategySharedWithDefaults() *DeploymentStrategyShared { + this := DeploymentStrategyShared{} + return &this +} + +// GetType returns the Type field value +func (o *DeploymentStrategyShared) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *DeploymentStrategyShared) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *DeploymentStrategyShared) SetType(v string) { + o.Type = v +} + +func (o DeploymentStrategyShared) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeploymentStrategyShared) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DeploymentStrategyShared) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeploymentStrategyShared := _DeploymentStrategyShared{} + + err = json.Unmarshal(data, &varDeploymentStrategyShared) + + if err != nil { + return err + } + + *o = DeploymentStrategyShared(varDeploymentStrategyShared) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDeploymentStrategyShared struct { + value *DeploymentStrategyShared + isSet bool +} + +func (v NullableDeploymentStrategyShared) Get() *DeploymentStrategyShared { + return v.value +} + +func (v *NullableDeploymentStrategyShared) Set(val *DeploymentStrategyShared) { + v.value = val + v.isSet = true +} + +func (v NullableDeploymentStrategyShared) IsSet() bool { + return v.isSet +} + +func (v *NullableDeploymentStrategyShared) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeploymentStrategyShared(val *DeploymentStrategyShared) *NullableDeploymentStrategyShared { + return &NullableDeploymentStrategyShared{value: val, isSet: true} +} + +func (v NullableDeploymentStrategyShared) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeploymentStrategyShared) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_device_group.go b/azion-api/model_device_group.go new file mode 100644 index 0000000..d6cff2c --- /dev/null +++ b/azion-api/model_device_group.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DeviceGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeviceGroup{} + +// DeviceGroup struct for DeviceGroup +type DeviceGroup struct { + Id int64 `json:"id"` + Name string `json:"name"` + // Enter a valid regular expression pattern to identify user agents. + UserAgent string `json:"user_agent"` +} + +type _DeviceGroup DeviceGroup + +// NewDeviceGroup instantiates a new DeviceGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeviceGroup(id int64, name string, userAgent string) *DeviceGroup { + this := DeviceGroup{} + this.Id = id + this.Name = name + this.UserAgent = userAgent + return &this +} + +// NewDeviceGroupWithDefaults instantiates a new DeviceGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeviceGroupWithDefaults() *DeviceGroup { + this := DeviceGroup{} + return &this +} + +// GetId returns the Id field value +func (o *DeviceGroup) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *DeviceGroup) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *DeviceGroup) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *DeviceGroup) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DeviceGroup) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DeviceGroup) SetName(v string) { + o.Name = v +} + +// GetUserAgent returns the UserAgent field value +func (o *DeviceGroup) GetUserAgent() string { + if o == nil { + var ret string + return ret + } + + return o.UserAgent +} + +// GetUserAgentOk returns a tuple with the UserAgent field value +// and a boolean to check if the value has been set. +func (o *DeviceGroup) GetUserAgentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserAgent, true +} + +// SetUserAgent sets field value +func (o *DeviceGroup) SetUserAgent(v string) { + o.UserAgent = v +} + +func (o DeviceGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeviceGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["user_agent"] = o.UserAgent + return toSerialize, nil +} + +func (o *DeviceGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "user_agent", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeviceGroup := _DeviceGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeviceGroup) + + if err != nil { + return err + } + + *o = DeviceGroup(varDeviceGroup) + + return err +} + +type NullableDeviceGroup struct { + value *DeviceGroup + isSet bool +} + +func (v NullableDeviceGroup) Get() *DeviceGroup { + return v.value +} + +func (v *NullableDeviceGroup) Set(val *DeviceGroup) { + v.value = val + v.isSet = true +} + +func (v NullableDeviceGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableDeviceGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeviceGroup(val *DeviceGroup) *NullableDeviceGroup { + return &NullableDeviceGroup{value: val, isSet: true} +} + +func (v NullableDeviceGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeviceGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_device_group_request.go b/azion-api/model_device_group_request.go new file mode 100644 index 0000000..82a3c64 --- /dev/null +++ b/azion-api/model_device_group_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DeviceGroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeviceGroupRequest{} + +// DeviceGroupRequest struct for DeviceGroupRequest +type DeviceGroupRequest struct { + Name string `json:"name"` + // Enter a valid regular expression pattern to identify user agents. + UserAgent string `json:"user_agent"` +} + +type _DeviceGroupRequest DeviceGroupRequest + +// NewDeviceGroupRequest instantiates a new DeviceGroupRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeviceGroupRequest(name string, userAgent string) *DeviceGroupRequest { + this := DeviceGroupRequest{} + this.Name = name + this.UserAgent = userAgent + return &this +} + +// NewDeviceGroupRequestWithDefaults instantiates a new DeviceGroupRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeviceGroupRequestWithDefaults() *DeviceGroupRequest { + this := DeviceGroupRequest{} + return &this +} + +// GetName returns the Name field value +func (o *DeviceGroupRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *DeviceGroupRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *DeviceGroupRequest) SetName(v string) { + o.Name = v +} + +// GetUserAgent returns the UserAgent field value +func (o *DeviceGroupRequest) GetUserAgent() string { + if o == nil { + var ret string + return ret + } + + return o.UserAgent +} + +// GetUserAgentOk returns a tuple with the UserAgent field value +// and a boolean to check if the value has been set. +func (o *DeviceGroupRequest) GetUserAgentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UserAgent, true +} + +// SetUserAgent sets field value +func (o *DeviceGroupRequest) SetUserAgent(v string) { + o.UserAgent = v +} + +func (o DeviceGroupRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeviceGroupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["user_agent"] = o.UserAgent + return toSerialize, nil +} + +func (o *DeviceGroupRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "user_agent", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeviceGroupRequest := _DeviceGroupRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeviceGroupRequest) + + if err != nil { + return err + } + + *o = DeviceGroupRequest(varDeviceGroupRequest) + + return err +} + +type NullableDeviceGroupRequest struct { + value *DeviceGroupRequest + isSet bool +} + +func (v NullableDeviceGroupRequest) Get() *DeviceGroupRequest { + return v.value +} + +func (v *NullableDeviceGroupRequest) Set(val *DeviceGroupRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDeviceGroupRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDeviceGroupRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeviceGroupRequest(val *DeviceGroupRequest) *NullableDeviceGroupRequest { + return &NullableDeviceGroupRequest{value: val, isSet: true} +} + +func (v NullableDeviceGroupRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeviceGroupRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_device_group_response.go b/azion-api/model_device_group_response.go new file mode 100644 index 0000000..ca16d67 --- /dev/null +++ b/azion-api/model_device_group_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DeviceGroupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DeviceGroupResponse{} + +// DeviceGroupResponse struct for DeviceGroupResponse +type DeviceGroupResponse struct { + State *string `json:"state,omitempty"` + Data DeviceGroup `json:"data"` +} + +type _DeviceGroupResponse DeviceGroupResponse + +// NewDeviceGroupResponse instantiates a new DeviceGroupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDeviceGroupResponse(data DeviceGroup) *DeviceGroupResponse { + this := DeviceGroupResponse{} + this.Data = data + return &this +} + +// NewDeviceGroupResponseWithDefaults instantiates a new DeviceGroupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDeviceGroupResponseWithDefaults() *DeviceGroupResponse { + this := DeviceGroupResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *DeviceGroupResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DeviceGroupResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *DeviceGroupResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *DeviceGroupResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *DeviceGroupResponse) GetData() DeviceGroup { + if o == nil { + var ret DeviceGroup + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *DeviceGroupResponse) GetDataOk() (*DeviceGroup, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *DeviceGroupResponse) SetData(v DeviceGroup) { + o.Data = v +} + +func (o DeviceGroupResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DeviceGroupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *DeviceGroupResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDeviceGroupResponse := _DeviceGroupResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDeviceGroupResponse) + + if err != nil { + return err + } + + *o = DeviceGroupResponse(varDeviceGroupResponse) + + return err +} + +type NullableDeviceGroupResponse struct { + value *DeviceGroupResponse + isSet bool +} + +func (v NullableDeviceGroupResponse) Get() *DeviceGroupResponse { + return v.value +} + +func (v *NullableDeviceGroupResponse) Set(val *DeviceGroupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDeviceGroupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDeviceGroupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDeviceGroupResponse(val *DeviceGroupResponse) *NullableDeviceGroupResponse { + return &NullableDeviceGroupResponse{value: val, isSet: true} +} + +func (v NullableDeviceGroupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDeviceGroupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_dnssec.go b/azion-api/model_dnssec.go new file mode 100644 index 0000000..05bcb31 --- /dev/null +++ b/azion-api/model_dnssec.go @@ -0,0 +1,218 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DNSSEC type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DNSSEC{} + +// DNSSEC struct for DNSSEC +type DNSSEC struct { + Enabled bool `json:"enabled"` + // * `unconfigured` - unconfigured * `waiting` - waiting * `ready` - ready + Status string `json:"status"` + DelegationSigner NullableDelegationSigner `json:"delegation_signer"` +} + +type _DNSSEC DNSSEC + +// NewDNSSEC instantiates a new DNSSEC object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDNSSEC(enabled bool, status string, delegationSigner NullableDelegationSigner) *DNSSEC { + this := DNSSEC{} + this.Enabled = enabled + this.Status = status + this.DelegationSigner = delegationSigner + return &this +} + +// NewDNSSECWithDefaults instantiates a new DNSSEC object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDNSSECWithDefaults() *DNSSEC { + this := DNSSEC{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *DNSSEC) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *DNSSEC) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *DNSSEC) SetEnabled(v bool) { + o.Enabled = v +} + +// GetStatus returns the Status field value +func (o *DNSSEC) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *DNSSEC) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *DNSSEC) SetStatus(v string) { + o.Status = v +} + +// GetDelegationSigner returns the DelegationSigner field value +// If the value is explicit nil, the zero value for DelegationSigner will be returned +func (o *DNSSEC) GetDelegationSigner() DelegationSigner { + if o == nil || o.DelegationSigner.Get() == nil { + var ret DelegationSigner + return ret + } + + return *o.DelegationSigner.Get() +} + +// GetDelegationSignerOk returns a tuple with the DelegationSigner field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DNSSEC) GetDelegationSignerOk() (*DelegationSigner, bool) { + if o == nil { + return nil, false + } + return o.DelegationSigner.Get(), o.DelegationSigner.IsSet() +} + +// SetDelegationSigner sets field value +func (o *DNSSEC) SetDelegationSigner(v DelegationSigner) { + o.DelegationSigner.Set(&v) +} + +func (o DNSSEC) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DNSSEC) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + toSerialize["status"] = o.Status + toSerialize["delegation_signer"] = o.DelegationSigner.Get() + return toSerialize, nil +} + +func (o *DNSSEC) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + "status", + "delegation_signer", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDNSSEC := _DNSSEC{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDNSSEC) + + if err != nil { + return err + } + + *o = DNSSEC(varDNSSEC) + + return err +} + +type NullableDNSSEC struct { + value *DNSSEC + isSet bool +} + +func (v NullableDNSSEC) Get() *DNSSEC { + return v.value +} + +func (v *NullableDNSSEC) Set(val *DNSSEC) { + v.value = val + v.isSet = true +} + +func (v NullableDNSSEC) IsSet() bool { + return v.isSet +} + +func (v *NullableDNSSEC) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDNSSEC(val *DNSSEC) *NullableDNSSEC { + return &NullableDNSSEC{value: val, isSet: true} +} + +func (v NullableDNSSEC) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDNSSEC) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_dnssec_request.go b/azion-api/model_dnssec_request.go new file mode 100644 index 0000000..ca4e48b --- /dev/null +++ b/azion-api/model_dnssec_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DNSSECRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DNSSECRequest{} + +// DNSSECRequest struct for DNSSECRequest +type DNSSECRequest struct { + Enabled bool `json:"enabled"` +} + +type _DNSSECRequest DNSSECRequest + +// NewDNSSECRequest instantiates a new DNSSECRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDNSSECRequest(enabled bool) *DNSSECRequest { + this := DNSSECRequest{} + this.Enabled = enabled + return &this +} + +// NewDNSSECRequestWithDefaults instantiates a new DNSSECRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDNSSECRequestWithDefaults() *DNSSECRequest { + this := DNSSECRequest{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *DNSSECRequest) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *DNSSECRequest) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *DNSSECRequest) SetEnabled(v bool) { + o.Enabled = v +} + +func (o DNSSECRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DNSSECRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + return toSerialize, nil +} + +func (o *DNSSECRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDNSSECRequest := _DNSSECRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDNSSECRequest) + + if err != nil { + return err + } + + *o = DNSSECRequest(varDNSSECRequest) + + return err +} + +type NullableDNSSECRequest struct { + value *DNSSECRequest + isSet bool +} + +func (v NullableDNSSECRequest) Get() *DNSSECRequest { + return v.value +} + +func (v *NullableDNSSECRequest) Set(val *DNSSECRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDNSSECRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDNSSECRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDNSSECRequest(val *DNSSECRequest) *NullableDNSSECRequest { + return &NullableDNSSECRequest{value: val, isSet: true} +} + +func (v NullableDNSSECRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDNSSECRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_dnssec_response.go b/azion-api/model_dnssec_response.go new file mode 100644 index 0000000..703538b --- /dev/null +++ b/azion-api/model_dnssec_response.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DNSSECResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DNSSECResponse{} + +// DNSSECResponse struct for DNSSECResponse +type DNSSECResponse struct { + Data DNSSEC `json:"data"` +} + +type _DNSSECResponse DNSSECResponse + +// NewDNSSECResponse instantiates a new DNSSECResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDNSSECResponse(data DNSSEC) *DNSSECResponse { + this := DNSSECResponse{} + this.Data = data + return &this +} + +// NewDNSSECResponseWithDefaults instantiates a new DNSSECResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDNSSECResponseWithDefaults() *DNSSECResponse { + this := DNSSECResponse{} + return &this +} + +// GetData returns the Data field value +func (o *DNSSECResponse) GetData() DNSSEC { + if o == nil { + var ret DNSSEC + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *DNSSECResponse) GetDataOk() (*DNSSEC, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *DNSSECResponse) SetData(v DNSSEC) { + o.Data = v +} + +func (o DNSSECResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DNSSECResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *DNSSECResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDNSSECResponse := _DNSSECResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDNSSECResponse) + + if err != nil { + return err + } + + *o = DNSSECResponse(varDNSSECResponse) + + return err +} + +type NullableDNSSECResponse struct { + value *DNSSECResponse + isSet bool +} + +func (v NullableDNSSECResponse) Get() *DNSSECResponse { + return v.value +} + +func (v *NullableDNSSECResponse) Set(val *DNSSECResponse) { + v.value = val + v.isSet = true +} + +func (v NullableDNSSECResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableDNSSECResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDNSSECResponse(val *DNSSECResponse) *NullableDNSSECResponse { + return &NullableDNSSECResponse{value: val, isSet: true} +} + +func (v NullableDNSSECResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDNSSECResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_document.go b/azion-api/model_document.go new file mode 100644 index 0000000..50caf69 --- /dev/null +++ b/azion-api/model_document.go @@ -0,0 +1,453 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Document type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Document{} + +// Document struct for Document +type Document struct { + DocumentId int64 `json:"document_id"` + KbId int64 `json:"kb_id"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + SourceUri *string `json:"source_uri,omitempty"` + ChunkStrategy map[string]interface{} `json:"chunk_strategy,omitempty"` + // * `waiting_authorization` - waiting_authorization * `authorized` - authorized + Status string `json:"status"` + LastModified time.Time `json:"last_modified"` + LastEditor string `json:"last_editor"` +} + +type _Document Document + +// NewDocument instantiates a new Document object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDocument(documentId int64, kbId int64, status string, lastModified time.Time, lastEditor string) *Document { + this := Document{} + this.DocumentId = documentId + this.KbId = kbId + this.Status = status + this.LastModified = lastModified + this.LastEditor = lastEditor + return &this +} + +// NewDocumentWithDefaults instantiates a new Document object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDocumentWithDefaults() *Document { + this := Document{} + return &this +} + +// GetDocumentId returns the DocumentId field value +func (o *Document) GetDocumentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.DocumentId +} + +// GetDocumentIdOk returns a tuple with the DocumentId field value +// and a boolean to check if the value has been set. +func (o *Document) GetDocumentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.DocumentId, true +} + +// SetDocumentId sets field value +func (o *Document) SetDocumentId(v int64) { + o.DocumentId = v +} + +// GetKbId returns the KbId field value +func (o *Document) GetKbId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value +// and a boolean to check if the value has been set. +func (o *Document) GetKbIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.KbId, true +} + +// SetKbId sets field value +func (o *Document) SetKbId(v int64) { + o.KbId = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Document) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Document) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Document) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Document) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Document) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Document) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Document) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Document) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Document) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Document) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *Document) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *Document) SetType(v string) { + o.Type = &v +} + +// GetSourceUri returns the SourceUri field value if set, zero value otherwise. +func (o *Document) GetSourceUri() string { + if o == nil || IsNil(o.SourceUri) { + var ret string + return ret + } + return *o.SourceUri +} + +// GetSourceUriOk returns a tuple with the SourceUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Document) GetSourceUriOk() (*string, bool) { + if o == nil || IsNil(o.SourceUri) { + return nil, false + } + return o.SourceUri, true +} + +// HasSourceUri returns a boolean if a field has been set. +func (o *Document) HasSourceUri() bool { + if o != nil && !IsNil(o.SourceUri) { + return true + } + + return false +} + +// SetSourceUri gets a reference to the given string and assigns it to the SourceUri field. +func (o *Document) SetSourceUri(v string) { + o.SourceUri = &v +} + +// GetChunkStrategy returns the ChunkStrategy field value if set, zero value otherwise. +func (o *Document) GetChunkStrategy() map[string]interface{} { + if o == nil || IsNil(o.ChunkStrategy) { + var ret map[string]interface{} + return ret + } + return o.ChunkStrategy +} + +// GetChunkStrategyOk returns a tuple with the ChunkStrategy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Document) GetChunkStrategyOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChunkStrategy) { + return map[string]interface{}{}, false + } + return o.ChunkStrategy, true +} + +// HasChunkStrategy returns a boolean if a field has been set. +func (o *Document) HasChunkStrategy() bool { + if o != nil && !IsNil(o.ChunkStrategy) { + return true + } + + return false +} + +// SetChunkStrategy gets a reference to the given map[string]interface{} and assigns it to the ChunkStrategy field. +func (o *Document) SetChunkStrategy(v map[string]interface{}) { + o.ChunkStrategy = v +} + +// GetStatus returns the Status field value +func (o *Document) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Document) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Document) SetStatus(v string) { + o.Status = v +} + +// GetLastModified returns the LastModified field value +func (o *Document) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Document) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Document) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Document) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Document) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Document) SetLastEditor(v string) { + o.LastEditor = v +} + +func (o Document) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Document) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["document_id"] = o.DocumentId + toSerialize["kb_id"] = o.KbId + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.SourceUri) { + toSerialize["source_uri"] = o.SourceUri + } + if !IsNil(o.ChunkStrategy) { + toSerialize["chunk_strategy"] = o.ChunkStrategy + } + toSerialize["status"] = o.Status + toSerialize["last_modified"] = o.LastModified + toSerialize["last_editor"] = o.LastEditor + return toSerialize, nil +} + +func (o *Document) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "document_id", + "kb_id", + "status", + "last_modified", + "last_editor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDocument := _Document{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDocument) + + if err != nil { + return err + } + + *o = Document(varDocument) + + return err +} + +type NullableDocument struct { + value *Document + isSet bool +} + +func (v NullableDocument) Get() *Document { + return v.value +} + +func (v *NullableDocument) Set(val *Document) { + v.value = val + v.isSet = true +} + +func (v NullableDocument) IsSet() bool { + return v.isSet +} + +func (v *NullableDocument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDocument(val *Document) *NullableDocument { + return &NullableDocument{value: val, isSet: true} +} + +func (v NullableDocument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDocument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_document_request.go b/azion-api/model_document_request.go new file mode 100644 index 0000000..5a9cf3e --- /dev/null +++ b/azion-api/model_document_request.go @@ -0,0 +1,271 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the DocumentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DocumentRequest{} + +// DocumentRequest struct for DocumentRequest +type DocumentRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + SourceUri *string `json:"source_uri,omitempty"` + ChunkStrategy map[string]interface{} `json:"chunk_strategy,omitempty"` +} + +// NewDocumentRequest instantiates a new DocumentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDocumentRequest() *DocumentRequest { + this := DocumentRequest{} + return &this +} + +// NewDocumentRequestWithDefaults instantiates a new DocumentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDocumentRequestWithDefaults() *DocumentRequest { + this := DocumentRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *DocumentRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *DocumentRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *DocumentRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *DocumentRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *DocumentRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *DocumentRequest) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *DocumentRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *DocumentRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *DocumentRequest) SetType(v string) { + o.Type = &v +} + +// GetSourceUri returns the SourceUri field value if set, zero value otherwise. +func (o *DocumentRequest) GetSourceUri() string { + if o == nil || IsNil(o.SourceUri) { + var ret string + return ret + } + return *o.SourceUri +} + +// GetSourceUriOk returns a tuple with the SourceUri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentRequest) GetSourceUriOk() (*string, bool) { + if o == nil || IsNil(o.SourceUri) { + return nil, false + } + return o.SourceUri, true +} + +// HasSourceUri returns a boolean if a field has been set. +func (o *DocumentRequest) HasSourceUri() bool { + if o != nil && !IsNil(o.SourceUri) { + return true + } + + return false +} + +// SetSourceUri gets a reference to the given string and assigns it to the SourceUri field. +func (o *DocumentRequest) SetSourceUri(v string) { + o.SourceUri = &v +} + +// GetChunkStrategy returns the ChunkStrategy field value if set, zero value otherwise. +func (o *DocumentRequest) GetChunkStrategy() map[string]interface{} { + if o == nil || IsNil(o.ChunkStrategy) { + var ret map[string]interface{} + return ret + } + return o.ChunkStrategy +} + +// GetChunkStrategyOk returns a tuple with the ChunkStrategy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DocumentRequest) GetChunkStrategyOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.ChunkStrategy) { + return map[string]interface{}{}, false + } + return o.ChunkStrategy, true +} + +// HasChunkStrategy returns a boolean if a field has been set. +func (o *DocumentRequest) HasChunkStrategy() bool { + if o != nil && !IsNil(o.ChunkStrategy) { + return true + } + + return false +} + +// SetChunkStrategy gets a reference to the given map[string]interface{} and assigns it to the ChunkStrategy field. +func (o *DocumentRequest) SetChunkStrategy(v map[string]interface{}) { + o.ChunkStrategy = v +} + +func (o DocumentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DocumentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.SourceUri) { + toSerialize["source_uri"] = o.SourceUri + } + if !IsNil(o.ChunkStrategy) { + toSerialize["chunk_strategy"] = o.ChunkStrategy + } + return toSerialize, nil +} + +type NullableDocumentRequest struct { + value *DocumentRequest + isSet bool +} + +func (v NullableDocumentRequest) Get() *DocumentRequest { + return v.value +} + +func (v *NullableDocumentRequest) Set(val *DocumentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableDocumentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableDocumentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDocumentRequest(val *DocumentRequest) *NullableDocumentRequest { + return &NullableDocumentRequest{value: val, isSet: true} +} + +func (v NullableDocumentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDocumentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_elasticsearch_endpoint.go b/azion-api/model_elasticsearch_endpoint.go new file mode 100644 index 0000000..9701d42 --- /dev/null +++ b/azion-api/model_elasticsearch_endpoint.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ElasticsearchEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ElasticsearchEndpoint{} + +// ElasticsearchEndpoint struct for ElasticsearchEndpoint +type ElasticsearchEndpoint struct { + Url string `json:"url"` + ApiKey string `json:"api_key"` + // Type identifier for this endpoint (elasticsearch) + Type string `json:"type"` +} + +type _ElasticsearchEndpoint ElasticsearchEndpoint + +// NewElasticsearchEndpoint instantiates a new ElasticsearchEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewElasticsearchEndpoint(url string, apiKey string, type_ string) *ElasticsearchEndpoint { + this := ElasticsearchEndpoint{} + this.Url = url + this.ApiKey = apiKey + this.Type = type_ + return &this +} + +// NewElasticsearchEndpointWithDefaults instantiates a new ElasticsearchEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewElasticsearchEndpointWithDefaults() *ElasticsearchEndpoint { + this := ElasticsearchEndpoint{} + return &this +} + +// GetUrl returns the Url field value +func (o *ElasticsearchEndpoint) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *ElasticsearchEndpoint) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *ElasticsearchEndpoint) SetUrl(v string) { + o.Url = v +} + +// GetApiKey returns the ApiKey field value +func (o *ElasticsearchEndpoint) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *ElasticsearchEndpoint) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *ElasticsearchEndpoint) SetApiKey(v string) { + o.ApiKey = v +} + +// GetType returns the Type field value +func (o *ElasticsearchEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ElasticsearchEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ElasticsearchEndpoint) SetType(v string) { + o.Type = v +} + +func (o ElasticsearchEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ElasticsearchEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["api_key"] = o.ApiKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ElasticsearchEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "api_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varElasticsearchEndpoint := _ElasticsearchEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varElasticsearchEndpoint) + + if err != nil { + return err + } + + *o = ElasticsearchEndpoint(varElasticsearchEndpoint) + + return err +} + +type NullableElasticsearchEndpoint struct { + value *ElasticsearchEndpoint + isSet bool +} + +func (v NullableElasticsearchEndpoint) Get() *ElasticsearchEndpoint { + return v.value +} + +func (v *NullableElasticsearchEndpoint) Set(val *ElasticsearchEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableElasticsearchEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableElasticsearchEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableElasticsearchEndpoint(val *ElasticsearchEndpoint) *NullableElasticsearchEndpoint { + return &NullableElasticsearchEndpoint{value: val, isSet: true} +} + +func (v NullableElasticsearchEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableElasticsearchEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_elasticsearch_endpoint_request.go b/azion-api/model_elasticsearch_endpoint_request.go new file mode 100644 index 0000000..39be2a6 --- /dev/null +++ b/azion-api/model_elasticsearch_endpoint_request.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ElasticsearchEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ElasticsearchEndpointRequest{} + +// ElasticsearchEndpointRequest struct for ElasticsearchEndpointRequest +type ElasticsearchEndpointRequest struct { + Url string `json:"url"` + ApiKey string `json:"api_key"` + // Type identifier for this endpoint (elasticsearch) + Type string `json:"type"` +} + +type _ElasticsearchEndpointRequest ElasticsearchEndpointRequest + +// NewElasticsearchEndpointRequest instantiates a new ElasticsearchEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewElasticsearchEndpointRequest(url string, apiKey string, type_ string) *ElasticsearchEndpointRequest { + this := ElasticsearchEndpointRequest{} + this.Url = url + this.ApiKey = apiKey + this.Type = type_ + return &this +} + +// NewElasticsearchEndpointRequestWithDefaults instantiates a new ElasticsearchEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewElasticsearchEndpointRequestWithDefaults() *ElasticsearchEndpointRequest { + this := ElasticsearchEndpointRequest{} + return &this +} + +// GetUrl returns the Url field value +func (o *ElasticsearchEndpointRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *ElasticsearchEndpointRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *ElasticsearchEndpointRequest) SetUrl(v string) { + o.Url = v +} + +// GetApiKey returns the ApiKey field value +func (o *ElasticsearchEndpointRequest) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *ElasticsearchEndpointRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *ElasticsearchEndpointRequest) SetApiKey(v string) { + o.ApiKey = v +} + +// GetType returns the Type field value +func (o *ElasticsearchEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ElasticsearchEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ElasticsearchEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o ElasticsearchEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ElasticsearchEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["api_key"] = o.ApiKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ElasticsearchEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "api_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varElasticsearchEndpointRequest := _ElasticsearchEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varElasticsearchEndpointRequest) + + if err != nil { + return err + } + + *o = ElasticsearchEndpointRequest(varElasticsearchEndpointRequest) + + return err +} + +type NullableElasticsearchEndpointRequest struct { + value *ElasticsearchEndpointRequest + isSet bool +} + +func (v NullableElasticsearchEndpointRequest) Get() *ElasticsearchEndpointRequest { + return v.value +} + +func (v *NullableElasticsearchEndpointRequest) Set(val *ElasticsearchEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableElasticsearchEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableElasticsearchEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableElasticsearchEndpointRequest(val *ElasticsearchEndpointRequest) *NullableElasticsearchEndpointRequest { + return &NullableElasticsearchEndpointRequest{value: val, isSet: true} +} + +func (v NullableElasticsearchEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableElasticsearchEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_error_response.go b/azion-api/model_error_response.go new file mode 100644 index 0000000..6c9bdea --- /dev/null +++ b/azion-api/model_error_response.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ErrorResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ErrorResponse{} + +// ErrorResponse Serializer for a JSON:API error response. +type ErrorResponse struct { + // Array of error objects + Errors []JSONAPIErrorObject `json:"errors"` +} + +type _ErrorResponse ErrorResponse + +// NewErrorResponse instantiates a new ErrorResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewErrorResponse(errors []JSONAPIErrorObject) *ErrorResponse { + this := ErrorResponse{} + this.Errors = errors + return &this +} + +// NewErrorResponseWithDefaults instantiates a new ErrorResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorResponseWithDefaults() *ErrorResponse { + this := ErrorResponse{} + return &this +} + +// GetErrors returns the Errors field value +func (o *ErrorResponse) GetErrors() []JSONAPIErrorObject { + if o == nil { + var ret []JSONAPIErrorObject + return ret + } + + return o.Errors +} + +// GetErrorsOk returns a tuple with the Errors field value +// and a boolean to check if the value has been set. +func (o *ErrorResponse) GetErrorsOk() ([]JSONAPIErrorObject, bool) { + if o == nil { + return nil, false + } + return o.Errors, true +} + +// SetErrors sets field value +func (o *ErrorResponse) SetErrors(v []JSONAPIErrorObject) { + o.Errors = v +} + +func (o ErrorResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ErrorResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["errors"] = o.Errors + return toSerialize, nil +} + +func (o *ErrorResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "errors", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varErrorResponse := _ErrorResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varErrorResponse) + + if err != nil { + return err + } + + *o = ErrorResponse(varErrorResponse) + + return err +} + +type NullableErrorResponse struct { + value *ErrorResponse + isSet bool +} + +func (v NullableErrorResponse) Get() *ErrorResponse { + return v.value +} + +func (v *NullableErrorResponse) Set(val *ErrorResponse) { + v.value = val + v.isSet = true +} + +func (v NullableErrorResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableErrorResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse { + return &NullableErrorResponse{value: val, isSet: true} +} + +func (v NullableErrorResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_execution.go b/azion-api/model_execution.go new file mode 100644 index 0000000..0a0f182 --- /dev/null +++ b/azion-api/model_execution.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Execution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Execution{} + +// Execution struct for Execution +type Execution struct { + Id int64 `json:"id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +type _Execution Execution + +// NewExecution instantiates a new Execution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecution(id int64, status string, createdAt time.Time, updatedAt time.Time) *Execution { + this := Execution{} + this.Id = id + this.Status = status + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + return &this +} + +// NewExecutionWithDefaults instantiates a new Execution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutionWithDefaults() *Execution { + this := Execution{} + return &this +} + +// GetId returns the Id field value +func (o *Execution) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Execution) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Execution) SetId(v int64) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *Execution) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Execution) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Execution) SetStatus(v string) { + o.Status = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *Execution) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *Execution) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *Execution) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *Execution) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *Execution) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *Execution) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +func (o Execution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Execution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + return toSerialize, nil +} + +func (o *Execution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "status", + "created_at", + "updated_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecution := _Execution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecution) + + if err != nil { + return err + } + + *o = Execution(varExecution) + + return err +} + +type NullableExecution struct { + value *Execution + isSet bool +} + +func (v NullableExecution) Get() *Execution { + return v.value +} + +func (v *NullableExecution) Set(val *Execution) { + v.value = val + v.isSet = true +} + +func (v NullableExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecution(val *Execution) *NullableExecution { + return &NullableExecution{value: val, isSet: true} +} + +func (v NullableExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_execution_script.go b/azion-api/model_execution_script.go new file mode 100644 index 0000000..5375cb9 --- /dev/null +++ b/azion-api/model_execution_script.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ExecutionScript type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ExecutionScript{} + +// ExecutionScript struct for ExecutionScript +type ExecutionScript struct { + Id int64 `json:"id"` + Name string `json:"name"` + TemplateUuid string `json:"template_uuid"` +} + +type _ExecutionScript ExecutionScript + +// NewExecutionScript instantiates a new ExecutionScript object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutionScript(id int64, name string, templateUuid string) *ExecutionScript { + this := ExecutionScript{} + this.Id = id + this.Name = name + this.TemplateUuid = templateUuid + return &this +} + +// NewExecutionScriptWithDefaults instantiates a new ExecutionScript object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutionScriptWithDefaults() *ExecutionScript { + this := ExecutionScript{} + return &this +} + +// GetId returns the Id field value +func (o *ExecutionScript) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ExecutionScript) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ExecutionScript) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ExecutionScript) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ExecutionScript) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ExecutionScript) SetName(v string) { + o.Name = v +} + +// GetTemplateUuid returns the TemplateUuid field value +func (o *ExecutionScript) GetTemplateUuid() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateUuid +} + +// GetTemplateUuidOk returns a tuple with the TemplateUuid field value +// and a boolean to check if the value has been set. +func (o *ExecutionScript) GetTemplateUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateUuid, true +} + +// SetTemplateUuid sets field value +func (o *ExecutionScript) SetTemplateUuid(v string) { + o.TemplateUuid = v +} + +func (o ExecutionScript) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ExecutionScript) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["template_uuid"] = o.TemplateUuid + return toSerialize, nil +} + +func (o *ExecutionScript) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "template_uuid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecutionScript := _ExecutionScript{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecutionScript) + + if err != nil { + return err + } + + *o = ExecutionScript(varExecutionScript) + + return err +} + +type NullableExecutionScript struct { + value *ExecutionScript + isSet bool +} + +func (v NullableExecutionScript) Get() *ExecutionScript { + return v.value +} + +func (v *NullableExecutionScript) Set(val *ExecutionScript) { + v.value = val + v.isSet = true +} + +func (v NullableExecutionScript) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutionScript) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutionScript(val *ExecutionScript) *NullableExecutionScript { + return &NullableExecutionScript{value: val, isSet: true} +} + +func (v NullableExecutionScript) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutionScript) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_executor.go b/azion-api/model_executor.go new file mode 100644 index 0000000..6d6865f --- /dev/null +++ b/azion-api/model_executor.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Executor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Executor{} + +// Executor struct for Executor +type Executor struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + IsActive bool `json:"is_active"` +} + +type _Executor Executor + +// NewExecutor instantiates a new Executor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewExecutor(id int64, name string, email string, isActive bool) *Executor { + this := Executor{} + this.Id = id + this.Name = name + this.Email = email + this.IsActive = isActive + return &this +} + +// NewExecutorWithDefaults instantiates a new Executor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewExecutorWithDefaults() *Executor { + this := Executor{} + return &this +} + +// GetId returns the Id field value +func (o *Executor) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Executor) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Executor) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Executor) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Executor) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Executor) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *Executor) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *Executor) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *Executor) SetEmail(v string) { + o.Email = v +} + +// GetIsActive returns the IsActive field value +func (o *Executor) GetIsActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsActive +} + +// GetIsActiveOk returns a tuple with the IsActive field value +// and a boolean to check if the value has been set. +func (o *Executor) GetIsActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsActive, true +} + +// SetIsActive sets field value +func (o *Executor) SetIsActive(v bool) { + o.IsActive = v +} + +func (o Executor) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Executor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["is_active"] = o.IsActive + return toSerialize, nil +} + +func (o *Executor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "is_active", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varExecutor := _Executor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varExecutor) + + if err != nil { + return err + } + + *o = Executor(varExecutor) + + return err +} + +type NullableExecutor struct { + value *Executor + isSet bool +} + +func (v NullableExecutor) Get() *Executor { + return v.value +} + +func (v *NullableExecutor) Set(val *Executor) { + v.value = val + v.isSet = true +} + +func (v NullableExecutor) IsSet() bool { + return v.isSet +} + +func (v *NullableExecutor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableExecutor(val *Executor) *NullableExecutor { + return &NullableExecutor{value: val, isSet: true} +} + +func (v NullableExecutor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableExecutor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_favorite.go b/azion-api/model_favorite.go new file mode 100644 index 0000000..be37c0e --- /dev/null +++ b/azion-api/model_favorite.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Favorite type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Favorite{} + +// Favorite struct for Favorite +type Favorite struct { + Id int64 `json:"id"` + Uri string `json:"uri"` + // Favorite type + Type string `json:"type"` + Name string `json:"name"` +} + +type _Favorite Favorite + +// NewFavorite instantiates a new Favorite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFavorite(id int64, uri string, type_ string, name string) *Favorite { + this := Favorite{} + this.Id = id + this.Uri = uri + this.Type = type_ + this.Name = name + return &this +} + +// NewFavoriteWithDefaults instantiates a new Favorite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFavoriteWithDefaults() *Favorite { + this := Favorite{} + return &this +} + +// GetId returns the Id field value +func (o *Favorite) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Favorite) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Favorite) SetId(v int64) { + o.Id = v +} + +// GetUri returns the Uri field value +func (o *Favorite) GetUri() string { + if o == nil { + var ret string + return ret + } + + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value +// and a boolean to check if the value has been set. +func (o *Favorite) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uri, true +} + +// SetUri sets field value +func (o *Favorite) SetUri(v string) { + o.Uri = v +} + +// GetType returns the Type field value +func (o *Favorite) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Favorite) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Favorite) SetType(v string) { + o.Type = v +} + +// GetName returns the Name field value +func (o *Favorite) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Favorite) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Favorite) SetName(v string) { + o.Name = v +} + +func (o Favorite) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Favorite) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["uri"] = o.Uri + toSerialize["type"] = o.Type + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *Favorite) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "uri", + "type", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFavorite := _Favorite{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFavorite) + + if err != nil { + return err + } + + *o = Favorite(varFavorite) + + return err +} + +type NullableFavorite struct { + value *Favorite + isSet bool +} + +func (v NullableFavorite) Get() *Favorite { + return v.value +} + +func (v *NullableFavorite) Set(val *Favorite) { + v.value = val + v.isSet = true +} + +func (v NullableFavorite) IsSet() bool { + return v.isSet +} + +func (v *NullableFavorite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFavorite(val *Favorite) *NullableFavorite { + return &NullableFavorite{value: val, isSet: true} +} + +func (v NullableFavorite) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFavorite) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_favorite_request.go b/azion-api/model_favorite_request.go new file mode 100644 index 0000000..7348434 --- /dev/null +++ b/azion-api/model_favorite_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FavoriteRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FavoriteRequest{} + +// FavoriteRequest struct for FavoriteRequest +type FavoriteRequest struct { + Uri string `json:"uri"` +} + +type _FavoriteRequest FavoriteRequest + +// NewFavoriteRequest instantiates a new FavoriteRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFavoriteRequest(uri string) *FavoriteRequest { + this := FavoriteRequest{} + this.Uri = uri + return &this +} + +// NewFavoriteRequestWithDefaults instantiates a new FavoriteRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFavoriteRequestWithDefaults() *FavoriteRequest { + this := FavoriteRequest{} + return &this +} + +// GetUri returns the Uri field value +func (o *FavoriteRequest) GetUri() string { + if o == nil { + var ret string + return ret + } + + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value +// and a boolean to check if the value has been set. +func (o *FavoriteRequest) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uri, true +} + +// SetUri sets field value +func (o *FavoriteRequest) SetUri(v string) { + o.Uri = v +} + +func (o FavoriteRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FavoriteRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["uri"] = o.Uri + return toSerialize, nil +} + +func (o *FavoriteRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "uri", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFavoriteRequest := _FavoriteRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFavoriteRequest) + + if err != nil { + return err + } + + *o = FavoriteRequest(varFavoriteRequest) + + return err +} + +type NullableFavoriteRequest struct { + value *FavoriteRequest + isSet bool +} + +func (v NullableFavoriteRequest) Get() *FavoriteRequest { + return v.value +} + +func (v *NullableFavoriteRequest) Set(val *FavoriteRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFavoriteRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFavoriteRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFavoriteRequest(val *FavoriteRequest) *NullableFavoriteRequest { + return &NullableFavoriteRequest{value: val, isSet: true} +} + +func (v NullableFavoriteRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFavoriteRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall.go b/azion-api/model_firewall.go new file mode 100644 index 0000000..7dad070 --- /dev/null +++ b/azion-api/model_firewall.go @@ -0,0 +1,380 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Firewall type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Firewall{} + +// Firewall struct for Firewall +type Firewall struct { + Id int64 `json:"id"` + Name string `json:"name"` + Modules *FirewallModules `json:"modules,omitempty"` + Debug *bool `json:"debug,omitempty"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ProductVersion string `json:"product_version"` +} + +type _Firewall Firewall + +// NewFirewall instantiates a new Firewall object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewall(id int64, name string, lastEditor string, lastModified time.Time, productVersion string) *Firewall { + this := Firewall{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + return &this +} + +// NewFirewallWithDefaults instantiates a new Firewall object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallWithDefaults() *Firewall { + this := Firewall{} + return &this +} + +// GetId returns the Id field value +func (o *Firewall) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Firewall) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Firewall) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Firewall) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Firewall) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Firewall) SetName(v string) { + o.Name = v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *Firewall) GetModules() FirewallModules { + if o == nil || IsNil(o.Modules) { + var ret FirewallModules + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetModulesOk() (*FirewallModules, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *Firewall) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given FirewallModules and assigns it to the Modules field. +func (o *Firewall) SetModules(v FirewallModules) { + o.Modules = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *Firewall) GetDebug() bool { + if o == nil || IsNil(o.Debug) { + var ret bool + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetDebugOk() (*bool, bool) { + if o == nil || IsNil(o.Debug) { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *Firewall) HasDebug() bool { + if o != nil && !IsNil(o.Debug) { + return true + } + + return false +} + +// SetDebug gets a reference to the given bool and assigns it to the Debug field. +func (o *Firewall) SetDebug(v bool) { + o.Debug = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Firewall) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Firewall) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Firewall) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Firewall) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *Firewall) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Firewall) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Firewall) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Firewall) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Firewall) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Firewall) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Firewall) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Firewall) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Firewall) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Firewall) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Firewall) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + if !IsNil(o.Debug) { + toSerialize["debug"] = o.Debug + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Firewall) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewall := _Firewall{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewall) + + if err != nil { + return err + } + + *o = Firewall(varFirewall) + + return err +} + +type NullableFirewall struct { + value *Firewall + isSet bool +} + +func (v NullableFirewall) Get() *Firewall { + return v.value +} + +func (v *NullableFirewall) Set(val *Firewall) { + v.value = val + v.isSet = true +} + +func (v NullableFirewall) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewall) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewall(val *Firewall) *NullableFirewall { + return &NullableFirewall{value: val, isSet: true} +} + +func (v NullableFirewall) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewall) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior.go b/azion-api/model_firewall_behavior.go new file mode 100644 index 0000000..b66b96f --- /dev/null +++ b/azion-api/model_firewall_behavior.go @@ -0,0 +1,286 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// FirewallBehavior - struct for FirewallBehavior +type FirewallBehavior struct { + FirewallBehaviorNoArgs *FirewallBehaviorNoArgs + FirewallBehaviorRunFunction *FirewallBehaviorRunFunction + FirewallBehaviorSetCustomResponse *FirewallBehaviorSetCustomResponse + FirewallBehaviorSetRateLimit *FirewallBehaviorSetRateLimit + FirewallBehaviorSetWaf *FirewallBehaviorSetWaf +} + +// FirewallBehaviorNoArgsAsFirewallBehavior is a convenience function that returns FirewallBehaviorNoArgs wrapped in FirewallBehavior +func FirewallBehaviorNoArgsAsFirewallBehavior(v *FirewallBehaviorNoArgs) FirewallBehavior { + return FirewallBehavior{ + FirewallBehaviorNoArgs: v, + } +} + +// FirewallBehaviorRunFunctionAsFirewallBehavior is a convenience function that returns FirewallBehaviorRunFunction wrapped in FirewallBehavior +func FirewallBehaviorRunFunctionAsFirewallBehavior(v *FirewallBehaviorRunFunction) FirewallBehavior { + return FirewallBehavior{ + FirewallBehaviorRunFunction: v, + } +} + +// FirewallBehaviorSetCustomResponseAsFirewallBehavior is a convenience function that returns FirewallBehaviorSetCustomResponse wrapped in FirewallBehavior +func FirewallBehaviorSetCustomResponseAsFirewallBehavior(v *FirewallBehaviorSetCustomResponse) FirewallBehavior { + return FirewallBehavior{ + FirewallBehaviorSetCustomResponse: v, + } +} + +// FirewallBehaviorSetRateLimitAsFirewallBehavior is a convenience function that returns FirewallBehaviorSetRateLimit wrapped in FirewallBehavior +func FirewallBehaviorSetRateLimitAsFirewallBehavior(v *FirewallBehaviorSetRateLimit) FirewallBehavior { + return FirewallBehavior{ + FirewallBehaviorSetRateLimit: v, + } +} + +// FirewallBehaviorSetWafAsFirewallBehavior is a convenience function that returns FirewallBehaviorSetWaf wrapped in FirewallBehavior +func FirewallBehaviorSetWafAsFirewallBehavior(v *FirewallBehaviorSetWaf) FirewallBehavior { + return FirewallBehavior{ + FirewallBehaviorSetWaf: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FirewallBehavior) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into FirewallBehaviorNoArgs + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorNoArgs) + if err == nil { + jsonFirewallBehaviorNoArgs, _ := json.Marshal(dst.FirewallBehaviorNoArgs) + if string(jsonFirewallBehaviorNoArgs) == "{}" { // empty struct + dst.FirewallBehaviorNoArgs = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorNoArgs); err != nil { + dst.FirewallBehaviorNoArgs = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorNoArgs = nil + } + + // try to unmarshal data into FirewallBehaviorRunFunction + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorRunFunction) + if err == nil { + jsonFirewallBehaviorRunFunction, _ := json.Marshal(dst.FirewallBehaviorRunFunction) + if string(jsonFirewallBehaviorRunFunction) == "{}" { // empty struct + dst.FirewallBehaviorRunFunction = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorRunFunction); err != nil { + dst.FirewallBehaviorRunFunction = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorRunFunction = nil + } + + // try to unmarshal data into FirewallBehaviorSetCustomResponse + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorSetCustomResponse) + if err == nil { + jsonFirewallBehaviorSetCustomResponse, _ := json.Marshal(dst.FirewallBehaviorSetCustomResponse) + if string(jsonFirewallBehaviorSetCustomResponse) == "{}" { // empty struct + dst.FirewallBehaviorSetCustomResponse = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorSetCustomResponse); err != nil { + dst.FirewallBehaviorSetCustomResponse = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorSetCustomResponse = nil + } + + // try to unmarshal data into FirewallBehaviorSetRateLimit + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorSetRateLimit) + if err == nil { + jsonFirewallBehaviorSetRateLimit, _ := json.Marshal(dst.FirewallBehaviorSetRateLimit) + if string(jsonFirewallBehaviorSetRateLimit) == "{}" { // empty struct + dst.FirewallBehaviorSetRateLimit = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorSetRateLimit); err != nil { + dst.FirewallBehaviorSetRateLimit = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorSetRateLimit = nil + } + + // try to unmarshal data into FirewallBehaviorSetWaf + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorSetWaf) + if err == nil { + jsonFirewallBehaviorSetWaf, _ := json.Marshal(dst.FirewallBehaviorSetWaf) + if string(jsonFirewallBehaviorSetWaf) == "{}" { // empty struct + dst.FirewallBehaviorSetWaf = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorSetWaf); err != nil { + dst.FirewallBehaviorSetWaf = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorSetWaf = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.FirewallBehaviorNoArgs = nil + dst.FirewallBehaviorRunFunction = nil + dst.FirewallBehaviorSetCustomResponse = nil + dst.FirewallBehaviorSetRateLimit = nil + dst.FirewallBehaviorSetWaf = nil + + return fmt.Errorf("data matches more than one schema in oneOf(FirewallBehavior)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(FirewallBehavior)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FirewallBehavior) MarshalJSON() ([]byte, error) { + if src.FirewallBehaviorNoArgs != nil { + return json.Marshal(&src.FirewallBehaviorNoArgs) + } + + if src.FirewallBehaviorRunFunction != nil { + return json.Marshal(&src.FirewallBehaviorRunFunction) + } + + if src.FirewallBehaviorSetCustomResponse != nil { + return json.Marshal(&src.FirewallBehaviorSetCustomResponse) + } + + if src.FirewallBehaviorSetRateLimit != nil { + return json.Marshal(&src.FirewallBehaviorSetRateLimit) + } + + if src.FirewallBehaviorSetWaf != nil { + return json.Marshal(&src.FirewallBehaviorSetWaf) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FirewallBehavior) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.FirewallBehaviorNoArgs != nil { + return obj.FirewallBehaviorNoArgs + } + + if obj.FirewallBehaviorRunFunction != nil { + return obj.FirewallBehaviorRunFunction + } + + if obj.FirewallBehaviorSetCustomResponse != nil { + return obj.FirewallBehaviorSetCustomResponse + } + + if obj.FirewallBehaviorSetRateLimit != nil { + return obj.FirewallBehaviorSetRateLimit + } + + if obj.FirewallBehaviorSetWaf != nil { + return obj.FirewallBehaviorSetWaf + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj FirewallBehavior) GetActualInstanceValue() (interface{}) { + if obj.FirewallBehaviorNoArgs != nil { + return *obj.FirewallBehaviorNoArgs + } + + if obj.FirewallBehaviorRunFunction != nil { + return *obj.FirewallBehaviorRunFunction + } + + if obj.FirewallBehaviorSetCustomResponse != nil { + return *obj.FirewallBehaviorSetCustomResponse + } + + if obj.FirewallBehaviorSetRateLimit != nil { + return *obj.FirewallBehaviorSetRateLimit + } + + if obj.FirewallBehaviorSetWaf != nil { + return *obj.FirewallBehaviorSetWaf + } + + // all schemas are nil + return nil +} + +type NullableFirewallBehavior struct { + value *FirewallBehavior + isSet bool +} + +func (v NullableFirewallBehavior) Get() *FirewallBehavior { + return v.value +} + +func (v *NullableFirewallBehavior) Set(val *FirewallBehavior) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehavior) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehavior) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehavior(val *FirewallBehavior) *NullableFirewallBehavior { + return &NullableFirewallBehavior{value: val, isSet: true} +} + +func (v NullableFirewallBehavior) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehavior) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_no_args.go b/azion-api/model_firewall_behavior_no_args.go new file mode 100644 index 0000000..5cabee7 --- /dev/null +++ b/azion-api/model_firewall_behavior_no_args.go @@ -0,0 +1,170 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorNoArgs type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorNoArgs{} + +// FirewallBehaviorNoArgs Behaviors without arguments +type FirewallBehaviorNoArgs struct { + // * `deny` - deny * `drop` - drop + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorNoArgs FirewallBehaviorNoArgs + +// NewFirewallBehaviorNoArgs instantiates a new FirewallBehaviorNoArgs object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorNoArgs(type_ string) *FirewallBehaviorNoArgs { + this := FirewallBehaviorNoArgs{} + this.Type = type_ + return &this +} + +// NewFirewallBehaviorNoArgsWithDefaults instantiates a new FirewallBehaviorNoArgs object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorNoArgsWithDefaults() *FirewallBehaviorNoArgs { + this := FirewallBehaviorNoArgs{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorNoArgs) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorNoArgs) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorNoArgs) SetType(v string) { + o.Type = v +} + +func (o FirewallBehaviorNoArgs) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorNoArgs) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorNoArgs) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorNoArgs := _FirewallBehaviorNoArgs{} + + err = json.Unmarshal(data, &varFirewallBehaviorNoArgs) + + if err != nil { + return err + } + + *o = FirewallBehaviorNoArgs(varFirewallBehaviorNoArgs) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorNoArgs struct { + value *FirewallBehaviorNoArgs + isSet bool +} + +func (v NullableFirewallBehaviorNoArgs) Get() *FirewallBehaviorNoArgs { + return v.value +} + +func (v *NullableFirewallBehaviorNoArgs) Set(val *FirewallBehaviorNoArgs) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorNoArgs) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorNoArgs) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorNoArgs(val *FirewallBehaviorNoArgs) *NullableFirewallBehaviorNoArgs { + return &NullableFirewallBehaviorNoArgs{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorNoArgs) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorNoArgs) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_no_args_request.go b/azion-api/model_firewall_behavior_no_args_request.go new file mode 100644 index 0000000..65ea848 --- /dev/null +++ b/azion-api/model_firewall_behavior_no_args_request.go @@ -0,0 +1,170 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorNoArgsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorNoArgsRequest{} + +// FirewallBehaviorNoArgsRequest Behaviors without arguments +type FirewallBehaviorNoArgsRequest struct { + // * `deny` - deny * `drop` - drop + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorNoArgsRequest FirewallBehaviorNoArgsRequest + +// NewFirewallBehaviorNoArgsRequest instantiates a new FirewallBehaviorNoArgsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorNoArgsRequest(type_ string) *FirewallBehaviorNoArgsRequest { + this := FirewallBehaviorNoArgsRequest{} + this.Type = type_ + return &this +} + +// NewFirewallBehaviorNoArgsRequestWithDefaults instantiates a new FirewallBehaviorNoArgsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorNoArgsRequestWithDefaults() *FirewallBehaviorNoArgsRequest { + this := FirewallBehaviorNoArgsRequest{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorNoArgsRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorNoArgsRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorNoArgsRequest) SetType(v string) { + o.Type = v +} + +func (o FirewallBehaviorNoArgsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorNoArgsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorNoArgsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorNoArgsRequest := _FirewallBehaviorNoArgsRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorNoArgsRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorNoArgsRequest(varFirewallBehaviorNoArgsRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorNoArgsRequest struct { + value *FirewallBehaviorNoArgsRequest + isSet bool +} + +func (v NullableFirewallBehaviorNoArgsRequest) Get() *FirewallBehaviorNoArgsRequest { + return v.value +} + +func (v *NullableFirewallBehaviorNoArgsRequest) Set(val *FirewallBehaviorNoArgsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorNoArgsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorNoArgsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorNoArgsRequest(val *FirewallBehaviorNoArgsRequest) *NullableFirewallBehaviorNoArgsRequest { + return &NullableFirewallBehaviorNoArgsRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorNoArgsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorNoArgsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_request.go b/azion-api/model_firewall_behavior_request.go new file mode 100644 index 0000000..5f0817b --- /dev/null +++ b/azion-api/model_firewall_behavior_request.go @@ -0,0 +1,286 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// FirewallBehaviorRequest - struct for FirewallBehaviorRequest +type FirewallBehaviorRequest struct { + FirewallBehaviorNoArgsRequest *FirewallBehaviorNoArgsRequest + FirewallBehaviorRunFunctionRequest *FirewallBehaviorRunFunctionRequest + FirewallBehaviorSetCustomResponseRequest *FirewallBehaviorSetCustomResponseRequest + FirewallBehaviorSetRateLimitRequest *FirewallBehaviorSetRateLimitRequest + FirewallBehaviorSetWafRequest *FirewallBehaviorSetWafRequest +} + +// FirewallBehaviorNoArgsRequestAsFirewallBehaviorRequest is a convenience function that returns FirewallBehaviorNoArgsRequest wrapped in FirewallBehaviorRequest +func FirewallBehaviorNoArgsRequestAsFirewallBehaviorRequest(v *FirewallBehaviorNoArgsRequest) FirewallBehaviorRequest { + return FirewallBehaviorRequest{ + FirewallBehaviorNoArgsRequest: v, + } +} + +// FirewallBehaviorRunFunctionRequestAsFirewallBehaviorRequest is a convenience function that returns FirewallBehaviorRunFunctionRequest wrapped in FirewallBehaviorRequest +func FirewallBehaviorRunFunctionRequestAsFirewallBehaviorRequest(v *FirewallBehaviorRunFunctionRequest) FirewallBehaviorRequest { + return FirewallBehaviorRequest{ + FirewallBehaviorRunFunctionRequest: v, + } +} + +// FirewallBehaviorSetCustomResponseRequestAsFirewallBehaviorRequest is a convenience function that returns FirewallBehaviorSetCustomResponseRequest wrapped in FirewallBehaviorRequest +func FirewallBehaviorSetCustomResponseRequestAsFirewallBehaviorRequest(v *FirewallBehaviorSetCustomResponseRequest) FirewallBehaviorRequest { + return FirewallBehaviorRequest{ + FirewallBehaviorSetCustomResponseRequest: v, + } +} + +// FirewallBehaviorSetRateLimitRequestAsFirewallBehaviorRequest is a convenience function that returns FirewallBehaviorSetRateLimitRequest wrapped in FirewallBehaviorRequest +func FirewallBehaviorSetRateLimitRequestAsFirewallBehaviorRequest(v *FirewallBehaviorSetRateLimitRequest) FirewallBehaviorRequest { + return FirewallBehaviorRequest{ + FirewallBehaviorSetRateLimitRequest: v, + } +} + +// FirewallBehaviorSetWafRequestAsFirewallBehaviorRequest is a convenience function that returns FirewallBehaviorSetWafRequest wrapped in FirewallBehaviorRequest +func FirewallBehaviorSetWafRequestAsFirewallBehaviorRequest(v *FirewallBehaviorSetWafRequest) FirewallBehaviorRequest { + return FirewallBehaviorRequest{ + FirewallBehaviorSetWafRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FirewallBehaviorRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into FirewallBehaviorNoArgsRequest + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorNoArgsRequest) + if err == nil { + jsonFirewallBehaviorNoArgsRequest, _ := json.Marshal(dst.FirewallBehaviorNoArgsRequest) + if string(jsonFirewallBehaviorNoArgsRequest) == "{}" { // empty struct + dst.FirewallBehaviorNoArgsRequest = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorNoArgsRequest); err != nil { + dst.FirewallBehaviorNoArgsRequest = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorNoArgsRequest = nil + } + + // try to unmarshal data into FirewallBehaviorRunFunctionRequest + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorRunFunctionRequest) + if err == nil { + jsonFirewallBehaviorRunFunctionRequest, _ := json.Marshal(dst.FirewallBehaviorRunFunctionRequest) + if string(jsonFirewallBehaviorRunFunctionRequest) == "{}" { // empty struct + dst.FirewallBehaviorRunFunctionRequest = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorRunFunctionRequest); err != nil { + dst.FirewallBehaviorRunFunctionRequest = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorRunFunctionRequest = nil + } + + // try to unmarshal data into FirewallBehaviorSetCustomResponseRequest + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorSetCustomResponseRequest) + if err == nil { + jsonFirewallBehaviorSetCustomResponseRequest, _ := json.Marshal(dst.FirewallBehaviorSetCustomResponseRequest) + if string(jsonFirewallBehaviorSetCustomResponseRequest) == "{}" { // empty struct + dst.FirewallBehaviorSetCustomResponseRequest = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorSetCustomResponseRequest); err != nil { + dst.FirewallBehaviorSetCustomResponseRequest = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorSetCustomResponseRequest = nil + } + + // try to unmarshal data into FirewallBehaviorSetRateLimitRequest + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorSetRateLimitRequest) + if err == nil { + jsonFirewallBehaviorSetRateLimitRequest, _ := json.Marshal(dst.FirewallBehaviorSetRateLimitRequest) + if string(jsonFirewallBehaviorSetRateLimitRequest) == "{}" { // empty struct + dst.FirewallBehaviorSetRateLimitRequest = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorSetRateLimitRequest); err != nil { + dst.FirewallBehaviorSetRateLimitRequest = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorSetRateLimitRequest = nil + } + + // try to unmarshal data into FirewallBehaviorSetWafRequest + err = newStrictDecoder(data).Decode(&dst.FirewallBehaviorSetWafRequest) + if err == nil { + jsonFirewallBehaviorSetWafRequest, _ := json.Marshal(dst.FirewallBehaviorSetWafRequest) + if string(jsonFirewallBehaviorSetWafRequest) == "{}" { // empty struct + dst.FirewallBehaviorSetWafRequest = nil + } else { + if err = validator.Validate(dst.FirewallBehaviorSetWafRequest); err != nil { + dst.FirewallBehaviorSetWafRequest = nil + } else { + match++ + } + } + } else { + dst.FirewallBehaviorSetWafRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.FirewallBehaviorNoArgsRequest = nil + dst.FirewallBehaviorRunFunctionRequest = nil + dst.FirewallBehaviorSetCustomResponseRequest = nil + dst.FirewallBehaviorSetRateLimitRequest = nil + dst.FirewallBehaviorSetWafRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(FirewallBehaviorRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(FirewallBehaviorRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FirewallBehaviorRequest) MarshalJSON() ([]byte, error) { + if src.FirewallBehaviorNoArgsRequest != nil { + return json.Marshal(&src.FirewallBehaviorNoArgsRequest) + } + + if src.FirewallBehaviorRunFunctionRequest != nil { + return json.Marshal(&src.FirewallBehaviorRunFunctionRequest) + } + + if src.FirewallBehaviorSetCustomResponseRequest != nil { + return json.Marshal(&src.FirewallBehaviorSetCustomResponseRequest) + } + + if src.FirewallBehaviorSetRateLimitRequest != nil { + return json.Marshal(&src.FirewallBehaviorSetRateLimitRequest) + } + + if src.FirewallBehaviorSetWafRequest != nil { + return json.Marshal(&src.FirewallBehaviorSetWafRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FirewallBehaviorRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.FirewallBehaviorNoArgsRequest != nil { + return obj.FirewallBehaviorNoArgsRequest + } + + if obj.FirewallBehaviorRunFunctionRequest != nil { + return obj.FirewallBehaviorRunFunctionRequest + } + + if obj.FirewallBehaviorSetCustomResponseRequest != nil { + return obj.FirewallBehaviorSetCustomResponseRequest + } + + if obj.FirewallBehaviorSetRateLimitRequest != nil { + return obj.FirewallBehaviorSetRateLimitRequest + } + + if obj.FirewallBehaviorSetWafRequest != nil { + return obj.FirewallBehaviorSetWafRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj FirewallBehaviorRequest) GetActualInstanceValue() (interface{}) { + if obj.FirewallBehaviorNoArgsRequest != nil { + return *obj.FirewallBehaviorNoArgsRequest + } + + if obj.FirewallBehaviorRunFunctionRequest != nil { + return *obj.FirewallBehaviorRunFunctionRequest + } + + if obj.FirewallBehaviorSetCustomResponseRequest != nil { + return *obj.FirewallBehaviorSetCustomResponseRequest + } + + if obj.FirewallBehaviorSetRateLimitRequest != nil { + return *obj.FirewallBehaviorSetRateLimitRequest + } + + if obj.FirewallBehaviorSetWafRequest != nil { + return *obj.FirewallBehaviorSetWafRequest + } + + // all schemas are nil + return nil +} + +type NullableFirewallBehaviorRequest struct { + value *FirewallBehaviorRequest + isSet bool +} + +func (v NullableFirewallBehaviorRequest) Get() *FirewallBehaviorRequest { + return v.value +} + +func (v *NullableFirewallBehaviorRequest) Set(val *FirewallBehaviorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorRequest(val *FirewallBehaviorRequest) *NullableFirewallBehaviorRequest { + return &NullableFirewallBehaviorRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_run_function.go b/azion-api/model_firewall_behavior_run_function.go new file mode 100644 index 0000000..633f414 --- /dev/null +++ b/azion-api/model_firewall_behavior_run_function.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorRunFunction type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorRunFunction{} + +// FirewallBehaviorRunFunction Run a function +type FirewallBehaviorRunFunction struct { + // * `run_function` - run_function + Type string `json:"type"` + Attributes FirewallBehaviorRunFunctionAttributes `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorRunFunction FirewallBehaviorRunFunction + +// NewFirewallBehaviorRunFunction instantiates a new FirewallBehaviorRunFunction object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorRunFunction(type_ string, attributes FirewallBehaviorRunFunctionAttributes) *FirewallBehaviorRunFunction { + this := FirewallBehaviorRunFunction{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorRunFunctionWithDefaults instantiates a new FirewallBehaviorRunFunction object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorRunFunctionWithDefaults() *FirewallBehaviorRunFunction { + this := FirewallBehaviorRunFunction{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorRunFunction) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorRunFunction) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorRunFunction) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorRunFunction) GetAttributes() FirewallBehaviorRunFunctionAttributes { + if o == nil { + var ret FirewallBehaviorRunFunctionAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorRunFunction) GetAttributesOk() (*FirewallBehaviorRunFunctionAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorRunFunction) SetAttributes(v FirewallBehaviorRunFunctionAttributes) { + o.Attributes = v +} + +func (o FirewallBehaviorRunFunction) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorRunFunction) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorRunFunction) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorRunFunction := _FirewallBehaviorRunFunction{} + + err = json.Unmarshal(data, &varFirewallBehaviorRunFunction) + + if err != nil { + return err + } + + *o = FirewallBehaviorRunFunction(varFirewallBehaviorRunFunction) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorRunFunction struct { + value *FirewallBehaviorRunFunction + isSet bool +} + +func (v NullableFirewallBehaviorRunFunction) Get() *FirewallBehaviorRunFunction { + return v.value +} + +func (v *NullableFirewallBehaviorRunFunction) Set(val *FirewallBehaviorRunFunction) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorRunFunction) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorRunFunction) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorRunFunction(val *FirewallBehaviorRunFunction) *NullableFirewallBehaviorRunFunction { + return &NullableFirewallBehaviorRunFunction{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorRunFunction) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorRunFunction) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_run_function_attributes.go b/azion-api/model_firewall_behavior_run_function_attributes.go new file mode 100644 index 0000000..74ec125 --- /dev/null +++ b/azion-api/model_firewall_behavior_run_function_attributes.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorRunFunctionAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorRunFunctionAttributes{} + +// FirewallBehaviorRunFunctionAttributes struct for FirewallBehaviorRunFunctionAttributes +type FirewallBehaviorRunFunctionAttributes struct { + Value int64 `json:"value"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorRunFunctionAttributes FirewallBehaviorRunFunctionAttributes + +// NewFirewallBehaviorRunFunctionAttributes instantiates a new FirewallBehaviorRunFunctionAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorRunFunctionAttributes(value int64) *FirewallBehaviorRunFunctionAttributes { + this := FirewallBehaviorRunFunctionAttributes{} + this.Value = value + return &this +} + +// NewFirewallBehaviorRunFunctionAttributesWithDefaults instantiates a new FirewallBehaviorRunFunctionAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorRunFunctionAttributesWithDefaults() *FirewallBehaviorRunFunctionAttributes { + this := FirewallBehaviorRunFunctionAttributes{} + return &this +} + +// GetValue returns the Value field value +func (o *FirewallBehaviorRunFunctionAttributes) GetValue() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorRunFunctionAttributes) GetValueOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *FirewallBehaviorRunFunctionAttributes) SetValue(v int64) { + o.Value = v +} + +func (o FirewallBehaviorRunFunctionAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorRunFunctionAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorRunFunctionAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorRunFunctionAttributes := _FirewallBehaviorRunFunctionAttributes{} + + err = json.Unmarshal(data, &varFirewallBehaviorRunFunctionAttributes) + + if err != nil { + return err + } + + *o = FirewallBehaviorRunFunctionAttributes(varFirewallBehaviorRunFunctionAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorRunFunctionAttributes struct { + value *FirewallBehaviorRunFunctionAttributes + isSet bool +} + +func (v NullableFirewallBehaviorRunFunctionAttributes) Get() *FirewallBehaviorRunFunctionAttributes { + return v.value +} + +func (v *NullableFirewallBehaviorRunFunctionAttributes) Set(val *FirewallBehaviorRunFunctionAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorRunFunctionAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorRunFunctionAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorRunFunctionAttributes(val *FirewallBehaviorRunFunctionAttributes) *NullableFirewallBehaviorRunFunctionAttributes { + return &NullableFirewallBehaviorRunFunctionAttributes{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorRunFunctionAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorRunFunctionAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_run_function_attributes_request.go b/azion-api/model_firewall_behavior_run_function_attributes_request.go new file mode 100644 index 0000000..a410e9e --- /dev/null +++ b/azion-api/model_firewall_behavior_run_function_attributes_request.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorRunFunctionAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorRunFunctionAttributesRequest{} + +// FirewallBehaviorRunFunctionAttributesRequest struct for FirewallBehaviorRunFunctionAttributesRequest +type FirewallBehaviorRunFunctionAttributesRequest struct { + Value int64 `json:"value"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorRunFunctionAttributesRequest FirewallBehaviorRunFunctionAttributesRequest + +// NewFirewallBehaviorRunFunctionAttributesRequest instantiates a new FirewallBehaviorRunFunctionAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorRunFunctionAttributesRequest(value int64) *FirewallBehaviorRunFunctionAttributesRequest { + this := FirewallBehaviorRunFunctionAttributesRequest{} + this.Value = value + return &this +} + +// NewFirewallBehaviorRunFunctionAttributesRequestWithDefaults instantiates a new FirewallBehaviorRunFunctionAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorRunFunctionAttributesRequestWithDefaults() *FirewallBehaviorRunFunctionAttributesRequest { + this := FirewallBehaviorRunFunctionAttributesRequest{} + return &this +} + +// GetValue returns the Value field value +func (o *FirewallBehaviorRunFunctionAttributesRequest) GetValue() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorRunFunctionAttributesRequest) GetValueOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *FirewallBehaviorRunFunctionAttributesRequest) SetValue(v int64) { + o.Value = v +} + +func (o FirewallBehaviorRunFunctionAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorRunFunctionAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["value"] = o.Value + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorRunFunctionAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorRunFunctionAttributesRequest := _FirewallBehaviorRunFunctionAttributesRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorRunFunctionAttributesRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorRunFunctionAttributesRequest(varFirewallBehaviorRunFunctionAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "value") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorRunFunctionAttributesRequest struct { + value *FirewallBehaviorRunFunctionAttributesRequest + isSet bool +} + +func (v NullableFirewallBehaviorRunFunctionAttributesRequest) Get() *FirewallBehaviorRunFunctionAttributesRequest { + return v.value +} + +func (v *NullableFirewallBehaviorRunFunctionAttributesRequest) Set(val *FirewallBehaviorRunFunctionAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorRunFunctionAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorRunFunctionAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorRunFunctionAttributesRequest(val *FirewallBehaviorRunFunctionAttributesRequest) *NullableFirewallBehaviorRunFunctionAttributesRequest { + return &NullableFirewallBehaviorRunFunctionAttributesRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorRunFunctionAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorRunFunctionAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_run_function_request.go b/azion-api/model_firewall_behavior_run_function_request.go new file mode 100644 index 0000000..d4e6aa2 --- /dev/null +++ b/azion-api/model_firewall_behavior_run_function_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorRunFunctionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorRunFunctionRequest{} + +// FirewallBehaviorRunFunctionRequest Run a function +type FirewallBehaviorRunFunctionRequest struct { + // * `run_function` - run_function + Type string `json:"type"` + Attributes FirewallBehaviorRunFunctionAttributesRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorRunFunctionRequest FirewallBehaviorRunFunctionRequest + +// NewFirewallBehaviorRunFunctionRequest instantiates a new FirewallBehaviorRunFunctionRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorRunFunctionRequest(type_ string, attributes FirewallBehaviorRunFunctionAttributesRequest) *FirewallBehaviorRunFunctionRequest { + this := FirewallBehaviorRunFunctionRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorRunFunctionRequestWithDefaults instantiates a new FirewallBehaviorRunFunctionRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorRunFunctionRequestWithDefaults() *FirewallBehaviorRunFunctionRequest { + this := FirewallBehaviorRunFunctionRequest{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorRunFunctionRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorRunFunctionRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorRunFunctionRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorRunFunctionRequest) GetAttributes() FirewallBehaviorRunFunctionAttributesRequest { + if o == nil { + var ret FirewallBehaviorRunFunctionAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorRunFunctionRequest) GetAttributesOk() (*FirewallBehaviorRunFunctionAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorRunFunctionRequest) SetAttributes(v FirewallBehaviorRunFunctionAttributesRequest) { + o.Attributes = v +} + +func (o FirewallBehaviorRunFunctionRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorRunFunctionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorRunFunctionRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorRunFunctionRequest := _FirewallBehaviorRunFunctionRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorRunFunctionRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorRunFunctionRequest(varFirewallBehaviorRunFunctionRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorRunFunctionRequest struct { + value *FirewallBehaviorRunFunctionRequest + isSet bool +} + +func (v NullableFirewallBehaviorRunFunctionRequest) Get() *FirewallBehaviorRunFunctionRequest { + return v.value +} + +func (v *NullableFirewallBehaviorRunFunctionRequest) Set(val *FirewallBehaviorRunFunctionRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorRunFunctionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorRunFunctionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorRunFunctionRequest(val *FirewallBehaviorRunFunctionRequest) *NullableFirewallBehaviorRunFunctionRequest { + return &NullableFirewallBehaviorRunFunctionRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorRunFunctionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorRunFunctionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_custom_response.go b/azion-api/model_firewall_behavior_set_custom_response.go new file mode 100644 index 0000000..5be3ee4 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_custom_response.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetCustomResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetCustomResponse{} + +// FirewallBehaviorSetCustomResponse Set a custom response +type FirewallBehaviorSetCustomResponse struct { + // * `set_custom_response` - set_custom_response + Type string `json:"type"` + Attributes FirewallBehaviorSetCustomResponseAttributes `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetCustomResponse FirewallBehaviorSetCustomResponse + +// NewFirewallBehaviorSetCustomResponse instantiates a new FirewallBehaviorSetCustomResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetCustomResponse(type_ string, attributes FirewallBehaviorSetCustomResponseAttributes) *FirewallBehaviorSetCustomResponse { + this := FirewallBehaviorSetCustomResponse{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorSetCustomResponseWithDefaults instantiates a new FirewallBehaviorSetCustomResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetCustomResponseWithDefaults() *FirewallBehaviorSetCustomResponse { + this := FirewallBehaviorSetCustomResponse{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorSetCustomResponse) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponse) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorSetCustomResponse) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorSetCustomResponse) GetAttributes() FirewallBehaviorSetCustomResponseAttributes { + if o == nil { + var ret FirewallBehaviorSetCustomResponseAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponse) GetAttributesOk() (*FirewallBehaviorSetCustomResponseAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorSetCustomResponse) SetAttributes(v FirewallBehaviorSetCustomResponseAttributes) { + o.Attributes = v +} + +func (o FirewallBehaviorSetCustomResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetCustomResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetCustomResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetCustomResponse := _FirewallBehaviorSetCustomResponse{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetCustomResponse) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetCustomResponse(varFirewallBehaviorSetCustomResponse) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetCustomResponse struct { + value *FirewallBehaviorSetCustomResponse + isSet bool +} + +func (v NullableFirewallBehaviorSetCustomResponse) Get() *FirewallBehaviorSetCustomResponse { + return v.value +} + +func (v *NullableFirewallBehaviorSetCustomResponse) Set(val *FirewallBehaviorSetCustomResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetCustomResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetCustomResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetCustomResponse(val *FirewallBehaviorSetCustomResponse) *NullableFirewallBehaviorSetCustomResponse { + return &NullableFirewallBehaviorSetCustomResponse{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetCustomResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetCustomResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_custom_response_attributes.go b/azion-api/model_firewall_behavior_set_custom_response_attributes.go new file mode 100644 index 0000000..d18a137 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_custom_response_attributes.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetCustomResponseAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetCustomResponseAttributes{} + +// FirewallBehaviorSetCustomResponseAttributes struct for FirewallBehaviorSetCustomResponseAttributes +type FirewallBehaviorSetCustomResponseAttributes struct { + StatusCode int64 `json:"status_code"` + ContentType *string `json:"content_type,omitempty"` + ContentBody *string `json:"content_body,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetCustomResponseAttributes FirewallBehaviorSetCustomResponseAttributes + +// NewFirewallBehaviorSetCustomResponseAttributes instantiates a new FirewallBehaviorSetCustomResponseAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetCustomResponseAttributes(statusCode int64) *FirewallBehaviorSetCustomResponseAttributes { + this := FirewallBehaviorSetCustomResponseAttributes{} + this.StatusCode = statusCode + return &this +} + +// NewFirewallBehaviorSetCustomResponseAttributesWithDefaults instantiates a new FirewallBehaviorSetCustomResponseAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetCustomResponseAttributesWithDefaults() *FirewallBehaviorSetCustomResponseAttributes { + this := FirewallBehaviorSetCustomResponseAttributes{} + return &this +} + +// GetStatusCode returns the StatusCode field value +func (o *FirewallBehaviorSetCustomResponseAttributes) GetStatusCode() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseAttributes) GetStatusCodeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.StatusCode, true +} + +// SetStatusCode sets field value +func (o *FirewallBehaviorSetCustomResponseAttributes) SetStatusCode(v int64) { + o.StatusCode = v +} + +// GetContentType returns the ContentType field value if set, zero value otherwise. +func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentType() string { + if o == nil || IsNil(o.ContentType) { + var ret string + return ret + } + return *o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ContentType) { + return nil, false + } + return o.ContentType, true +} + +// HasContentType returns a boolean if a field has been set. +func (o *FirewallBehaviorSetCustomResponseAttributes) HasContentType() bool { + if o != nil && !IsNil(o.ContentType) { + return true + } + + return false +} + +// SetContentType gets a reference to the given string and assigns it to the ContentType field. +func (o *FirewallBehaviorSetCustomResponseAttributes) SetContentType(v string) { + o.ContentType = &v +} + +// GetContentBody returns the ContentBody field value if set, zero value otherwise. +func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentBody() string { + if o == nil || IsNil(o.ContentBody) { + var ret string + return ret + } + return *o.ContentBody +} + +// GetContentBodyOk returns a tuple with the ContentBody field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseAttributes) GetContentBodyOk() (*string, bool) { + if o == nil || IsNil(o.ContentBody) { + return nil, false + } + return o.ContentBody, true +} + +// HasContentBody returns a boolean if a field has been set. +func (o *FirewallBehaviorSetCustomResponseAttributes) HasContentBody() bool { + if o != nil && !IsNil(o.ContentBody) { + return true + } + + return false +} + +// SetContentBody gets a reference to the given string and assigns it to the ContentBody field. +func (o *FirewallBehaviorSetCustomResponseAttributes) SetContentBody(v string) { + o.ContentBody = &v +} + +func (o FirewallBehaviorSetCustomResponseAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetCustomResponseAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status_code"] = o.StatusCode + if !IsNil(o.ContentType) { + toSerialize["content_type"] = o.ContentType + } + if !IsNil(o.ContentBody) { + toSerialize["content_body"] = o.ContentBody + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetCustomResponseAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status_code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetCustomResponseAttributes := _FirewallBehaviorSetCustomResponseAttributes{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetCustomResponseAttributes) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetCustomResponseAttributes(varFirewallBehaviorSetCustomResponseAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "status_code") + delete(additionalProperties, "content_type") + delete(additionalProperties, "content_body") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetCustomResponseAttributes struct { + value *FirewallBehaviorSetCustomResponseAttributes + isSet bool +} + +func (v NullableFirewallBehaviorSetCustomResponseAttributes) Get() *FirewallBehaviorSetCustomResponseAttributes { + return v.value +} + +func (v *NullableFirewallBehaviorSetCustomResponseAttributes) Set(val *FirewallBehaviorSetCustomResponseAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetCustomResponseAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetCustomResponseAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetCustomResponseAttributes(val *FirewallBehaviorSetCustomResponseAttributes) *NullableFirewallBehaviorSetCustomResponseAttributes { + return &NullableFirewallBehaviorSetCustomResponseAttributes{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetCustomResponseAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetCustomResponseAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_custom_response_attributes_request.go b/azion-api/model_firewall_behavior_set_custom_response_attributes_request.go new file mode 100644 index 0000000..3d460e8 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_custom_response_attributes_request.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetCustomResponseAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetCustomResponseAttributesRequest{} + +// FirewallBehaviorSetCustomResponseAttributesRequest struct for FirewallBehaviorSetCustomResponseAttributesRequest +type FirewallBehaviorSetCustomResponseAttributesRequest struct { + StatusCode int64 `json:"status_code"` + ContentType *string `json:"content_type,omitempty"` + ContentBody *string `json:"content_body,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetCustomResponseAttributesRequest FirewallBehaviorSetCustomResponseAttributesRequest + +// NewFirewallBehaviorSetCustomResponseAttributesRequest instantiates a new FirewallBehaviorSetCustomResponseAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetCustomResponseAttributesRequest(statusCode int64) *FirewallBehaviorSetCustomResponseAttributesRequest { + this := FirewallBehaviorSetCustomResponseAttributesRequest{} + this.StatusCode = statusCode + return &this +} + +// NewFirewallBehaviorSetCustomResponseAttributesRequestWithDefaults instantiates a new FirewallBehaviorSetCustomResponseAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetCustomResponseAttributesRequestWithDefaults() *FirewallBehaviorSetCustomResponseAttributesRequest { + this := FirewallBehaviorSetCustomResponseAttributesRequest{} + return &this +} + +// GetStatusCode returns the StatusCode field value +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetStatusCode() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetStatusCodeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.StatusCode, true +} + +// SetStatusCode sets field value +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) SetStatusCode(v int64) { + o.StatusCode = v +} + +// GetContentType returns the ContentType field value if set, zero value otherwise. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentType() string { + if o == nil || IsNil(o.ContentType) { + var ret string + return ret + } + return *o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ContentType) { + return nil, false + } + return o.ContentType, true +} + +// HasContentType returns a boolean if a field has been set. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) HasContentType() bool { + if o != nil && !IsNil(o.ContentType) { + return true + } + + return false +} + +// SetContentType gets a reference to the given string and assigns it to the ContentType field. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) SetContentType(v string) { + o.ContentType = &v +} + +// GetContentBody returns the ContentBody field value if set, zero value otherwise. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentBody() string { + if o == nil || IsNil(o.ContentBody) { + var ret string + return ret + } + return *o.ContentBody +} + +// GetContentBodyOk returns a tuple with the ContentBody field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) GetContentBodyOk() (*string, bool) { + if o == nil || IsNil(o.ContentBody) { + return nil, false + } + return o.ContentBody, true +} + +// HasContentBody returns a boolean if a field has been set. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) HasContentBody() bool { + if o != nil && !IsNil(o.ContentBody) { + return true + } + + return false +} + +// SetContentBody gets a reference to the given string and assigns it to the ContentBody field. +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) SetContentBody(v string) { + o.ContentBody = &v +} + +func (o FirewallBehaviorSetCustomResponseAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetCustomResponseAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["status_code"] = o.StatusCode + if !IsNil(o.ContentType) { + toSerialize["content_type"] = o.ContentType + } + if !IsNil(o.ContentBody) { + toSerialize["content_body"] = o.ContentBody + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetCustomResponseAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "status_code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetCustomResponseAttributesRequest := _FirewallBehaviorSetCustomResponseAttributesRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetCustomResponseAttributesRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetCustomResponseAttributesRequest(varFirewallBehaviorSetCustomResponseAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "status_code") + delete(additionalProperties, "content_type") + delete(additionalProperties, "content_body") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetCustomResponseAttributesRequest struct { + value *FirewallBehaviorSetCustomResponseAttributesRequest + isSet bool +} + +func (v NullableFirewallBehaviorSetCustomResponseAttributesRequest) Get() *FirewallBehaviorSetCustomResponseAttributesRequest { + return v.value +} + +func (v *NullableFirewallBehaviorSetCustomResponseAttributesRequest) Set(val *FirewallBehaviorSetCustomResponseAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetCustomResponseAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetCustomResponseAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetCustomResponseAttributesRequest(val *FirewallBehaviorSetCustomResponseAttributesRequest) *NullableFirewallBehaviorSetCustomResponseAttributesRequest { + return &NullableFirewallBehaviorSetCustomResponseAttributesRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetCustomResponseAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetCustomResponseAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_custom_response_request.go b/azion-api/model_firewall_behavior_set_custom_response_request.go new file mode 100644 index 0000000..716972f --- /dev/null +++ b/azion-api/model_firewall_behavior_set_custom_response_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetCustomResponseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetCustomResponseRequest{} + +// FirewallBehaviorSetCustomResponseRequest Set a custom response +type FirewallBehaviorSetCustomResponseRequest struct { + // * `set_custom_response` - set_custom_response + Type string `json:"type"` + Attributes FirewallBehaviorSetCustomResponseAttributesRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetCustomResponseRequest FirewallBehaviorSetCustomResponseRequest + +// NewFirewallBehaviorSetCustomResponseRequest instantiates a new FirewallBehaviorSetCustomResponseRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetCustomResponseRequest(type_ string, attributes FirewallBehaviorSetCustomResponseAttributesRequest) *FirewallBehaviorSetCustomResponseRequest { + this := FirewallBehaviorSetCustomResponseRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorSetCustomResponseRequestWithDefaults instantiates a new FirewallBehaviorSetCustomResponseRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetCustomResponseRequestWithDefaults() *FirewallBehaviorSetCustomResponseRequest { + this := FirewallBehaviorSetCustomResponseRequest{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorSetCustomResponseRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorSetCustomResponseRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorSetCustomResponseRequest) GetAttributes() FirewallBehaviorSetCustomResponseAttributesRequest { + if o == nil { + var ret FirewallBehaviorSetCustomResponseAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetCustomResponseRequest) GetAttributesOk() (*FirewallBehaviorSetCustomResponseAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorSetCustomResponseRequest) SetAttributes(v FirewallBehaviorSetCustomResponseAttributesRequest) { + o.Attributes = v +} + +func (o FirewallBehaviorSetCustomResponseRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetCustomResponseRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetCustomResponseRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetCustomResponseRequest := _FirewallBehaviorSetCustomResponseRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetCustomResponseRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetCustomResponseRequest(varFirewallBehaviorSetCustomResponseRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetCustomResponseRequest struct { + value *FirewallBehaviorSetCustomResponseRequest + isSet bool +} + +func (v NullableFirewallBehaviorSetCustomResponseRequest) Get() *FirewallBehaviorSetCustomResponseRequest { + return v.value +} + +func (v *NullableFirewallBehaviorSetCustomResponseRequest) Set(val *FirewallBehaviorSetCustomResponseRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetCustomResponseRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetCustomResponseRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetCustomResponseRequest(val *FirewallBehaviorSetCustomResponseRequest) *NullableFirewallBehaviorSetCustomResponseRequest { + return &NullableFirewallBehaviorSetCustomResponseRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetCustomResponseRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetCustomResponseRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_rate_limit.go b/azion-api/model_firewall_behavior_set_rate_limit.go new file mode 100644 index 0000000..30a7169 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_rate_limit.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetRateLimit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetRateLimit{} + +// FirewallBehaviorSetRateLimit Set a rate limit +type FirewallBehaviorSetRateLimit struct { + // * `set_rate_limit` - set_rate_limit + Type string `json:"type"` + Attributes FirewallBehaviorSetRateLimitAttributes `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetRateLimit FirewallBehaviorSetRateLimit + +// NewFirewallBehaviorSetRateLimit instantiates a new FirewallBehaviorSetRateLimit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetRateLimit(type_ string, attributes FirewallBehaviorSetRateLimitAttributes) *FirewallBehaviorSetRateLimit { + this := FirewallBehaviorSetRateLimit{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorSetRateLimitWithDefaults instantiates a new FirewallBehaviorSetRateLimit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetRateLimitWithDefaults() *FirewallBehaviorSetRateLimit { + this := FirewallBehaviorSetRateLimit{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorSetRateLimit) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimit) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorSetRateLimit) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorSetRateLimit) GetAttributes() FirewallBehaviorSetRateLimitAttributes { + if o == nil { + var ret FirewallBehaviorSetRateLimitAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimit) GetAttributesOk() (*FirewallBehaviorSetRateLimitAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorSetRateLimit) SetAttributes(v FirewallBehaviorSetRateLimitAttributes) { + o.Attributes = v +} + +func (o FirewallBehaviorSetRateLimit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetRateLimit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetRateLimit) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetRateLimit := _FirewallBehaviorSetRateLimit{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetRateLimit) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetRateLimit(varFirewallBehaviorSetRateLimit) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetRateLimit struct { + value *FirewallBehaviorSetRateLimit + isSet bool +} + +func (v NullableFirewallBehaviorSetRateLimit) Get() *FirewallBehaviorSetRateLimit { + return v.value +} + +func (v *NullableFirewallBehaviorSetRateLimit) Set(val *FirewallBehaviorSetRateLimit) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetRateLimit) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetRateLimit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetRateLimit(val *FirewallBehaviorSetRateLimit) *NullableFirewallBehaviorSetRateLimit { + return &NullableFirewallBehaviorSetRateLimit{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetRateLimit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetRateLimit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_rate_limit_attributes.go b/azion-api/model_firewall_behavior_set_rate_limit_attributes.go new file mode 100644 index 0000000..6074d97 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_rate_limit_attributes.go @@ -0,0 +1,284 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetRateLimitAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetRateLimitAttributes{} + +// FirewallBehaviorSetRateLimitAttributes struct for FirewallBehaviorSetRateLimitAttributes +type FirewallBehaviorSetRateLimitAttributes struct { + // * `second` - second * `minute` - minute + Type *string `json:"type,omitempty"` + // * `client_ip` - client_ip * `global` - global + LimitBy string `json:"limit_by"` + AverageRateLimit int64 `json:"average_rate_limit"` + MaximumBurstSize NullableInt64 `json:"maximum_burst_size,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetRateLimitAttributes FirewallBehaviorSetRateLimitAttributes + +// NewFirewallBehaviorSetRateLimitAttributes instantiates a new FirewallBehaviorSetRateLimitAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetRateLimitAttributes(limitBy string, averageRateLimit int64) *FirewallBehaviorSetRateLimitAttributes { + this := FirewallBehaviorSetRateLimitAttributes{} + this.LimitBy = limitBy + this.AverageRateLimit = averageRateLimit + return &this +} + +// NewFirewallBehaviorSetRateLimitAttributesWithDefaults instantiates a new FirewallBehaviorSetRateLimitAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetRateLimitAttributesWithDefaults() *FirewallBehaviorSetRateLimitAttributes { + this := FirewallBehaviorSetRateLimitAttributes{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *FirewallBehaviorSetRateLimitAttributes) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitAttributes) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *FirewallBehaviorSetRateLimitAttributes) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *FirewallBehaviorSetRateLimitAttributes) SetType(v string) { + o.Type = &v +} + +// GetLimitBy returns the LimitBy field value +func (o *FirewallBehaviorSetRateLimitAttributes) GetLimitBy() string { + if o == nil { + var ret string + return ret + } + + return o.LimitBy +} + +// GetLimitByOk returns a tuple with the LimitBy field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitAttributes) GetLimitByOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LimitBy, true +} + +// SetLimitBy sets field value +func (o *FirewallBehaviorSetRateLimitAttributes) SetLimitBy(v string) { + o.LimitBy = v +} + +// GetAverageRateLimit returns the AverageRateLimit field value +func (o *FirewallBehaviorSetRateLimitAttributes) GetAverageRateLimit() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AverageRateLimit +} + +// GetAverageRateLimitOk returns a tuple with the AverageRateLimit field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitAttributes) GetAverageRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AverageRateLimit, true +} + +// SetAverageRateLimit sets field value +func (o *FirewallBehaviorSetRateLimitAttributes) SetAverageRateLimit(v int64) { + o.AverageRateLimit = v +} + +// GetMaximumBurstSize returns the MaximumBurstSize field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallBehaviorSetRateLimitAttributes) GetMaximumBurstSize() int64 { + if o == nil || IsNil(o.MaximumBurstSize.Get()) { + var ret int64 + return ret + } + return *o.MaximumBurstSize.Get() +} + +// GetMaximumBurstSizeOk returns a tuple with the MaximumBurstSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallBehaviorSetRateLimitAttributes) GetMaximumBurstSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaximumBurstSize.Get(), o.MaximumBurstSize.IsSet() +} + +// HasMaximumBurstSize returns a boolean if a field has been set. +func (o *FirewallBehaviorSetRateLimitAttributes) HasMaximumBurstSize() bool { + if o != nil && o.MaximumBurstSize.IsSet() { + return true + } + + return false +} + +// SetMaximumBurstSize gets a reference to the given NullableInt64 and assigns it to the MaximumBurstSize field. +func (o *FirewallBehaviorSetRateLimitAttributes) SetMaximumBurstSize(v int64) { + o.MaximumBurstSize.Set(&v) +} +// SetMaximumBurstSizeNil sets the value for MaximumBurstSize to be an explicit nil +func (o *FirewallBehaviorSetRateLimitAttributes) SetMaximumBurstSizeNil() { + o.MaximumBurstSize.Set(nil) +} + +// UnsetMaximumBurstSize ensures that no value is present for MaximumBurstSize, not even an explicit nil +func (o *FirewallBehaviorSetRateLimitAttributes) UnsetMaximumBurstSize() { + o.MaximumBurstSize.Unset() +} + +func (o FirewallBehaviorSetRateLimitAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetRateLimitAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["limit_by"] = o.LimitBy + toSerialize["average_rate_limit"] = o.AverageRateLimit + if o.MaximumBurstSize.IsSet() { + toSerialize["maximum_burst_size"] = o.MaximumBurstSize.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetRateLimitAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "limit_by", + "average_rate_limit", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetRateLimitAttributes := _FirewallBehaviorSetRateLimitAttributes{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetRateLimitAttributes) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetRateLimitAttributes(varFirewallBehaviorSetRateLimitAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "limit_by") + delete(additionalProperties, "average_rate_limit") + delete(additionalProperties, "maximum_burst_size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetRateLimitAttributes struct { + value *FirewallBehaviorSetRateLimitAttributes + isSet bool +} + +func (v NullableFirewallBehaviorSetRateLimitAttributes) Get() *FirewallBehaviorSetRateLimitAttributes { + return v.value +} + +func (v *NullableFirewallBehaviorSetRateLimitAttributes) Set(val *FirewallBehaviorSetRateLimitAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetRateLimitAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetRateLimitAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetRateLimitAttributes(val *FirewallBehaviorSetRateLimitAttributes) *NullableFirewallBehaviorSetRateLimitAttributes { + return &NullableFirewallBehaviorSetRateLimitAttributes{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetRateLimitAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetRateLimitAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_rate_limit_attributes_request.go b/azion-api/model_firewall_behavior_set_rate_limit_attributes_request.go new file mode 100644 index 0000000..3689ee9 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_rate_limit_attributes_request.go @@ -0,0 +1,284 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetRateLimitAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetRateLimitAttributesRequest{} + +// FirewallBehaviorSetRateLimitAttributesRequest struct for FirewallBehaviorSetRateLimitAttributesRequest +type FirewallBehaviorSetRateLimitAttributesRequest struct { + // * `second` - second * `minute` - minute + Type *string `json:"type,omitempty"` + // * `client_ip` - client_ip * `global` - global + LimitBy string `json:"limit_by"` + AverageRateLimit int64 `json:"average_rate_limit"` + MaximumBurstSize NullableInt64 `json:"maximum_burst_size,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetRateLimitAttributesRequest FirewallBehaviorSetRateLimitAttributesRequest + +// NewFirewallBehaviorSetRateLimitAttributesRequest instantiates a new FirewallBehaviorSetRateLimitAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetRateLimitAttributesRequest(limitBy string, averageRateLimit int64) *FirewallBehaviorSetRateLimitAttributesRequest { + this := FirewallBehaviorSetRateLimitAttributesRequest{} + this.LimitBy = limitBy + this.AverageRateLimit = averageRateLimit + return &this +} + +// NewFirewallBehaviorSetRateLimitAttributesRequestWithDefaults instantiates a new FirewallBehaviorSetRateLimitAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetRateLimitAttributesRequestWithDefaults() *FirewallBehaviorSetRateLimitAttributesRequest { + this := FirewallBehaviorSetRateLimitAttributesRequest{} + return &this +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetType(v string) { + o.Type = &v +} + +// GetLimitBy returns the LimitBy field value +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetLimitBy() string { + if o == nil { + var ret string + return ret + } + + return o.LimitBy +} + +// GetLimitByOk returns a tuple with the LimitBy field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetLimitByOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LimitBy, true +} + +// SetLimitBy sets field value +func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetLimitBy(v string) { + o.LimitBy = v +} + +// GetAverageRateLimit returns the AverageRateLimit field value +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetAverageRateLimit() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AverageRateLimit +} + +// GetAverageRateLimitOk returns a tuple with the AverageRateLimit field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetAverageRateLimitOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AverageRateLimit, true +} + +// SetAverageRateLimit sets field value +func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetAverageRateLimit(v int64) { + o.AverageRateLimit = v +} + +// GetMaximumBurstSize returns the MaximumBurstSize field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetMaximumBurstSize() int64 { + if o == nil || IsNil(o.MaximumBurstSize.Get()) { + var ret int64 + return ret + } + return *o.MaximumBurstSize.Get() +} + +// GetMaximumBurstSizeOk returns a tuple with the MaximumBurstSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallBehaviorSetRateLimitAttributesRequest) GetMaximumBurstSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaximumBurstSize.Get(), o.MaximumBurstSize.IsSet() +} + +// HasMaximumBurstSize returns a boolean if a field has been set. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) HasMaximumBurstSize() bool { + if o != nil && o.MaximumBurstSize.IsSet() { + return true + } + + return false +} + +// SetMaximumBurstSize gets a reference to the given NullableInt64 and assigns it to the MaximumBurstSize field. +func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetMaximumBurstSize(v int64) { + o.MaximumBurstSize.Set(&v) +} +// SetMaximumBurstSizeNil sets the value for MaximumBurstSize to be an explicit nil +func (o *FirewallBehaviorSetRateLimitAttributesRequest) SetMaximumBurstSizeNil() { + o.MaximumBurstSize.Set(nil) +} + +// UnsetMaximumBurstSize ensures that no value is present for MaximumBurstSize, not even an explicit nil +func (o *FirewallBehaviorSetRateLimitAttributesRequest) UnsetMaximumBurstSize() { + o.MaximumBurstSize.Unset() +} + +func (o FirewallBehaviorSetRateLimitAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetRateLimitAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + toSerialize["limit_by"] = o.LimitBy + toSerialize["average_rate_limit"] = o.AverageRateLimit + if o.MaximumBurstSize.IsSet() { + toSerialize["maximum_burst_size"] = o.MaximumBurstSize.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetRateLimitAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "limit_by", + "average_rate_limit", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetRateLimitAttributesRequest := _FirewallBehaviorSetRateLimitAttributesRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetRateLimitAttributesRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetRateLimitAttributesRequest(varFirewallBehaviorSetRateLimitAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "limit_by") + delete(additionalProperties, "average_rate_limit") + delete(additionalProperties, "maximum_burst_size") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetRateLimitAttributesRequest struct { + value *FirewallBehaviorSetRateLimitAttributesRequest + isSet bool +} + +func (v NullableFirewallBehaviorSetRateLimitAttributesRequest) Get() *FirewallBehaviorSetRateLimitAttributesRequest { + return v.value +} + +func (v *NullableFirewallBehaviorSetRateLimitAttributesRequest) Set(val *FirewallBehaviorSetRateLimitAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetRateLimitAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetRateLimitAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetRateLimitAttributesRequest(val *FirewallBehaviorSetRateLimitAttributesRequest) *NullableFirewallBehaviorSetRateLimitAttributesRequest { + return &NullableFirewallBehaviorSetRateLimitAttributesRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetRateLimitAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetRateLimitAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_rate_limit_request.go b/azion-api/model_firewall_behavior_set_rate_limit_request.go new file mode 100644 index 0000000..9515184 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_rate_limit_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetRateLimitRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetRateLimitRequest{} + +// FirewallBehaviorSetRateLimitRequest Set a rate limit +type FirewallBehaviorSetRateLimitRequest struct { + // * `set_rate_limit` - set_rate_limit + Type string `json:"type"` + Attributes FirewallBehaviorSetRateLimitAttributesRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetRateLimitRequest FirewallBehaviorSetRateLimitRequest + +// NewFirewallBehaviorSetRateLimitRequest instantiates a new FirewallBehaviorSetRateLimitRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetRateLimitRequest(type_ string, attributes FirewallBehaviorSetRateLimitAttributesRequest) *FirewallBehaviorSetRateLimitRequest { + this := FirewallBehaviorSetRateLimitRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorSetRateLimitRequestWithDefaults instantiates a new FirewallBehaviorSetRateLimitRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetRateLimitRequestWithDefaults() *FirewallBehaviorSetRateLimitRequest { + this := FirewallBehaviorSetRateLimitRequest{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorSetRateLimitRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorSetRateLimitRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorSetRateLimitRequest) GetAttributes() FirewallBehaviorSetRateLimitAttributesRequest { + if o == nil { + var ret FirewallBehaviorSetRateLimitAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetRateLimitRequest) GetAttributesOk() (*FirewallBehaviorSetRateLimitAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorSetRateLimitRequest) SetAttributes(v FirewallBehaviorSetRateLimitAttributesRequest) { + o.Attributes = v +} + +func (o FirewallBehaviorSetRateLimitRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetRateLimitRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetRateLimitRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetRateLimitRequest := _FirewallBehaviorSetRateLimitRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetRateLimitRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetRateLimitRequest(varFirewallBehaviorSetRateLimitRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetRateLimitRequest struct { + value *FirewallBehaviorSetRateLimitRequest + isSet bool +} + +func (v NullableFirewallBehaviorSetRateLimitRequest) Get() *FirewallBehaviorSetRateLimitRequest { + return v.value +} + +func (v *NullableFirewallBehaviorSetRateLimitRequest) Set(val *FirewallBehaviorSetRateLimitRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetRateLimitRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetRateLimitRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetRateLimitRequest(val *FirewallBehaviorSetRateLimitRequest) *NullableFirewallBehaviorSetRateLimitRequest { + return &NullableFirewallBehaviorSetRateLimitRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetRateLimitRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetRateLimitRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_waf.go b/azion-api/model_firewall_behavior_set_waf.go new file mode 100644 index 0000000..315feba --- /dev/null +++ b/azion-api/model_firewall_behavior_set_waf.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetWaf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetWaf{} + +// FirewallBehaviorSetWaf Set a WAF +type FirewallBehaviorSetWaf struct { + // * `set_waf` - set_waf + Type string `json:"type"` + Attributes FirewallBehaviorSetWafAttributes `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetWaf FirewallBehaviorSetWaf + +// NewFirewallBehaviorSetWaf instantiates a new FirewallBehaviorSetWaf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetWaf(type_ string, attributes FirewallBehaviorSetWafAttributes) *FirewallBehaviorSetWaf { + this := FirewallBehaviorSetWaf{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorSetWafWithDefaults instantiates a new FirewallBehaviorSetWaf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetWafWithDefaults() *FirewallBehaviorSetWaf { + this := FirewallBehaviorSetWaf{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorSetWaf) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWaf) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorSetWaf) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorSetWaf) GetAttributes() FirewallBehaviorSetWafAttributes { + if o == nil { + var ret FirewallBehaviorSetWafAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWaf) GetAttributesOk() (*FirewallBehaviorSetWafAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorSetWaf) SetAttributes(v FirewallBehaviorSetWafAttributes) { + o.Attributes = v +} + +func (o FirewallBehaviorSetWaf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetWaf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetWaf) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetWaf := _FirewallBehaviorSetWaf{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetWaf) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetWaf(varFirewallBehaviorSetWaf) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetWaf struct { + value *FirewallBehaviorSetWaf + isSet bool +} + +func (v NullableFirewallBehaviorSetWaf) Get() *FirewallBehaviorSetWaf { + return v.value +} + +func (v *NullableFirewallBehaviorSetWaf) Set(val *FirewallBehaviorSetWaf) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetWaf) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetWaf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetWaf(val *FirewallBehaviorSetWaf) *NullableFirewallBehaviorSetWaf { + return &NullableFirewallBehaviorSetWaf{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetWaf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetWaf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_waf_attributes.go b/azion-api/model_firewall_behavior_set_waf_attributes.go new file mode 100644 index 0000000..a13cab9 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_waf_attributes.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetWafAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetWafAttributes{} + +// FirewallBehaviorSetWafAttributes struct for FirewallBehaviorSetWafAttributes +type FirewallBehaviorSetWafAttributes struct { + WafId int64 `json:"waf_id"` + // * `logging` - logging * `blocking` - blocking + Mode string `json:"mode"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetWafAttributes FirewallBehaviorSetWafAttributes + +// NewFirewallBehaviorSetWafAttributes instantiates a new FirewallBehaviorSetWafAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetWafAttributes(wafId int64, mode string) *FirewallBehaviorSetWafAttributes { + this := FirewallBehaviorSetWafAttributes{} + this.WafId = wafId + this.Mode = mode + return &this +} + +// NewFirewallBehaviorSetWafAttributesWithDefaults instantiates a new FirewallBehaviorSetWafAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetWafAttributesWithDefaults() *FirewallBehaviorSetWafAttributes { + this := FirewallBehaviorSetWafAttributes{} + return &this +} + +// GetWafId returns the WafId field value +func (o *FirewallBehaviorSetWafAttributes) GetWafId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.WafId +} + +// GetWafIdOk returns a tuple with the WafId field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWafAttributes) GetWafIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.WafId, true +} + +// SetWafId sets field value +func (o *FirewallBehaviorSetWafAttributes) SetWafId(v int64) { + o.WafId = v +} + +// GetMode returns the Mode field value +func (o *FirewallBehaviorSetWafAttributes) GetMode() string { + if o == nil { + var ret string + return ret + } + + return o.Mode +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWafAttributes) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mode, true +} + +// SetMode sets field value +func (o *FirewallBehaviorSetWafAttributes) SetMode(v string) { + o.Mode = v +} + +func (o FirewallBehaviorSetWafAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetWafAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["waf_id"] = o.WafId + toSerialize["mode"] = o.Mode + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetWafAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "waf_id", + "mode", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetWafAttributes := _FirewallBehaviorSetWafAttributes{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetWafAttributes) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetWafAttributes(varFirewallBehaviorSetWafAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "waf_id") + delete(additionalProperties, "mode") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetWafAttributes struct { + value *FirewallBehaviorSetWafAttributes + isSet bool +} + +func (v NullableFirewallBehaviorSetWafAttributes) Get() *FirewallBehaviorSetWafAttributes { + return v.value +} + +func (v *NullableFirewallBehaviorSetWafAttributes) Set(val *FirewallBehaviorSetWafAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetWafAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetWafAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetWafAttributes(val *FirewallBehaviorSetWafAttributes) *NullableFirewallBehaviorSetWafAttributes { + return &NullableFirewallBehaviorSetWafAttributes{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetWafAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetWafAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_waf_attributes_request.go b/azion-api/model_firewall_behavior_set_waf_attributes_request.go new file mode 100644 index 0000000..8cf966f --- /dev/null +++ b/azion-api/model_firewall_behavior_set_waf_attributes_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetWafAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetWafAttributesRequest{} + +// FirewallBehaviorSetWafAttributesRequest struct for FirewallBehaviorSetWafAttributesRequest +type FirewallBehaviorSetWafAttributesRequest struct { + WafId int64 `json:"waf_id"` + // * `logging` - logging * `blocking` - blocking + Mode string `json:"mode"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetWafAttributesRequest FirewallBehaviorSetWafAttributesRequest + +// NewFirewallBehaviorSetWafAttributesRequest instantiates a new FirewallBehaviorSetWafAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetWafAttributesRequest(wafId int64, mode string) *FirewallBehaviorSetWafAttributesRequest { + this := FirewallBehaviorSetWafAttributesRequest{} + this.WafId = wafId + this.Mode = mode + return &this +} + +// NewFirewallBehaviorSetWafAttributesRequestWithDefaults instantiates a new FirewallBehaviorSetWafAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetWafAttributesRequestWithDefaults() *FirewallBehaviorSetWafAttributesRequest { + this := FirewallBehaviorSetWafAttributesRequest{} + return &this +} + +// GetWafId returns the WafId field value +func (o *FirewallBehaviorSetWafAttributesRequest) GetWafId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.WafId +} + +// GetWafIdOk returns a tuple with the WafId field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWafAttributesRequest) GetWafIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.WafId, true +} + +// SetWafId sets field value +func (o *FirewallBehaviorSetWafAttributesRequest) SetWafId(v int64) { + o.WafId = v +} + +// GetMode returns the Mode field value +func (o *FirewallBehaviorSetWafAttributesRequest) GetMode() string { + if o == nil { + var ret string + return ret + } + + return o.Mode +} + +// GetModeOk returns a tuple with the Mode field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWafAttributesRequest) GetModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Mode, true +} + +// SetMode sets field value +func (o *FirewallBehaviorSetWafAttributesRequest) SetMode(v string) { + o.Mode = v +} + +func (o FirewallBehaviorSetWafAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetWafAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["waf_id"] = o.WafId + toSerialize["mode"] = o.Mode + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetWafAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "waf_id", + "mode", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetWafAttributesRequest := _FirewallBehaviorSetWafAttributesRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetWafAttributesRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetWafAttributesRequest(varFirewallBehaviorSetWafAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "waf_id") + delete(additionalProperties, "mode") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetWafAttributesRequest struct { + value *FirewallBehaviorSetWafAttributesRequest + isSet bool +} + +func (v NullableFirewallBehaviorSetWafAttributesRequest) Get() *FirewallBehaviorSetWafAttributesRequest { + return v.value +} + +func (v *NullableFirewallBehaviorSetWafAttributesRequest) Set(val *FirewallBehaviorSetWafAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetWafAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetWafAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetWafAttributesRequest(val *FirewallBehaviorSetWafAttributesRequest) *NullableFirewallBehaviorSetWafAttributesRequest { + return &NullableFirewallBehaviorSetWafAttributesRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetWafAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetWafAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_behavior_set_waf_request.go b/azion-api/model_firewall_behavior_set_waf_request.go new file mode 100644 index 0000000..ff56504 --- /dev/null +++ b/azion-api/model_firewall_behavior_set_waf_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the FirewallBehaviorSetWafRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallBehaviorSetWafRequest{} + +// FirewallBehaviorSetWafRequest Set a WAF +type FirewallBehaviorSetWafRequest struct { + // * `set_waf` - set_waf + Type string `json:"type"` + Attributes FirewallBehaviorSetWafAttributesRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _FirewallBehaviorSetWafRequest FirewallBehaviorSetWafRequest + +// NewFirewallBehaviorSetWafRequest instantiates a new FirewallBehaviorSetWafRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallBehaviorSetWafRequest(type_ string, attributes FirewallBehaviorSetWafAttributesRequest) *FirewallBehaviorSetWafRequest { + this := FirewallBehaviorSetWafRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewFirewallBehaviorSetWafRequestWithDefaults instantiates a new FirewallBehaviorSetWafRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallBehaviorSetWafRequestWithDefaults() *FirewallBehaviorSetWafRequest { + this := FirewallBehaviorSetWafRequest{} + return &this +} + +// GetType returns the Type field value +func (o *FirewallBehaviorSetWafRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWafRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *FirewallBehaviorSetWafRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *FirewallBehaviorSetWafRequest) GetAttributes() FirewallBehaviorSetWafAttributesRequest { + if o == nil { + var ret FirewallBehaviorSetWafAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *FirewallBehaviorSetWafRequest) GetAttributesOk() (*FirewallBehaviorSetWafAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *FirewallBehaviorSetWafRequest) SetAttributes(v FirewallBehaviorSetWafAttributesRequest) { + o.Attributes = v +} + +func (o FirewallBehaviorSetWafRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallBehaviorSetWafRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FirewallBehaviorSetWafRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallBehaviorSetWafRequest := _FirewallBehaviorSetWafRequest{} + + err = json.Unmarshal(data, &varFirewallBehaviorSetWafRequest) + + if err != nil { + return err + } + + *o = FirewallBehaviorSetWafRequest(varFirewallBehaviorSetWafRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFirewallBehaviorSetWafRequest struct { + value *FirewallBehaviorSetWafRequest + isSet bool +} + +func (v NullableFirewallBehaviorSetWafRequest) Get() *FirewallBehaviorSetWafRequest { + return v.value +} + +func (v *NullableFirewallBehaviorSetWafRequest) Set(val *FirewallBehaviorSetWafRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallBehaviorSetWafRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallBehaviorSetWafRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallBehaviorSetWafRequest(val *FirewallBehaviorSetWafRequest) *NullableFirewallBehaviorSetWafRequest { + return &NullableFirewallBehaviorSetWafRequest{value: val, isSet: true} +} + +func (v NullableFirewallBehaviorSetWafRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallBehaviorSetWafRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_criterion_argument.go b/azion-api/model_firewall_criterion_argument.go new file mode 100644 index 0000000..4ecfaca --- /dev/null +++ b/azion-api/model_firewall_criterion_argument.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// FirewallCriterionArgument - struct for FirewallCriterionArgument +type FirewallCriterionArgument struct { + Int64 *int64 + String *string +} + +// int64AsFirewallCriterionArgument is a convenience function that returns int64 wrapped in FirewallCriterionArgument +func Int64AsFirewallCriterionArgument(v *int64) FirewallCriterionArgument { + return FirewallCriterionArgument{ + Int64: v, + } +} + +// stringAsFirewallCriterionArgument is a convenience function that returns string wrapped in FirewallCriterionArgument +func StringAsFirewallCriterionArgument(v *string) FirewallCriterionArgument { + return FirewallCriterionArgument{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FirewallCriterionArgument) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Int64 + err = newStrictDecoder(data).Decode(&dst.Int64) + if err == nil { + jsonInt64, _ := json.Marshal(dst.Int64) + if string(jsonInt64) == "{}" { // empty struct + dst.Int64 = nil + } else { + if err = validator.Validate(dst.Int64); err != nil { + dst.Int64 = nil + } else { + match++ + } + } + } else { + dst.Int64 = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Int64 = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(FirewallCriterionArgument)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(FirewallCriterionArgument)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FirewallCriterionArgument) MarshalJSON() ([]byte, error) { + if src.Int64 != nil { + return json.Marshal(&src.Int64) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FirewallCriterionArgument) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Int64 != nil { + return obj.Int64 + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj FirewallCriterionArgument) GetActualInstanceValue() (interface{}) { + if obj.Int64 != nil { + return *obj.Int64 + } + + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableFirewallCriterionArgument struct { + value *FirewallCriterionArgument + isSet bool +} + +func (v NullableFirewallCriterionArgument) Get() *FirewallCriterionArgument { + return v.value +} + +func (v *NullableFirewallCriterionArgument) Set(val *FirewallCriterionArgument) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallCriterionArgument) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallCriterionArgument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallCriterionArgument(val *FirewallCriterionArgument) *NullableFirewallCriterionArgument { + return &NullableFirewallCriterionArgument{value: val, isSet: true} +} + +func (v NullableFirewallCriterionArgument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallCriterionArgument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_criterion_argument_request.go b/azion-api/model_firewall_criterion_argument_request.go new file mode 100644 index 0000000..e8c9064 --- /dev/null +++ b/azion-api/model_firewall_criterion_argument_request.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// FirewallCriterionArgumentRequest - struct for FirewallCriterionArgumentRequest +type FirewallCriterionArgumentRequest struct { + Int64 *int64 + String *string +} + +// int64AsFirewallCriterionArgumentRequest is a convenience function that returns int64 wrapped in FirewallCriterionArgumentRequest +func Int64AsFirewallCriterionArgumentRequest(v *int64) FirewallCriterionArgumentRequest { + return FirewallCriterionArgumentRequest{ + Int64: v, + } +} + +// stringAsFirewallCriterionArgumentRequest is a convenience function that returns string wrapped in FirewallCriterionArgumentRequest +func StringAsFirewallCriterionArgumentRequest(v *string) FirewallCriterionArgumentRequest { + return FirewallCriterionArgumentRequest{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *FirewallCriterionArgumentRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Int64 + err = newStrictDecoder(data).Decode(&dst.Int64) + if err == nil { + jsonInt64, _ := json.Marshal(dst.Int64) + if string(jsonInt64) == "{}" { // empty struct + dst.Int64 = nil + } else { + if err = validator.Validate(dst.Int64); err != nil { + dst.Int64 = nil + } else { + match++ + } + } + } else { + dst.Int64 = nil + } + + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Int64 = nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(FirewallCriterionArgumentRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(FirewallCriterionArgumentRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src FirewallCriterionArgumentRequest) MarshalJSON() ([]byte, error) { + if src.Int64 != nil { + return json.Marshal(&src.Int64) + } + + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *FirewallCriterionArgumentRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Int64 != nil { + return obj.Int64 + } + + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj FirewallCriterionArgumentRequest) GetActualInstanceValue() (interface{}) { + if obj.Int64 != nil { + return *obj.Int64 + } + + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableFirewallCriterionArgumentRequest struct { + value *FirewallCriterionArgumentRequest + isSet bool +} + +func (v NullableFirewallCriterionArgumentRequest) Get() *FirewallCriterionArgumentRequest { + return v.value +} + +func (v *NullableFirewallCriterionArgumentRequest) Set(val *FirewallCriterionArgumentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallCriterionArgumentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallCriterionArgumentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallCriterionArgumentRequest(val *FirewallCriterionArgumentRequest) *NullableFirewallCriterionArgumentRequest { + return &NullableFirewallCriterionArgumentRequest{value: val, isSet: true} +} + +func (v NullableFirewallCriterionArgumentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallCriterionArgumentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_criterion_field.go b/azion-api/model_firewall_criterion_field.go new file mode 100644 index 0000000..b517b40 --- /dev/null +++ b/azion-api/model_firewall_criterion_field.go @@ -0,0 +1,264 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallCriterionField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallCriterionField{} + +// FirewallCriterionField The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. | Variable | Description | Operators | Argument | | -------- | ----------- | --------- | ---------| | ${header_accept} | | matches, does_not_match | string | | ${header_accept_encoding} | | matches, does_not_match | string | | ${header_accept_language} | | matches, does_not_match | string | | ${header_cookie} | | matches, does_not_match | string | | ${header_origin} | | matches, does_not_match | string | | ${header_referer} | | matches, does_not_match | string | | ${header_user_agent} | | matches, does_not_match | string | | ${host} | | is_equal, is_not_equal, matches, does_not_match | string | | ${network} | | is_in_list, is_not_in_list | string | | ${request_args} | | is_equal, is_not_equal, matches, does_not_match, exists, does_not_exist | string | | ${request_method} | | is_equal, is_not_equal | string | | ${request_uri} | | starts_with, does_not_starts_with, is_equal, is_not_equal, matches, does_not_match | string | | ${scheme} | | is_equal, is_not_equal | string | | ${ssl_verification_status} | | is_equal, is_not_equal | SUCCESS, CERTIFICATE_VERIFICATION_ERROR, MISSING_CLIENT_CERTIFICATE | | ${client_certificate_validation} | | is_equal, is_not_equal | string | About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. +type FirewallCriterionField struct { + // * `if` - if * `or` - or * `and` - and + Conditional string `json:"conditional"` + // * `${header_accept}` - ${header_accept} * `${header_accept_encoding}` - ${header_accept_encoding} * `${header_accept_language}` - ${header_accept_language} * `${header_cookie}` - ${header_cookie} * `${header_origin}` - ${header_origin} * `${header_referer}` - ${header_referer} * `${header_user_agent}` - ${header_user_agent} * `${host}` - ${host} * `${network}` - ${network} * `${request_args}` - ${request_args} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${scheme}` - ${scheme} * `${ssl_verification_status}` - ${ssl_verification_status} * `${client_certificate_validation}` - ${client_certificate_validation} + Variable string `json:"variable"` + // * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with + Operator string `json:"operator"` + Argument NullableFirewallCriterionArgument `json:"argument,omitempty"` +} + +type _FirewallCriterionField FirewallCriterionField + +// NewFirewallCriterionField instantiates a new FirewallCriterionField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallCriterionField(conditional string, variable string, operator string) *FirewallCriterionField { + this := FirewallCriterionField{} + this.Conditional = conditional + this.Variable = variable + this.Operator = operator + return &this +} + +// NewFirewallCriterionFieldWithDefaults instantiates a new FirewallCriterionField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallCriterionFieldWithDefaults() *FirewallCriterionField { + this := FirewallCriterionField{} + return &this +} + +// GetConditional returns the Conditional field value +func (o *FirewallCriterionField) GetConditional() string { + if o == nil { + var ret string + return ret + } + + return o.Conditional +} + +// GetConditionalOk returns a tuple with the Conditional field value +// and a boolean to check if the value has been set. +func (o *FirewallCriterionField) GetConditionalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Conditional, true +} + +// SetConditional sets field value +func (o *FirewallCriterionField) SetConditional(v string) { + o.Conditional = v +} + +// GetVariable returns the Variable field value +func (o *FirewallCriterionField) GetVariable() string { + if o == nil { + var ret string + return ret + } + + return o.Variable +} + +// GetVariableOk returns a tuple with the Variable field value +// and a boolean to check if the value has been set. +func (o *FirewallCriterionField) GetVariableOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Variable, true +} + +// SetVariable sets field value +func (o *FirewallCriterionField) SetVariable(v string) { + o.Variable = v +} + +// GetOperator returns the Operator field value +func (o *FirewallCriterionField) GetOperator() string { + if o == nil { + var ret string + return ret + } + + return o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value +// and a boolean to check if the value has been set. +func (o *FirewallCriterionField) GetOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operator, true +} + +// SetOperator sets field value +func (o *FirewallCriterionField) SetOperator(v string) { + o.Operator = v +} + +// GetArgument returns the Argument field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallCriterionField) GetArgument() FirewallCriterionArgument { + if o == nil || IsNil(o.Argument.Get()) { + var ret FirewallCriterionArgument + return ret + } + return *o.Argument.Get() +} + +// GetArgumentOk returns a tuple with the Argument field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallCriterionField) GetArgumentOk() (*FirewallCriterionArgument, bool) { + if o == nil { + return nil, false + } + return o.Argument.Get(), o.Argument.IsSet() +} + +// HasArgument returns a boolean if a field has been set. +func (o *FirewallCriterionField) HasArgument() bool { + if o != nil && o.Argument.IsSet() { + return true + } + + return false +} + +// SetArgument gets a reference to the given NullableFirewallCriterionArgument and assigns it to the Argument field. +func (o *FirewallCriterionField) SetArgument(v FirewallCriterionArgument) { + o.Argument.Set(&v) +} +// SetArgumentNil sets the value for Argument to be an explicit nil +func (o *FirewallCriterionField) SetArgumentNil() { + o.Argument.Set(nil) +} + +// UnsetArgument ensures that no value is present for Argument, not even an explicit nil +func (o *FirewallCriterionField) UnsetArgument() { + o.Argument.Unset() +} + +func (o FirewallCriterionField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallCriterionField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["conditional"] = o.Conditional + toSerialize["variable"] = o.Variable + toSerialize["operator"] = o.Operator + if o.Argument.IsSet() { + toSerialize["argument"] = o.Argument.Get() + } + return toSerialize, nil +} + +func (o *FirewallCriterionField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "conditional", + "variable", + "operator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallCriterionField := _FirewallCriterionField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallCriterionField) + + if err != nil { + return err + } + + *o = FirewallCriterionField(varFirewallCriterionField) + + return err +} + +type NullableFirewallCriterionField struct { + value *FirewallCriterionField + isSet bool +} + +func (v NullableFirewallCriterionField) Get() *FirewallCriterionField { + return v.value +} + +func (v *NullableFirewallCriterionField) Set(val *FirewallCriterionField) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallCriterionField) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallCriterionField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallCriterionField(val *FirewallCriterionField) *NullableFirewallCriterionField { + return &NullableFirewallCriterionField{value: val, isSet: true} +} + +func (v NullableFirewallCriterionField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallCriterionField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_criterion_field_request.go b/azion-api/model_firewall_criterion_field_request.go new file mode 100644 index 0000000..3ec3496 --- /dev/null +++ b/azion-api/model_firewall_criterion_field_request.go @@ -0,0 +1,264 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallCriterionFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallCriterionFieldRequest{} + +// FirewallCriterionFieldRequest The criterion which will be evaluated to define if the configured behaviors for this rule can be executed. | Variable | Description | Operators | Argument | | -------- | ----------- | --------- | ---------| | ${header_accept} | | matches, does_not_match | string | | ${header_accept_encoding} | | matches, does_not_match | string | | ${header_accept_language} | | matches, does_not_match | string | | ${header_cookie} | | matches, does_not_match | string | | ${header_origin} | | matches, does_not_match | string | | ${header_referer} | | matches, does_not_match | string | | ${header_user_agent} | | matches, does_not_match | string | | ${host} | | is_equal, is_not_equal, matches, does_not_match | string | | ${network} | | is_in_list, is_not_in_list | string | | ${request_args} | | is_equal, is_not_equal, matches, does_not_match, exists, does_not_exist | string | | ${request_method} | | is_equal, is_not_equal | string | | ${request_uri} | | starts_with, does_not_starts_with, is_equal, is_not_equal, matches, does_not_match | string | | ${scheme} | | is_equal, is_not_equal | string | | ${ssl_verification_status} | | is_equal, is_not_equal | SUCCESS, CERTIFICATE_VERIFICATION_ERROR, MISSING_CLIENT_CERTIFICATE | | ${client_certificate_validation} | | is_equal, is_not_equal | string | About `operator` field: it's the operator to be used to evaluate the current criterion. When used in the first criterion of a block it should be always the `if` operator. +type FirewallCriterionFieldRequest struct { + // * `if` - if * `or` - or * `and` - and + Conditional string `json:"conditional"` + // * `${header_accept}` - ${header_accept} * `${header_accept_encoding}` - ${header_accept_encoding} * `${header_accept_language}` - ${header_accept_language} * `${header_cookie}` - ${header_cookie} * `${header_origin}` - ${header_origin} * `${header_referer}` - ${header_referer} * `${header_user_agent}` - ${header_user_agent} * `${host}` - ${host} * `${network}` - ${network} * `${request_args}` - ${request_args} * `${request_method}` - ${request_method} * `${request_uri}` - ${request_uri} * `${scheme}` - ${scheme} * `${ssl_verification_status}` - ${ssl_verification_status} * `${client_certificate_validation}` - ${client_certificate_validation} + Variable string `json:"variable"` + // * `does_not_exist` - does_not_exist * `does_not_match` - does_not_match * `does_not_start_with` - does_not_start_with * `exists` - exists * `is_equal` - is_equal * `is_in_list` - is_in_list * `is_not_equal` - is_not_equal * `is_not_in_list` - is_not_in_list * `matches` - matches * `starts_with` - starts_with + Operator string `json:"operator"` + Argument NullableFirewallCriterionArgumentRequest `json:"argument,omitempty"` +} + +type _FirewallCriterionFieldRequest FirewallCriterionFieldRequest + +// NewFirewallCriterionFieldRequest instantiates a new FirewallCriterionFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallCriterionFieldRequest(conditional string, variable string, operator string) *FirewallCriterionFieldRequest { + this := FirewallCriterionFieldRequest{} + this.Conditional = conditional + this.Variable = variable + this.Operator = operator + return &this +} + +// NewFirewallCriterionFieldRequestWithDefaults instantiates a new FirewallCriterionFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallCriterionFieldRequestWithDefaults() *FirewallCriterionFieldRequest { + this := FirewallCriterionFieldRequest{} + return &this +} + +// GetConditional returns the Conditional field value +func (o *FirewallCriterionFieldRequest) GetConditional() string { + if o == nil { + var ret string + return ret + } + + return o.Conditional +} + +// GetConditionalOk returns a tuple with the Conditional field value +// and a boolean to check if the value has been set. +func (o *FirewallCriterionFieldRequest) GetConditionalOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Conditional, true +} + +// SetConditional sets field value +func (o *FirewallCriterionFieldRequest) SetConditional(v string) { + o.Conditional = v +} + +// GetVariable returns the Variable field value +func (o *FirewallCriterionFieldRequest) GetVariable() string { + if o == nil { + var ret string + return ret + } + + return o.Variable +} + +// GetVariableOk returns a tuple with the Variable field value +// and a boolean to check if the value has been set. +func (o *FirewallCriterionFieldRequest) GetVariableOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Variable, true +} + +// SetVariable sets field value +func (o *FirewallCriterionFieldRequest) SetVariable(v string) { + o.Variable = v +} + +// GetOperator returns the Operator field value +func (o *FirewallCriterionFieldRequest) GetOperator() string { + if o == nil { + var ret string + return ret + } + + return o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value +// and a boolean to check if the value has been set. +func (o *FirewallCriterionFieldRequest) GetOperatorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Operator, true +} + +// SetOperator sets field value +func (o *FirewallCriterionFieldRequest) SetOperator(v string) { + o.Operator = v +} + +// GetArgument returns the Argument field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallCriterionFieldRequest) GetArgument() FirewallCriterionArgumentRequest { + if o == nil || IsNil(o.Argument.Get()) { + var ret FirewallCriterionArgumentRequest + return ret + } + return *o.Argument.Get() +} + +// GetArgumentOk returns a tuple with the Argument field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallCriterionFieldRequest) GetArgumentOk() (*FirewallCriterionArgumentRequest, bool) { + if o == nil { + return nil, false + } + return o.Argument.Get(), o.Argument.IsSet() +} + +// HasArgument returns a boolean if a field has been set. +func (o *FirewallCriterionFieldRequest) HasArgument() bool { + if o != nil && o.Argument.IsSet() { + return true + } + + return false +} + +// SetArgument gets a reference to the given NullableFirewallCriterionArgumentRequest and assigns it to the Argument field. +func (o *FirewallCriterionFieldRequest) SetArgument(v FirewallCriterionArgumentRequest) { + o.Argument.Set(&v) +} +// SetArgumentNil sets the value for Argument to be an explicit nil +func (o *FirewallCriterionFieldRequest) SetArgumentNil() { + o.Argument.Set(nil) +} + +// UnsetArgument ensures that no value is present for Argument, not even an explicit nil +func (o *FirewallCriterionFieldRequest) UnsetArgument() { + o.Argument.Unset() +} + +func (o FirewallCriterionFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallCriterionFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["conditional"] = o.Conditional + toSerialize["variable"] = o.Variable + toSerialize["operator"] = o.Operator + if o.Argument.IsSet() { + toSerialize["argument"] = o.Argument.Get() + } + return toSerialize, nil +} + +func (o *FirewallCriterionFieldRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "conditional", + "variable", + "operator", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallCriterionFieldRequest := _FirewallCriterionFieldRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallCriterionFieldRequest) + + if err != nil { + return err + } + + *o = FirewallCriterionFieldRequest(varFirewallCriterionFieldRequest) + + return err +} + +type NullableFirewallCriterionFieldRequest struct { + value *FirewallCriterionFieldRequest + isSet bool +} + +func (v NullableFirewallCriterionFieldRequest) Get() *FirewallCriterionFieldRequest { + return v.value +} + +func (v *NullableFirewallCriterionFieldRequest) Set(val *FirewallCriterionFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallCriterionFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallCriterionFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallCriterionFieldRequest(val *FirewallCriterionFieldRequest) *NullableFirewallCriterionFieldRequest { + return &NullableFirewallCriterionFieldRequest{value: val, isSet: true} +} + +func (v NullableFirewallCriterionFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallCriterionFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_function_instance.go b/azion-api/model_firewall_function_instance.go new file mode 100644 index 0000000..7e96219 --- /dev/null +++ b/azion-api/model_firewall_function_instance.go @@ -0,0 +1,381 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the FirewallFunctionInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallFunctionInstance{} + +// FirewallFunctionInstance Serializer for Firewall Function Instances +type FirewallFunctionInstance struct { + Id int64 `json:"id"` + Name string `json:"name"` + Args interface{} `json:"args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + Function int64 `json:"function"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` +} + +type _FirewallFunctionInstance FirewallFunctionInstance + +// NewFirewallFunctionInstance instantiates a new FirewallFunctionInstance object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallFunctionInstance(id int64, name string, function int64, lastEditor string, lastModified time.Time) *FirewallFunctionInstance { + this := FirewallFunctionInstance{} + this.Id = id + this.Name = name + this.Function = function + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewFirewallFunctionInstanceWithDefaults instantiates a new FirewallFunctionInstance object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallFunctionInstanceWithDefaults() *FirewallFunctionInstance { + this := FirewallFunctionInstance{} + return &this +} + +// GetId returns the Id field value +func (o *FirewallFunctionInstance) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *FirewallFunctionInstance) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *FirewallFunctionInstance) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FirewallFunctionInstance) SetName(v string) { + o.Name = v +} + +// GetArgs returns the Args field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallFunctionInstance) GetArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallFunctionInstance) GetArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.Args) { + return nil, false + } + return &o.Args, true +} + +// HasArgs returns a boolean if a field has been set. +func (o *FirewallFunctionInstance) HasArgs() bool { + if o != nil && !IsNil(o.Args) { + return true + } + + return false +} + +// SetArgs gets a reference to the given interface{} and assigns it to the Args field. +func (o *FirewallFunctionInstance) SetArgs(v interface{}) { + o.Args = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *FirewallFunctionInstance) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *FirewallFunctionInstance) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *FirewallFunctionInstance) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetFunction returns the Function field value +func (o *FirewallFunctionInstance) GetFunction() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Function +} + +// GetFunctionOk returns a tuple with the Function field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetFunctionOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Function, true +} + +// SetFunction sets field value +func (o *FirewallFunctionInstance) SetFunction(v int64) { + o.Function = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FirewallFunctionInstance) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FirewallFunctionInstance) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FirewallFunctionInstance) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *FirewallFunctionInstance) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *FirewallFunctionInstance) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *FirewallFunctionInstance) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstance) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *FirewallFunctionInstance) SetLastModified(v time.Time) { + o.LastModified = v +} + +func (o FirewallFunctionInstance) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallFunctionInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.Args != nil { + toSerialize["args"] = o.Args + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + toSerialize["function"] = o.Function + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *FirewallFunctionInstance) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "function", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallFunctionInstance := _FirewallFunctionInstance{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallFunctionInstance) + + if err != nil { + return err + } + + *o = FirewallFunctionInstance(varFirewallFunctionInstance) + + return err +} + +type NullableFirewallFunctionInstance struct { + value *FirewallFunctionInstance + isSet bool +} + +func (v NullableFirewallFunctionInstance) Get() *FirewallFunctionInstance { + return v.value +} + +func (v *NullableFirewallFunctionInstance) Set(val *FirewallFunctionInstance) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallFunctionInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallFunctionInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallFunctionInstance(val *FirewallFunctionInstance) *NullableFirewallFunctionInstance { + return &NullableFirewallFunctionInstance{value: val, isSet: true} +} + +func (v NullableFirewallFunctionInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallFunctionInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_function_instance_request.go b/azion-api/model_firewall_function_instance_request.go new file mode 100644 index 0000000..58d66c0 --- /dev/null +++ b/azion-api/model_firewall_function_instance_request.go @@ -0,0 +1,296 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallFunctionInstanceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallFunctionInstanceRequest{} + +// FirewallFunctionInstanceRequest Serializer for Firewall Function Instances +type FirewallFunctionInstanceRequest struct { + Name string `json:"name"` + Args interface{} `json:"args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + Function int64 `json:"function"` + Active *bool `json:"active,omitempty"` +} + +type _FirewallFunctionInstanceRequest FirewallFunctionInstanceRequest + +// NewFirewallFunctionInstanceRequest instantiates a new FirewallFunctionInstanceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallFunctionInstanceRequest(name string, function int64) *FirewallFunctionInstanceRequest { + this := FirewallFunctionInstanceRequest{} + this.Name = name + this.Function = function + return &this +} + +// NewFirewallFunctionInstanceRequestWithDefaults instantiates a new FirewallFunctionInstanceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallFunctionInstanceRequestWithDefaults() *FirewallFunctionInstanceRequest { + this := FirewallFunctionInstanceRequest{} + return &this +} + +// GetName returns the Name field value +func (o *FirewallFunctionInstanceRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstanceRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FirewallFunctionInstanceRequest) SetName(v string) { + o.Name = v +} + +// GetArgs returns the Args field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FirewallFunctionInstanceRequest) GetArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FirewallFunctionInstanceRequest) GetArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.Args) { + return nil, false + } + return &o.Args, true +} + +// HasArgs returns a boolean if a field has been set. +func (o *FirewallFunctionInstanceRequest) HasArgs() bool { + if o != nil && !IsNil(o.Args) { + return true + } + + return false +} + +// SetArgs gets a reference to the given interface{} and assigns it to the Args field. +func (o *FirewallFunctionInstanceRequest) SetArgs(v interface{}) { + o.Args = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *FirewallFunctionInstanceRequest) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *FirewallFunctionInstanceRequest) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *FirewallFunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetFunction returns the Function field value +func (o *FirewallFunctionInstanceRequest) GetFunction() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Function +} + +// GetFunctionOk returns a tuple with the Function field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstanceRequest) GetFunctionOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Function, true +} + +// SetFunction sets field value +func (o *FirewallFunctionInstanceRequest) SetFunction(v int64) { + o.Function = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FirewallFunctionInstanceRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstanceRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FirewallFunctionInstanceRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FirewallFunctionInstanceRequest) SetActive(v bool) { + o.Active = &v +} + +func (o FirewallFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallFunctionInstanceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Args != nil { + toSerialize["args"] = o.Args + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + toSerialize["function"] = o.Function + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *FirewallFunctionInstanceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "function", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallFunctionInstanceRequest := _FirewallFunctionInstanceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallFunctionInstanceRequest) + + if err != nil { + return err + } + + *o = FirewallFunctionInstanceRequest(varFirewallFunctionInstanceRequest) + + return err +} + +type NullableFirewallFunctionInstanceRequest struct { + value *FirewallFunctionInstanceRequest + isSet bool +} + +func (v NullableFirewallFunctionInstanceRequest) Get() *FirewallFunctionInstanceRequest { + return v.value +} + +func (v *NullableFirewallFunctionInstanceRequest) Set(val *FirewallFunctionInstanceRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallFunctionInstanceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallFunctionInstanceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallFunctionInstanceRequest(val *FirewallFunctionInstanceRequest) *NullableFirewallFunctionInstanceRequest { + return &NullableFirewallFunctionInstanceRequest{value: val, isSet: true} +} + +func (v NullableFirewallFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallFunctionInstanceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_function_instance_response.go b/azion-api/model_firewall_function_instance_response.go new file mode 100644 index 0000000..1b256d1 --- /dev/null +++ b/azion-api/model_firewall_function_instance_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallFunctionInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallFunctionInstanceResponse{} + +// FirewallFunctionInstanceResponse struct for FirewallFunctionInstanceResponse +type FirewallFunctionInstanceResponse struct { + State *string `json:"state,omitempty"` + Data FirewallFunctionInstance `json:"data"` +} + +type _FirewallFunctionInstanceResponse FirewallFunctionInstanceResponse + +// NewFirewallFunctionInstanceResponse instantiates a new FirewallFunctionInstanceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallFunctionInstanceResponse(data FirewallFunctionInstance) *FirewallFunctionInstanceResponse { + this := FirewallFunctionInstanceResponse{} + this.Data = data + return &this +} + +// NewFirewallFunctionInstanceResponseWithDefaults instantiates a new FirewallFunctionInstanceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallFunctionInstanceResponseWithDefaults() *FirewallFunctionInstanceResponse { + this := FirewallFunctionInstanceResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *FirewallFunctionInstanceResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstanceResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *FirewallFunctionInstanceResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *FirewallFunctionInstanceResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *FirewallFunctionInstanceResponse) GetData() FirewallFunctionInstance { + if o == nil { + var ret FirewallFunctionInstance + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *FirewallFunctionInstanceResponse) GetDataOk() (*FirewallFunctionInstance, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *FirewallFunctionInstanceResponse) SetData(v FirewallFunctionInstance) { + o.Data = v +} + +func (o FirewallFunctionInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallFunctionInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *FirewallFunctionInstanceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallFunctionInstanceResponse := _FirewallFunctionInstanceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallFunctionInstanceResponse) + + if err != nil { + return err + } + + *o = FirewallFunctionInstanceResponse(varFirewallFunctionInstanceResponse) + + return err +} + +type NullableFirewallFunctionInstanceResponse struct { + value *FirewallFunctionInstanceResponse + isSet bool +} + +func (v NullableFirewallFunctionInstanceResponse) Get() *FirewallFunctionInstanceResponse { + return v.value +} + +func (v *NullableFirewallFunctionInstanceResponse) Set(val *FirewallFunctionInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallFunctionInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallFunctionInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallFunctionInstanceResponse(val *FirewallFunctionInstanceResponse) *NullableFirewallFunctionInstanceResponse { + return &NullableFirewallFunctionInstanceResponse{value: val, isSet: true} +} + +func (v NullableFirewallFunctionInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallFunctionInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_module.go b/azion-api/model_firewall_module.go new file mode 100644 index 0000000..e04c752 --- /dev/null +++ b/azion-api/model_firewall_module.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the FirewallModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallModule{} + +// FirewallModule Serializer for individual modules in Firewall. Handles serialization and deserialization of module settings with an enabled flag. +type FirewallModule struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewFirewallModule instantiates a new FirewallModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallModule() *FirewallModule { + this := FirewallModule{} + return &this +} + +// NewFirewallModuleWithDefaults instantiates a new FirewallModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallModuleWithDefaults() *FirewallModule { + this := FirewallModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *FirewallModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *FirewallModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *FirewallModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o FirewallModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableFirewallModule struct { + value *FirewallModule + isSet bool +} + +func (v NullableFirewallModule) Get() *FirewallModule { + return v.value +} + +func (v *NullableFirewallModule) Set(val *FirewallModule) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallModule) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallModule(val *FirewallModule) *NullableFirewallModule { + return &NullableFirewallModule{value: val, isSet: true} +} + +func (v NullableFirewallModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_module_request.go b/azion-api/model_firewall_module_request.go new file mode 100644 index 0000000..803d43e --- /dev/null +++ b/azion-api/model_firewall_module_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the FirewallModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallModuleRequest{} + +// FirewallModuleRequest Serializer for individual modules in Firewall. Handles serialization and deserialization of module settings with an enabled flag. +type FirewallModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewFirewallModuleRequest instantiates a new FirewallModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallModuleRequest() *FirewallModuleRequest { + this := FirewallModuleRequest{} + return &this +} + +// NewFirewallModuleRequestWithDefaults instantiates a new FirewallModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallModuleRequestWithDefaults() *FirewallModuleRequest { + this := FirewallModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *FirewallModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *FirewallModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *FirewallModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o FirewallModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableFirewallModuleRequest struct { + value *FirewallModuleRequest + isSet bool +} + +func (v NullableFirewallModuleRequest) Get() *FirewallModuleRequest { + return v.value +} + +func (v *NullableFirewallModuleRequest) Set(val *FirewallModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallModuleRequest(val *FirewallModuleRequest) *NullableFirewallModuleRequest { + return &NullableFirewallModuleRequest{value: val, isSet: true} +} + +func (v NullableFirewallModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_modules.go b/azion-api/model_firewall_modules.go new file mode 100644 index 0000000..d134ab9 --- /dev/null +++ b/azion-api/model_firewall_modules.go @@ -0,0 +1,267 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallModules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallModules{} + +// FirewallModules struct for FirewallModules +type FirewallModules struct { + DdosProtection FirewallModule `json:"ddos_protection"` + Functions *FirewallModule `json:"functions,omitempty"` + NetworkProtection *FirewallModule `json:"network_protection,omitempty"` + Waf *FirewallModule `json:"waf,omitempty"` +} + +type _FirewallModules FirewallModules + +// NewFirewallModules instantiates a new FirewallModules object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallModules(ddosProtection FirewallModule) *FirewallModules { + this := FirewallModules{} + this.DdosProtection = ddosProtection + return &this +} + +// NewFirewallModulesWithDefaults instantiates a new FirewallModules object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallModulesWithDefaults() *FirewallModules { + this := FirewallModules{} + return &this +} + +// GetDdosProtection returns the DdosProtection field value +func (o *FirewallModules) GetDdosProtection() FirewallModule { + if o == nil { + var ret FirewallModule + return ret + } + + return o.DdosProtection +} + +// GetDdosProtectionOk returns a tuple with the DdosProtection field value +// and a boolean to check if the value has been set. +func (o *FirewallModules) GetDdosProtectionOk() (*FirewallModule, bool) { + if o == nil { + return nil, false + } + return &o.DdosProtection, true +} + +// SetDdosProtection sets field value +func (o *FirewallModules) SetDdosProtection(v FirewallModule) { + o.DdosProtection = v +} + +// GetFunctions returns the Functions field value if set, zero value otherwise. +func (o *FirewallModules) GetFunctions() FirewallModule { + if o == nil || IsNil(o.Functions) { + var ret FirewallModule + return ret + } + return *o.Functions +} + +// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModules) GetFunctionsOk() (*FirewallModule, bool) { + if o == nil || IsNil(o.Functions) { + return nil, false + } + return o.Functions, true +} + +// HasFunctions returns a boolean if a field has been set. +func (o *FirewallModules) HasFunctions() bool { + if o != nil && !IsNil(o.Functions) { + return true + } + + return false +} + +// SetFunctions gets a reference to the given FirewallModule and assigns it to the Functions field. +func (o *FirewallModules) SetFunctions(v FirewallModule) { + o.Functions = &v +} + +// GetNetworkProtection returns the NetworkProtection field value if set, zero value otherwise. +func (o *FirewallModules) GetNetworkProtection() FirewallModule { + if o == nil || IsNil(o.NetworkProtection) { + var ret FirewallModule + return ret + } + return *o.NetworkProtection +} + +// GetNetworkProtectionOk returns a tuple with the NetworkProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModules) GetNetworkProtectionOk() (*FirewallModule, bool) { + if o == nil || IsNil(o.NetworkProtection) { + return nil, false + } + return o.NetworkProtection, true +} + +// HasNetworkProtection returns a boolean if a field has been set. +func (o *FirewallModules) HasNetworkProtection() bool { + if o != nil && !IsNil(o.NetworkProtection) { + return true + } + + return false +} + +// SetNetworkProtection gets a reference to the given FirewallModule and assigns it to the NetworkProtection field. +func (o *FirewallModules) SetNetworkProtection(v FirewallModule) { + o.NetworkProtection = &v +} + +// GetWaf returns the Waf field value if set, zero value otherwise. +func (o *FirewallModules) GetWaf() FirewallModule { + if o == nil || IsNil(o.Waf) { + var ret FirewallModule + return ret + } + return *o.Waf +} + +// GetWafOk returns a tuple with the Waf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModules) GetWafOk() (*FirewallModule, bool) { + if o == nil || IsNil(o.Waf) { + return nil, false + } + return o.Waf, true +} + +// HasWaf returns a boolean if a field has been set. +func (o *FirewallModules) HasWaf() bool { + if o != nil && !IsNil(o.Waf) { + return true + } + + return false +} + +// SetWaf gets a reference to the given FirewallModule and assigns it to the Waf field. +func (o *FirewallModules) SetWaf(v FirewallModule) { + o.Waf = &v +} + +func (o FirewallModules) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallModules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ddos_protection"] = o.DdosProtection + if !IsNil(o.Functions) { + toSerialize["functions"] = o.Functions + } + if !IsNil(o.NetworkProtection) { + toSerialize["network_protection"] = o.NetworkProtection + } + if !IsNil(o.Waf) { + toSerialize["waf"] = o.Waf + } + return toSerialize, nil +} + +func (o *FirewallModules) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ddos_protection", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallModules := _FirewallModules{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallModules) + + if err != nil { + return err + } + + *o = FirewallModules(varFirewallModules) + + return err +} + +type NullableFirewallModules struct { + value *FirewallModules + isSet bool +} + +func (v NullableFirewallModules) Get() *FirewallModules { + return v.value +} + +func (v *NullableFirewallModules) Set(val *FirewallModules) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallModules) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallModules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallModules(val *FirewallModules) *NullableFirewallModules { + return &NullableFirewallModules{value: val, isSet: true} +} + +func (v NullableFirewallModules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallModules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_modules_request.go b/azion-api/model_firewall_modules_request.go new file mode 100644 index 0000000..595932b --- /dev/null +++ b/azion-api/model_firewall_modules_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the FirewallModulesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallModulesRequest{} + +// FirewallModulesRequest struct for FirewallModulesRequest +type FirewallModulesRequest struct { + Functions *FirewallModuleRequest `json:"functions,omitempty"` + NetworkProtection *FirewallModuleRequest `json:"network_protection,omitempty"` + Waf *FirewallModuleRequest `json:"waf,omitempty"` +} + +// NewFirewallModulesRequest instantiates a new FirewallModulesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallModulesRequest() *FirewallModulesRequest { + this := FirewallModulesRequest{} + return &this +} + +// NewFirewallModulesRequestWithDefaults instantiates a new FirewallModulesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallModulesRequestWithDefaults() *FirewallModulesRequest { + this := FirewallModulesRequest{} + return &this +} + +// GetFunctions returns the Functions field value if set, zero value otherwise. +func (o *FirewallModulesRequest) GetFunctions() FirewallModuleRequest { + if o == nil || IsNil(o.Functions) { + var ret FirewallModuleRequest + return ret + } + return *o.Functions +} + +// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModulesRequest) GetFunctionsOk() (*FirewallModuleRequest, bool) { + if o == nil || IsNil(o.Functions) { + return nil, false + } + return o.Functions, true +} + +// HasFunctions returns a boolean if a field has been set. +func (o *FirewallModulesRequest) HasFunctions() bool { + if o != nil && !IsNil(o.Functions) { + return true + } + + return false +} + +// SetFunctions gets a reference to the given FirewallModuleRequest and assigns it to the Functions field. +func (o *FirewallModulesRequest) SetFunctions(v FirewallModuleRequest) { + o.Functions = &v +} + +// GetNetworkProtection returns the NetworkProtection field value if set, zero value otherwise. +func (o *FirewallModulesRequest) GetNetworkProtection() FirewallModuleRequest { + if o == nil || IsNil(o.NetworkProtection) { + var ret FirewallModuleRequest + return ret + } + return *o.NetworkProtection +} + +// GetNetworkProtectionOk returns a tuple with the NetworkProtection field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModulesRequest) GetNetworkProtectionOk() (*FirewallModuleRequest, bool) { + if o == nil || IsNil(o.NetworkProtection) { + return nil, false + } + return o.NetworkProtection, true +} + +// HasNetworkProtection returns a boolean if a field has been set. +func (o *FirewallModulesRequest) HasNetworkProtection() bool { + if o != nil && !IsNil(o.NetworkProtection) { + return true + } + + return false +} + +// SetNetworkProtection gets a reference to the given FirewallModuleRequest and assigns it to the NetworkProtection field. +func (o *FirewallModulesRequest) SetNetworkProtection(v FirewallModuleRequest) { + o.NetworkProtection = &v +} + +// GetWaf returns the Waf field value if set, zero value otherwise. +func (o *FirewallModulesRequest) GetWaf() FirewallModuleRequest { + if o == nil || IsNil(o.Waf) { + var ret FirewallModuleRequest + return ret + } + return *o.Waf +} + +// GetWafOk returns a tuple with the Waf field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallModulesRequest) GetWafOk() (*FirewallModuleRequest, bool) { + if o == nil || IsNil(o.Waf) { + return nil, false + } + return o.Waf, true +} + +// HasWaf returns a boolean if a field has been set. +func (o *FirewallModulesRequest) HasWaf() bool { + if o != nil && !IsNil(o.Waf) { + return true + } + + return false +} + +// SetWaf gets a reference to the given FirewallModuleRequest and assigns it to the Waf field. +func (o *FirewallModulesRequest) SetWaf(v FirewallModuleRequest) { + o.Waf = &v +} + +func (o FirewallModulesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallModulesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Functions) { + toSerialize["functions"] = o.Functions + } + if !IsNil(o.NetworkProtection) { + toSerialize["network_protection"] = o.NetworkProtection + } + if !IsNil(o.Waf) { + toSerialize["waf"] = o.Waf + } + return toSerialize, nil +} + +type NullableFirewallModulesRequest struct { + value *FirewallModulesRequest + isSet bool +} + +func (v NullableFirewallModulesRequest) Get() *FirewallModulesRequest { + return v.value +} + +func (v *NullableFirewallModulesRequest) Set(val *FirewallModulesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallModulesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallModulesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallModulesRequest(val *FirewallModulesRequest) *NullableFirewallModulesRequest { + return &NullableFirewallModulesRequest{value: val, isSet: true} +} + +func (v NullableFirewallModulesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallModulesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_request.go b/azion-api/model_firewall_request.go new file mode 100644 index 0000000..2e85c24 --- /dev/null +++ b/azion-api/model_firewall_request.go @@ -0,0 +1,267 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRequest{} + +// FirewallRequest struct for FirewallRequest +type FirewallRequest struct { + Name string `json:"name"` + Modules *FirewallModulesRequest `json:"modules,omitempty"` + Debug *bool `json:"debug,omitempty"` + Active *bool `json:"active,omitempty"` +} + +type _FirewallRequest FirewallRequest + +// NewFirewallRequest instantiates a new FirewallRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallRequest(name string) *FirewallRequest { + this := FirewallRequest{} + this.Name = name + return &this +} + +// NewFirewallRequestWithDefaults instantiates a new FirewallRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallRequestWithDefaults() *FirewallRequest { + this := FirewallRequest{} + return &this +} + +// GetName returns the Name field value +func (o *FirewallRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FirewallRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FirewallRequest) SetName(v string) { + o.Name = v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *FirewallRequest) GetModules() FirewallModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret FirewallModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRequest) GetModulesOk() (*FirewallModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *FirewallRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given FirewallModulesRequest and assigns it to the Modules field. +func (o *FirewallRequest) SetModules(v FirewallModulesRequest) { + o.Modules = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *FirewallRequest) GetDebug() bool { + if o == nil || IsNil(o.Debug) { + var ret bool + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRequest) GetDebugOk() (*bool, bool) { + if o == nil || IsNil(o.Debug) { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *FirewallRequest) HasDebug() bool { + if o != nil && !IsNil(o.Debug) { + return true + } + + return false +} + +// SetDebug gets a reference to the given bool and assigns it to the Debug field. +func (o *FirewallRequest) SetDebug(v bool) { + o.Debug = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FirewallRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FirewallRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FirewallRequest) SetActive(v bool) { + o.Active = &v +} + +func (o FirewallRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + if !IsNil(o.Debug) { + toSerialize["debug"] = o.Debug + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *FirewallRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallRequest := _FirewallRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallRequest) + + if err != nil { + return err + } + + *o = FirewallRequest(varFirewallRequest) + + return err +} + +type NullableFirewallRequest struct { + value *FirewallRequest + isSet bool +} + +func (v NullableFirewallRequest) Get() *FirewallRequest { + return v.value +} + +func (v *NullableFirewallRequest) Set(val *FirewallRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRequest(val *FirewallRequest) *NullableFirewallRequest { + return &NullableFirewallRequest{value: val, isSet: true} +} + +func (v NullableFirewallRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_response.go b/azion-api/model_firewall_response.go new file mode 100644 index 0000000..a73a28f --- /dev/null +++ b/azion-api/model_firewall_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallResponse{} + +// FirewallResponse struct for FirewallResponse +type FirewallResponse struct { + State *string `json:"state,omitempty"` + Data Firewall `json:"data"` +} + +type _FirewallResponse FirewallResponse + +// NewFirewallResponse instantiates a new FirewallResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallResponse(data Firewall) *FirewallResponse { + this := FirewallResponse{} + this.Data = data + return &this +} + +// NewFirewallResponseWithDefaults instantiates a new FirewallResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallResponseWithDefaults() *FirewallResponse { + this := FirewallResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *FirewallResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *FirewallResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *FirewallResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *FirewallResponse) GetData() Firewall { + if o == nil { + var ret Firewall + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *FirewallResponse) GetDataOk() (*Firewall, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *FirewallResponse) SetData(v Firewall) { + o.Data = v +} + +func (o FirewallResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *FirewallResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallResponse := _FirewallResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallResponse) + + if err != nil { + return err + } + + *o = FirewallResponse(varFirewallResponse) + + return err +} + +type NullableFirewallResponse struct { + value *FirewallResponse + isSet bool +} + +func (v NullableFirewallResponse) Get() *FirewallResponse { + return v.value +} + +func (v *NullableFirewallResponse) Set(val *FirewallResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallResponse(val *FirewallResponse) *NullableFirewallResponse { + return &NullableFirewallResponse{value: val, isSet: true} +} + +func (v NullableFirewallResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_rule.go b/azion-api/model_firewall_rule.go new file mode 100644 index 0000000..236240c --- /dev/null +++ b/azion-api/model_firewall_rule.go @@ -0,0 +1,400 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the FirewallRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRule{} + +// FirewallRule struct for FirewallRule +type FirewallRule struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + Criteria [][]FirewallCriterionField `json:"criteria"` + Behaviors []FirewallBehavior `json:"behaviors"` + Description *string `json:"description,omitempty"` + Order int64 `json:"order"` +} + +type _FirewallRule FirewallRule + +// NewFirewallRule instantiates a new FirewallRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallRule(id int64, name string, lastEditor string, lastModified time.Time, criteria [][]FirewallCriterionField, behaviors []FirewallBehavior, order int64) *FirewallRule { + this := FirewallRule{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.Criteria = criteria + this.Behaviors = behaviors + this.Order = order + return &this +} + +// NewFirewallRuleWithDefaults instantiates a new FirewallRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallRuleWithDefaults() *FirewallRule { + this := FirewallRule{} + return &this +} + +// GetId returns the Id field value +func (o *FirewallRule) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *FirewallRule) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *FirewallRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FirewallRule) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *FirewallRule) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *FirewallRule) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *FirewallRule) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *FirewallRule) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FirewallRule) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FirewallRule) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FirewallRule) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value +func (o *FirewallRule) GetCriteria() [][]FirewallCriterionField { + if o == nil { + var ret [][]FirewallCriterionField + return ret + } + + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetCriteriaOk() ([][]FirewallCriterionField, bool) { + if o == nil { + return nil, false + } + return o.Criteria, true +} + +// SetCriteria sets field value +func (o *FirewallRule) SetCriteria(v [][]FirewallCriterionField) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value +func (o *FirewallRule) GetBehaviors() []FirewallBehavior { + if o == nil { + var ret []FirewallBehavior + return ret + } + + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetBehaviorsOk() ([]FirewallBehavior, bool) { + if o == nil { + return nil, false + } + return o.Behaviors, true +} + +// SetBehaviors sets field value +func (o *FirewallRule) SetBehaviors(v []FirewallBehavior) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *FirewallRule) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *FirewallRule) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *FirewallRule) SetDescription(v string) { + o.Description = &v +} + +// GetOrder returns the Order field value +func (o *FirewallRule) GetOrder() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *FirewallRule) GetOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *FirewallRule) SetOrder(v int64) { + o.Order = v +} + +func (o FirewallRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["criteria"] = o.Criteria + toSerialize["behaviors"] = o.Behaviors + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *FirewallRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "criteria", + "behaviors", + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallRule := _FirewallRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallRule) + + if err != nil { + return err + } + + *o = FirewallRule(varFirewallRule) + + return err +} + +type NullableFirewallRule struct { + value *FirewallRule + isSet bool +} + +func (v NullableFirewallRule) Get() *FirewallRule { + return v.value +} + +func (v *NullableFirewallRule) Set(val *FirewallRule) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRule) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRule(val *FirewallRule) *NullableFirewallRule { + return &NullableFirewallRule{value: val, isSet: true} +} + +func (v NullableFirewallRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_rule_engine_order_request.go b/azion-api/model_firewall_rule_engine_order_request.go new file mode 100644 index 0000000..01de3de --- /dev/null +++ b/azion-api/model_firewall_rule_engine_order_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallRuleEngineOrderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRuleEngineOrderRequest{} + +// FirewallRuleEngineOrderRequest struct for FirewallRuleEngineOrderRequest +type FirewallRuleEngineOrderRequest struct { + Order []int64 `json:"order"` +} + +type _FirewallRuleEngineOrderRequest FirewallRuleEngineOrderRequest + +// NewFirewallRuleEngineOrderRequest instantiates a new FirewallRuleEngineOrderRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallRuleEngineOrderRequest(order []int64) *FirewallRuleEngineOrderRequest { + this := FirewallRuleEngineOrderRequest{} + this.Order = order + return &this +} + +// NewFirewallRuleEngineOrderRequestWithDefaults instantiates a new FirewallRuleEngineOrderRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallRuleEngineOrderRequestWithDefaults() *FirewallRuleEngineOrderRequest { + this := FirewallRuleEngineOrderRequest{} + return &this +} + +// GetOrder returns the Order field value +func (o *FirewallRuleEngineOrderRequest) GetOrder() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *FirewallRuleEngineOrderRequest) GetOrderOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Order, true +} + +// SetOrder sets field value +func (o *FirewallRuleEngineOrderRequest) SetOrder(v []int64) { + o.Order = v +} + +func (o FirewallRuleEngineOrderRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRuleEngineOrderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *FirewallRuleEngineOrderRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallRuleEngineOrderRequest := _FirewallRuleEngineOrderRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallRuleEngineOrderRequest) + + if err != nil { + return err + } + + *o = FirewallRuleEngineOrderRequest(varFirewallRuleEngineOrderRequest) + + return err +} + +type NullableFirewallRuleEngineOrderRequest struct { + value *FirewallRuleEngineOrderRequest + isSet bool +} + +func (v NullableFirewallRuleEngineOrderRequest) Get() *FirewallRuleEngineOrderRequest { + return v.value +} + +func (v *NullableFirewallRuleEngineOrderRequest) Set(val *FirewallRuleEngineOrderRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRuleEngineOrderRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRuleEngineOrderRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRuleEngineOrderRequest(val *FirewallRuleEngineOrderRequest) *NullableFirewallRuleEngineOrderRequest { + return &NullableFirewallRuleEngineOrderRequest{value: val, isSet: true} +} + +func (v NullableFirewallRuleEngineOrderRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRuleEngineOrderRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_rule_request.go b/azion-api/model_firewall_rule_request.go new file mode 100644 index 0000000..234140c --- /dev/null +++ b/azion-api/model_firewall_rule_request.go @@ -0,0 +1,287 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRuleRequest{} + +// FirewallRuleRequest struct for FirewallRuleRequest +type FirewallRuleRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Criteria [][]FirewallCriterionFieldRequest `json:"criteria"` + Behaviors []FirewallBehaviorRequest `json:"behaviors"` + Description *string `json:"description,omitempty"` +} + +type _FirewallRuleRequest FirewallRuleRequest + +// NewFirewallRuleRequest instantiates a new FirewallRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallRuleRequest(name string, criteria [][]FirewallCriterionFieldRequest, behaviors []FirewallBehaviorRequest) *FirewallRuleRequest { + this := FirewallRuleRequest{} + this.Name = name + this.Criteria = criteria + this.Behaviors = behaviors + return &this +} + +// NewFirewallRuleRequestWithDefaults instantiates a new FirewallRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallRuleRequestWithDefaults() *FirewallRuleRequest { + this := FirewallRuleRequest{} + return &this +} + +// GetName returns the Name field value +func (o *FirewallRuleRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FirewallRuleRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FirewallRuleRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FirewallRuleRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FirewallRuleRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FirewallRuleRequest) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value +func (o *FirewallRuleRequest) GetCriteria() [][]FirewallCriterionFieldRequest { + if o == nil { + var ret [][]FirewallCriterionFieldRequest + return ret + } + + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value +// and a boolean to check if the value has been set. +func (o *FirewallRuleRequest) GetCriteriaOk() ([][]FirewallCriterionFieldRequest, bool) { + if o == nil { + return nil, false + } + return o.Criteria, true +} + +// SetCriteria sets field value +func (o *FirewallRuleRequest) SetCriteria(v [][]FirewallCriterionFieldRequest) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value +func (o *FirewallRuleRequest) GetBehaviors() []FirewallBehaviorRequest { + if o == nil { + var ret []FirewallBehaviorRequest + return ret + } + + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value +// and a boolean to check if the value has been set. +func (o *FirewallRuleRequest) GetBehaviorsOk() ([]FirewallBehaviorRequest, bool) { + if o == nil { + return nil, false + } + return o.Behaviors, true +} + +// SetBehaviors sets field value +func (o *FirewallRuleRequest) SetBehaviors(v []FirewallBehaviorRequest) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *FirewallRuleRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *FirewallRuleRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *FirewallRuleRequest) SetDescription(v string) { + o.Description = &v +} + +func (o FirewallRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["criteria"] = o.Criteria + toSerialize["behaviors"] = o.Behaviors + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *FirewallRuleRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "criteria", + "behaviors", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallRuleRequest := _FirewallRuleRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallRuleRequest) + + if err != nil { + return err + } + + *o = FirewallRuleRequest(varFirewallRuleRequest) + + return err +} + +type NullableFirewallRuleRequest struct { + value *FirewallRuleRequest + isSet bool +} + +func (v NullableFirewallRuleRequest) Get() *FirewallRuleRequest { + return v.value +} + +func (v *NullableFirewallRuleRequest) Set(val *FirewallRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRuleRequest(val *FirewallRuleRequest) *NullableFirewallRuleRequest { + return &NullableFirewallRuleRequest{value: val, isSet: true} +} + +func (v NullableFirewallRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_firewall_rule_response.go b/azion-api/model_firewall_rule_response.go new file mode 100644 index 0000000..d827cec --- /dev/null +++ b/azion-api/model_firewall_rule_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FirewallRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FirewallRuleResponse{} + +// FirewallRuleResponse struct for FirewallRuleResponse +type FirewallRuleResponse struct { + State *string `json:"state,omitempty"` + Data FirewallRule `json:"data"` +} + +type _FirewallRuleResponse FirewallRuleResponse + +// NewFirewallRuleResponse instantiates a new FirewallRuleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFirewallRuleResponse(data FirewallRule) *FirewallRuleResponse { + this := FirewallRuleResponse{} + this.Data = data + return &this +} + +// NewFirewallRuleResponseWithDefaults instantiates a new FirewallRuleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFirewallRuleResponseWithDefaults() *FirewallRuleResponse { + this := FirewallRuleResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *FirewallRuleResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FirewallRuleResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *FirewallRuleResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *FirewallRuleResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *FirewallRuleResponse) GetData() FirewallRule { + if o == nil { + var ret FirewallRule + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *FirewallRuleResponse) GetDataOk() (*FirewallRule, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *FirewallRuleResponse) SetData(v FirewallRule) { + o.Data = v +} + +func (o FirewallRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FirewallRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *FirewallRuleResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFirewallRuleResponse := _FirewallRuleResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFirewallRuleResponse) + + if err != nil { + return err + } + + *o = FirewallRuleResponse(varFirewallRuleResponse) + + return err +} + +type NullableFirewallRuleResponse struct { + value *FirewallRuleResponse + isSet bool +} + +func (v NullableFirewallRuleResponse) Get() *FirewallRuleResponse { + return v.value +} + +func (v *NullableFirewallRuleResponse) Set(val *FirewallRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFirewallRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFirewallRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFirewallRuleResponse(val *FirewallRuleResponse) *NullableFirewallRuleResponse { + return &NullableFirewallRuleResponse{value: val, isSet: true} +} + +func (v NullableFirewallRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFirewallRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_folder.go b/azion-api/model_folder.go new file mode 100644 index 0000000..6b1a031 --- /dev/null +++ b/azion-api/model_folder.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Folder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Folder{} + +// Folder struct for Folder +type Folder struct { + Id int64 `json:"id"` + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` +} + +type _Folder Folder + +// NewFolder instantiates a new Folder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFolder(id int64, name string, scope string) *Folder { + this := Folder{} + this.Id = id + this.Name = name + this.Scope = scope + return &this +} + +// NewFolderWithDefaults instantiates a new Folder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFolderWithDefaults() *Folder { + this := Folder{} + return &this +} + +// GetId returns the Id field value +func (o *Folder) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Folder) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Folder) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Folder) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Folder) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Folder) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *Folder) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *Folder) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *Folder) SetScope(v string) { + o.Scope = v +} + +func (o Folder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Folder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + return toSerialize, nil +} + +func (o *Folder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "scope", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFolder := _Folder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFolder) + + if err != nil { + return err + } + + *o = Folder(varFolder) + + return err +} + +type NullableFolder struct { + value *Folder + isSet bool +} + +func (v NullableFolder) Get() *Folder { + return v.value +} + +func (v *NullableFolder) Set(val *Folder) { + v.value = val + v.isSet = true +} + +func (v NullableFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFolder(val *Folder) *NullableFolder { + return &NullableFolder{value: val, isSet: true} +} + +func (v NullableFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_folder_request.go b/azion-api/model_folder_request.go new file mode 100644 index 0000000..83aea00 --- /dev/null +++ b/azion-api/model_folder_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FolderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FolderRequest{} + +// FolderRequest struct for FolderRequest +type FolderRequest struct { + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` +} + +type _FolderRequest FolderRequest + +// NewFolderRequest instantiates a new FolderRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFolderRequest(name string, scope string) *FolderRequest { + this := FolderRequest{} + this.Name = name + this.Scope = scope + return &this +} + +// NewFolderRequestWithDefaults instantiates a new FolderRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFolderRequestWithDefaults() *FolderRequest { + this := FolderRequest{} + return &this +} + +// GetName returns the Name field value +func (o *FolderRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FolderRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FolderRequest) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *FolderRequest) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *FolderRequest) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *FolderRequest) SetScope(v string) { + o.Scope = v +} + +func (o FolderRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FolderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + return toSerialize, nil +} + +func (o *FolderRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "scope", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFolderRequest := _FolderRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFolderRequest) + + if err != nil { + return err + } + + *o = FolderRequest(varFolderRequest) + + return err +} + +type NullableFolderRequest struct { + value *FolderRequest + isSet bool +} + +func (v NullableFolderRequest) Get() *FolderRequest { + return v.value +} + +func (v *NullableFolderRequest) Set(val *FolderRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFolderRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFolderRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFolderRequest(val *FolderRequest) *NullableFolderRequest { + return &NullableFolderRequest{value: val, isSet: true} +} + +func (v NullableFolderRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFolderRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_function_instance.go b/azion-api/model_function_instance.go new file mode 100644 index 0000000..aea4463 --- /dev/null +++ b/azion-api/model_function_instance.go @@ -0,0 +1,381 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the FunctionInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionInstance{} + +// FunctionInstance Serializer for Application Function Instances +type FunctionInstance struct { + Id int64 `json:"id"` + Name string `json:"name"` + Args interface{} `json:"args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + Function int64 `json:"function"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` +} + +type _FunctionInstance FunctionInstance + +// NewFunctionInstance instantiates a new FunctionInstance object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionInstance(id int64, name string, function int64, lastEditor string, lastModified time.Time) *FunctionInstance { + this := FunctionInstance{} + this.Id = id + this.Name = name + this.Function = function + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewFunctionInstanceWithDefaults instantiates a new FunctionInstance object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionInstanceWithDefaults() *FunctionInstance { + this := FunctionInstance{} + return &this +} + +// GetId returns the Id field value +func (o *FunctionInstance) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *FunctionInstance) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *FunctionInstance) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FunctionInstance) SetName(v string) { + o.Name = v +} + +// GetArgs returns the Args field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FunctionInstance) GetArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FunctionInstance) GetArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.Args) { + return nil, false + } + return &o.Args, true +} + +// HasArgs returns a boolean if a field has been set. +func (o *FunctionInstance) HasArgs() bool { + if o != nil && !IsNil(o.Args) { + return true + } + + return false +} + +// SetArgs gets a reference to the given interface{} and assigns it to the Args field. +func (o *FunctionInstance) SetArgs(v interface{}) { + o.Args = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *FunctionInstance) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *FunctionInstance) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *FunctionInstance) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetFunction returns the Function field value +func (o *FunctionInstance) GetFunction() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Function +} + +// GetFunctionOk returns a tuple with the Function field value +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetFunctionOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Function, true +} + +// SetFunction sets field value +func (o *FunctionInstance) SetFunction(v int64) { + o.Function = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FunctionInstance) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FunctionInstance) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FunctionInstance) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *FunctionInstance) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *FunctionInstance) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *FunctionInstance) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *FunctionInstance) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *FunctionInstance) SetLastModified(v time.Time) { + o.LastModified = v +} + +func (o FunctionInstance) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if o.Args != nil { + toSerialize["args"] = o.Args + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + toSerialize["function"] = o.Function + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *FunctionInstance) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "function", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFunctionInstance := _FunctionInstance{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFunctionInstance) + + if err != nil { + return err + } + + *o = FunctionInstance(varFunctionInstance) + + return err +} + +type NullableFunctionInstance struct { + value *FunctionInstance + isSet bool +} + +func (v NullableFunctionInstance) Get() *FunctionInstance { + return v.value +} + +func (v *NullableFunctionInstance) Set(val *FunctionInstance) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionInstance(val *FunctionInstance) *NullableFunctionInstance { + return &NullableFunctionInstance{value: val, isSet: true} +} + +func (v NullableFunctionInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_function_instance_request.go b/azion-api/model_function_instance_request.go new file mode 100644 index 0000000..3cae135 --- /dev/null +++ b/azion-api/model_function_instance_request.go @@ -0,0 +1,296 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FunctionInstanceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionInstanceRequest{} + +// FunctionInstanceRequest Serializer for Application Function Instances +type FunctionInstanceRequest struct { + Name string `json:"name"` + Args interface{} `json:"args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + Function int64 `json:"function"` + Active *bool `json:"active,omitempty"` +} + +type _FunctionInstanceRequest FunctionInstanceRequest + +// NewFunctionInstanceRequest instantiates a new FunctionInstanceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionInstanceRequest(name string, function int64) *FunctionInstanceRequest { + this := FunctionInstanceRequest{} + this.Name = name + this.Function = function + return &this +} + +// NewFunctionInstanceRequestWithDefaults instantiates a new FunctionInstanceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionInstanceRequestWithDefaults() *FunctionInstanceRequest { + this := FunctionInstanceRequest{} + return &this +} + +// GetName returns the Name field value +func (o *FunctionInstanceRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FunctionInstanceRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FunctionInstanceRequest) SetName(v string) { + o.Name = v +} + +// GetArgs returns the Args field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FunctionInstanceRequest) GetArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FunctionInstanceRequest) GetArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.Args) { + return nil, false + } + return &o.Args, true +} + +// HasArgs returns a boolean if a field has been set. +func (o *FunctionInstanceRequest) HasArgs() bool { + if o != nil && !IsNil(o.Args) { + return true + } + + return false +} + +// SetArgs gets a reference to the given interface{} and assigns it to the Args field. +func (o *FunctionInstanceRequest) SetArgs(v interface{}) { + o.Args = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *FunctionInstanceRequest) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *FunctionInstanceRequest) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *FunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetFunction returns the Function field value +func (o *FunctionInstanceRequest) GetFunction() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Function +} + +// GetFunctionOk returns a tuple with the Function field value +// and a boolean to check if the value has been set. +func (o *FunctionInstanceRequest) GetFunctionOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Function, true +} + +// SetFunction sets field value +func (o *FunctionInstanceRequest) SetFunction(v int64) { + o.Function = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FunctionInstanceRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionInstanceRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FunctionInstanceRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FunctionInstanceRequest) SetActive(v bool) { + o.Active = &v +} + +func (o FunctionInstanceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionInstanceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if o.Args != nil { + toSerialize["args"] = o.Args + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + toSerialize["function"] = o.Function + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *FunctionInstanceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "function", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFunctionInstanceRequest := _FunctionInstanceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFunctionInstanceRequest) + + if err != nil { + return err + } + + *o = FunctionInstanceRequest(varFunctionInstanceRequest) + + return err +} + +type NullableFunctionInstanceRequest struct { + value *FunctionInstanceRequest + isSet bool +} + +func (v NullableFunctionInstanceRequest) Get() *FunctionInstanceRequest { + return v.value +} + +func (v *NullableFunctionInstanceRequest) Set(val *FunctionInstanceRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionInstanceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionInstanceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionInstanceRequest(val *FunctionInstanceRequest) *NullableFunctionInstanceRequest { + return &NullableFunctionInstanceRequest{value: val, isSet: true} +} + +func (v NullableFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionInstanceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_function_instance_response.go b/azion-api/model_function_instance_response.go new file mode 100644 index 0000000..38209c9 --- /dev/null +++ b/azion-api/model_function_instance_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FunctionInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionInstanceResponse{} + +// FunctionInstanceResponse struct for FunctionInstanceResponse +type FunctionInstanceResponse struct { + State *string `json:"state,omitempty"` + Data FunctionInstance `json:"data"` +} + +type _FunctionInstanceResponse FunctionInstanceResponse + +// NewFunctionInstanceResponse instantiates a new FunctionInstanceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionInstanceResponse(data FunctionInstance) *FunctionInstanceResponse { + this := FunctionInstanceResponse{} + this.Data = data + return &this +} + +// NewFunctionInstanceResponseWithDefaults instantiates a new FunctionInstanceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionInstanceResponseWithDefaults() *FunctionInstanceResponse { + this := FunctionInstanceResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *FunctionInstanceResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionInstanceResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *FunctionInstanceResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *FunctionInstanceResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *FunctionInstanceResponse) GetData() FunctionInstance { + if o == nil { + var ret FunctionInstance + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *FunctionInstanceResponse) GetDataOk() (*FunctionInstance, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *FunctionInstanceResponse) SetData(v FunctionInstance) { + o.Data = v +} + +func (o FunctionInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *FunctionInstanceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFunctionInstanceResponse := _FunctionInstanceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFunctionInstanceResponse) + + if err != nil { + return err + } + + *o = FunctionInstanceResponse(varFunctionInstanceResponse) + + return err +} + +type NullableFunctionInstanceResponse struct { + value *FunctionInstanceResponse + isSet bool +} + +func (v NullableFunctionInstanceResponse) Get() *FunctionInstanceResponse { + return v.value +} + +func (v *NullableFunctionInstanceResponse) Set(val *FunctionInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionInstanceResponse(val *FunctionInstanceResponse) *NullableFunctionInstanceResponse { + return &NullableFunctionInstanceResponse{value: val, isSet: true} +} + +func (v NullableFunctionInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_function_module.go b/azion-api/model_function_module.go new file mode 100644 index 0000000..933cc0a --- /dev/null +++ b/azion-api/model_function_module.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the FunctionModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionModule{} + +// FunctionModule struct for FunctionModule +type FunctionModule struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewFunctionModule instantiates a new FunctionModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionModule() *FunctionModule { + this := FunctionModule{} + return &this +} + +// NewFunctionModuleWithDefaults instantiates a new FunctionModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionModuleWithDefaults() *FunctionModule { + this := FunctionModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *FunctionModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *FunctionModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *FunctionModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o FunctionModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableFunctionModule struct { + value *FunctionModule + isSet bool +} + +func (v NullableFunctionModule) Get() *FunctionModule { + return v.value +} + +func (v *NullableFunctionModule) Set(val *FunctionModule) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionModule) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionModule(val *FunctionModule) *NullableFunctionModule { + return &NullableFunctionModule{value: val, isSet: true} +} + +func (v NullableFunctionModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_function_module_request.go b/azion-api/model_function_module_request.go new file mode 100644 index 0000000..fb772ac --- /dev/null +++ b/azion-api/model_function_module_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the FunctionModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionModuleRequest{} + +// FunctionModuleRequest struct for FunctionModuleRequest +type FunctionModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewFunctionModuleRequest instantiates a new FunctionModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionModuleRequest() *FunctionModuleRequest { + this := FunctionModuleRequest{} + return &this +} + +// NewFunctionModuleRequestWithDefaults instantiates a new FunctionModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionModuleRequestWithDefaults() *FunctionModuleRequest { + this := FunctionModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *FunctionModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *FunctionModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *FunctionModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o FunctionModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableFunctionModuleRequest struct { + value *FunctionModuleRequest + isSet bool +} + +func (v NullableFunctionModuleRequest) Get() *FunctionModuleRequest { + return v.value +} + +func (v *NullableFunctionModuleRequest) Set(val *FunctionModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionModuleRequest(val *FunctionModuleRequest) *NullableFunctionModuleRequest { + return &NullableFunctionModuleRequest{value: val, isSet: true} +} + +func (v NullableFunctionModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_function_response.go b/azion-api/model_function_response.go new file mode 100644 index 0000000..a373909 --- /dev/null +++ b/azion-api/model_function_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FunctionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionResponse{} + +// FunctionResponse struct for FunctionResponse +type FunctionResponse struct { + State *string `json:"state,omitempty"` + Data Functions `json:"data"` +} + +type _FunctionResponse FunctionResponse + +// NewFunctionResponse instantiates a new FunctionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionResponse(data Functions) *FunctionResponse { + this := FunctionResponse{} + this.Data = data + return &this +} + +// NewFunctionResponseWithDefaults instantiates a new FunctionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionResponseWithDefaults() *FunctionResponse { + this := FunctionResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *FunctionResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *FunctionResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *FunctionResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *FunctionResponse) GetData() Functions { + if o == nil { + var ret Functions + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *FunctionResponse) GetDataOk() (*Functions, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *FunctionResponse) SetData(v Functions) { + o.Data = v +} + +func (o FunctionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *FunctionResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFunctionResponse := _FunctionResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFunctionResponse) + + if err != nil { + return err + } + + *o = FunctionResponse(varFunctionResponse) + + return err +} + +type NullableFunctionResponse struct { + value *FunctionResponse + isSet bool +} + +func (v NullableFunctionResponse) Get() *FunctionResponse { + return v.value +} + +func (v *NullableFunctionResponse) Set(val *FunctionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionResponse(val *FunctionResponse) *NullableFunctionResponse { + return &NullableFunctionResponse{value: val, isSet: true} +} + +func (v NullableFunctionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_functions.go b/azion-api/model_functions.go new file mode 100644 index 0000000..aaaca2a --- /dev/null +++ b/azion-api/model_functions.go @@ -0,0 +1,569 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Functions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Functions{} + +// Functions struct for Functions +type Functions struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ProductVersion string `json:"product_version"` + Active *bool `json:"active,omitempty"` + // * `azion_js` - Azion JavaScript + Runtime *string `json:"runtime,omitempty"` + // * `firewall` - Firewall * `application` - Application + ExecutionEnvironment *string `json:"execution_environment,omitempty"` + // String containing the function code. Maximum size: 20MB. + Code string `json:"code"` + DefaultArgs interface{} `json:"default_args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + ReferenceCount int64 `json:"reference_count"` + // Installed version, which may not be the latest if the vendor has released updates since installation. + Version string `json:"version"` + Vendor string `json:"vendor"` +} + +type _Functions Functions + +// NewFunctions instantiates a new Functions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctions(id int64, name string, lastEditor string, lastModified time.Time, productVersion string, code string, referenceCount int64, version string, vendor string) *Functions { + this := Functions{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + this.Code = code + this.ReferenceCount = referenceCount + this.Version = version + this.Vendor = vendor + return &this +} + +// NewFunctionsWithDefaults instantiates a new Functions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionsWithDefaults() *Functions { + this := Functions{} + return &this +} + +// GetId returns the Id field value +func (o *Functions) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Functions) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Functions) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Functions) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Functions) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Functions) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Functions) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Functions) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Functions) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Functions) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Functions) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Functions) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Functions) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Functions) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Functions) SetProductVersion(v string) { + o.ProductVersion = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Functions) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Functions) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Functions) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Functions) SetActive(v bool) { + o.Active = &v +} + +// GetRuntime returns the Runtime field value if set, zero value otherwise. +func (o *Functions) GetRuntime() string { + if o == nil || IsNil(o.Runtime) { + var ret string + return ret + } + return *o.Runtime +} + +// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Functions) GetRuntimeOk() (*string, bool) { + if o == nil || IsNil(o.Runtime) { + return nil, false + } + return o.Runtime, true +} + +// HasRuntime returns a boolean if a field has been set. +func (o *Functions) HasRuntime() bool { + if o != nil && !IsNil(o.Runtime) { + return true + } + + return false +} + +// SetRuntime gets a reference to the given string and assigns it to the Runtime field. +func (o *Functions) SetRuntime(v string) { + o.Runtime = &v +} + +// GetExecutionEnvironment returns the ExecutionEnvironment field value if set, zero value otherwise. +func (o *Functions) GetExecutionEnvironment() string { + if o == nil || IsNil(o.ExecutionEnvironment) { + var ret string + return ret + } + return *o.ExecutionEnvironment +} + +// GetExecutionEnvironmentOk returns a tuple with the ExecutionEnvironment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Functions) GetExecutionEnvironmentOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionEnvironment) { + return nil, false + } + return o.ExecutionEnvironment, true +} + +// HasExecutionEnvironment returns a boolean if a field has been set. +func (o *Functions) HasExecutionEnvironment() bool { + if o != nil && !IsNil(o.ExecutionEnvironment) { + return true + } + + return false +} + +// SetExecutionEnvironment gets a reference to the given string and assigns it to the ExecutionEnvironment field. +func (o *Functions) SetExecutionEnvironment(v string) { + o.ExecutionEnvironment = &v +} + +// GetCode returns the Code field value +func (o *Functions) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *Functions) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *Functions) SetCode(v string) { + o.Code = v +} + +// GetDefaultArgs returns the DefaultArgs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Functions) GetDefaultArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DefaultArgs +} + +// GetDefaultArgsOk returns a tuple with the DefaultArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Functions) GetDefaultArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.DefaultArgs) { + return nil, false + } + return &o.DefaultArgs, true +} + +// HasDefaultArgs returns a boolean if a field has been set. +func (o *Functions) HasDefaultArgs() bool { + if o != nil && !IsNil(o.DefaultArgs) { + return true + } + + return false +} + +// SetDefaultArgs gets a reference to the given interface{} and assigns it to the DefaultArgs field. +func (o *Functions) SetDefaultArgs(v interface{}) { + o.DefaultArgs = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *Functions) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Functions) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *Functions) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *Functions) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetReferenceCount returns the ReferenceCount field value +func (o *Functions) GetReferenceCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ReferenceCount +} + +// GetReferenceCountOk returns a tuple with the ReferenceCount field value +// and a boolean to check if the value has been set. +func (o *Functions) GetReferenceCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ReferenceCount, true +} + +// SetReferenceCount sets field value +func (o *Functions) SetReferenceCount(v int64) { + o.ReferenceCount = v +} + +// GetVersion returns the Version field value +func (o *Functions) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *Functions) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *Functions) SetVersion(v string) { + o.Version = v +} + +// GetVendor returns the Vendor field value +func (o *Functions) GetVendor() string { + if o == nil { + var ret string + return ret + } + + return o.Vendor +} + +// GetVendorOk returns a tuple with the Vendor field value +// and a boolean to check if the value has been set. +func (o *Functions) GetVendorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Vendor, true +} + +// SetVendor sets field value +func (o *Functions) SetVendor(v string) { + o.Vendor = v +} + +func (o Functions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Functions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["product_version"] = o.ProductVersion + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Runtime) { + toSerialize["runtime"] = o.Runtime + } + if !IsNil(o.ExecutionEnvironment) { + toSerialize["execution_environment"] = o.ExecutionEnvironment + } + toSerialize["code"] = o.Code + if o.DefaultArgs != nil { + toSerialize["default_args"] = o.DefaultArgs + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + toSerialize["reference_count"] = o.ReferenceCount + toSerialize["version"] = o.Version + toSerialize["vendor"] = o.Vendor + return toSerialize, nil +} + +func (o *Functions) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "product_version", + "code", + "reference_count", + "version", + "vendor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFunctions := _Functions{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFunctions) + + if err != nil { + return err + } + + *o = Functions(varFunctions) + + return err +} + +type NullableFunctions struct { + value *Functions + isSet bool +} + +func (v NullableFunctions) Get() *Functions { + return v.value +} + +func (v *NullableFunctions) Set(val *Functions) { + v.value = val + v.isSet = true +} + +func (v NullableFunctions) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctions(val *Functions) *NullableFunctions { + return &NullableFunctions{value: val, isSet: true} +} + +func (v NullableFunctions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_functions_azion_form.go b/azion-api/model_functions_azion_form.go new file mode 100644 index 0000000..d0f4e68 --- /dev/null +++ b/azion-api/model_functions_azion_form.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the FunctionsAzionForm type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionsAzionForm{} + +// FunctionsAzionForm JSON schema to be rendered as a json args form. - azion_form must be a JSON schema. - If there are no schema being informed, an empty JSON object will be used. +type FunctionsAzionForm struct { + Arg map[string]interface{} `json:"arg,omitempty"` +} + +// NewFunctionsAzionForm instantiates a new FunctionsAzionForm object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionsAzionForm() *FunctionsAzionForm { + this := FunctionsAzionForm{} + return &this +} + +// NewFunctionsAzionFormWithDefaults instantiates a new FunctionsAzionForm object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionsAzionFormWithDefaults() *FunctionsAzionForm { + this := FunctionsAzionForm{} + return &this +} + +// GetArg returns the Arg field value if set, zero value otherwise. +func (o *FunctionsAzionForm) GetArg() map[string]interface{} { + if o == nil || IsNil(o.Arg) { + var ret map[string]interface{} + return ret + } + return o.Arg +} + +// GetArgOk returns a tuple with the Arg field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionsAzionForm) GetArgOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Arg) { + return map[string]interface{}{}, false + } + return o.Arg, true +} + +// HasArg returns a boolean if a field has been set. +func (o *FunctionsAzionForm) HasArg() bool { + if o != nil && !IsNil(o.Arg) { + return true + } + + return false +} + +// SetArg gets a reference to the given map[string]interface{} and assigns it to the Arg field. +func (o *FunctionsAzionForm) SetArg(v map[string]interface{}) { + o.Arg = v +} + +func (o FunctionsAzionForm) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionsAzionForm) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Arg) { + toSerialize["arg"] = o.Arg + } + return toSerialize, nil +} + +type NullableFunctionsAzionForm struct { + value *FunctionsAzionForm + isSet bool +} + +func (v NullableFunctionsAzionForm) Get() *FunctionsAzionForm { + return v.value +} + +func (v *NullableFunctionsAzionForm) Set(val *FunctionsAzionForm) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionsAzionForm) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionsAzionForm) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionsAzionForm(val *FunctionsAzionForm) *NullableFunctionsAzionForm { + return &NullableFunctionsAzionForm{value: val, isSet: true} +} + +func (v NullableFunctionsAzionForm) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionsAzionForm) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_functions_request.go b/azion-api/model_functions_request.go new file mode 100644 index 0000000..4743d2b --- /dev/null +++ b/azion-api/model_functions_request.go @@ -0,0 +1,371 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FunctionsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FunctionsRequest{} + +// FunctionsRequest struct for FunctionsRequest +type FunctionsRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + // * `azion_js` - Azion JavaScript + Runtime *string `json:"runtime,omitempty"` + // * `firewall` - Firewall * `application` - Application + ExecutionEnvironment *string `json:"execution_environment,omitempty"` + // String containing the function code. Maximum size: 20MB. + Code string `json:"code"` + DefaultArgs interface{} `json:"default_args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` +} + +type _FunctionsRequest FunctionsRequest + +// NewFunctionsRequest instantiates a new FunctionsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFunctionsRequest(name string, code string) *FunctionsRequest { + this := FunctionsRequest{} + this.Name = name + this.Code = code + return &this +} + +// NewFunctionsRequestWithDefaults instantiates a new FunctionsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFunctionsRequestWithDefaults() *FunctionsRequest { + this := FunctionsRequest{} + return &this +} + +// GetName returns the Name field value +func (o *FunctionsRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FunctionsRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FunctionsRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *FunctionsRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionsRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *FunctionsRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *FunctionsRequest) SetActive(v bool) { + o.Active = &v +} + +// GetRuntime returns the Runtime field value if set, zero value otherwise. +func (o *FunctionsRequest) GetRuntime() string { + if o == nil || IsNil(o.Runtime) { + var ret string + return ret + } + return *o.Runtime +} + +// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionsRequest) GetRuntimeOk() (*string, bool) { + if o == nil || IsNil(o.Runtime) { + return nil, false + } + return o.Runtime, true +} + +// HasRuntime returns a boolean if a field has been set. +func (o *FunctionsRequest) HasRuntime() bool { + if o != nil && !IsNil(o.Runtime) { + return true + } + + return false +} + +// SetRuntime gets a reference to the given string and assigns it to the Runtime field. +func (o *FunctionsRequest) SetRuntime(v string) { + o.Runtime = &v +} + +// GetExecutionEnvironment returns the ExecutionEnvironment field value if set, zero value otherwise. +func (o *FunctionsRequest) GetExecutionEnvironment() string { + if o == nil || IsNil(o.ExecutionEnvironment) { + var ret string + return ret + } + return *o.ExecutionEnvironment +} + +// GetExecutionEnvironmentOk returns a tuple with the ExecutionEnvironment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionsRequest) GetExecutionEnvironmentOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionEnvironment) { + return nil, false + } + return o.ExecutionEnvironment, true +} + +// HasExecutionEnvironment returns a boolean if a field has been set. +func (o *FunctionsRequest) HasExecutionEnvironment() bool { + if o != nil && !IsNil(o.ExecutionEnvironment) { + return true + } + + return false +} + +// SetExecutionEnvironment gets a reference to the given string and assigns it to the ExecutionEnvironment field. +func (o *FunctionsRequest) SetExecutionEnvironment(v string) { + o.ExecutionEnvironment = &v +} + +// GetCode returns the Code field value +func (o *FunctionsRequest) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *FunctionsRequest) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *FunctionsRequest) SetCode(v string) { + o.Code = v +} + +// GetDefaultArgs returns the DefaultArgs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FunctionsRequest) GetDefaultArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DefaultArgs +} + +// GetDefaultArgsOk returns a tuple with the DefaultArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FunctionsRequest) GetDefaultArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.DefaultArgs) { + return nil, false + } + return &o.DefaultArgs, true +} + +// HasDefaultArgs returns a boolean if a field has been set. +func (o *FunctionsRequest) HasDefaultArgs() bool { + if o != nil && !IsNil(o.DefaultArgs) { + return true + } + + return false +} + +// SetDefaultArgs gets a reference to the given interface{} and assigns it to the DefaultArgs field. +func (o *FunctionsRequest) SetDefaultArgs(v interface{}) { + o.DefaultArgs = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *FunctionsRequest) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FunctionsRequest) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *FunctionsRequest) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *FunctionsRequest) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +func (o FunctionsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FunctionsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Runtime) { + toSerialize["runtime"] = o.Runtime + } + if !IsNil(o.ExecutionEnvironment) { + toSerialize["execution_environment"] = o.ExecutionEnvironment + } + toSerialize["code"] = o.Code + if o.DefaultArgs != nil { + toSerialize["default_args"] = o.DefaultArgs + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + return toSerialize, nil +} + +func (o *FunctionsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFunctionsRequest := _FunctionsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFunctionsRequest) + + if err != nil { + return err + } + + *o = FunctionsRequest(varFunctionsRequest) + + return err +} + +type NullableFunctionsRequest struct { + value *FunctionsRequest + isSet bool +} + +func (v NullableFunctionsRequest) Get() *FunctionsRequest { + return v.value +} + +func (v *NullableFunctionsRequest) Set(val *FunctionsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableFunctionsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableFunctionsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFunctionsRequest(val *FunctionsRequest) *NullableFunctionsRequest { + return &NullableFunctionsRequest{value: val, isSet: true} +} + +func (v NullableFunctionsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFunctionsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_grant.go b/azion-api/model_grant.go new file mode 100644 index 0000000..5e483d6 --- /dev/null +++ b/azion-api/model_grant.go @@ -0,0 +1,370 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Grant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Grant{} + +// Grant struct for Grant +type Grant struct { + Id int64 `json:"id"` + Identity NullableInt64 `json:"identity,omitempty"` + Roles []int64 `json:"roles,omitempty"` + Policies []int64 `json:"policies,omitempty"` + Expires *time.Time `json:"expires,omitempty"` + Owner bool `json:"owner"` + AccountId int64 `json:"account_id"` +} + +type _Grant Grant + +// NewGrant instantiates a new Grant object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGrant(id int64, owner bool, accountId int64) *Grant { + this := Grant{} + this.Id = id + this.Owner = owner + this.AccountId = accountId + return &this +} + +// NewGrantWithDefaults instantiates a new Grant object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGrantWithDefaults() *Grant { + this := Grant{} + return &this +} + +// GetId returns the Id field value +func (o *Grant) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Grant) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Grant) SetId(v int64) { + o.Id = v +} + +// GetIdentity returns the Identity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Grant) GetIdentity() int64 { + if o == nil || IsNil(o.Identity.Get()) { + var ret int64 + return ret + } + return *o.Identity.Get() +} + +// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Grant) GetIdentityOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Identity.Get(), o.Identity.IsSet() +} + +// HasIdentity returns a boolean if a field has been set. +func (o *Grant) HasIdentity() bool { + if o != nil && o.Identity.IsSet() { + return true + } + + return false +} + +// SetIdentity gets a reference to the given NullableInt64 and assigns it to the Identity field. +func (o *Grant) SetIdentity(v int64) { + o.Identity.Set(&v) +} +// SetIdentityNil sets the value for Identity to be an explicit nil +func (o *Grant) SetIdentityNil() { + o.Identity.Set(nil) +} + +// UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +func (o *Grant) UnsetIdentity() { + o.Identity.Unset() +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *Grant) GetRoles() []int64 { + if o == nil || IsNil(o.Roles) { + var ret []int64 + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Grant) GetRolesOk() ([]int64, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *Grant) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []int64 and assigns it to the Roles field. +func (o *Grant) SetRoles(v []int64) { + o.Roles = v +} + +// GetPolicies returns the Policies field value if set, zero value otherwise. +func (o *Grant) GetPolicies() []int64 { + if o == nil || IsNil(o.Policies) { + var ret []int64 + return ret + } + return o.Policies +} + +// GetPoliciesOk returns a tuple with the Policies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Grant) GetPoliciesOk() ([]int64, bool) { + if o == nil || IsNil(o.Policies) { + return nil, false + } + return o.Policies, true +} + +// HasPolicies returns a boolean if a field has been set. +func (o *Grant) HasPolicies() bool { + if o != nil && !IsNil(o.Policies) { + return true + } + + return false +} + +// SetPolicies gets a reference to the given []int64 and assigns it to the Policies field. +func (o *Grant) SetPolicies(v []int64) { + o.Policies = v +} + +// GetExpires returns the Expires field value if set, zero value otherwise. +func (o *Grant) GetExpires() time.Time { + if o == nil || IsNil(o.Expires) { + var ret time.Time + return ret + } + return *o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Grant) GetExpiresOk() (*time.Time, bool) { + if o == nil || IsNil(o.Expires) { + return nil, false + } + return o.Expires, true +} + +// HasExpires returns a boolean if a field has been set. +func (o *Grant) HasExpires() bool { + if o != nil && !IsNil(o.Expires) { + return true + } + + return false +} + +// SetExpires gets a reference to the given time.Time and assigns it to the Expires field. +func (o *Grant) SetExpires(v time.Time) { + o.Expires = &v +} + +// GetOwner returns the Owner field value +func (o *Grant) GetOwner() bool { + if o == nil { + var ret bool + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *Grant) GetOwnerOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *Grant) SetOwner(v bool) { + o.Owner = v +} + +// GetAccountId returns the AccountId field value +func (o *Grant) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *Grant) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *Grant) SetAccountId(v int64) { + o.AccountId = v +} + +func (o Grant) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Grant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if o.Identity.IsSet() { + toSerialize["identity"] = o.Identity.Get() + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Policies) { + toSerialize["policies"] = o.Policies + } + if !IsNil(o.Expires) { + toSerialize["expires"] = o.Expires + } + toSerialize["owner"] = o.Owner + toSerialize["account_id"] = o.AccountId + return toSerialize, nil +} + +func (o *Grant) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "owner", + "account_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGrant := _Grant{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGrant) + + if err != nil { + return err + } + + *o = Grant(varGrant) + + return err +} + +type NullableGrant struct { + value *Grant + isSet bool +} + +func (v NullableGrant) Get() *Grant { + return v.value +} + +func (v *NullableGrant) Set(val *Grant) { + v.value = val + v.isSet = true +} + +func (v NullableGrant) IsSet() bool { + return v.isSet +} + +func (v *NullableGrant) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGrant(val *Grant) *NullableGrant { + return &NullableGrant{value: val, isSet: true} +} + +func (v NullableGrant) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGrant) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_grant_request.go b/azion-api/model_grant_request.go new file mode 100644 index 0000000..3389514 --- /dev/null +++ b/azion-api/model_grant_request.go @@ -0,0 +1,342 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the GrantRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GrantRequest{} + +// GrantRequest struct for GrantRequest +type GrantRequest struct { + Identity NullableInt64 `json:"identity,omitempty"` + Roles []int64 `json:"roles,omitempty"` + Policies []int64 `json:"policies,omitempty"` + Expires *time.Time `json:"expires,omitempty"` + Owner bool `json:"owner"` + AccountId int64 `json:"account_id"` +} + +type _GrantRequest GrantRequest + +// NewGrantRequest instantiates a new GrantRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGrantRequest(owner bool, accountId int64) *GrantRequest { + this := GrantRequest{} + this.Owner = owner + this.AccountId = accountId + return &this +} + +// NewGrantRequestWithDefaults instantiates a new GrantRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGrantRequestWithDefaults() *GrantRequest { + this := GrantRequest{} + return &this +} + +// GetIdentity returns the Identity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GrantRequest) GetIdentity() int64 { + if o == nil || IsNil(o.Identity.Get()) { + var ret int64 + return ret + } + return *o.Identity.Get() +} + +// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantRequest) GetIdentityOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Identity.Get(), o.Identity.IsSet() +} + +// HasIdentity returns a boolean if a field has been set. +func (o *GrantRequest) HasIdentity() bool { + if o != nil && o.Identity.IsSet() { + return true + } + + return false +} + +// SetIdentity gets a reference to the given NullableInt64 and assigns it to the Identity field. +func (o *GrantRequest) SetIdentity(v int64) { + o.Identity.Set(&v) +} +// SetIdentityNil sets the value for Identity to be an explicit nil +func (o *GrantRequest) SetIdentityNil() { + o.Identity.Set(nil) +} + +// UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +func (o *GrantRequest) UnsetIdentity() { + o.Identity.Unset() +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *GrantRequest) GetRoles() []int64 { + if o == nil || IsNil(o.Roles) { + var ret []int64 + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrantRequest) GetRolesOk() ([]int64, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *GrantRequest) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []int64 and assigns it to the Roles field. +func (o *GrantRequest) SetRoles(v []int64) { + o.Roles = v +} + +// GetPolicies returns the Policies field value if set, zero value otherwise. +func (o *GrantRequest) GetPolicies() []int64 { + if o == nil || IsNil(o.Policies) { + var ret []int64 + return ret + } + return o.Policies +} + +// GetPoliciesOk returns a tuple with the Policies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrantRequest) GetPoliciesOk() ([]int64, bool) { + if o == nil || IsNil(o.Policies) { + return nil, false + } + return o.Policies, true +} + +// HasPolicies returns a boolean if a field has been set. +func (o *GrantRequest) HasPolicies() bool { + if o != nil && !IsNil(o.Policies) { + return true + } + + return false +} + +// SetPolicies gets a reference to the given []int64 and assigns it to the Policies field. +func (o *GrantRequest) SetPolicies(v []int64) { + o.Policies = v +} + +// GetExpires returns the Expires field value if set, zero value otherwise. +func (o *GrantRequest) GetExpires() time.Time { + if o == nil || IsNil(o.Expires) { + var ret time.Time + return ret + } + return *o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GrantRequest) GetExpiresOk() (*time.Time, bool) { + if o == nil || IsNil(o.Expires) { + return nil, false + } + return o.Expires, true +} + +// HasExpires returns a boolean if a field has been set. +func (o *GrantRequest) HasExpires() bool { + if o != nil && !IsNil(o.Expires) { + return true + } + + return false +} + +// SetExpires gets a reference to the given time.Time and assigns it to the Expires field. +func (o *GrantRequest) SetExpires(v time.Time) { + o.Expires = &v +} + +// GetOwner returns the Owner field value +func (o *GrantRequest) GetOwner() bool { + if o == nil { + var ret bool + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *GrantRequest) GetOwnerOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *GrantRequest) SetOwner(v bool) { + o.Owner = v +} + +// GetAccountId returns the AccountId field value +func (o *GrantRequest) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *GrantRequest) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *GrantRequest) SetAccountId(v int64) { + o.AccountId = v +} + +func (o GrantRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GrantRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Identity.IsSet() { + toSerialize["identity"] = o.Identity.Get() + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Policies) { + toSerialize["policies"] = o.Policies + } + if !IsNil(o.Expires) { + toSerialize["expires"] = o.Expires + } + toSerialize["owner"] = o.Owner + toSerialize["account_id"] = o.AccountId + return toSerialize, nil +} + +func (o *GrantRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "owner", + "account_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGrantRequest := _GrantRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGrantRequest) + + if err != nil { + return err + } + + *o = GrantRequest(varGrantRequest) + + return err +} + +type NullableGrantRequest struct { + value *GrantRequest + isSet bool +} + +func (v NullableGrantRequest) Get() *GrantRequest { + return v.value +} + +func (v *NullableGrantRequest) Set(val *GrantRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGrantRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGrantRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGrantRequest(val *GrantRequest) *NullableGrantRequest { + return &NullableGrantRequest{value: val, isSet: true} +} + +func (v NullableGrantRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGrantRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_group.go b/azion-api/model_group.go new file mode 100644 index 0000000..3eb1531 --- /dev/null +++ b/azion-api/model_group.go @@ -0,0 +1,364 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Group type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Group{} + +// Group struct for Group +type Group struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` +} + +type _Group Group + +// NewGroup instantiates a new Group object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroup(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64) *Group { + this := Group{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + return &this +} + +// NewGroupWithDefaults instantiates a new Group object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupWithDefaults() *Group { + this := Group{} + return &this +} + +// GetId returns the Id field value +func (o *Group) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Group) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Group) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Group) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Group) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Group) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *Group) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *Group) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *Group) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *Group) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Group) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Group) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Group) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Group) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Group) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Group) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Group) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Group) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Group) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Group) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Group) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Group) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *Group) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *Group) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *Group) SetAccountId(v int64) { + o.AccountId = v +} + +func (o Group) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Group) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + return toSerialize, nil +} + +func (o *Group) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroup := _Group{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroup) + + if err != nil { + return err + } + + *o = Group(varGroup) + + return err +} + +type NullableGroup struct { + value *Group + isSet bool +} + +func (v NullableGroup) Get() *Group { + return v.value +} + +func (v *NullableGroup) Set(val *Group) { + v.value = val + v.isSet = true +} + +func (v NullableGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroup(val *Group) *NullableGroup { + return &NullableGroup{value: val, isSet: true} +} + +func (v NullableGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_group_members.go b/azion-api/model_group_members.go new file mode 100644 index 0000000..43e7f99 --- /dev/null +++ b/azion-api/model_group_members.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the GroupMembers type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupMembers{} + +// GroupMembers struct for GroupMembers +type GroupMembers struct { + // List of the users' IDs. + Members []int64 `json:"members"` +} + +type _GroupMembers GroupMembers + +// NewGroupMembers instantiates a new GroupMembers object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupMembers(members []int64) *GroupMembers { + this := GroupMembers{} + this.Members = members + return &this +} + +// NewGroupMembersWithDefaults instantiates a new GroupMembers object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupMembersWithDefaults() *GroupMembers { + this := GroupMembers{} + return &this +} + +// GetMembers returns the Members field value +func (o *GroupMembers) GetMembers() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value +// and a boolean to check if the value has been set. +func (o *GroupMembers) GetMembersOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Members, true +} + +// SetMembers sets field value +func (o *GroupMembers) SetMembers(v []int64) { + o.Members = v +} + +func (o GroupMembers) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupMembers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["members"] = o.Members + return toSerialize, nil +} + +func (o *GroupMembers) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "members", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupMembers := _GroupMembers{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroupMembers) + + if err != nil { + return err + } + + *o = GroupMembers(varGroupMembers) + + return err +} + +type NullableGroupMembers struct { + value *GroupMembers + isSet bool +} + +func (v NullableGroupMembers) Get() *GroupMembers { + return v.value +} + +func (v *NullableGroupMembers) Set(val *GroupMembers) { + v.value = val + v.isSet = true +} + +func (v NullableGroupMembers) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupMembers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupMembers(val *GroupMembers) *NullableGroupMembers { + return &NullableGroupMembers{value: val, isSet: true} +} + +func (v NullableGroupMembers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupMembers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_group_members_request.go b/azion-api/model_group_members_request.go new file mode 100644 index 0000000..4368334 --- /dev/null +++ b/azion-api/model_group_members_request.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the GroupMembersRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupMembersRequest{} + +// GroupMembersRequest struct for GroupMembersRequest +type GroupMembersRequest struct { + // List of the users' IDs. + Members []int64 `json:"members"` +} + +type _GroupMembersRequest GroupMembersRequest + +// NewGroupMembersRequest instantiates a new GroupMembersRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupMembersRequest(members []int64) *GroupMembersRequest { + this := GroupMembersRequest{} + this.Members = members + return &this +} + +// NewGroupMembersRequestWithDefaults instantiates a new GroupMembersRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupMembersRequestWithDefaults() *GroupMembersRequest { + this := GroupMembersRequest{} + return &this +} + +// GetMembers returns the Members field value +func (o *GroupMembersRequest) GetMembers() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Members +} + +// GetMembersOk returns a tuple with the Members field value +// and a boolean to check if the value has been set. +func (o *GroupMembersRequest) GetMembersOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Members, true +} + +// SetMembers sets field value +func (o *GroupMembersRequest) SetMembers(v []int64) { + o.Members = v +} + +func (o GroupMembersRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupMembersRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["members"] = o.Members + return toSerialize, nil +} + +func (o *GroupMembersRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "members", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupMembersRequest := _GroupMembersRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroupMembersRequest) + + if err != nil { + return err + } + + *o = GroupMembersRequest(varGroupMembersRequest) + + return err +} + +type NullableGroupMembersRequest struct { + value *GroupMembersRequest + isSet bool +} + +func (v NullableGroupMembersRequest) Get() *GroupMembersRequest { + return v.value +} + +func (v *NullableGroupMembersRequest) Set(val *GroupMembersRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGroupMembersRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupMembersRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupMembersRequest(val *GroupMembersRequest) *NullableGroupMembersRequest { + return &NullableGroupMembersRequest{value: val, isSet: true} +} + +func (v NullableGroupMembersRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupMembersRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_group_request.go b/azion-api/model_group_request.go new file mode 100644 index 0000000..f5d8634 --- /dev/null +++ b/azion-api/model_group_request.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the GroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GroupRequest{} + +// GroupRequest struct for GroupRequest +type GroupRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` +} + +type _GroupRequest GroupRequest + +// NewGroupRequest instantiates a new GroupRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGroupRequest(name string) *GroupRequest { + this := GroupRequest{} + this.Name = name + return &this +} + +// NewGroupRequestWithDefaults instantiates a new GroupRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGroupRequestWithDefaults() *GroupRequest { + this := GroupRequest{} + return &this +} + +// GetName returns the Name field value +func (o *GroupRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *GroupRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *GroupRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *GroupRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GroupRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *GroupRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *GroupRequest) SetActive(v bool) { + o.Active = &v +} + +func (o GroupRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GroupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *GroupRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGroupRequest := _GroupRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGroupRequest) + + if err != nil { + return err + } + + *o = GroupRequest(varGroupRequest) + + return err +} + +type NullableGroupRequest struct { + value *GroupRequest + isSet bool +} + +func (v NullableGroupRequest) Get() *GroupRequest { + return v.value +} + +func (v *NullableGroupRequest) Set(val *GroupRequest) { + v.value = val + v.isSet = true +} + +func (v NullableGroupRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableGroupRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGroupRequest(val *GroupRequest) *NullableGroupRequest { + return &NullableGroupRequest{value: val, isSet: true} +} + +func (v NullableGroupRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGroupRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_hmac.go b/azion-api/model_hmac.go new file mode 100644 index 0000000..0b55208 --- /dev/null +++ b/azion-api/model_hmac.go @@ -0,0 +1,205 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the HMAC type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HMAC{} + +// HMAC struct for HMAC +type HMAC struct { + Enabled bool `json:"enabled"` + Config NullableAWS4HMAC `json:"config,omitempty"` +} + +type _HMAC HMAC + +// NewHMAC instantiates a new HMAC object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHMAC(enabled bool) *HMAC { + this := HMAC{} + this.Enabled = enabled + return &this +} + +// NewHMACWithDefaults instantiates a new HMAC object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHMACWithDefaults() *HMAC { + this := HMAC{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *HMAC) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *HMAC) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *HMAC) SetEnabled(v bool) { + o.Enabled = v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HMAC) GetConfig() AWS4HMAC { + if o == nil || IsNil(o.Config.Get()) { + var ret AWS4HMAC + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HMAC) GetConfigOk() (*AWS4HMAC, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *HMAC) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableAWS4HMAC and assigns it to the Config field. +func (o *HMAC) SetConfig(v AWS4HMAC) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *HMAC) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *HMAC) UnsetConfig() { + o.Config.Unset() +} + +func (o HMAC) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HMAC) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +func (o *HMAC) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHMAC := _HMAC{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHMAC) + + if err != nil { + return err + } + + *o = HMAC(varHMAC) + + return err +} + +type NullableHMAC struct { + value *HMAC + isSet bool +} + +func (v NullableHMAC) Get() *HMAC { + return v.value +} + +func (v *NullableHMAC) Set(val *HMAC) { + v.value = val + v.isSet = true +} + +func (v NullableHMAC) IsSet() bool { + return v.isSet +} + +func (v *NullableHMAC) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHMAC(val *HMAC) *NullableHMAC { + return &NullableHMAC{value: val, isSet: true} +} + +func (v NullableHMAC) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHMAC) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_hmac_request.go b/azion-api/model_hmac_request.go new file mode 100644 index 0000000..a10ef50 --- /dev/null +++ b/azion-api/model_hmac_request.go @@ -0,0 +1,205 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the HMACRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HMACRequest{} + +// HMACRequest struct for HMACRequest +type HMACRequest struct { + Enabled bool `json:"enabled"` + Config NullableAWS4HMACRequest `json:"config,omitempty"` +} + +type _HMACRequest HMACRequest + +// NewHMACRequest instantiates a new HMACRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHMACRequest(enabled bool) *HMACRequest { + this := HMACRequest{} + this.Enabled = enabled + return &this +} + +// NewHMACRequestWithDefaults instantiates a new HMACRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHMACRequestWithDefaults() *HMACRequest { + this := HMACRequest{} + return &this +} + +// GetEnabled returns the Enabled field value +func (o *HMACRequest) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *HMACRequest) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *HMACRequest) SetEnabled(v bool) { + o.Enabled = v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HMACRequest) GetConfig() AWS4HMACRequest { + if o == nil || IsNil(o.Config.Get()) { + var ret AWS4HMACRequest + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HMACRequest) GetConfigOk() (*AWS4HMACRequest, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *HMACRequest) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableAWS4HMACRequest and assigns it to the Config field. +func (o *HMACRequest) SetConfig(v AWS4HMACRequest) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *HMACRequest) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *HMACRequest) UnsetConfig() { + o.Config.Unset() +} + +func (o HMACRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HMACRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["enabled"] = o.Enabled + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +func (o *HMACRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "enabled", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHMACRequest := _HMACRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHMACRequest) + + if err != nil { + return err + } + + *o = HMACRequest(varHMACRequest) + + return err +} + +type NullableHMACRequest struct { + value *HMACRequest + isSet bool +} + +func (v NullableHMACRequest) Get() *HMACRequest { + return v.value +} + +func (v *NullableHMACRequest) Set(val *HMACRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHMACRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHMACRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHMACRequest(val *HMACRequest) *NullableHMACRequest { + return &NullableHMACRequest{value: val, isSet: true} +} + +func (v NullableHMACRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHMACRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_connection_options.go b/azion-api/model_http_connection_options.go new file mode 100644 index 0000000..de12261 --- /dev/null +++ b/azion-api/model_http_connection_options.go @@ -0,0 +1,387 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the HTTPConnectionOptions type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HTTPConnectionOptions{} + +// HTTPConnectionOptions struct for HTTPConnectionOptions +type HTTPConnectionOptions struct { + // DNS resolution policy: force IPv4 or both (IPv4 and IPv6) when connecting. * `both` - Both * `force_ipv4` - Force IPv4 + DnsResolution *string `json:"dns_resolution,omitempty"` + // Transport protocol policy: preserve current scheme, force HTTP, or force HTTPS. * `preserve` - Preserve * `force_https` - Force HTTPS * `force_http` - Force HTTP + TransportPolicy *string `json:"transport_policy,omitempty"` + // Defines the HTTP version preference for outbound connections (e.g., HTTP/1.1). * `http1_1` - HTTP/1.1 + HttpVersionPolicy *string `json:"http_version_policy,omitempty"` + // Optional custom host used to override the default target hostname during connection. + Host *string `json:"host,omitempty"` + // Optional prefix to add to all request paths (e.g., '/v1'). + PathPrefix *string `json:"path_prefix,omitempty"` + // If true, automatically follows HTTP redirects from the target server. + FollowingRedirect *bool `json:"following_redirect,omitempty"` + // Header name used to forward the original client IP address. + RealIpHeader *string `json:"real_ip_header,omitempty"` + // Header name used to forward the original client port. + RealPortHeader *string `json:"real_port_header,omitempty"` +} + +// NewHTTPConnectionOptions instantiates a new HTTPConnectionOptions object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHTTPConnectionOptions() *HTTPConnectionOptions { + this := HTTPConnectionOptions{} + return &this +} + +// NewHTTPConnectionOptionsWithDefaults instantiates a new HTTPConnectionOptions object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHTTPConnectionOptionsWithDefaults() *HTTPConnectionOptions { + this := HTTPConnectionOptions{} + return &this +} + +// GetDnsResolution returns the DnsResolution field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetDnsResolution() string { + if o == nil || IsNil(o.DnsResolution) { + var ret string + return ret + } + return *o.DnsResolution +} + +// GetDnsResolutionOk returns a tuple with the DnsResolution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetDnsResolutionOk() (*string, bool) { + if o == nil || IsNil(o.DnsResolution) { + return nil, false + } + return o.DnsResolution, true +} + +// HasDnsResolution returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasDnsResolution() bool { + if o != nil && !IsNil(o.DnsResolution) { + return true + } + + return false +} + +// SetDnsResolution gets a reference to the given string and assigns it to the DnsResolution field. +func (o *HTTPConnectionOptions) SetDnsResolution(v string) { + o.DnsResolution = &v +} + +// GetTransportPolicy returns the TransportPolicy field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetTransportPolicy() string { + if o == nil || IsNil(o.TransportPolicy) { + var ret string + return ret + } + return *o.TransportPolicy +} + +// GetTransportPolicyOk returns a tuple with the TransportPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetTransportPolicyOk() (*string, bool) { + if o == nil || IsNil(o.TransportPolicy) { + return nil, false + } + return o.TransportPolicy, true +} + +// HasTransportPolicy returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasTransportPolicy() bool { + if o != nil && !IsNil(o.TransportPolicy) { + return true + } + + return false +} + +// SetTransportPolicy gets a reference to the given string and assigns it to the TransportPolicy field. +func (o *HTTPConnectionOptions) SetTransportPolicy(v string) { + o.TransportPolicy = &v +} + +// GetHttpVersionPolicy returns the HttpVersionPolicy field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetHttpVersionPolicy() string { + if o == nil || IsNil(o.HttpVersionPolicy) { + var ret string + return ret + } + return *o.HttpVersionPolicy +} + +// GetHttpVersionPolicyOk returns a tuple with the HttpVersionPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetHttpVersionPolicyOk() (*string, bool) { + if o == nil || IsNil(o.HttpVersionPolicy) { + return nil, false + } + return o.HttpVersionPolicy, true +} + +// HasHttpVersionPolicy returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasHttpVersionPolicy() bool { + if o != nil && !IsNil(o.HttpVersionPolicy) { + return true + } + + return false +} + +// SetHttpVersionPolicy gets a reference to the given string and assigns it to the HttpVersionPolicy field. +func (o *HTTPConnectionOptions) SetHttpVersionPolicy(v string) { + o.HttpVersionPolicy = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *HTTPConnectionOptions) SetHost(v string) { + o.Host = &v +} + +// GetPathPrefix returns the PathPrefix field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetPathPrefix() string { + if o == nil || IsNil(o.PathPrefix) { + var ret string + return ret + } + return *o.PathPrefix +} + +// GetPathPrefixOk returns a tuple with the PathPrefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetPathPrefixOk() (*string, bool) { + if o == nil || IsNil(o.PathPrefix) { + return nil, false + } + return o.PathPrefix, true +} + +// HasPathPrefix returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasPathPrefix() bool { + if o != nil && !IsNil(o.PathPrefix) { + return true + } + + return false +} + +// SetPathPrefix gets a reference to the given string and assigns it to the PathPrefix field. +func (o *HTTPConnectionOptions) SetPathPrefix(v string) { + o.PathPrefix = &v +} + +// GetFollowingRedirect returns the FollowingRedirect field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetFollowingRedirect() bool { + if o == nil || IsNil(o.FollowingRedirect) { + var ret bool + return ret + } + return *o.FollowingRedirect +} + +// GetFollowingRedirectOk returns a tuple with the FollowingRedirect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetFollowingRedirectOk() (*bool, bool) { + if o == nil || IsNil(o.FollowingRedirect) { + return nil, false + } + return o.FollowingRedirect, true +} + +// HasFollowingRedirect returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasFollowingRedirect() bool { + if o != nil && !IsNil(o.FollowingRedirect) { + return true + } + + return false +} + +// SetFollowingRedirect gets a reference to the given bool and assigns it to the FollowingRedirect field. +func (o *HTTPConnectionOptions) SetFollowingRedirect(v bool) { + o.FollowingRedirect = &v +} + +// GetRealIpHeader returns the RealIpHeader field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetRealIpHeader() string { + if o == nil || IsNil(o.RealIpHeader) { + var ret string + return ret + } + return *o.RealIpHeader +} + +// GetRealIpHeaderOk returns a tuple with the RealIpHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetRealIpHeaderOk() (*string, bool) { + if o == nil || IsNil(o.RealIpHeader) { + return nil, false + } + return o.RealIpHeader, true +} + +// HasRealIpHeader returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasRealIpHeader() bool { + if o != nil && !IsNil(o.RealIpHeader) { + return true + } + + return false +} + +// SetRealIpHeader gets a reference to the given string and assigns it to the RealIpHeader field. +func (o *HTTPConnectionOptions) SetRealIpHeader(v string) { + o.RealIpHeader = &v +} + +// GetRealPortHeader returns the RealPortHeader field value if set, zero value otherwise. +func (o *HTTPConnectionOptions) GetRealPortHeader() string { + if o == nil || IsNil(o.RealPortHeader) { + var ret string + return ret + } + return *o.RealPortHeader +} + +// GetRealPortHeaderOk returns a tuple with the RealPortHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptions) GetRealPortHeaderOk() (*string, bool) { + if o == nil || IsNil(o.RealPortHeader) { + return nil, false + } + return o.RealPortHeader, true +} + +// HasRealPortHeader returns a boolean if a field has been set. +func (o *HTTPConnectionOptions) HasRealPortHeader() bool { + if o != nil && !IsNil(o.RealPortHeader) { + return true + } + + return false +} + +// SetRealPortHeader gets a reference to the given string and assigns it to the RealPortHeader field. +func (o *HTTPConnectionOptions) SetRealPortHeader(v string) { + o.RealPortHeader = &v +} + +func (o HTTPConnectionOptions) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HTTPConnectionOptions) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DnsResolution) { + toSerialize["dns_resolution"] = o.DnsResolution + } + if !IsNil(o.TransportPolicy) { + toSerialize["transport_policy"] = o.TransportPolicy + } + if !IsNil(o.HttpVersionPolicy) { + toSerialize["http_version_policy"] = o.HttpVersionPolicy + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.PathPrefix) { + toSerialize["path_prefix"] = o.PathPrefix + } + if !IsNil(o.FollowingRedirect) { + toSerialize["following_redirect"] = o.FollowingRedirect + } + if !IsNil(o.RealIpHeader) { + toSerialize["real_ip_header"] = o.RealIpHeader + } + if !IsNil(o.RealPortHeader) { + toSerialize["real_port_header"] = o.RealPortHeader + } + return toSerialize, nil +} + +type NullableHTTPConnectionOptions struct { + value *HTTPConnectionOptions + isSet bool +} + +func (v NullableHTTPConnectionOptions) Get() *HTTPConnectionOptions { + return v.value +} + +func (v *NullableHTTPConnectionOptions) Set(val *HTTPConnectionOptions) { + v.value = val + v.isSet = true +} + +func (v NullableHTTPConnectionOptions) IsSet() bool { + return v.isSet +} + +func (v *NullableHTTPConnectionOptions) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHTTPConnectionOptions(val *HTTPConnectionOptions) *NullableHTTPConnectionOptions { + return &NullableHTTPConnectionOptions{value: val, isSet: true} +} + +func (v NullableHTTPConnectionOptions) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHTTPConnectionOptions) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_connection_options_request.go b/azion-api/model_http_connection_options_request.go new file mode 100644 index 0000000..33f9863 --- /dev/null +++ b/azion-api/model_http_connection_options_request.go @@ -0,0 +1,387 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the HTTPConnectionOptionsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HTTPConnectionOptionsRequest{} + +// HTTPConnectionOptionsRequest struct for HTTPConnectionOptionsRequest +type HTTPConnectionOptionsRequest struct { + // DNS resolution policy: force IPv4 or both (IPv4 and IPv6) when connecting. * `both` - Both * `force_ipv4` - Force IPv4 + DnsResolution *string `json:"dns_resolution,omitempty"` + // Transport protocol policy: preserve current scheme, force HTTP, or force HTTPS. * `preserve` - Preserve * `force_https` - Force HTTPS * `force_http` - Force HTTP + TransportPolicy *string `json:"transport_policy,omitempty"` + // Defines the HTTP version preference for outbound connections (e.g., HTTP/1.1). * `http1_1` - HTTP/1.1 + HttpVersionPolicy *string `json:"http_version_policy,omitempty"` + // Optional custom host used to override the default target hostname during connection. + Host *string `json:"host,omitempty"` + // Optional prefix to add to all request paths (e.g., '/v1'). + PathPrefix *string `json:"path_prefix,omitempty"` + // If true, automatically follows HTTP redirects from the target server. + FollowingRedirect *bool `json:"following_redirect,omitempty"` + // Header name used to forward the original client IP address. + RealIpHeader *string `json:"real_ip_header,omitempty"` + // Header name used to forward the original client port. + RealPortHeader *string `json:"real_port_header,omitempty"` +} + +// NewHTTPConnectionOptionsRequest instantiates a new HTTPConnectionOptionsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHTTPConnectionOptionsRequest() *HTTPConnectionOptionsRequest { + this := HTTPConnectionOptionsRequest{} + return &this +} + +// NewHTTPConnectionOptionsRequestWithDefaults instantiates a new HTTPConnectionOptionsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHTTPConnectionOptionsRequestWithDefaults() *HTTPConnectionOptionsRequest { + this := HTTPConnectionOptionsRequest{} + return &this +} + +// GetDnsResolution returns the DnsResolution field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetDnsResolution() string { + if o == nil || IsNil(o.DnsResolution) { + var ret string + return ret + } + return *o.DnsResolution +} + +// GetDnsResolutionOk returns a tuple with the DnsResolution field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetDnsResolutionOk() (*string, bool) { + if o == nil || IsNil(o.DnsResolution) { + return nil, false + } + return o.DnsResolution, true +} + +// HasDnsResolution returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasDnsResolution() bool { + if o != nil && !IsNil(o.DnsResolution) { + return true + } + + return false +} + +// SetDnsResolution gets a reference to the given string and assigns it to the DnsResolution field. +func (o *HTTPConnectionOptionsRequest) SetDnsResolution(v string) { + o.DnsResolution = &v +} + +// GetTransportPolicy returns the TransportPolicy field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetTransportPolicy() string { + if o == nil || IsNil(o.TransportPolicy) { + var ret string + return ret + } + return *o.TransportPolicy +} + +// GetTransportPolicyOk returns a tuple with the TransportPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetTransportPolicyOk() (*string, bool) { + if o == nil || IsNil(o.TransportPolicy) { + return nil, false + } + return o.TransportPolicy, true +} + +// HasTransportPolicy returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasTransportPolicy() bool { + if o != nil && !IsNil(o.TransportPolicy) { + return true + } + + return false +} + +// SetTransportPolicy gets a reference to the given string and assigns it to the TransportPolicy field. +func (o *HTTPConnectionOptionsRequest) SetTransportPolicy(v string) { + o.TransportPolicy = &v +} + +// GetHttpVersionPolicy returns the HttpVersionPolicy field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetHttpVersionPolicy() string { + if o == nil || IsNil(o.HttpVersionPolicy) { + var ret string + return ret + } + return *o.HttpVersionPolicy +} + +// GetHttpVersionPolicyOk returns a tuple with the HttpVersionPolicy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetHttpVersionPolicyOk() (*string, bool) { + if o == nil || IsNil(o.HttpVersionPolicy) { + return nil, false + } + return o.HttpVersionPolicy, true +} + +// HasHttpVersionPolicy returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasHttpVersionPolicy() bool { + if o != nil && !IsNil(o.HttpVersionPolicy) { + return true + } + + return false +} + +// SetHttpVersionPolicy gets a reference to the given string and assigns it to the HttpVersionPolicy field. +func (o *HTTPConnectionOptionsRequest) SetHttpVersionPolicy(v string) { + o.HttpVersionPolicy = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *HTTPConnectionOptionsRequest) SetHost(v string) { + o.Host = &v +} + +// GetPathPrefix returns the PathPrefix field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetPathPrefix() string { + if o == nil || IsNil(o.PathPrefix) { + var ret string + return ret + } + return *o.PathPrefix +} + +// GetPathPrefixOk returns a tuple with the PathPrefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetPathPrefixOk() (*string, bool) { + if o == nil || IsNil(o.PathPrefix) { + return nil, false + } + return o.PathPrefix, true +} + +// HasPathPrefix returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasPathPrefix() bool { + if o != nil && !IsNil(o.PathPrefix) { + return true + } + + return false +} + +// SetPathPrefix gets a reference to the given string and assigns it to the PathPrefix field. +func (o *HTTPConnectionOptionsRequest) SetPathPrefix(v string) { + o.PathPrefix = &v +} + +// GetFollowingRedirect returns the FollowingRedirect field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetFollowingRedirect() bool { + if o == nil || IsNil(o.FollowingRedirect) { + var ret bool + return ret + } + return *o.FollowingRedirect +} + +// GetFollowingRedirectOk returns a tuple with the FollowingRedirect field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetFollowingRedirectOk() (*bool, bool) { + if o == nil || IsNil(o.FollowingRedirect) { + return nil, false + } + return o.FollowingRedirect, true +} + +// HasFollowingRedirect returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasFollowingRedirect() bool { + if o != nil && !IsNil(o.FollowingRedirect) { + return true + } + + return false +} + +// SetFollowingRedirect gets a reference to the given bool and assigns it to the FollowingRedirect field. +func (o *HTTPConnectionOptionsRequest) SetFollowingRedirect(v bool) { + o.FollowingRedirect = &v +} + +// GetRealIpHeader returns the RealIpHeader field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetRealIpHeader() string { + if o == nil || IsNil(o.RealIpHeader) { + var ret string + return ret + } + return *o.RealIpHeader +} + +// GetRealIpHeaderOk returns a tuple with the RealIpHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetRealIpHeaderOk() (*string, bool) { + if o == nil || IsNil(o.RealIpHeader) { + return nil, false + } + return o.RealIpHeader, true +} + +// HasRealIpHeader returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasRealIpHeader() bool { + if o != nil && !IsNil(o.RealIpHeader) { + return true + } + + return false +} + +// SetRealIpHeader gets a reference to the given string and assigns it to the RealIpHeader field. +func (o *HTTPConnectionOptionsRequest) SetRealIpHeader(v string) { + o.RealIpHeader = &v +} + +// GetRealPortHeader returns the RealPortHeader field value if set, zero value otherwise. +func (o *HTTPConnectionOptionsRequest) GetRealPortHeader() string { + if o == nil || IsNil(o.RealPortHeader) { + var ret string + return ret + } + return *o.RealPortHeader +} + +// GetRealPortHeaderOk returns a tuple with the RealPortHeader field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPConnectionOptionsRequest) GetRealPortHeaderOk() (*string, bool) { + if o == nil || IsNil(o.RealPortHeader) { + return nil, false + } + return o.RealPortHeader, true +} + +// HasRealPortHeader returns a boolean if a field has been set. +func (o *HTTPConnectionOptionsRequest) HasRealPortHeader() bool { + if o != nil && !IsNil(o.RealPortHeader) { + return true + } + + return false +} + +// SetRealPortHeader gets a reference to the given string and assigns it to the RealPortHeader field. +func (o *HTTPConnectionOptionsRequest) SetRealPortHeader(v string) { + o.RealPortHeader = &v +} + +func (o HTTPConnectionOptionsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HTTPConnectionOptionsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.DnsResolution) { + toSerialize["dns_resolution"] = o.DnsResolution + } + if !IsNil(o.TransportPolicy) { + toSerialize["transport_policy"] = o.TransportPolicy + } + if !IsNil(o.HttpVersionPolicy) { + toSerialize["http_version_policy"] = o.HttpVersionPolicy + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.PathPrefix) { + toSerialize["path_prefix"] = o.PathPrefix + } + if !IsNil(o.FollowingRedirect) { + toSerialize["following_redirect"] = o.FollowingRedirect + } + if !IsNil(o.RealIpHeader) { + toSerialize["real_ip_header"] = o.RealIpHeader + } + if !IsNil(o.RealPortHeader) { + toSerialize["real_port_header"] = o.RealPortHeader + } + return toSerialize, nil +} + +type NullableHTTPConnectionOptionsRequest struct { + value *HTTPConnectionOptionsRequest + isSet bool +} + +func (v NullableHTTPConnectionOptionsRequest) Get() *HTTPConnectionOptionsRequest { + return v.value +} + +func (v *NullableHTTPConnectionOptionsRequest) Set(val *HTTPConnectionOptionsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHTTPConnectionOptionsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHTTPConnectionOptionsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHTTPConnectionOptionsRequest(val *HTTPConnectionOptionsRequest) *NullableHTTPConnectionOptionsRequest { + return &NullableHTTPConnectionOptionsRequest{value: val, isSet: true} +} + +func (v NullableHTTPConnectionOptionsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHTTPConnectionOptionsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_modules.go b/azion-api/model_http_modules.go new file mode 100644 index 0000000..11ebd4b --- /dev/null +++ b/azion-api/model_http_modules.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the HTTPModules type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HTTPModules{} + +// HTTPModules struct for HTTPModules +type HTTPModules struct { + LoadBalancer *LoadBalancerModule `json:"load_balancer,omitempty"` + OriginShield *OriginShieldModule `json:"origin_shield,omitempty"` +} + +// NewHTTPModules instantiates a new HTTPModules object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHTTPModules() *HTTPModules { + this := HTTPModules{} + return &this +} + +// NewHTTPModulesWithDefaults instantiates a new HTTPModules object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHTTPModulesWithDefaults() *HTTPModules { + this := HTTPModules{} + return &this +} + +// GetLoadBalancer returns the LoadBalancer field value if set, zero value otherwise. +func (o *HTTPModules) GetLoadBalancer() LoadBalancerModule { + if o == nil || IsNil(o.LoadBalancer) { + var ret LoadBalancerModule + return ret + } + return *o.LoadBalancer +} + +// GetLoadBalancerOk returns a tuple with the LoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPModules) GetLoadBalancerOk() (*LoadBalancerModule, bool) { + if o == nil || IsNil(o.LoadBalancer) { + return nil, false + } + return o.LoadBalancer, true +} + +// HasLoadBalancer returns a boolean if a field has been set. +func (o *HTTPModules) HasLoadBalancer() bool { + if o != nil && !IsNil(o.LoadBalancer) { + return true + } + + return false +} + +// SetLoadBalancer gets a reference to the given LoadBalancerModule and assigns it to the LoadBalancer field. +func (o *HTTPModules) SetLoadBalancer(v LoadBalancerModule) { + o.LoadBalancer = &v +} + +// GetOriginShield returns the OriginShield field value if set, zero value otherwise. +func (o *HTTPModules) GetOriginShield() OriginShieldModule { + if o == nil || IsNil(o.OriginShield) { + var ret OriginShieldModule + return ret + } + return *o.OriginShield +} + +// GetOriginShieldOk returns a tuple with the OriginShield field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPModules) GetOriginShieldOk() (*OriginShieldModule, bool) { + if o == nil || IsNil(o.OriginShield) { + return nil, false + } + return o.OriginShield, true +} + +// HasOriginShield returns a boolean if a field has been set. +func (o *HTTPModules) HasOriginShield() bool { + if o != nil && !IsNil(o.OriginShield) { + return true + } + + return false +} + +// SetOriginShield gets a reference to the given OriginShieldModule and assigns it to the OriginShield field. +func (o *HTTPModules) SetOriginShield(v OriginShieldModule) { + o.OriginShield = &v +} + +func (o HTTPModules) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HTTPModules) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancer) { + toSerialize["load_balancer"] = o.LoadBalancer + } + if !IsNil(o.OriginShield) { + toSerialize["origin_shield"] = o.OriginShield + } + return toSerialize, nil +} + +type NullableHTTPModules struct { + value *HTTPModules + isSet bool +} + +func (v NullableHTTPModules) Get() *HTTPModules { + return v.value +} + +func (v *NullableHTTPModules) Set(val *HTTPModules) { + v.value = val + v.isSet = true +} + +func (v NullableHTTPModules) IsSet() bool { + return v.isSet +} + +func (v *NullableHTTPModules) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHTTPModules(val *HTTPModules) *NullableHTTPModules { + return &NullableHTTPModules{value: val, isSet: true} +} + +func (v NullableHTTPModules) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHTTPModules) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_modules_request.go b/azion-api/model_http_modules_request.go new file mode 100644 index 0000000..85fd7fe --- /dev/null +++ b/azion-api/model_http_modules_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the HTTPModulesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HTTPModulesRequest{} + +// HTTPModulesRequest struct for HTTPModulesRequest +type HTTPModulesRequest struct { + LoadBalancer *LoadBalancerModuleRequest `json:"load_balancer,omitempty"` + OriginShield *OriginShieldModuleRequest `json:"origin_shield,omitempty"` +} + +// NewHTTPModulesRequest instantiates a new HTTPModulesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHTTPModulesRequest() *HTTPModulesRequest { + this := HTTPModulesRequest{} + return &this +} + +// NewHTTPModulesRequestWithDefaults instantiates a new HTTPModulesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHTTPModulesRequestWithDefaults() *HTTPModulesRequest { + this := HTTPModulesRequest{} + return &this +} + +// GetLoadBalancer returns the LoadBalancer field value if set, zero value otherwise. +func (o *HTTPModulesRequest) GetLoadBalancer() LoadBalancerModuleRequest { + if o == nil || IsNil(o.LoadBalancer) { + var ret LoadBalancerModuleRequest + return ret + } + return *o.LoadBalancer +} + +// GetLoadBalancerOk returns a tuple with the LoadBalancer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPModulesRequest) GetLoadBalancerOk() (*LoadBalancerModuleRequest, bool) { + if o == nil || IsNil(o.LoadBalancer) { + return nil, false + } + return o.LoadBalancer, true +} + +// HasLoadBalancer returns a boolean if a field has been set. +func (o *HTTPModulesRequest) HasLoadBalancer() bool { + if o != nil && !IsNil(o.LoadBalancer) { + return true + } + + return false +} + +// SetLoadBalancer gets a reference to the given LoadBalancerModuleRequest and assigns it to the LoadBalancer field. +func (o *HTTPModulesRequest) SetLoadBalancer(v LoadBalancerModuleRequest) { + o.LoadBalancer = &v +} + +// GetOriginShield returns the OriginShield field value if set, zero value otherwise. +func (o *HTTPModulesRequest) GetOriginShield() OriginShieldModuleRequest { + if o == nil || IsNil(o.OriginShield) { + var ret OriginShieldModuleRequest + return ret + } + return *o.OriginShield +} + +// GetOriginShieldOk returns a tuple with the OriginShield field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HTTPModulesRequest) GetOriginShieldOk() (*OriginShieldModuleRequest, bool) { + if o == nil || IsNil(o.OriginShield) { + return nil, false + } + return o.OriginShield, true +} + +// HasOriginShield returns a boolean if a field has been set. +func (o *HTTPModulesRequest) HasOriginShield() bool { + if o != nil && !IsNil(o.OriginShield) { + return true + } + + return false +} + +// SetOriginShield gets a reference to the given OriginShieldModuleRequest and assigns it to the OriginShield field. +func (o *HTTPModulesRequest) SetOriginShield(v OriginShieldModuleRequest) { + o.OriginShield = &v +} + +func (o HTTPModulesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HTTPModulesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.LoadBalancer) { + toSerialize["load_balancer"] = o.LoadBalancer + } + if !IsNil(o.OriginShield) { + toSerialize["origin_shield"] = o.OriginShield + } + return toSerialize, nil +} + +type NullableHTTPModulesRequest struct { + value *HTTPModulesRequest + isSet bool +} + +func (v NullableHTTPModulesRequest) Get() *HTTPModulesRequest { + return v.value +} + +func (v *NullableHTTPModulesRequest) Set(val *HTTPModulesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHTTPModulesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHTTPModulesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHTTPModulesRequest(val *HTTPModulesRequest) *NullableHTTPModulesRequest { + return &NullableHTTPModulesRequest{value: val, isSet: true} +} + +func (v NullableHTTPModulesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHTTPModulesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_post_endpoint.go b/azion-api/model_http_post_endpoint.go new file mode 100644 index 0000000..ae16773 --- /dev/null +++ b/azion-api/model_http_post_endpoint.go @@ -0,0 +1,334 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the HttpPostEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpPostEndpoint{} + +// HttpPostEndpoint struct for HttpPostEndpoint +type HttpPostEndpoint struct { + Url string `json:"url"` + LogLineSeparator *string `json:"log_line_separator,omitempty"` + PayloadFormat *string `json:"payload_format,omitempty"` + MaxSize NullableInt64 `json:"max_size,omitempty"` + Headers map[string]string `json:"headers"` + // Type identifier for this endpoint (standard) + Type string `json:"type"` +} + +type _HttpPostEndpoint HttpPostEndpoint + +// NewHttpPostEndpoint instantiates a new HttpPostEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHttpPostEndpoint(url string, headers map[string]string, type_ string) *HttpPostEndpoint { + this := HttpPostEndpoint{} + this.Url = url + this.Headers = headers + this.Type = type_ + return &this +} + +// NewHttpPostEndpointWithDefaults instantiates a new HttpPostEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHttpPostEndpointWithDefaults() *HttpPostEndpoint { + this := HttpPostEndpoint{} + return &this +} + +// GetUrl returns the Url field value +func (o *HttpPostEndpoint) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *HttpPostEndpoint) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *HttpPostEndpoint) SetUrl(v string) { + o.Url = v +} + +// GetLogLineSeparator returns the LogLineSeparator field value if set, zero value otherwise. +func (o *HttpPostEndpoint) GetLogLineSeparator() string { + if o == nil || IsNil(o.LogLineSeparator) { + var ret string + return ret + } + return *o.LogLineSeparator +} + +// GetLogLineSeparatorOk returns a tuple with the LogLineSeparator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpPostEndpoint) GetLogLineSeparatorOk() (*string, bool) { + if o == nil || IsNil(o.LogLineSeparator) { + return nil, false + } + return o.LogLineSeparator, true +} + +// HasLogLineSeparator returns a boolean if a field has been set. +func (o *HttpPostEndpoint) HasLogLineSeparator() bool { + if o != nil && !IsNil(o.LogLineSeparator) { + return true + } + + return false +} + +// SetLogLineSeparator gets a reference to the given string and assigns it to the LogLineSeparator field. +func (o *HttpPostEndpoint) SetLogLineSeparator(v string) { + o.LogLineSeparator = &v +} + +// GetPayloadFormat returns the PayloadFormat field value if set, zero value otherwise. +func (o *HttpPostEndpoint) GetPayloadFormat() string { + if o == nil || IsNil(o.PayloadFormat) { + var ret string + return ret + } + return *o.PayloadFormat +} + +// GetPayloadFormatOk returns a tuple with the PayloadFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpPostEndpoint) GetPayloadFormatOk() (*string, bool) { + if o == nil || IsNil(o.PayloadFormat) { + return nil, false + } + return o.PayloadFormat, true +} + +// HasPayloadFormat returns a boolean if a field has been set. +func (o *HttpPostEndpoint) HasPayloadFormat() bool { + if o != nil && !IsNil(o.PayloadFormat) { + return true + } + + return false +} + +// SetPayloadFormat gets a reference to the given string and assigns it to the PayloadFormat field. +func (o *HttpPostEndpoint) SetPayloadFormat(v string) { + o.PayloadFormat = &v +} + +// GetMaxSize returns the MaxSize field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HttpPostEndpoint) GetMaxSize() int64 { + if o == nil || IsNil(o.MaxSize.Get()) { + var ret int64 + return ret + } + return *o.MaxSize.Get() +} + +// GetMaxSizeOk returns a tuple with the MaxSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HttpPostEndpoint) GetMaxSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxSize.Get(), o.MaxSize.IsSet() +} + +// HasMaxSize returns a boolean if a field has been set. +func (o *HttpPostEndpoint) HasMaxSize() bool { + if o != nil && o.MaxSize.IsSet() { + return true + } + + return false +} + +// SetMaxSize gets a reference to the given NullableInt64 and assigns it to the MaxSize field. +func (o *HttpPostEndpoint) SetMaxSize(v int64) { + o.MaxSize.Set(&v) +} +// SetMaxSizeNil sets the value for MaxSize to be an explicit nil +func (o *HttpPostEndpoint) SetMaxSizeNil() { + o.MaxSize.Set(nil) +} + +// UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil +func (o *HttpPostEndpoint) UnsetMaxSize() { + o.MaxSize.Unset() +} + +// GetHeaders returns the Headers field value +func (o *HttpPostEndpoint) GetHeaders() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value +// and a boolean to check if the value has been set. +func (o *HttpPostEndpoint) GetHeadersOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Headers, true +} + +// SetHeaders sets field value +func (o *HttpPostEndpoint) SetHeaders(v map[string]string) { + o.Headers = v +} + +// GetType returns the Type field value +func (o *HttpPostEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *HttpPostEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *HttpPostEndpoint) SetType(v string) { + o.Type = v +} + +func (o HttpPostEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HttpPostEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + if !IsNil(o.LogLineSeparator) { + toSerialize["log_line_separator"] = o.LogLineSeparator + } + if !IsNil(o.PayloadFormat) { + toSerialize["payload_format"] = o.PayloadFormat + } + if o.MaxSize.IsSet() { + toSerialize["max_size"] = o.MaxSize.Get() + } + toSerialize["headers"] = o.Headers + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *HttpPostEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "headers", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHttpPostEndpoint := _HttpPostEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHttpPostEndpoint) + + if err != nil { + return err + } + + *o = HttpPostEndpoint(varHttpPostEndpoint) + + return err +} + +type NullableHttpPostEndpoint struct { + value *HttpPostEndpoint + isSet bool +} + +func (v NullableHttpPostEndpoint) Get() *HttpPostEndpoint { + return v.value +} + +func (v *NullableHttpPostEndpoint) Set(val *HttpPostEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableHttpPostEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpPostEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpPostEndpoint(val *HttpPostEndpoint) *NullableHttpPostEndpoint { + return &NullableHttpPostEndpoint{value: val, isSet: true} +} + +func (v NullableHttpPostEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpPostEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_post_endpoint_request.go b/azion-api/model_http_post_endpoint_request.go new file mode 100644 index 0000000..b142437 --- /dev/null +++ b/azion-api/model_http_post_endpoint_request.go @@ -0,0 +1,334 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the HttpPostEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpPostEndpointRequest{} + +// HttpPostEndpointRequest struct for HttpPostEndpointRequest +type HttpPostEndpointRequest struct { + Url string `json:"url"` + LogLineSeparator *string `json:"log_line_separator,omitempty"` + PayloadFormat *string `json:"payload_format,omitempty"` + MaxSize NullableInt64 `json:"max_size,omitempty"` + Headers map[string]string `json:"headers"` + // Type identifier for this endpoint (standard) + Type string `json:"type"` +} + +type _HttpPostEndpointRequest HttpPostEndpointRequest + +// NewHttpPostEndpointRequest instantiates a new HttpPostEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHttpPostEndpointRequest(url string, headers map[string]string, type_ string) *HttpPostEndpointRequest { + this := HttpPostEndpointRequest{} + this.Url = url + this.Headers = headers + this.Type = type_ + return &this +} + +// NewHttpPostEndpointRequestWithDefaults instantiates a new HttpPostEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHttpPostEndpointRequestWithDefaults() *HttpPostEndpointRequest { + this := HttpPostEndpointRequest{} + return &this +} + +// GetUrl returns the Url field value +func (o *HttpPostEndpointRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *HttpPostEndpointRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *HttpPostEndpointRequest) SetUrl(v string) { + o.Url = v +} + +// GetLogLineSeparator returns the LogLineSeparator field value if set, zero value otherwise. +func (o *HttpPostEndpointRequest) GetLogLineSeparator() string { + if o == nil || IsNil(o.LogLineSeparator) { + var ret string + return ret + } + return *o.LogLineSeparator +} + +// GetLogLineSeparatorOk returns a tuple with the LogLineSeparator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpPostEndpointRequest) GetLogLineSeparatorOk() (*string, bool) { + if o == nil || IsNil(o.LogLineSeparator) { + return nil, false + } + return o.LogLineSeparator, true +} + +// HasLogLineSeparator returns a boolean if a field has been set. +func (o *HttpPostEndpointRequest) HasLogLineSeparator() bool { + if o != nil && !IsNil(o.LogLineSeparator) { + return true + } + + return false +} + +// SetLogLineSeparator gets a reference to the given string and assigns it to the LogLineSeparator field. +func (o *HttpPostEndpointRequest) SetLogLineSeparator(v string) { + o.LogLineSeparator = &v +} + +// GetPayloadFormat returns the PayloadFormat field value if set, zero value otherwise. +func (o *HttpPostEndpointRequest) GetPayloadFormat() string { + if o == nil || IsNil(o.PayloadFormat) { + var ret string + return ret + } + return *o.PayloadFormat +} + +// GetPayloadFormatOk returns a tuple with the PayloadFormat field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpPostEndpointRequest) GetPayloadFormatOk() (*string, bool) { + if o == nil || IsNil(o.PayloadFormat) { + return nil, false + } + return o.PayloadFormat, true +} + +// HasPayloadFormat returns a boolean if a field has been set. +func (o *HttpPostEndpointRequest) HasPayloadFormat() bool { + if o != nil && !IsNil(o.PayloadFormat) { + return true + } + + return false +} + +// SetPayloadFormat gets a reference to the given string and assigns it to the PayloadFormat field. +func (o *HttpPostEndpointRequest) SetPayloadFormat(v string) { + o.PayloadFormat = &v +} + +// GetMaxSize returns the MaxSize field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HttpPostEndpointRequest) GetMaxSize() int64 { + if o == nil || IsNil(o.MaxSize.Get()) { + var ret int64 + return ret + } + return *o.MaxSize.Get() +} + +// GetMaxSizeOk returns a tuple with the MaxSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HttpPostEndpointRequest) GetMaxSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.MaxSize.Get(), o.MaxSize.IsSet() +} + +// HasMaxSize returns a boolean if a field has been set. +func (o *HttpPostEndpointRequest) HasMaxSize() bool { + if o != nil && o.MaxSize.IsSet() { + return true + } + + return false +} + +// SetMaxSize gets a reference to the given NullableInt64 and assigns it to the MaxSize field. +func (o *HttpPostEndpointRequest) SetMaxSize(v int64) { + o.MaxSize.Set(&v) +} +// SetMaxSizeNil sets the value for MaxSize to be an explicit nil +func (o *HttpPostEndpointRequest) SetMaxSizeNil() { + o.MaxSize.Set(nil) +} + +// UnsetMaxSize ensures that no value is present for MaxSize, not even an explicit nil +func (o *HttpPostEndpointRequest) UnsetMaxSize() { + o.MaxSize.Unset() +} + +// GetHeaders returns the Headers field value +func (o *HttpPostEndpointRequest) GetHeaders() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value +// and a boolean to check if the value has been set. +func (o *HttpPostEndpointRequest) GetHeadersOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Headers, true +} + +// SetHeaders sets field value +func (o *HttpPostEndpointRequest) SetHeaders(v map[string]string) { + o.Headers = v +} + +// GetType returns the Type field value +func (o *HttpPostEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *HttpPostEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *HttpPostEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o HttpPostEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HttpPostEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + if !IsNil(o.LogLineSeparator) { + toSerialize["log_line_separator"] = o.LogLineSeparator + } + if !IsNil(o.PayloadFormat) { + toSerialize["payload_format"] = o.PayloadFormat + } + if o.MaxSize.IsSet() { + toSerialize["max_size"] = o.MaxSize.Get() + } + toSerialize["headers"] = o.Headers + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *HttpPostEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "headers", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varHttpPostEndpointRequest := _HttpPostEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varHttpPostEndpointRequest) + + if err != nil { + return err + } + + *o = HttpPostEndpointRequest(varHttpPostEndpointRequest) + + return err +} + +type NullableHttpPostEndpointRequest struct { + value *HttpPostEndpointRequest + isSet bool +} + +func (v NullableHttpPostEndpointRequest) Get() *HttpPostEndpointRequest { + return v.value +} + +func (v *NullableHttpPostEndpointRequest) Set(val *HttpPostEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHttpPostEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpPostEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpPostEndpointRequest(val *HttpPostEndpointRequest) *NullableHttpPostEndpointRequest { + return &NullableHttpPostEndpointRequest{value: val, isSet: true} +} + +func (v NullableHttpPostEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpPostEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_protocol.go b/azion-api/model_http_protocol.go new file mode 100644 index 0000000..dc66c20 --- /dev/null +++ b/azion-api/model_http_protocol.go @@ -0,0 +1,237 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the HttpProtocol type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpProtocol{} + +// HttpProtocol struct for HttpProtocol +type HttpProtocol struct { + Versions []string `json:"versions,omitempty"` + HttpPorts []int64 `json:"http_ports,omitempty"` + HttpsPorts []int64 `json:"https_ports,omitempty"` + QuicPorts []int64 `json:"quic_ports,omitempty"` +} + +// NewHttpProtocol instantiates a new HttpProtocol object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHttpProtocol() *HttpProtocol { + this := HttpProtocol{} + return &this +} + +// NewHttpProtocolWithDefaults instantiates a new HttpProtocol object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHttpProtocolWithDefaults() *HttpProtocol { + this := HttpProtocol{} + return &this +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *HttpProtocol) GetVersions() []string { + if o == nil || IsNil(o.Versions) { + var ret []string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpProtocol) GetVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *HttpProtocol) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *HttpProtocol) SetVersions(v []string) { + o.Versions = v +} + +// GetHttpPorts returns the HttpPorts field value if set, zero value otherwise. +func (o *HttpProtocol) GetHttpPorts() []int64 { + if o == nil || IsNil(o.HttpPorts) { + var ret []int64 + return ret + } + return o.HttpPorts +} + +// GetHttpPortsOk returns a tuple with the HttpPorts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpProtocol) GetHttpPortsOk() ([]int64, bool) { + if o == nil || IsNil(o.HttpPorts) { + return nil, false + } + return o.HttpPorts, true +} + +// HasHttpPorts returns a boolean if a field has been set. +func (o *HttpProtocol) HasHttpPorts() bool { + if o != nil && !IsNil(o.HttpPorts) { + return true + } + + return false +} + +// SetHttpPorts gets a reference to the given []int64 and assigns it to the HttpPorts field. +func (o *HttpProtocol) SetHttpPorts(v []int64) { + o.HttpPorts = v +} + +// GetHttpsPorts returns the HttpsPorts field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HttpProtocol) GetHttpsPorts() []int64 { + if o == nil { + var ret []int64 + return ret + } + return o.HttpsPorts +} + +// GetHttpsPortsOk returns a tuple with the HttpsPorts field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HttpProtocol) GetHttpsPortsOk() ([]int64, bool) { + if o == nil || IsNil(o.HttpsPorts) { + return nil, false + } + return o.HttpsPorts, true +} + +// HasHttpsPorts returns a boolean if a field has been set. +func (o *HttpProtocol) HasHttpsPorts() bool { + if o != nil && !IsNil(o.HttpsPorts) { + return true + } + + return false +} + +// SetHttpsPorts gets a reference to the given []int64 and assigns it to the HttpsPorts field. +func (o *HttpProtocol) SetHttpsPorts(v []int64) { + o.HttpsPorts = v +} + +// GetQuicPorts returns the QuicPorts field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HttpProtocol) GetQuicPorts() []int64 { + if o == nil { + var ret []int64 + return ret + } + return o.QuicPorts +} + +// GetQuicPortsOk returns a tuple with the QuicPorts field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HttpProtocol) GetQuicPortsOk() ([]int64, bool) { + if o == nil || IsNil(o.QuicPorts) { + return nil, false + } + return o.QuicPorts, true +} + +// HasQuicPorts returns a boolean if a field has been set. +func (o *HttpProtocol) HasQuicPorts() bool { + if o != nil && !IsNil(o.QuicPorts) { + return true + } + + return false +} + +// SetQuicPorts gets a reference to the given []int64 and assigns it to the QuicPorts field. +func (o *HttpProtocol) SetQuicPorts(v []int64) { + o.QuicPorts = v +} + +func (o HttpProtocol) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HttpProtocol) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + if !IsNil(o.HttpPorts) { + toSerialize["http_ports"] = o.HttpPorts + } + if o.HttpsPorts != nil { + toSerialize["https_ports"] = o.HttpsPorts + } + if o.QuicPorts != nil { + toSerialize["quic_ports"] = o.QuicPorts + } + return toSerialize, nil +} + +type NullableHttpProtocol struct { + value *HttpProtocol + isSet bool +} + +func (v NullableHttpProtocol) Get() *HttpProtocol { + return v.value +} + +func (v *NullableHttpProtocol) Set(val *HttpProtocol) { + v.value = val + v.isSet = true +} + +func (v NullableHttpProtocol) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpProtocol) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpProtocol(val *HttpProtocol) *NullableHttpProtocol { + return &NullableHttpProtocol{value: val, isSet: true} +} + +func (v NullableHttpProtocol) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpProtocol) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_http_protocol_request.go b/azion-api/model_http_protocol_request.go new file mode 100644 index 0000000..dc2acf7 --- /dev/null +++ b/azion-api/model_http_protocol_request.go @@ -0,0 +1,237 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the HttpProtocolRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HttpProtocolRequest{} + +// HttpProtocolRequest struct for HttpProtocolRequest +type HttpProtocolRequest struct { + Versions []string `json:"versions,omitempty"` + HttpPorts []int64 `json:"http_ports,omitempty"` + HttpsPorts []int64 `json:"https_ports,omitempty"` + QuicPorts []int64 `json:"quic_ports,omitempty"` +} + +// NewHttpProtocolRequest instantiates a new HttpProtocolRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewHttpProtocolRequest() *HttpProtocolRequest { + this := HttpProtocolRequest{} + return &this +} + +// NewHttpProtocolRequestWithDefaults instantiates a new HttpProtocolRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewHttpProtocolRequestWithDefaults() *HttpProtocolRequest { + this := HttpProtocolRequest{} + return &this +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *HttpProtocolRequest) GetVersions() []string { + if o == nil || IsNil(o.Versions) { + var ret []string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpProtocolRequest) GetVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *HttpProtocolRequest) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *HttpProtocolRequest) SetVersions(v []string) { + o.Versions = v +} + +// GetHttpPorts returns the HttpPorts field value if set, zero value otherwise. +func (o *HttpProtocolRequest) GetHttpPorts() []int64 { + if o == nil || IsNil(o.HttpPorts) { + var ret []int64 + return ret + } + return o.HttpPorts +} + +// GetHttpPortsOk returns a tuple with the HttpPorts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HttpProtocolRequest) GetHttpPortsOk() ([]int64, bool) { + if o == nil || IsNil(o.HttpPorts) { + return nil, false + } + return o.HttpPorts, true +} + +// HasHttpPorts returns a boolean if a field has been set. +func (o *HttpProtocolRequest) HasHttpPorts() bool { + if o != nil && !IsNil(o.HttpPorts) { + return true + } + + return false +} + +// SetHttpPorts gets a reference to the given []int64 and assigns it to the HttpPorts field. +func (o *HttpProtocolRequest) SetHttpPorts(v []int64) { + o.HttpPorts = v +} + +// GetHttpsPorts returns the HttpsPorts field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HttpProtocolRequest) GetHttpsPorts() []int64 { + if o == nil { + var ret []int64 + return ret + } + return o.HttpsPorts +} + +// GetHttpsPortsOk returns a tuple with the HttpsPorts field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HttpProtocolRequest) GetHttpsPortsOk() ([]int64, bool) { + if o == nil || IsNil(o.HttpsPorts) { + return nil, false + } + return o.HttpsPorts, true +} + +// HasHttpsPorts returns a boolean if a field has been set. +func (o *HttpProtocolRequest) HasHttpsPorts() bool { + if o != nil && !IsNil(o.HttpsPorts) { + return true + } + + return false +} + +// SetHttpsPorts gets a reference to the given []int64 and assigns it to the HttpsPorts field. +func (o *HttpProtocolRequest) SetHttpsPorts(v []int64) { + o.HttpsPorts = v +} + +// GetQuicPorts returns the QuicPorts field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *HttpProtocolRequest) GetQuicPorts() []int64 { + if o == nil { + var ret []int64 + return ret + } + return o.QuicPorts +} + +// GetQuicPortsOk returns a tuple with the QuicPorts field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *HttpProtocolRequest) GetQuicPortsOk() ([]int64, bool) { + if o == nil || IsNil(o.QuicPorts) { + return nil, false + } + return o.QuicPorts, true +} + +// HasQuicPorts returns a boolean if a field has been set. +func (o *HttpProtocolRequest) HasQuicPorts() bool { + if o != nil && !IsNil(o.QuicPorts) { + return true + } + + return false +} + +// SetQuicPorts gets a reference to the given []int64 and assigns it to the QuicPorts field. +func (o *HttpProtocolRequest) SetQuicPorts(v []int64) { + o.QuicPorts = v +} + +func (o HttpProtocolRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HttpProtocolRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + if !IsNil(o.HttpPorts) { + toSerialize["http_ports"] = o.HttpPorts + } + if o.HttpsPorts != nil { + toSerialize["https_ports"] = o.HttpsPorts + } + if o.QuicPorts != nil { + toSerialize["quic_ports"] = o.QuicPorts + } + return toSerialize, nil +} + +type NullableHttpProtocolRequest struct { + value *HttpProtocolRequest + isSet bool +} + +func (v NullableHttpProtocolRequest) Get() *HttpProtocolRequest { + return v.value +} + +func (v *NullableHttpProtocolRequest) Set(val *HttpProtocolRequest) { + v.value = val + v.isSet = true +} + +func (v NullableHttpProtocolRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableHttpProtocolRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHttpProtocolRequest(val *HttpProtocolRequest) *NullableHttpProtocolRequest { + return &NullableHttpProtocolRequest{value: val, isSet: true} +} + +func (v NullableHttpProtocolRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHttpProtocolRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_image_processor_module.go b/azion-api/model_image_processor_module.go new file mode 100644 index 0000000..e9d3186 --- /dev/null +++ b/azion-api/model_image_processor_module.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ImageProcessorModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImageProcessorModule{} + +// ImageProcessorModule struct for ImageProcessorModule +type ImageProcessorModule struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewImageProcessorModule instantiates a new ImageProcessorModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImageProcessorModule() *ImageProcessorModule { + this := ImageProcessorModule{} + return &this +} + +// NewImageProcessorModuleWithDefaults instantiates a new ImageProcessorModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImageProcessorModuleWithDefaults() *ImageProcessorModule { + this := ImageProcessorModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ImageProcessorModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageProcessorModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ImageProcessorModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ImageProcessorModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o ImageProcessorModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImageProcessorModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableImageProcessorModule struct { + value *ImageProcessorModule + isSet bool +} + +func (v NullableImageProcessorModule) Get() *ImageProcessorModule { + return v.value +} + +func (v *NullableImageProcessorModule) Set(val *ImageProcessorModule) { + v.value = val + v.isSet = true +} + +func (v NullableImageProcessorModule) IsSet() bool { + return v.isSet +} + +func (v *NullableImageProcessorModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImageProcessorModule(val *ImageProcessorModule) *NullableImageProcessorModule { + return &NullableImageProcessorModule{value: val, isSet: true} +} + +func (v NullableImageProcessorModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImageProcessorModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_image_processor_module_request.go b/azion-api/model_image_processor_module_request.go new file mode 100644 index 0000000..ec6e56e --- /dev/null +++ b/azion-api/model_image_processor_module_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ImageProcessorModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ImageProcessorModuleRequest{} + +// ImageProcessorModuleRequest struct for ImageProcessorModuleRequest +type ImageProcessorModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewImageProcessorModuleRequest instantiates a new ImageProcessorModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewImageProcessorModuleRequest() *ImageProcessorModuleRequest { + this := ImageProcessorModuleRequest{} + return &this +} + +// NewImageProcessorModuleRequestWithDefaults instantiates a new ImageProcessorModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewImageProcessorModuleRequestWithDefaults() *ImageProcessorModuleRequest { + this := ImageProcessorModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *ImageProcessorModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ImageProcessorModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ImageProcessorModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *ImageProcessorModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o ImageProcessorModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ImageProcessorModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableImageProcessorModuleRequest struct { + value *ImageProcessorModuleRequest + isSet bool +} + +func (v NullableImageProcessorModuleRequest) Get() *ImageProcessorModuleRequest { + return v.value +} + +func (v *NullableImageProcessorModuleRequest) Set(val *ImageProcessorModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableImageProcessorModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableImageProcessorModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableImageProcessorModuleRequest(val *ImageProcessorModuleRequest) *NullableImageProcessorModuleRequest { + return &NullableImageProcessorModuleRequest{value: val, isSet: true} +} + +func (v NullableImageProcessorModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableImageProcessorModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_data_source.go b/azion-api/model_input_data_source.go new file mode 100644 index 0000000..24f852f --- /dev/null +++ b/azion-api/model_input_data_source.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the InputDataSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputDataSource{} + +// InputDataSource struct for InputDataSource +type InputDataSource struct { + // * `http` - Applications * `waf` - WAF Events * `functions` - Functions * `activity` - Activity History + DataSource string `json:"data_source"` +} + +type _InputDataSource InputDataSource + +// NewInputDataSource instantiates a new InputDataSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputDataSource(dataSource string) *InputDataSource { + this := InputDataSource{} + this.DataSource = dataSource + return &this +} + +// NewInputDataSourceWithDefaults instantiates a new InputDataSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputDataSourceWithDefaults() *InputDataSource { + this := InputDataSource{} + return &this +} + +// GetDataSource returns the DataSource field value +func (o *InputDataSource) GetDataSource() string { + if o == nil { + var ret string + return ret + } + + return o.DataSource +} + +// GetDataSourceOk returns a tuple with the DataSource field value +// and a boolean to check if the value has been set. +func (o *InputDataSource) GetDataSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataSource, true +} + +// SetDataSource sets field value +func (o *InputDataSource) SetDataSource(v string) { + o.DataSource = v +} + +func (o InputDataSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputDataSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data_source"] = o.DataSource + return toSerialize, nil +} + +func (o *InputDataSource) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data_source", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputDataSource := _InputDataSource{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInputDataSource) + + if err != nil { + return err + } + + *o = InputDataSource(varInputDataSource) + + return err +} + +type NullableInputDataSource struct { + value *InputDataSource + isSet bool +} + +func (v NullableInputDataSource) Get() *InputDataSource { + return v.value +} + +func (v *NullableInputDataSource) Set(val *InputDataSource) { + v.value = val + v.isSet = true +} + +func (v NullableInputDataSource) IsSet() bool { + return v.isSet +} + +func (v *NullableInputDataSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputDataSource(val *InputDataSource) *NullableInputDataSource { + return &NullableInputDataSource{value: val, isSet: true} +} + +func (v NullableInputDataSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputDataSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_data_source_attributes.go b/azion-api/model_input_data_source_attributes.go new file mode 100644 index 0000000..05c5a73 --- /dev/null +++ b/azion-api/model_input_data_source_attributes.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the InputDataSourceAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputDataSourceAttributes{} + +// InputDataSourceAttributes struct for InputDataSourceAttributes +type InputDataSourceAttributes struct { + // * `raw_logs` - Raw Logs + Type string `json:"type"` + Attributes InputDataSource `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _InputDataSourceAttributes InputDataSourceAttributes + +// NewInputDataSourceAttributes instantiates a new InputDataSourceAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputDataSourceAttributes(type_ string, attributes InputDataSource) *InputDataSourceAttributes { + this := InputDataSourceAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewInputDataSourceAttributesWithDefaults instantiates a new InputDataSourceAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputDataSourceAttributesWithDefaults() *InputDataSourceAttributes { + this := InputDataSourceAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *InputDataSourceAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *InputDataSourceAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *InputDataSourceAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *InputDataSourceAttributes) GetAttributes() InputDataSource { + if o == nil { + var ret InputDataSource + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *InputDataSourceAttributes) GetAttributesOk() (*InputDataSource, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *InputDataSourceAttributes) SetAttributes(v InputDataSource) { + o.Attributes = v +} + +func (o InputDataSourceAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputDataSourceAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *InputDataSourceAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputDataSourceAttributes := _InputDataSourceAttributes{} + + err = json.Unmarshal(data, &varInputDataSourceAttributes) + + if err != nil { + return err + } + + *o = InputDataSourceAttributes(varInputDataSourceAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableInputDataSourceAttributes struct { + value *InputDataSourceAttributes + isSet bool +} + +func (v NullableInputDataSourceAttributes) Get() *InputDataSourceAttributes { + return v.value +} + +func (v *NullableInputDataSourceAttributes) Set(val *InputDataSourceAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableInputDataSourceAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableInputDataSourceAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputDataSourceAttributes(val *InputDataSourceAttributes) *NullableInputDataSourceAttributes { + return &NullableInputDataSourceAttributes{value: val, isSet: true} +} + +func (v NullableInputDataSourceAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputDataSourceAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_data_source_attributes_request.go b/azion-api/model_input_data_source_attributes_request.go new file mode 100644 index 0000000..6312383 --- /dev/null +++ b/azion-api/model_input_data_source_attributes_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the InputDataSourceAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputDataSourceAttributesRequest{} + +// InputDataSourceAttributesRequest struct for InputDataSourceAttributesRequest +type InputDataSourceAttributesRequest struct { + // * `raw_logs` - Raw Logs + Type string `json:"type"` + Attributes InputDataSourceRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _InputDataSourceAttributesRequest InputDataSourceAttributesRequest + +// NewInputDataSourceAttributesRequest instantiates a new InputDataSourceAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputDataSourceAttributesRequest(type_ string, attributes InputDataSourceRequest) *InputDataSourceAttributesRequest { + this := InputDataSourceAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewInputDataSourceAttributesRequestWithDefaults instantiates a new InputDataSourceAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputDataSourceAttributesRequestWithDefaults() *InputDataSourceAttributesRequest { + this := InputDataSourceAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *InputDataSourceAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *InputDataSourceAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *InputDataSourceAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *InputDataSourceAttributesRequest) GetAttributes() InputDataSourceRequest { + if o == nil { + var ret InputDataSourceRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *InputDataSourceAttributesRequest) GetAttributesOk() (*InputDataSourceRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *InputDataSourceAttributesRequest) SetAttributes(v InputDataSourceRequest) { + o.Attributes = v +} + +func (o InputDataSourceAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputDataSourceAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *InputDataSourceAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputDataSourceAttributesRequest := _InputDataSourceAttributesRequest{} + + err = json.Unmarshal(data, &varInputDataSourceAttributesRequest) + + if err != nil { + return err + } + + *o = InputDataSourceAttributesRequest(varInputDataSourceAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableInputDataSourceAttributesRequest struct { + value *InputDataSourceAttributesRequest + isSet bool +} + +func (v NullableInputDataSourceAttributesRequest) Get() *InputDataSourceAttributesRequest { + return v.value +} + +func (v *NullableInputDataSourceAttributesRequest) Set(val *InputDataSourceAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableInputDataSourceAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableInputDataSourceAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputDataSourceAttributesRequest(val *InputDataSourceAttributesRequest) *NullableInputDataSourceAttributesRequest { + return &NullableInputDataSourceAttributesRequest{value: val, isSet: true} +} + +func (v NullableInputDataSourceAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputDataSourceAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_data_source_request.go b/azion-api/model_input_data_source_request.go new file mode 100644 index 0000000..53b723b --- /dev/null +++ b/azion-api/model_input_data_source_request.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the InputDataSourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputDataSourceRequest{} + +// InputDataSourceRequest struct for InputDataSourceRequest +type InputDataSourceRequest struct { + // * `http` - Applications * `waf` - WAF Events * `functions` - Functions * `activity` - Activity History + DataSource string `json:"data_source"` +} + +type _InputDataSourceRequest InputDataSourceRequest + +// NewInputDataSourceRequest instantiates a new InputDataSourceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputDataSourceRequest(dataSource string) *InputDataSourceRequest { + this := InputDataSourceRequest{} + this.DataSource = dataSource + return &this +} + +// NewInputDataSourceRequestWithDefaults instantiates a new InputDataSourceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputDataSourceRequestWithDefaults() *InputDataSourceRequest { + this := InputDataSourceRequest{} + return &this +} + +// GetDataSource returns the DataSource field value +func (o *InputDataSourceRequest) GetDataSource() string { + if o == nil { + var ret string + return ret + } + + return o.DataSource +} + +// GetDataSourceOk returns a tuple with the DataSource field value +// and a boolean to check if the value has been set. +func (o *InputDataSourceRequest) GetDataSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataSource, true +} + +// SetDataSource sets field value +func (o *InputDataSourceRequest) SetDataSource(v string) { + o.DataSource = v +} + +func (o InputDataSourceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputDataSourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data_source"] = o.DataSource + return toSerialize, nil +} + +func (o *InputDataSourceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data_source", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputDataSourceRequest := _InputDataSourceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInputDataSourceRequest) + + if err != nil { + return err + } + + *o = InputDataSourceRequest(varInputDataSourceRequest) + + return err +} + +type NullableInputDataSourceRequest struct { + value *InputDataSourceRequest + isSet bool +} + +func (v NullableInputDataSourceRequest) Get() *InputDataSourceRequest { + return v.value +} + +func (v *NullableInputDataSourceRequest) Set(val *InputDataSourceRequest) { + v.value = val + v.isSet = true +} + +func (v NullableInputDataSourceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableInputDataSourceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputDataSourceRequest(val *InputDataSourceRequest) *NullableInputDataSourceRequest { + return &NullableInputDataSourceRequest{value: val, isSet: true} +} + +func (v NullableInputDataSourceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputDataSourceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_input_data_source_attributes.go b/azion-api/model_input_input_data_source_attributes.go new file mode 100644 index 0000000..d8f648a --- /dev/null +++ b/azion-api/model_input_input_data_source_attributes.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the InputInputDataSourceAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputInputDataSourceAttributes{} + +// InputInputDataSourceAttributes struct for InputInputDataSourceAttributes +type InputInputDataSourceAttributes struct { + // Type identifier for this endpoint (raw_logs) + Type string `json:"type"` + Attributes InputDataSource `json:"attributes"` +} + +type _InputInputDataSourceAttributes InputInputDataSourceAttributes + +// NewInputInputDataSourceAttributes instantiates a new InputInputDataSourceAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputInputDataSourceAttributes(type_ string, attributes InputDataSource) *InputInputDataSourceAttributes { + this := InputInputDataSourceAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewInputInputDataSourceAttributesWithDefaults instantiates a new InputInputDataSourceAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputInputDataSourceAttributesWithDefaults() *InputInputDataSourceAttributes { + this := InputInputDataSourceAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *InputInputDataSourceAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *InputInputDataSourceAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *InputInputDataSourceAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *InputInputDataSourceAttributes) GetAttributes() InputDataSource { + if o == nil { + var ret InputDataSource + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *InputInputDataSourceAttributes) GetAttributesOk() (*InputDataSource, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *InputInputDataSourceAttributes) SetAttributes(v InputDataSource) { + o.Attributes = v +} + +func (o InputInputDataSourceAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputInputDataSourceAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *InputInputDataSourceAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputInputDataSourceAttributes := _InputInputDataSourceAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInputInputDataSourceAttributes) + + if err != nil { + return err + } + + *o = InputInputDataSourceAttributes(varInputInputDataSourceAttributes) + + return err +} + +type NullableInputInputDataSourceAttributes struct { + value *InputInputDataSourceAttributes + isSet bool +} + +func (v NullableInputInputDataSourceAttributes) Get() *InputInputDataSourceAttributes { + return v.value +} + +func (v *NullableInputInputDataSourceAttributes) Set(val *InputInputDataSourceAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableInputInputDataSourceAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableInputInputDataSourceAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputInputDataSourceAttributes(val *InputInputDataSourceAttributes) *NullableInputInputDataSourceAttributes { + return &NullableInputInputDataSourceAttributes{value: val, isSet: true} +} + +func (v NullableInputInputDataSourceAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputInputDataSourceAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_input_data_source_attributes_request.go b/azion-api/model_input_input_data_source_attributes_request.go new file mode 100644 index 0000000..bf3802a --- /dev/null +++ b/azion-api/model_input_input_data_source_attributes_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the InputInputDataSourceAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputInputDataSourceAttributesRequest{} + +// InputInputDataSourceAttributesRequest struct for InputInputDataSourceAttributesRequest +type InputInputDataSourceAttributesRequest struct { + // Type identifier for this endpoint (raw_logs) + Type string `json:"type"` + Attributes InputDataSourceRequest `json:"attributes"` +} + +type _InputInputDataSourceAttributesRequest InputInputDataSourceAttributesRequest + +// NewInputInputDataSourceAttributesRequest instantiates a new InputInputDataSourceAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputInputDataSourceAttributesRequest(type_ string, attributes InputDataSourceRequest) *InputInputDataSourceAttributesRequest { + this := InputInputDataSourceAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewInputInputDataSourceAttributesRequestWithDefaults instantiates a new InputInputDataSourceAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputInputDataSourceAttributesRequestWithDefaults() *InputInputDataSourceAttributesRequest { + this := InputInputDataSourceAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *InputInputDataSourceAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *InputInputDataSourceAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *InputInputDataSourceAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *InputInputDataSourceAttributesRequest) GetAttributes() InputDataSourceRequest { + if o == nil { + var ret InputDataSourceRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *InputInputDataSourceAttributesRequest) GetAttributesOk() (*InputDataSourceRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *InputInputDataSourceAttributesRequest) SetAttributes(v InputDataSourceRequest) { + o.Attributes = v +} + +func (o InputInputDataSourceAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputInputDataSourceAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *InputInputDataSourceAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputInputDataSourceAttributesRequest := _InputInputDataSourceAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varInputInputDataSourceAttributesRequest) + + if err != nil { + return err + } + + *o = InputInputDataSourceAttributesRequest(varInputInputDataSourceAttributesRequest) + + return err +} + +type NullableInputInputDataSourceAttributesRequest struct { + value *InputInputDataSourceAttributesRequest + isSet bool +} + +func (v NullableInputInputDataSourceAttributesRequest) Get() *InputInputDataSourceAttributesRequest { + return v.value +} + +func (v *NullableInputInputDataSourceAttributesRequest) Set(val *InputInputDataSourceAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableInputInputDataSourceAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableInputInputDataSourceAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputInputDataSourceAttributesRequest(val *InputInputDataSourceAttributesRequest) *NullableInputInputDataSourceAttributesRequest { + return &NullableInputInputDataSourceAttributesRequest{value: val, isSet: true} +} + +func (v NullableInputInputDataSourceAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputInputDataSourceAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_input_shared.go b/azion-api/model_input_shared.go new file mode 100644 index 0000000..3862d3b --- /dev/null +++ b/azion-api/model_input_shared.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the InputShared type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InputShared{} + +// InputShared struct for InputShared +type InputShared struct { + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _InputShared InputShared + +// NewInputShared instantiates a new InputShared object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewInputShared(type_ string) *InputShared { + this := InputShared{} + this.Type = type_ + return &this +} + +// NewInputSharedWithDefaults instantiates a new InputShared object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewInputSharedWithDefaults() *InputShared { + this := InputShared{} + return &this +} + +// GetType returns the Type field value +func (o *InputShared) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *InputShared) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *InputShared) SetType(v string) { + o.Type = v +} + +func (o InputShared) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InputShared) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *InputShared) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varInputShared := _InputShared{} + + err = json.Unmarshal(data, &varInputShared) + + if err != nil { + return err + } + + *o = InputShared(varInputShared) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableInputShared struct { + value *InputShared + isSet bool +} + +func (v NullableInputShared) Get() *InputShared { + return v.value +} + +func (v *NullableInputShared) Set(val *InputShared) { + v.value = val + v.isSet = true +} + +func (v NullableInputShared) IsSet() bool { + return v.isSet +} + +func (v *NullableInputShared) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInputShared(val *InputShared) *NullableInputShared { + return &NullableInputShared{value: val, isSet: true} +} + +func (v NullableInputShared) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInputShared) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_integration.go b/azion-api/model_integration.go new file mode 100644 index 0000000..0f17292 --- /dev/null +++ b/azion-api/model_integration.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Integration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Integration{} + +// Integration struct for Integration +type Integration struct { + Id int64 `json:"id"` + Scope string `json:"scope"` + ScopeType string `json:"scope_type"` + Provider Platform `json:"provider"` +} + +type _Integration Integration + +// NewIntegration instantiates a new Integration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewIntegration(id int64, scope string, scopeType string, provider Platform) *Integration { + this := Integration{} + this.Id = id + this.Scope = scope + this.ScopeType = scopeType + this.Provider = provider + return &this +} + +// NewIntegrationWithDefaults instantiates a new Integration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewIntegrationWithDefaults() *Integration { + this := Integration{} + return &this +} + +// GetId returns the Id field value +func (o *Integration) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Integration) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Integration) SetId(v int64) { + o.Id = v +} + +// GetScope returns the Scope field value +func (o *Integration) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *Integration) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *Integration) SetScope(v string) { + o.Scope = v +} + +// GetScopeType returns the ScopeType field value +func (o *Integration) GetScopeType() string { + if o == nil { + var ret string + return ret + } + + return o.ScopeType +} + +// GetScopeTypeOk returns a tuple with the ScopeType field value +// and a boolean to check if the value has been set. +func (o *Integration) GetScopeTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ScopeType, true +} + +// SetScopeType sets field value +func (o *Integration) SetScopeType(v string) { + o.ScopeType = v +} + +// GetProvider returns the Provider field value +func (o *Integration) GetProvider() Platform { + if o == nil { + var ret Platform + return ret + } + + return o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value +// and a boolean to check if the value has been set. +func (o *Integration) GetProviderOk() (*Platform, bool) { + if o == nil { + return nil, false + } + return &o.Provider, true +} + +// SetProvider sets field value +func (o *Integration) SetProvider(v Platform) { + o.Provider = v +} + +func (o Integration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Integration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["scope"] = o.Scope + toSerialize["scope_type"] = o.ScopeType + toSerialize["provider"] = o.Provider + return toSerialize, nil +} + +func (o *Integration) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "scope", + "scope_type", + "provider", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varIntegration := _Integration{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varIntegration) + + if err != nil { + return err + } + + *o = Integration(varIntegration) + + return err +} + +type NullableIntegration struct { + value *Integration + isSet bool +} + +func (v NullableIntegration) Get() *Integration { + return v.value +} + +func (v *NullableIntegration) Set(val *Integration) { + v.value = val + v.isSet = true +} + +func (v NullableIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableIntegration(val *Integration) *NullableIntegration { + return &NullableIntegration{value: val, isSet: true} +} + +func (v NullableIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_jsonapi_error_object.go b/azion-api/model_jsonapi_error_object.go new file mode 100644 index 0000000..e774da7 --- /dev/null +++ b/azion-api/model_jsonapi_error_object.go @@ -0,0 +1,313 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the JSONAPIErrorObject type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JSONAPIErrorObject{} + +// JSONAPIErrorObject Serializer for a single JSON:API error object. +type JSONAPIErrorObject struct { + // The HTTP status code applicable to this problem + Status *string `json:"status,omitempty"` + // An application-specific error code + Code *string `json:"code,omitempty"` + // A short, human-readable summary of the problem + Title *string `json:"title,omitempty"` + // A human-readable explanation specific to this occurrence of the problem + Detail *string `json:"detail,omitempty"` + // References to the primary source of the error + Source *JSONAPIErrorSource `json:"source,omitempty"` + // Non-standard meta-information about the error + Meta map[string]interface{} `json:"meta,omitempty"` +} + +// NewJSONAPIErrorObject instantiates a new JSONAPIErrorObject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJSONAPIErrorObject() *JSONAPIErrorObject { + this := JSONAPIErrorObject{} + return &this +} + +// NewJSONAPIErrorObjectWithDefaults instantiates a new JSONAPIErrorObject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJSONAPIErrorObjectWithDefaults() *JSONAPIErrorObject { + this := JSONAPIErrorObject{} + return &this +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *JSONAPIErrorObject) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorObject) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *JSONAPIErrorObject) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *JSONAPIErrorObject) SetStatus(v string) { + o.Status = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *JSONAPIErrorObject) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorObject) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *JSONAPIErrorObject) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *JSONAPIErrorObject) SetCode(v string) { + o.Code = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *JSONAPIErrorObject) GetTitle() string { + if o == nil || IsNil(o.Title) { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorObject) GetTitleOk() (*string, bool) { + if o == nil || IsNil(o.Title) { + return nil, false + } + return o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *JSONAPIErrorObject) HasTitle() bool { + if o != nil && !IsNil(o.Title) { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *JSONAPIErrorObject) SetTitle(v string) { + o.Title = &v +} + +// GetDetail returns the Detail field value if set, zero value otherwise. +func (o *JSONAPIErrorObject) GetDetail() string { + if o == nil || IsNil(o.Detail) { + var ret string + return ret + } + return *o.Detail +} + +// GetDetailOk returns a tuple with the Detail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorObject) GetDetailOk() (*string, bool) { + if o == nil || IsNil(o.Detail) { + return nil, false + } + return o.Detail, true +} + +// HasDetail returns a boolean if a field has been set. +func (o *JSONAPIErrorObject) HasDetail() bool { + if o != nil && !IsNil(o.Detail) { + return true + } + + return false +} + +// SetDetail gets a reference to the given string and assigns it to the Detail field. +func (o *JSONAPIErrorObject) SetDetail(v string) { + o.Detail = &v +} + +// GetSource returns the Source field value if set, zero value otherwise. +func (o *JSONAPIErrorObject) GetSource() JSONAPIErrorSource { + if o == nil || IsNil(o.Source) { + var ret JSONAPIErrorSource + return ret + } + return *o.Source +} + +// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorObject) GetSourceOk() (*JSONAPIErrorSource, bool) { + if o == nil || IsNil(o.Source) { + return nil, false + } + return o.Source, true +} + +// HasSource returns a boolean if a field has been set. +func (o *JSONAPIErrorObject) HasSource() bool { + if o != nil && !IsNil(o.Source) { + return true + } + + return false +} + +// SetSource gets a reference to the given JSONAPIErrorSource and assigns it to the Source field. +func (o *JSONAPIErrorObject) SetSource(v JSONAPIErrorSource) { + o.Source = &v +} + +// GetMeta returns the Meta field value if set, zero value otherwise. +func (o *JSONAPIErrorObject) GetMeta() map[string]interface{} { + if o == nil || IsNil(o.Meta) { + var ret map[string]interface{} + return ret + } + return o.Meta +} + +// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorObject) GetMetaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Meta) { + return map[string]interface{}{}, false + } + return o.Meta, true +} + +// HasMeta returns a boolean if a field has been set. +func (o *JSONAPIErrorObject) HasMeta() bool { + if o != nil && !IsNil(o.Meta) { + return true + } + + return false +} + +// SetMeta gets a reference to the given map[string]interface{} and assigns it to the Meta field. +func (o *JSONAPIErrorObject) SetMeta(v map[string]interface{}) { + o.Meta = v +} + +func (o JSONAPIErrorObject) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JSONAPIErrorObject) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Title) { + toSerialize["title"] = o.Title + } + if !IsNil(o.Detail) { + toSerialize["detail"] = o.Detail + } + if !IsNil(o.Source) { + toSerialize["source"] = o.Source + } + if !IsNil(o.Meta) { + toSerialize["meta"] = o.Meta + } + return toSerialize, nil +} + +type NullableJSONAPIErrorObject struct { + value *JSONAPIErrorObject + isSet bool +} + +func (v NullableJSONAPIErrorObject) Get() *JSONAPIErrorObject { + return v.value +} + +func (v *NullableJSONAPIErrorObject) Set(val *JSONAPIErrorObject) { + v.value = val + v.isSet = true +} + +func (v NullableJSONAPIErrorObject) IsSet() bool { + return v.isSet +} + +func (v *NullableJSONAPIErrorObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJSONAPIErrorObject(val *JSONAPIErrorObject) *NullableJSONAPIErrorObject { + return &NullableJSONAPIErrorObject{value: val, isSet: true} +} + +func (v NullableJSONAPIErrorObject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJSONAPIErrorObject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_jsonapi_error_source.go b/azion-api/model_jsonapi_error_source.go new file mode 100644 index 0000000..e651f65 --- /dev/null +++ b/azion-api/model_jsonapi_error_source.go @@ -0,0 +1,202 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the JSONAPIErrorSource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &JSONAPIErrorSource{} + +// JSONAPIErrorSource Serializer for the 'source' object in a JSON:API error. +type JSONAPIErrorSource struct { + // JSON Pointer to the value in the request document that caused the error + Pointer *string `json:"pointer,omitempty"` + // URI query parameter that caused the error + Parameter *string `json:"parameter,omitempty"` + // Request header name that caused the error + Header *string `json:"header,omitempty"` +} + +// NewJSONAPIErrorSource instantiates a new JSONAPIErrorSource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewJSONAPIErrorSource() *JSONAPIErrorSource { + this := JSONAPIErrorSource{} + return &this +} + +// NewJSONAPIErrorSourceWithDefaults instantiates a new JSONAPIErrorSource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewJSONAPIErrorSourceWithDefaults() *JSONAPIErrorSource { + this := JSONAPIErrorSource{} + return &this +} + +// GetPointer returns the Pointer field value if set, zero value otherwise. +func (o *JSONAPIErrorSource) GetPointer() string { + if o == nil || IsNil(o.Pointer) { + var ret string + return ret + } + return *o.Pointer +} + +// GetPointerOk returns a tuple with the Pointer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorSource) GetPointerOk() (*string, bool) { + if o == nil || IsNil(o.Pointer) { + return nil, false + } + return o.Pointer, true +} + +// HasPointer returns a boolean if a field has been set. +func (o *JSONAPIErrorSource) HasPointer() bool { + if o != nil && !IsNil(o.Pointer) { + return true + } + + return false +} + +// SetPointer gets a reference to the given string and assigns it to the Pointer field. +func (o *JSONAPIErrorSource) SetPointer(v string) { + o.Pointer = &v +} + +// GetParameter returns the Parameter field value if set, zero value otherwise. +func (o *JSONAPIErrorSource) GetParameter() string { + if o == nil || IsNil(o.Parameter) { + var ret string + return ret + } + return *o.Parameter +} + +// GetParameterOk returns a tuple with the Parameter field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorSource) GetParameterOk() (*string, bool) { + if o == nil || IsNil(o.Parameter) { + return nil, false + } + return o.Parameter, true +} + +// HasParameter returns a boolean if a field has been set. +func (o *JSONAPIErrorSource) HasParameter() bool { + if o != nil && !IsNil(o.Parameter) { + return true + } + + return false +} + +// SetParameter gets a reference to the given string and assigns it to the Parameter field. +func (o *JSONAPIErrorSource) SetParameter(v string) { + o.Parameter = &v +} + +// GetHeader returns the Header field value if set, zero value otherwise. +func (o *JSONAPIErrorSource) GetHeader() string { + if o == nil || IsNil(o.Header) { + var ret string + return ret + } + return *o.Header +} + +// GetHeaderOk returns a tuple with the Header field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *JSONAPIErrorSource) GetHeaderOk() (*string, bool) { + if o == nil || IsNil(o.Header) { + return nil, false + } + return o.Header, true +} + +// HasHeader returns a boolean if a field has been set. +func (o *JSONAPIErrorSource) HasHeader() bool { + if o != nil && !IsNil(o.Header) { + return true + } + + return false +} + +// SetHeader gets a reference to the given string and assigns it to the Header field. +func (o *JSONAPIErrorSource) SetHeader(v string) { + o.Header = &v +} + +func (o JSONAPIErrorSource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o JSONAPIErrorSource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Pointer) { + toSerialize["pointer"] = o.Pointer + } + if !IsNil(o.Parameter) { + toSerialize["parameter"] = o.Parameter + } + if !IsNil(o.Header) { + toSerialize["header"] = o.Header + } + return toSerialize, nil +} + +type NullableJSONAPIErrorSource struct { + value *JSONAPIErrorSource + isSet bool +} + +func (v NullableJSONAPIErrorSource) Get() *JSONAPIErrorSource { + return v.value +} + +func (v *NullableJSONAPIErrorSource) Set(val *JSONAPIErrorSource) { + v.value = val + v.isSet = true +} + +func (v NullableJSONAPIErrorSource) IsSet() bool { + return v.isSet +} + +func (v *NullableJSONAPIErrorSource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableJSONAPIErrorSource(val *JSONAPIErrorSource) *NullableJSONAPIErrorSource { + return &NullableJSONAPIErrorSource{value: val, isSet: true} +} + +func (v NullableJSONAPIErrorSource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableJSONAPIErrorSource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kafka_endpoint.go b/azion-api/model_kafka_endpoint.go new file mode 100644 index 0000000..8aa99df --- /dev/null +++ b/azion-api/model_kafka_endpoint.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KafkaEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KafkaEndpoint{} + +// KafkaEndpoint struct for KafkaEndpoint +type KafkaEndpoint struct { + BootstrapServers string `json:"bootstrap_servers"` + KafkaTopic string `json:"kafka_topic"` + UseTls bool `json:"use_tls"` + // Type identifier for this endpoint (kafka) + Type string `json:"type"` +} + +type _KafkaEndpoint KafkaEndpoint + +// NewKafkaEndpoint instantiates a new KafkaEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKafkaEndpoint(bootstrapServers string, kafkaTopic string, useTls bool, type_ string) *KafkaEndpoint { + this := KafkaEndpoint{} + this.BootstrapServers = bootstrapServers + this.KafkaTopic = kafkaTopic + this.UseTls = useTls + this.Type = type_ + return &this +} + +// NewKafkaEndpointWithDefaults instantiates a new KafkaEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKafkaEndpointWithDefaults() *KafkaEndpoint { + this := KafkaEndpoint{} + return &this +} + +// GetBootstrapServers returns the BootstrapServers field value +func (o *KafkaEndpoint) GetBootstrapServers() string { + if o == nil { + var ret string + return ret + } + + return o.BootstrapServers +} + +// GetBootstrapServersOk returns a tuple with the BootstrapServers field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpoint) GetBootstrapServersOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BootstrapServers, true +} + +// SetBootstrapServers sets field value +func (o *KafkaEndpoint) SetBootstrapServers(v string) { + o.BootstrapServers = v +} + +// GetKafkaTopic returns the KafkaTopic field value +func (o *KafkaEndpoint) GetKafkaTopic() string { + if o == nil { + var ret string + return ret + } + + return o.KafkaTopic +} + +// GetKafkaTopicOk returns a tuple with the KafkaTopic field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpoint) GetKafkaTopicOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KafkaTopic, true +} + +// SetKafkaTopic sets field value +func (o *KafkaEndpoint) SetKafkaTopic(v string) { + o.KafkaTopic = v +} + +// GetUseTls returns the UseTls field value +func (o *KafkaEndpoint) GetUseTls() bool { + if o == nil { + var ret bool + return ret + } + + return o.UseTls +} + +// GetUseTlsOk returns a tuple with the UseTls field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpoint) GetUseTlsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.UseTls, true +} + +// SetUseTls sets field value +func (o *KafkaEndpoint) SetUseTls(v bool) { + o.UseTls = v +} + +// GetType returns the Type field value +func (o *KafkaEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *KafkaEndpoint) SetType(v string) { + o.Type = v +} + +func (o KafkaEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KafkaEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["bootstrap_servers"] = o.BootstrapServers + toSerialize["kafka_topic"] = o.KafkaTopic + toSerialize["use_tls"] = o.UseTls + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *KafkaEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "bootstrap_servers", + "kafka_topic", + "use_tls", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKafkaEndpoint := _KafkaEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKafkaEndpoint) + + if err != nil { + return err + } + + *o = KafkaEndpoint(varKafkaEndpoint) + + return err +} + +type NullableKafkaEndpoint struct { + value *KafkaEndpoint + isSet bool +} + +func (v NullableKafkaEndpoint) Get() *KafkaEndpoint { + return v.value +} + +func (v *NullableKafkaEndpoint) Set(val *KafkaEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableKafkaEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableKafkaEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKafkaEndpoint(val *KafkaEndpoint) *NullableKafkaEndpoint { + return &NullableKafkaEndpoint{value: val, isSet: true} +} + +func (v NullableKafkaEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKafkaEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kafka_endpoint_request.go b/azion-api/model_kafka_endpoint_request.go new file mode 100644 index 0000000..fe55753 --- /dev/null +++ b/azion-api/model_kafka_endpoint_request.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KafkaEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KafkaEndpointRequest{} + +// KafkaEndpointRequest struct for KafkaEndpointRequest +type KafkaEndpointRequest struct { + BootstrapServers string `json:"bootstrap_servers"` + KafkaTopic string `json:"kafka_topic"` + UseTls bool `json:"use_tls"` + // Type identifier for this endpoint (kafka) + Type string `json:"type"` +} + +type _KafkaEndpointRequest KafkaEndpointRequest + +// NewKafkaEndpointRequest instantiates a new KafkaEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKafkaEndpointRequest(bootstrapServers string, kafkaTopic string, useTls bool, type_ string) *KafkaEndpointRequest { + this := KafkaEndpointRequest{} + this.BootstrapServers = bootstrapServers + this.KafkaTopic = kafkaTopic + this.UseTls = useTls + this.Type = type_ + return &this +} + +// NewKafkaEndpointRequestWithDefaults instantiates a new KafkaEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKafkaEndpointRequestWithDefaults() *KafkaEndpointRequest { + this := KafkaEndpointRequest{} + return &this +} + +// GetBootstrapServers returns the BootstrapServers field value +func (o *KafkaEndpointRequest) GetBootstrapServers() string { + if o == nil { + var ret string + return ret + } + + return o.BootstrapServers +} + +// GetBootstrapServersOk returns a tuple with the BootstrapServers field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpointRequest) GetBootstrapServersOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BootstrapServers, true +} + +// SetBootstrapServers sets field value +func (o *KafkaEndpointRequest) SetBootstrapServers(v string) { + o.BootstrapServers = v +} + +// GetKafkaTopic returns the KafkaTopic field value +func (o *KafkaEndpointRequest) GetKafkaTopic() string { + if o == nil { + var ret string + return ret + } + + return o.KafkaTopic +} + +// GetKafkaTopicOk returns a tuple with the KafkaTopic field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpointRequest) GetKafkaTopicOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.KafkaTopic, true +} + +// SetKafkaTopic sets field value +func (o *KafkaEndpointRequest) SetKafkaTopic(v string) { + o.KafkaTopic = v +} + +// GetUseTls returns the UseTls field value +func (o *KafkaEndpointRequest) GetUseTls() bool { + if o == nil { + var ret bool + return ret + } + + return o.UseTls +} + +// GetUseTlsOk returns a tuple with the UseTls field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpointRequest) GetUseTlsOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.UseTls, true +} + +// SetUseTls sets field value +func (o *KafkaEndpointRequest) SetUseTls(v bool) { + o.UseTls = v +} + +// GetType returns the Type field value +func (o *KafkaEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *KafkaEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *KafkaEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o KafkaEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KafkaEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["bootstrap_servers"] = o.BootstrapServers + toSerialize["kafka_topic"] = o.KafkaTopic + toSerialize["use_tls"] = o.UseTls + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *KafkaEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "bootstrap_servers", + "kafka_topic", + "use_tls", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKafkaEndpointRequest := _KafkaEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKafkaEndpointRequest) + + if err != nil { + return err + } + + *o = KafkaEndpointRequest(varKafkaEndpointRequest) + + return err +} + +type NullableKafkaEndpointRequest struct { + value *KafkaEndpointRequest + isSet bool +} + +func (v NullableKafkaEndpointRequest) Get() *KafkaEndpointRequest { + return v.value +} + +func (v *NullableKafkaEndpointRequest) Set(val *KafkaEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableKafkaEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableKafkaEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKafkaEndpointRequest(val *KafkaEndpointRequest) *NullableKafkaEndpointRequest { + return &NullableKafkaEndpointRequest{value: val, isSet: true} +} + +func (v NullableKafkaEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKafkaEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kb_ask_request.go b/azion-api/model_kb_ask_request.go new file mode 100644 index 0000000..02aeb7a --- /dev/null +++ b/azion-api/model_kb_ask_request.go @@ -0,0 +1,241 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KBAskRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KBAskRequest{} + +// KBAskRequest struct for KBAskRequest +type KBAskRequest struct { + Question string `json:"question"` + TopK *int64 `json:"top_k,omitempty"` + Model NullableString `json:"model,omitempty"` +} + +type _KBAskRequest KBAskRequest + +// NewKBAskRequest instantiates a new KBAskRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKBAskRequest(question string) *KBAskRequest { + this := KBAskRequest{} + this.Question = question + return &this +} + +// NewKBAskRequestWithDefaults instantiates a new KBAskRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKBAskRequestWithDefaults() *KBAskRequest { + this := KBAskRequest{} + return &this +} + +// GetQuestion returns the Question field value +func (o *KBAskRequest) GetQuestion() string { + if o == nil { + var ret string + return ret + } + + return o.Question +} + +// GetQuestionOk returns a tuple with the Question field value +// and a boolean to check if the value has been set. +func (o *KBAskRequest) GetQuestionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Question, true +} + +// SetQuestion sets field value +func (o *KBAskRequest) SetQuestion(v string) { + o.Question = v +} + +// GetTopK returns the TopK field value if set, zero value otherwise. +func (o *KBAskRequest) GetTopK() int64 { + if o == nil || IsNil(o.TopK) { + var ret int64 + return ret + } + return *o.TopK +} + +// GetTopKOk returns a tuple with the TopK field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KBAskRequest) GetTopKOk() (*int64, bool) { + if o == nil || IsNil(o.TopK) { + return nil, false + } + return o.TopK, true +} + +// HasTopK returns a boolean if a field has been set. +func (o *KBAskRequest) HasTopK() bool { + if o != nil && !IsNil(o.TopK) { + return true + } + + return false +} + +// SetTopK gets a reference to the given int64 and assigns it to the TopK field. +func (o *KBAskRequest) SetTopK(v int64) { + o.TopK = &v +} + +// GetModel returns the Model field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KBAskRequest) GetModel() string { + if o == nil || IsNil(o.Model.Get()) { + var ret string + return ret + } + return *o.Model.Get() +} + +// GetModelOk returns a tuple with the Model field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KBAskRequest) GetModelOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Model.Get(), o.Model.IsSet() +} + +// HasModel returns a boolean if a field has been set. +func (o *KBAskRequest) HasModel() bool { + if o != nil && o.Model.IsSet() { + return true + } + + return false +} + +// SetModel gets a reference to the given NullableString and assigns it to the Model field. +func (o *KBAskRequest) SetModel(v string) { + o.Model.Set(&v) +} +// SetModelNil sets the value for Model to be an explicit nil +func (o *KBAskRequest) SetModelNil() { + o.Model.Set(nil) +} + +// UnsetModel ensures that no value is present for Model, not even an explicit nil +func (o *KBAskRequest) UnsetModel() { + o.Model.Unset() +} + +func (o KBAskRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KBAskRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["question"] = o.Question + if !IsNil(o.TopK) { + toSerialize["top_k"] = o.TopK + } + if o.Model.IsSet() { + toSerialize["model"] = o.Model.Get() + } + return toSerialize, nil +} + +func (o *KBAskRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "question", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKBAskRequest := _KBAskRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKBAskRequest) + + if err != nil { + return err + } + + *o = KBAskRequest(varKBAskRequest) + + return err +} + +type NullableKBAskRequest struct { + value *KBAskRequest + isSet bool +} + +func (v NullableKBAskRequest) Get() *KBAskRequest { + return v.value +} + +func (v *NullableKBAskRequest) Set(val *KBAskRequest) { + v.value = val + v.isSet = true +} + +func (v NullableKBAskRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableKBAskRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKBAskRequest(val *KBAskRequest) *NullableKBAskRequest { + return &NullableKBAskRequest{value: val, isSet: true} +} + +func (v NullableKBAskRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKBAskRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kb_ask_response.go b/azion-api/model_kb_ask_response.go new file mode 100644 index 0000000..a36a71b --- /dev/null +++ b/azion-api/model_kb_ask_response.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KBAskResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KBAskResponse{} + +// KBAskResponse struct for KBAskResponse +type KBAskResponse struct { + Answer string `json:"answer"` + Context []KBQueryResult `json:"context"` +} + +type _KBAskResponse KBAskResponse + +// NewKBAskResponse instantiates a new KBAskResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKBAskResponse(answer string, context []KBQueryResult) *KBAskResponse { + this := KBAskResponse{} + this.Answer = answer + this.Context = context + return &this +} + +// NewKBAskResponseWithDefaults instantiates a new KBAskResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKBAskResponseWithDefaults() *KBAskResponse { + this := KBAskResponse{} + return &this +} + +// GetAnswer returns the Answer field value +func (o *KBAskResponse) GetAnswer() string { + if o == nil { + var ret string + return ret + } + + return o.Answer +} + +// GetAnswerOk returns a tuple with the Answer field value +// and a boolean to check if the value has been set. +func (o *KBAskResponse) GetAnswerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Answer, true +} + +// SetAnswer sets field value +func (o *KBAskResponse) SetAnswer(v string) { + o.Answer = v +} + +// GetContext returns the Context field value +func (o *KBAskResponse) GetContext() []KBQueryResult { + if o == nil { + var ret []KBQueryResult + return ret + } + + return o.Context +} + +// GetContextOk returns a tuple with the Context field value +// and a boolean to check if the value has been set. +func (o *KBAskResponse) GetContextOk() ([]KBQueryResult, bool) { + if o == nil { + return nil, false + } + return o.Context, true +} + +// SetContext sets field value +func (o *KBAskResponse) SetContext(v []KBQueryResult) { + o.Context = v +} + +func (o KBAskResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KBAskResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["answer"] = o.Answer + toSerialize["context"] = o.Context + return toSerialize, nil +} + +func (o *KBAskResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "answer", + "context", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKBAskResponse := _KBAskResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKBAskResponse) + + if err != nil { + return err + } + + *o = KBAskResponse(varKBAskResponse) + + return err +} + +type NullableKBAskResponse struct { + value *KBAskResponse + isSet bool +} + +func (v NullableKBAskResponse) Get() *KBAskResponse { + return v.value +} + +func (v *NullableKBAskResponse) Set(val *KBAskResponse) { + v.value = val + v.isSet = true +} + +func (v NullableKBAskResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableKBAskResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKBAskResponse(val *KBAskResponse) *NullableKBAskResponse { + return &NullableKBAskResponse{value: val, isSet: true} +} + +func (v NullableKBAskResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKBAskResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kb_query_request.go b/azion-api/model_kb_query_request.go new file mode 100644 index 0000000..1993cf7 --- /dev/null +++ b/azion-api/model_kb_query_request.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KBQueryRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KBQueryRequest{} + +// KBQueryRequest struct for KBQueryRequest +type KBQueryRequest struct { + Query string `json:"query"` + TopK *int64 `json:"top_k,omitempty"` +} + +type _KBQueryRequest KBQueryRequest + +// NewKBQueryRequest instantiates a new KBQueryRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKBQueryRequest(query string) *KBQueryRequest { + this := KBQueryRequest{} + this.Query = query + return &this +} + +// NewKBQueryRequestWithDefaults instantiates a new KBQueryRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKBQueryRequestWithDefaults() *KBQueryRequest { + this := KBQueryRequest{} + return &this +} + +// GetQuery returns the Query field value +func (o *KBQueryRequest) GetQuery() string { + if o == nil { + var ret string + return ret + } + + return o.Query +} + +// GetQueryOk returns a tuple with the Query field value +// and a boolean to check if the value has been set. +func (o *KBQueryRequest) GetQueryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Query, true +} + +// SetQuery sets field value +func (o *KBQueryRequest) SetQuery(v string) { + o.Query = v +} + +// GetTopK returns the TopK field value if set, zero value otherwise. +func (o *KBQueryRequest) GetTopK() int64 { + if o == nil || IsNil(o.TopK) { + var ret int64 + return ret + } + return *o.TopK +} + +// GetTopKOk returns a tuple with the TopK field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KBQueryRequest) GetTopKOk() (*int64, bool) { + if o == nil || IsNil(o.TopK) { + return nil, false + } + return o.TopK, true +} + +// HasTopK returns a boolean if a field has been set. +func (o *KBQueryRequest) HasTopK() bool { + if o != nil && !IsNil(o.TopK) { + return true + } + + return false +} + +// SetTopK gets a reference to the given int64 and assigns it to the TopK field. +func (o *KBQueryRequest) SetTopK(v int64) { + o.TopK = &v +} + +func (o KBQueryRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KBQueryRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["query"] = o.Query + if !IsNil(o.TopK) { + toSerialize["top_k"] = o.TopK + } + return toSerialize, nil +} + +func (o *KBQueryRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "query", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKBQueryRequest := _KBQueryRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKBQueryRequest) + + if err != nil { + return err + } + + *o = KBQueryRequest(varKBQueryRequest) + + return err +} + +type NullableKBQueryRequest struct { + value *KBQueryRequest + isSet bool +} + +func (v NullableKBQueryRequest) Get() *KBQueryRequest { + return v.value +} + +func (v *NullableKBQueryRequest) Set(val *KBQueryRequest) { + v.value = val + v.isSet = true +} + +func (v NullableKBQueryRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableKBQueryRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKBQueryRequest(val *KBQueryRequest) *NullableKBQueryRequest { + return &NullableKBQueryRequest{value: val, isSet: true} +} + +func (v NullableKBQueryRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKBQueryRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kb_query_response.go b/azion-api/model_kb_query_response.go new file mode 100644 index 0000000..92959fc --- /dev/null +++ b/azion-api/model_kb_query_response.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KBQueryResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KBQueryResponse{} + +// KBQueryResponse struct for KBQueryResponse +type KBQueryResponse struct { + Results []KBQueryResult `json:"results"` +} + +type _KBQueryResponse KBQueryResponse + +// NewKBQueryResponse instantiates a new KBQueryResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKBQueryResponse(results []KBQueryResult) *KBQueryResponse { + this := KBQueryResponse{} + this.Results = results + return &this +} + +// NewKBQueryResponseWithDefaults instantiates a new KBQueryResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKBQueryResponseWithDefaults() *KBQueryResponse { + this := KBQueryResponse{} + return &this +} + +// GetResults returns the Results field value +func (o *KBQueryResponse) GetResults() []KBQueryResult { + if o == nil { + var ret []KBQueryResult + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *KBQueryResponse) GetResultsOk() ([]KBQueryResult, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *KBQueryResponse) SetResults(v []KBQueryResult) { + o.Results = v +} + +func (o KBQueryResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KBQueryResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *KBQueryResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKBQueryResponse := _KBQueryResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKBQueryResponse) + + if err != nil { + return err + } + + *o = KBQueryResponse(varKBQueryResponse) + + return err +} + +type NullableKBQueryResponse struct { + value *KBQueryResponse + isSet bool +} + +func (v NullableKBQueryResponse) Get() *KBQueryResponse { + return v.value +} + +func (v *NullableKBQueryResponse) Set(val *KBQueryResponse) { + v.value = val + v.isSet = true +} + +func (v NullableKBQueryResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableKBQueryResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKBQueryResponse(val *KBQueryResponse) *NullableKBQueryResponse { + return &NullableKBQueryResponse{value: val, isSet: true} +} + +func (v NullableKBQueryResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKBQueryResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_kb_query_result.go b/azion-api/model_kb_query_result.go new file mode 100644 index 0000000..feef419 --- /dev/null +++ b/azion-api/model_kb_query_result.go @@ -0,0 +1,317 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KBQueryResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KBQueryResult{} + +// KBQueryResult struct for KBQueryResult +type KBQueryResult struct { + ChunkId string `json:"chunk_id"` + Title string `json:"title"` + Content string `json:"content"` + Source string `json:"source"` + Similarity NullableFloat64 `json:"similarity,omitempty"` + SearchType string `json:"search_type"` +} + +type _KBQueryResult KBQueryResult + +// NewKBQueryResult instantiates a new KBQueryResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKBQueryResult(chunkId string, title string, content string, source string, searchType string) *KBQueryResult { + this := KBQueryResult{} + this.ChunkId = chunkId + this.Title = title + this.Content = content + this.Source = source + this.SearchType = searchType + return &this +} + +// NewKBQueryResultWithDefaults instantiates a new KBQueryResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKBQueryResultWithDefaults() *KBQueryResult { + this := KBQueryResult{} + return &this +} + +// GetChunkId returns the ChunkId field value +func (o *KBQueryResult) GetChunkId() string { + if o == nil { + var ret string + return ret + } + + return o.ChunkId +} + +// GetChunkIdOk returns a tuple with the ChunkId field value +// and a boolean to check if the value has been set. +func (o *KBQueryResult) GetChunkIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChunkId, true +} + +// SetChunkId sets field value +func (o *KBQueryResult) SetChunkId(v string) { + o.ChunkId = v +} + +// GetTitle returns the Title field value +func (o *KBQueryResult) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *KBQueryResult) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *KBQueryResult) SetTitle(v string) { + o.Title = v +} + +// GetContent returns the Content field value +func (o *KBQueryResult) GetContent() string { + if o == nil { + var ret string + return ret + } + + return o.Content +} + +// GetContentOk returns a tuple with the Content field value +// and a boolean to check if the value has been set. +func (o *KBQueryResult) GetContentOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Content, true +} + +// SetContent sets field value +func (o *KBQueryResult) SetContent(v string) { + o.Content = v +} + +// GetSource returns the Source field value +func (o *KBQueryResult) GetSource() string { + if o == nil { + var ret string + return ret + } + + return o.Source +} + +// GetSourceOk returns a tuple with the Source field value +// and a boolean to check if the value has been set. +func (o *KBQueryResult) GetSourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Source, true +} + +// SetSource sets field value +func (o *KBQueryResult) SetSource(v string) { + o.Source = v +} + +// GetSimilarity returns the Similarity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *KBQueryResult) GetSimilarity() float64 { + if o == nil || IsNil(o.Similarity.Get()) { + var ret float64 + return ret + } + return *o.Similarity.Get() +} + +// GetSimilarityOk returns a tuple with the Similarity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KBQueryResult) GetSimilarityOk() (*float64, bool) { + if o == nil { + return nil, false + } + return o.Similarity.Get(), o.Similarity.IsSet() +} + +// HasSimilarity returns a boolean if a field has been set. +func (o *KBQueryResult) HasSimilarity() bool { + if o != nil && o.Similarity.IsSet() { + return true + } + + return false +} + +// SetSimilarity gets a reference to the given NullableFloat64 and assigns it to the Similarity field. +func (o *KBQueryResult) SetSimilarity(v float64) { + o.Similarity.Set(&v) +} +// SetSimilarityNil sets the value for Similarity to be an explicit nil +func (o *KBQueryResult) SetSimilarityNil() { + o.Similarity.Set(nil) +} + +// UnsetSimilarity ensures that no value is present for Similarity, not even an explicit nil +func (o *KBQueryResult) UnsetSimilarity() { + o.Similarity.Unset() +} + +// GetSearchType returns the SearchType field value +func (o *KBQueryResult) GetSearchType() string { + if o == nil { + var ret string + return ret + } + + return o.SearchType +} + +// GetSearchTypeOk returns a tuple with the SearchType field value +// and a boolean to check if the value has been set. +func (o *KBQueryResult) GetSearchTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SearchType, true +} + +// SetSearchType sets field value +func (o *KBQueryResult) SetSearchType(v string) { + o.SearchType = v +} + +func (o KBQueryResult) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KBQueryResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["chunk_id"] = o.ChunkId + toSerialize["title"] = o.Title + toSerialize["content"] = o.Content + toSerialize["source"] = o.Source + if o.Similarity.IsSet() { + toSerialize["similarity"] = o.Similarity.Get() + } + toSerialize["search_type"] = o.SearchType + return toSerialize, nil +} + +func (o *KBQueryResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "chunk_id", + "title", + "content", + "source", + "search_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKBQueryResult := _KBQueryResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKBQueryResult) + + if err != nil { + return err + } + + *o = KBQueryResult(varKBQueryResult) + + return err +} + +type NullableKBQueryResult struct { + value *KBQueryResult + isSet bool +} + +func (v NullableKBQueryResult) Get() *KBQueryResult { + return v.value +} + +func (v *NullableKBQueryResult) Set(val *KBQueryResult) { + v.value = val + v.isSet = true +} + +func (v NullableKBQueryResult) IsSet() bool { + return v.isSet +} + +func (v *NullableKBQueryResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKBQueryResult(val *KBQueryResult) *NullableKBQueryResult { + return &NullableKBQueryResult{value: val, isSet: true} +} + +func (v NullableKBQueryResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKBQueryResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_knowledge_base.go b/azion-api/model_knowledge_base.go new file mode 100644 index 0000000..76ce30a --- /dev/null +++ b/azion-api/model_knowledge_base.go @@ -0,0 +1,431 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the KnowledgeBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KnowledgeBase{} + +// KnowledgeBase struct for KnowledgeBase +type KnowledgeBase struct { + KbId int64 `json:"kb_id"` + AccountId NullableInt64 `json:"account_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + // * `text-embedding-3-small` - text-embedding-3-small + EmbeddingModel *string `json:"embedding_model,omitempty"` + SqlId string `json:"sql_id"` + SqlDbName string `json:"sql_db_name"` + StorageName string `json:"storage_name"` + LastModified time.Time `json:"last_modified"` + LastEditor string `json:"last_editor"` +} + +type _KnowledgeBase KnowledgeBase + +// NewKnowledgeBase instantiates a new KnowledgeBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKnowledgeBase(kbId int64, accountId NullableInt64, name string, sqlId string, sqlDbName string, storageName string, lastModified time.Time, lastEditor string) *KnowledgeBase { + this := KnowledgeBase{} + this.KbId = kbId + this.AccountId = accountId + this.Name = name + this.SqlId = sqlId + this.SqlDbName = sqlDbName + this.StorageName = storageName + this.LastModified = lastModified + this.LastEditor = lastEditor + return &this +} + +// NewKnowledgeBaseWithDefaults instantiates a new KnowledgeBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKnowledgeBaseWithDefaults() *KnowledgeBase { + this := KnowledgeBase{} + return &this +} + +// GetKbId returns the KbId field value +func (o *KnowledgeBase) GetKbId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetKbIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.KbId, true +} + +// SetKbId sets field value +func (o *KnowledgeBase) SetKbId(v int64) { + o.KbId = v +} + +// GetAccountId returns the AccountId field value +// If the value is explicit nil, the zero value for int64 will be returned +func (o *KnowledgeBase) GetAccountId() int64 { + if o == nil || o.AccountId.Get() == nil { + var ret int64 + return ret + } + + return *o.AccountId.Get() +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *KnowledgeBase) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AccountId.Get(), o.AccountId.IsSet() +} + +// SetAccountId sets field value +func (o *KnowledgeBase) SetAccountId(v int64) { + o.AccountId.Set(&v) +} + +// GetName returns the Name field value +func (o *KnowledgeBase) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *KnowledgeBase) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *KnowledgeBase) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *KnowledgeBase) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *KnowledgeBase) SetDescription(v string) { + o.Description = &v +} + +// GetEmbeddingModel returns the EmbeddingModel field value if set, zero value otherwise. +func (o *KnowledgeBase) GetEmbeddingModel() string { + if o == nil || IsNil(o.EmbeddingModel) { + var ret string + return ret + } + return *o.EmbeddingModel +} + +// GetEmbeddingModelOk returns a tuple with the EmbeddingModel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetEmbeddingModelOk() (*string, bool) { + if o == nil || IsNil(o.EmbeddingModel) { + return nil, false + } + return o.EmbeddingModel, true +} + +// HasEmbeddingModel returns a boolean if a field has been set. +func (o *KnowledgeBase) HasEmbeddingModel() bool { + if o != nil && !IsNil(o.EmbeddingModel) { + return true + } + + return false +} + +// SetEmbeddingModel gets a reference to the given string and assigns it to the EmbeddingModel field. +func (o *KnowledgeBase) SetEmbeddingModel(v string) { + o.EmbeddingModel = &v +} + +// GetSqlId returns the SqlId field value +func (o *KnowledgeBase) GetSqlId() string { + if o == nil { + var ret string + return ret + } + + return o.SqlId +} + +// GetSqlIdOk returns a tuple with the SqlId field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetSqlIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SqlId, true +} + +// SetSqlId sets field value +func (o *KnowledgeBase) SetSqlId(v string) { + o.SqlId = v +} + +// GetSqlDbName returns the SqlDbName field value +func (o *KnowledgeBase) GetSqlDbName() string { + if o == nil { + var ret string + return ret + } + + return o.SqlDbName +} + +// GetSqlDbNameOk returns a tuple with the SqlDbName field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetSqlDbNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SqlDbName, true +} + +// SetSqlDbName sets field value +func (o *KnowledgeBase) SetSqlDbName(v string) { + o.SqlDbName = v +} + +// GetStorageName returns the StorageName field value +func (o *KnowledgeBase) GetStorageName() string { + if o == nil { + var ret string + return ret + } + + return o.StorageName +} + +// GetStorageNameOk returns a tuple with the StorageName field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetStorageNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StorageName, true +} + +// SetStorageName sets field value +func (o *KnowledgeBase) SetStorageName(v string) { + o.StorageName = v +} + +// GetLastModified returns the LastModified field value +func (o *KnowledgeBase) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *KnowledgeBase) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetLastEditor returns the LastEditor field value +func (o *KnowledgeBase) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBase) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *KnowledgeBase) SetLastEditor(v string) { + o.LastEditor = v +} + +func (o KnowledgeBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KnowledgeBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["kb_id"] = o.KbId + toSerialize["account_id"] = o.AccountId.Get() + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.EmbeddingModel) { + toSerialize["embedding_model"] = o.EmbeddingModel + } + toSerialize["sql_id"] = o.SqlId + toSerialize["sql_db_name"] = o.SqlDbName + toSerialize["storage_name"] = o.StorageName + toSerialize["last_modified"] = o.LastModified + toSerialize["last_editor"] = o.LastEditor + return toSerialize, nil +} + +func (o *KnowledgeBase) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "kb_id", + "account_id", + "name", + "sql_id", + "sql_db_name", + "storage_name", + "last_modified", + "last_editor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKnowledgeBase := _KnowledgeBase{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKnowledgeBase) + + if err != nil { + return err + } + + *o = KnowledgeBase(varKnowledgeBase) + + return err +} + +type NullableKnowledgeBase struct { + value *KnowledgeBase + isSet bool +} + +func (v NullableKnowledgeBase) Get() *KnowledgeBase { + return v.value +} + +func (v *NullableKnowledgeBase) Set(val *KnowledgeBase) { + v.value = val + v.isSet = true +} + +func (v NullableKnowledgeBase) IsSet() bool { + return v.isSet +} + +func (v *NullableKnowledgeBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKnowledgeBase(val *KnowledgeBase) *NullableKnowledgeBase { + return &NullableKnowledgeBase{value: val, isSet: true} +} + +func (v NullableKnowledgeBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKnowledgeBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_knowledge_base_request.go b/azion-api/model_knowledge_base_request.go new file mode 100644 index 0000000..e30c5a2 --- /dev/null +++ b/azion-api/model_knowledge_base_request.go @@ -0,0 +1,232 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the KnowledgeBaseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &KnowledgeBaseRequest{} + +// KnowledgeBaseRequest struct for KnowledgeBaseRequest +type KnowledgeBaseRequest struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + // * `text-embedding-3-small` - text-embedding-3-small + EmbeddingModel *string `json:"embedding_model,omitempty"` +} + +type _KnowledgeBaseRequest KnowledgeBaseRequest + +// NewKnowledgeBaseRequest instantiates a new KnowledgeBaseRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewKnowledgeBaseRequest(name string) *KnowledgeBaseRequest { + this := KnowledgeBaseRequest{} + this.Name = name + return &this +} + +// NewKnowledgeBaseRequestWithDefaults instantiates a new KnowledgeBaseRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewKnowledgeBaseRequestWithDefaults() *KnowledgeBaseRequest { + this := KnowledgeBaseRequest{} + return &this +} + +// GetName returns the Name field value +func (o *KnowledgeBaseRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *KnowledgeBaseRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *KnowledgeBaseRequest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *KnowledgeBaseRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KnowledgeBaseRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *KnowledgeBaseRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *KnowledgeBaseRequest) SetDescription(v string) { + o.Description = &v +} + +// GetEmbeddingModel returns the EmbeddingModel field value if set, zero value otherwise. +func (o *KnowledgeBaseRequest) GetEmbeddingModel() string { + if o == nil || IsNil(o.EmbeddingModel) { + var ret string + return ret + } + return *o.EmbeddingModel +} + +// GetEmbeddingModelOk returns a tuple with the EmbeddingModel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *KnowledgeBaseRequest) GetEmbeddingModelOk() (*string, bool) { + if o == nil || IsNil(o.EmbeddingModel) { + return nil, false + } + return o.EmbeddingModel, true +} + +// HasEmbeddingModel returns a boolean if a field has been set. +func (o *KnowledgeBaseRequest) HasEmbeddingModel() bool { + if o != nil && !IsNil(o.EmbeddingModel) { + return true + } + + return false +} + +// SetEmbeddingModel gets a reference to the given string and assigns it to the EmbeddingModel field. +func (o *KnowledgeBaseRequest) SetEmbeddingModel(v string) { + o.EmbeddingModel = &v +} + +func (o KnowledgeBaseRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o KnowledgeBaseRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.EmbeddingModel) { + toSerialize["embedding_model"] = o.EmbeddingModel + } + return toSerialize, nil +} + +func (o *KnowledgeBaseRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varKnowledgeBaseRequest := _KnowledgeBaseRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varKnowledgeBaseRequest) + + if err != nil { + return err + } + + *o = KnowledgeBaseRequest(varKnowledgeBaseRequest) + + return err +} + +type NullableKnowledgeBaseRequest struct { + value *KnowledgeBaseRequest + isSet bool +} + +func (v NullableKnowledgeBaseRequest) Get() *KnowledgeBaseRequest { + return v.value +} + +func (v *NullableKnowledgeBaseRequest) Set(val *KnowledgeBaseRequest) { + v.value = val + v.isSet = true +} + +func (v NullableKnowledgeBaseRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableKnowledgeBaseRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableKnowledgeBaseRequest(val *KnowledgeBaseRequest) *NullableKnowledgeBaseRequest { + return &NullableKnowledgeBaseRequest{value: val, isSet: true} +} + +func (v NullableKnowledgeBaseRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableKnowledgeBaseRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_large_file_cache_module.go b/azion-api/model_large_file_cache_module.go new file mode 100644 index 0000000..7d8326e --- /dev/null +++ b/azion-api/model_large_file_cache_module.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the LargeFileCacheModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LargeFileCacheModule{} + +// LargeFileCacheModule struct for LargeFileCacheModule +type LargeFileCacheModule struct { + Enabled *bool `json:"enabled,omitempty"` + Offset *int64 `json:"offset,omitempty"` +} + +// NewLargeFileCacheModule instantiates a new LargeFileCacheModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLargeFileCacheModule() *LargeFileCacheModule { + this := LargeFileCacheModule{} + return &this +} + +// NewLargeFileCacheModuleWithDefaults instantiates a new LargeFileCacheModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLargeFileCacheModuleWithDefaults() *LargeFileCacheModule { + this := LargeFileCacheModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *LargeFileCacheModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LargeFileCacheModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *LargeFileCacheModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *LargeFileCacheModule) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *LargeFileCacheModule) GetOffset() int64 { + if o == nil || IsNil(o.Offset) { + var ret int64 + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LargeFileCacheModule) GetOffsetOk() (*int64, bool) { + if o == nil || IsNil(o.Offset) { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *LargeFileCacheModule) HasOffset() bool { + if o != nil && !IsNil(o.Offset) { + return true + } + + return false +} + +// SetOffset gets a reference to the given int64 and assigns it to the Offset field. +func (o *LargeFileCacheModule) SetOffset(v int64) { + o.Offset = &v +} + +func (o LargeFileCacheModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LargeFileCacheModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Offset) { + toSerialize["offset"] = o.Offset + } + return toSerialize, nil +} + +type NullableLargeFileCacheModule struct { + value *LargeFileCacheModule + isSet bool +} + +func (v NullableLargeFileCacheModule) Get() *LargeFileCacheModule { + return v.value +} + +func (v *NullableLargeFileCacheModule) Set(val *LargeFileCacheModule) { + v.value = val + v.isSet = true +} + +func (v NullableLargeFileCacheModule) IsSet() bool { + return v.isSet +} + +func (v *NullableLargeFileCacheModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLargeFileCacheModule(val *LargeFileCacheModule) *NullableLargeFileCacheModule { + return &NullableLargeFileCacheModule{value: val, isSet: true} +} + +func (v NullableLargeFileCacheModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLargeFileCacheModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_large_file_cache_module_request.go b/azion-api/model_large_file_cache_module_request.go new file mode 100644 index 0000000..ef97194 --- /dev/null +++ b/azion-api/model_large_file_cache_module_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the LargeFileCacheModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LargeFileCacheModuleRequest{} + +// LargeFileCacheModuleRequest struct for LargeFileCacheModuleRequest +type LargeFileCacheModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` + Offset *int64 `json:"offset,omitempty"` +} + +// NewLargeFileCacheModuleRequest instantiates a new LargeFileCacheModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLargeFileCacheModuleRequest() *LargeFileCacheModuleRequest { + this := LargeFileCacheModuleRequest{} + return &this +} + +// NewLargeFileCacheModuleRequestWithDefaults instantiates a new LargeFileCacheModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLargeFileCacheModuleRequestWithDefaults() *LargeFileCacheModuleRequest { + this := LargeFileCacheModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *LargeFileCacheModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LargeFileCacheModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *LargeFileCacheModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *LargeFileCacheModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetOffset returns the Offset field value if set, zero value otherwise. +func (o *LargeFileCacheModuleRequest) GetOffset() int64 { + if o == nil || IsNil(o.Offset) { + var ret int64 + return ret + } + return *o.Offset +} + +// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LargeFileCacheModuleRequest) GetOffsetOk() (*int64, bool) { + if o == nil || IsNil(o.Offset) { + return nil, false + } + return o.Offset, true +} + +// HasOffset returns a boolean if a field has been set. +func (o *LargeFileCacheModuleRequest) HasOffset() bool { + if o != nil && !IsNil(o.Offset) { + return true + } + + return false +} + +// SetOffset gets a reference to the given int64 and assigns it to the Offset field. +func (o *LargeFileCacheModuleRequest) SetOffset(v int64) { + o.Offset = &v +} + +func (o LargeFileCacheModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LargeFileCacheModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.Offset) { + toSerialize["offset"] = o.Offset + } + return toSerialize, nil +} + +type NullableLargeFileCacheModuleRequest struct { + value *LargeFileCacheModuleRequest + isSet bool +} + +func (v NullableLargeFileCacheModuleRequest) Get() *LargeFileCacheModuleRequest { + return v.value +} + +func (v *NullableLargeFileCacheModuleRequest) Set(val *LargeFileCacheModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLargeFileCacheModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLargeFileCacheModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLargeFileCacheModuleRequest(val *LargeFileCacheModuleRequest) *NullableLargeFileCacheModuleRequest { + return &NullableLargeFileCacheModuleRequest{value: val, isSet: true} +} + +func (v NullableLargeFileCacheModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLargeFileCacheModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_library_report_request.go b/azion-api/model_library_report_request.go new file mode 100644 index 0000000..d45bfea --- /dev/null +++ b/azion-api/model_library_report_request.go @@ -0,0 +1,522 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the LibraryReportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LibraryReportRequest{} + +// LibraryReportRequest struct for LibraryReportRequest +type LibraryReportRequest struct { + Description string `json:"description"` + // * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. + Type string `json:"type"` + XAxis *string `json:"x_axis,omitempty"` + // * `avg` - Aggregation by average. * `sum` - Aggregation by sum. + AggregationType string `json:"aggregation_type"` + // * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. + DataUnit string `json:"data_unit"` + Queries []BaseQueryRequest `json:"queries"` + Library *bool `json:"library,omitempty"` + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` + Rotated *bool `json:"rotated,omitempty"` + // * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. + ComparisonType *string `json:"comparison_type,omitempty"` + HelpCenterPath NullableString `json:"help_center_path,omitempty"` +} + +type _LibraryReportRequest LibraryReportRequest + +// NewLibraryReportRequest instantiates a new LibraryReportRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLibraryReportRequest(description string, type_ string, aggregationType string, dataUnit string, queries []BaseQueryRequest, name string, scope string) *LibraryReportRequest { + this := LibraryReportRequest{} + this.Description = description + this.Type = type_ + this.AggregationType = aggregationType + this.DataUnit = dataUnit + this.Queries = queries + this.Name = name + this.Scope = scope + return &this +} + +// NewLibraryReportRequestWithDefaults instantiates a new LibraryReportRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLibraryReportRequestWithDefaults() *LibraryReportRequest { + this := LibraryReportRequest{} + return &this +} + +// GetDescription returns the Description field value +func (o *LibraryReportRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *LibraryReportRequest) SetDescription(v string) { + o.Description = v +} + +// GetType returns the Type field value +func (o *LibraryReportRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *LibraryReportRequest) SetType(v string) { + o.Type = v +} + +// GetXAxis returns the XAxis field value if set, zero value otherwise. +func (o *LibraryReportRequest) GetXAxis() string { + if o == nil || IsNil(o.XAxis) { + var ret string + return ret + } + return *o.XAxis +} + +// GetXAxisOk returns a tuple with the XAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetXAxisOk() (*string, bool) { + if o == nil || IsNil(o.XAxis) { + return nil, false + } + return o.XAxis, true +} + +// HasXAxis returns a boolean if a field has been set. +func (o *LibraryReportRequest) HasXAxis() bool { + if o != nil && !IsNil(o.XAxis) { + return true + } + + return false +} + +// SetXAxis gets a reference to the given string and assigns it to the XAxis field. +func (o *LibraryReportRequest) SetXAxis(v string) { + o.XAxis = &v +} + +// GetAggregationType returns the AggregationType field value +func (o *LibraryReportRequest) GetAggregationType() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationType +} + +// GetAggregationTypeOk returns a tuple with the AggregationType field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetAggregationTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationType, true +} + +// SetAggregationType sets field value +func (o *LibraryReportRequest) SetAggregationType(v string) { + o.AggregationType = v +} + +// GetDataUnit returns the DataUnit field value +func (o *LibraryReportRequest) GetDataUnit() string { + if o == nil { + var ret string + return ret + } + + return o.DataUnit +} + +// GetDataUnitOk returns a tuple with the DataUnit field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetDataUnitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataUnit, true +} + +// SetDataUnit sets field value +func (o *LibraryReportRequest) SetDataUnit(v string) { + o.DataUnit = v +} + +// GetQueries returns the Queries field value +func (o *LibraryReportRequest) GetQueries() []BaseQueryRequest { + if o == nil { + var ret []BaseQueryRequest + return ret + } + + return o.Queries +} + +// GetQueriesOk returns a tuple with the Queries field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetQueriesOk() ([]BaseQueryRequest, bool) { + if o == nil { + return nil, false + } + return o.Queries, true +} + +// SetQueries sets field value +func (o *LibraryReportRequest) SetQueries(v []BaseQueryRequest) { + o.Queries = v +} + +// GetLibrary returns the Library field value if set, zero value otherwise. +func (o *LibraryReportRequest) GetLibrary() bool { + if o == nil || IsNil(o.Library) { + var ret bool + return ret + } + return *o.Library +} + +// GetLibraryOk returns a tuple with the Library field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetLibraryOk() (*bool, bool) { + if o == nil || IsNil(o.Library) { + return nil, false + } + return o.Library, true +} + +// HasLibrary returns a boolean if a field has been set. +func (o *LibraryReportRequest) HasLibrary() bool { + if o != nil && !IsNil(o.Library) { + return true + } + + return false +} + +// SetLibrary gets a reference to the given bool and assigns it to the Library field. +func (o *LibraryReportRequest) SetLibrary(v bool) { + o.Library = &v +} + +// GetName returns the Name field value +func (o *LibraryReportRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LibraryReportRequest) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *LibraryReportRequest) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *LibraryReportRequest) SetScope(v string) { + o.Scope = v +} + +// GetRotated returns the Rotated field value if set, zero value otherwise. +func (o *LibraryReportRequest) GetRotated() bool { + if o == nil || IsNil(o.Rotated) { + var ret bool + return ret + } + return *o.Rotated +} + +// GetRotatedOk returns a tuple with the Rotated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetRotatedOk() (*bool, bool) { + if o == nil || IsNil(o.Rotated) { + return nil, false + } + return o.Rotated, true +} + +// HasRotated returns a boolean if a field has been set. +func (o *LibraryReportRequest) HasRotated() bool { + if o != nil && !IsNil(o.Rotated) { + return true + } + + return false +} + +// SetRotated gets a reference to the given bool and assigns it to the Rotated field. +func (o *LibraryReportRequest) SetRotated(v bool) { + o.Rotated = &v +} + +// GetComparisonType returns the ComparisonType field value if set, zero value otherwise. +func (o *LibraryReportRequest) GetComparisonType() string { + if o == nil || IsNil(o.ComparisonType) { + var ret string + return ret + } + return *o.ComparisonType +} + +// GetComparisonTypeOk returns a tuple with the ComparisonType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LibraryReportRequest) GetComparisonTypeOk() (*string, bool) { + if o == nil || IsNil(o.ComparisonType) { + return nil, false + } + return o.ComparisonType, true +} + +// HasComparisonType returns a boolean if a field has been set. +func (o *LibraryReportRequest) HasComparisonType() bool { + if o != nil && !IsNil(o.ComparisonType) { + return true + } + + return false +} + +// SetComparisonType gets a reference to the given string and assigns it to the ComparisonType field. +func (o *LibraryReportRequest) SetComparisonType(v string) { + o.ComparisonType = &v +} + +// GetHelpCenterPath returns the HelpCenterPath field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LibraryReportRequest) GetHelpCenterPath() string { + if o == nil || IsNil(o.HelpCenterPath.Get()) { + var ret string + return ret + } + return *o.HelpCenterPath.Get() +} + +// GetHelpCenterPathOk returns a tuple with the HelpCenterPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LibraryReportRequest) GetHelpCenterPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HelpCenterPath.Get(), o.HelpCenterPath.IsSet() +} + +// HasHelpCenterPath returns a boolean if a field has been set. +func (o *LibraryReportRequest) HasHelpCenterPath() bool { + if o != nil && o.HelpCenterPath.IsSet() { + return true + } + + return false +} + +// SetHelpCenterPath gets a reference to the given NullableString and assigns it to the HelpCenterPath field. +func (o *LibraryReportRequest) SetHelpCenterPath(v string) { + o.HelpCenterPath.Set(&v) +} +// SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil +func (o *LibraryReportRequest) SetHelpCenterPathNil() { + o.HelpCenterPath.Set(nil) +} + +// UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +func (o *LibraryReportRequest) UnsetHelpCenterPath() { + o.HelpCenterPath.Unset() +} + +func (o LibraryReportRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LibraryReportRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + toSerialize["type"] = o.Type + if !IsNil(o.XAxis) { + toSerialize["x_axis"] = o.XAxis + } + toSerialize["aggregation_type"] = o.AggregationType + toSerialize["data_unit"] = o.DataUnit + toSerialize["queries"] = o.Queries + if !IsNil(o.Library) { + toSerialize["library"] = o.Library + } + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + if !IsNil(o.Rotated) { + toSerialize["rotated"] = o.Rotated + } + if !IsNil(o.ComparisonType) { + toSerialize["comparison_type"] = o.ComparisonType + } + if o.HelpCenterPath.IsSet() { + toSerialize["help_center_path"] = o.HelpCenterPath.Get() + } + return toSerialize, nil +} + +func (o *LibraryReportRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "description", + "type", + "aggregation_type", + "data_unit", + "queries", + "name", + "scope", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLibraryReportRequest := _LibraryReportRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLibraryReportRequest) + + if err != nil { + return err + } + + *o = LibraryReportRequest(varLibraryReportRequest) + + return err +} + +type NullableLibraryReportRequest struct { + value *LibraryReportRequest + isSet bool +} + +func (v NullableLibraryReportRequest) Get() *LibraryReportRequest { + return v.value +} + +func (v *NullableLibraryReportRequest) Set(val *LibraryReportRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLibraryReportRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLibraryReportRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLibraryReportRequest(val *LibraryReportRequest) *NullableLibraryReportRequest { + return &NullableLibraryReportRequest{value: val, isSet: true} +} + +func (v NullableLibraryReportRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLibraryReportRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_load_balancer_module.go b/azion-api/model_load_balancer_module.go new file mode 100644 index 0000000..de07a92 --- /dev/null +++ b/azion-api/model_load_balancer_module.go @@ -0,0 +1,173 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the LoadBalancerModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerModule{} + +// LoadBalancerModule struct for LoadBalancerModule +type LoadBalancerModule struct { + Enabled *bool `json:"enabled,omitempty"` + Config NullableLoadBalancerModuleConfig `json:"config,omitempty"` +} + +// NewLoadBalancerModule instantiates a new LoadBalancerModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLoadBalancerModule() *LoadBalancerModule { + this := LoadBalancerModule{} + return &this +} + +// NewLoadBalancerModuleWithDefaults instantiates a new LoadBalancerModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLoadBalancerModuleWithDefaults() *LoadBalancerModule { + this := LoadBalancerModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *LoadBalancerModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *LoadBalancerModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *LoadBalancerModule) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancerModule) GetConfig() LoadBalancerModuleConfig { + if o == nil || IsNil(o.Config.Get()) { + var ret LoadBalancerModuleConfig + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoadBalancerModule) GetConfigOk() (*LoadBalancerModuleConfig, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *LoadBalancerModule) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableLoadBalancerModuleConfig and assigns it to the Config field. +func (o *LoadBalancerModule) SetConfig(v LoadBalancerModuleConfig) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *LoadBalancerModule) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *LoadBalancerModule) UnsetConfig() { + o.Config.Unset() +} + +func (o LoadBalancerModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +type NullableLoadBalancerModule struct { + value *LoadBalancerModule + isSet bool +} + +func (v NullableLoadBalancerModule) Get() *LoadBalancerModule { + return v.value +} + +func (v *NullableLoadBalancerModule) Set(val *LoadBalancerModule) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerModule) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerModule(val *LoadBalancerModule) *NullableLoadBalancerModule { + return &NullableLoadBalancerModule{value: val, isSet: true} +} + +func (v NullableLoadBalancerModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_load_balancer_module_config.go b/azion-api/model_load_balancer_module_config.go new file mode 100644 index 0000000..925a58d --- /dev/null +++ b/azion-api/model_load_balancer_module_config.go @@ -0,0 +1,239 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the LoadBalancerModuleConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerModuleConfig{} + +// LoadBalancerModuleConfig struct for LoadBalancerModuleConfig +type LoadBalancerModuleConfig struct { + // Load balancing method to use (e.g., round-robin, least_conn). * `round_robin` - Round Robin * `least_conn` - Least Connections * `ip_hash` - IP Hash + Method *string `json:"method,omitempty"` + // Maximum number of retry attempts on connection failure. + MaxRetries *int64 `json:"max_retries,omitempty"` + // Maximum time (in seconds) to wait for a connection to be established. + ConnectionTimeout *int64 `json:"connection_timeout,omitempty"` + // Maximum time (in seconds) to wait for data read/write after connection. + ReadWriteTimeout *int64 `json:"read_write_timeout,omitempty"` +} + +// NewLoadBalancerModuleConfig instantiates a new LoadBalancerModuleConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLoadBalancerModuleConfig() *LoadBalancerModuleConfig { + this := LoadBalancerModuleConfig{} + return &this +} + +// NewLoadBalancerModuleConfigWithDefaults instantiates a new LoadBalancerModuleConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLoadBalancerModuleConfigWithDefaults() *LoadBalancerModuleConfig { + this := LoadBalancerModuleConfig{} + return &this +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfig) GetMethod() string { + if o == nil || IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfig) GetMethodOk() (*string, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfig) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *LoadBalancerModuleConfig) SetMethod(v string) { + o.Method = &v +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfig) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries) { + var ret int64 + return ret + } + return *o.MaxRetries +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfig) GetMaxRetriesOk() (*int64, bool) { + if o == nil || IsNil(o.MaxRetries) { + return nil, false + } + return o.MaxRetries, true +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfig) HasMaxRetries() bool { + if o != nil && !IsNil(o.MaxRetries) { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given int64 and assigns it to the MaxRetries field. +func (o *LoadBalancerModuleConfig) SetMaxRetries(v int64) { + o.MaxRetries = &v +} + +// GetConnectionTimeout returns the ConnectionTimeout field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfig) GetConnectionTimeout() int64 { + if o == nil || IsNil(o.ConnectionTimeout) { + var ret int64 + return ret + } + return *o.ConnectionTimeout +} + +// GetConnectionTimeoutOk returns a tuple with the ConnectionTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfig) GetConnectionTimeoutOk() (*int64, bool) { + if o == nil || IsNil(o.ConnectionTimeout) { + return nil, false + } + return o.ConnectionTimeout, true +} + +// HasConnectionTimeout returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfig) HasConnectionTimeout() bool { + if o != nil && !IsNil(o.ConnectionTimeout) { + return true + } + + return false +} + +// SetConnectionTimeout gets a reference to the given int64 and assigns it to the ConnectionTimeout field. +func (o *LoadBalancerModuleConfig) SetConnectionTimeout(v int64) { + o.ConnectionTimeout = &v +} + +// GetReadWriteTimeout returns the ReadWriteTimeout field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfig) GetReadWriteTimeout() int64 { + if o == nil || IsNil(o.ReadWriteTimeout) { + var ret int64 + return ret + } + return *o.ReadWriteTimeout +} + +// GetReadWriteTimeoutOk returns a tuple with the ReadWriteTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfig) GetReadWriteTimeoutOk() (*int64, bool) { + if o == nil || IsNil(o.ReadWriteTimeout) { + return nil, false + } + return o.ReadWriteTimeout, true +} + +// HasReadWriteTimeout returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfig) HasReadWriteTimeout() bool { + if o != nil && !IsNil(o.ReadWriteTimeout) { + return true + } + + return false +} + +// SetReadWriteTimeout gets a reference to the given int64 and assigns it to the ReadWriteTimeout field. +func (o *LoadBalancerModuleConfig) SetReadWriteTimeout(v int64) { + o.ReadWriteTimeout = &v +} + +func (o LoadBalancerModuleConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerModuleConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !IsNil(o.MaxRetries) { + toSerialize["max_retries"] = o.MaxRetries + } + if !IsNil(o.ConnectionTimeout) { + toSerialize["connection_timeout"] = o.ConnectionTimeout + } + if !IsNil(o.ReadWriteTimeout) { + toSerialize["read_write_timeout"] = o.ReadWriteTimeout + } + return toSerialize, nil +} + +type NullableLoadBalancerModuleConfig struct { + value *LoadBalancerModuleConfig + isSet bool +} + +func (v NullableLoadBalancerModuleConfig) Get() *LoadBalancerModuleConfig { + return v.value +} + +func (v *NullableLoadBalancerModuleConfig) Set(val *LoadBalancerModuleConfig) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerModuleConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerModuleConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerModuleConfig(val *LoadBalancerModuleConfig) *NullableLoadBalancerModuleConfig { + return &NullableLoadBalancerModuleConfig{value: val, isSet: true} +} + +func (v NullableLoadBalancerModuleConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerModuleConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_load_balancer_module_config_request.go b/azion-api/model_load_balancer_module_config_request.go new file mode 100644 index 0000000..e5ae78c --- /dev/null +++ b/azion-api/model_load_balancer_module_config_request.go @@ -0,0 +1,239 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the LoadBalancerModuleConfigRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerModuleConfigRequest{} + +// LoadBalancerModuleConfigRequest struct for LoadBalancerModuleConfigRequest +type LoadBalancerModuleConfigRequest struct { + // Load balancing method to use (e.g., round-robin, least_conn). * `round_robin` - Round Robin * `least_conn` - Least Connections * `ip_hash` - IP Hash + Method *string `json:"method,omitempty"` + // Maximum number of retry attempts on connection failure. + MaxRetries *int64 `json:"max_retries,omitempty"` + // Maximum time (in seconds) to wait for a connection to be established. + ConnectionTimeout *int64 `json:"connection_timeout,omitempty"` + // Maximum time (in seconds) to wait for data read/write after connection. + ReadWriteTimeout *int64 `json:"read_write_timeout,omitempty"` +} + +// NewLoadBalancerModuleConfigRequest instantiates a new LoadBalancerModuleConfigRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLoadBalancerModuleConfigRequest() *LoadBalancerModuleConfigRequest { + this := LoadBalancerModuleConfigRequest{} + return &this +} + +// NewLoadBalancerModuleConfigRequestWithDefaults instantiates a new LoadBalancerModuleConfigRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLoadBalancerModuleConfigRequestWithDefaults() *LoadBalancerModuleConfigRequest { + this := LoadBalancerModuleConfigRequest{} + return &this +} + +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfigRequest) GetMethod() string { + if o == nil || IsNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfigRequest) GetMethodOk() (*string, bool) { + if o == nil || IsNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfigRequest) HasMethod() bool { + if o != nil && !IsNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *LoadBalancerModuleConfigRequest) SetMethod(v string) { + o.Method = &v +} + +// GetMaxRetries returns the MaxRetries field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfigRequest) GetMaxRetries() int64 { + if o == nil || IsNil(o.MaxRetries) { + var ret int64 + return ret + } + return *o.MaxRetries +} + +// GetMaxRetriesOk returns a tuple with the MaxRetries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfigRequest) GetMaxRetriesOk() (*int64, bool) { + if o == nil || IsNil(o.MaxRetries) { + return nil, false + } + return o.MaxRetries, true +} + +// HasMaxRetries returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfigRequest) HasMaxRetries() bool { + if o != nil && !IsNil(o.MaxRetries) { + return true + } + + return false +} + +// SetMaxRetries gets a reference to the given int64 and assigns it to the MaxRetries field. +func (o *LoadBalancerModuleConfigRequest) SetMaxRetries(v int64) { + o.MaxRetries = &v +} + +// GetConnectionTimeout returns the ConnectionTimeout field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfigRequest) GetConnectionTimeout() int64 { + if o == nil || IsNil(o.ConnectionTimeout) { + var ret int64 + return ret + } + return *o.ConnectionTimeout +} + +// GetConnectionTimeoutOk returns a tuple with the ConnectionTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfigRequest) GetConnectionTimeoutOk() (*int64, bool) { + if o == nil || IsNil(o.ConnectionTimeout) { + return nil, false + } + return o.ConnectionTimeout, true +} + +// HasConnectionTimeout returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfigRequest) HasConnectionTimeout() bool { + if o != nil && !IsNil(o.ConnectionTimeout) { + return true + } + + return false +} + +// SetConnectionTimeout gets a reference to the given int64 and assigns it to the ConnectionTimeout field. +func (o *LoadBalancerModuleConfigRequest) SetConnectionTimeout(v int64) { + o.ConnectionTimeout = &v +} + +// GetReadWriteTimeout returns the ReadWriteTimeout field value if set, zero value otherwise. +func (o *LoadBalancerModuleConfigRequest) GetReadWriteTimeout() int64 { + if o == nil || IsNil(o.ReadWriteTimeout) { + var ret int64 + return ret + } + return *o.ReadWriteTimeout +} + +// GetReadWriteTimeoutOk returns a tuple with the ReadWriteTimeout field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleConfigRequest) GetReadWriteTimeoutOk() (*int64, bool) { + if o == nil || IsNil(o.ReadWriteTimeout) { + return nil, false + } + return o.ReadWriteTimeout, true +} + +// HasReadWriteTimeout returns a boolean if a field has been set. +func (o *LoadBalancerModuleConfigRequest) HasReadWriteTimeout() bool { + if o != nil && !IsNil(o.ReadWriteTimeout) { + return true + } + + return false +} + +// SetReadWriteTimeout gets a reference to the given int64 and assigns it to the ReadWriteTimeout field. +func (o *LoadBalancerModuleConfigRequest) SetReadWriteTimeout(v int64) { + o.ReadWriteTimeout = &v +} + +func (o LoadBalancerModuleConfigRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerModuleConfigRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Method) { + toSerialize["method"] = o.Method + } + if !IsNil(o.MaxRetries) { + toSerialize["max_retries"] = o.MaxRetries + } + if !IsNil(o.ConnectionTimeout) { + toSerialize["connection_timeout"] = o.ConnectionTimeout + } + if !IsNil(o.ReadWriteTimeout) { + toSerialize["read_write_timeout"] = o.ReadWriteTimeout + } + return toSerialize, nil +} + +type NullableLoadBalancerModuleConfigRequest struct { + value *LoadBalancerModuleConfigRequest + isSet bool +} + +func (v NullableLoadBalancerModuleConfigRequest) Get() *LoadBalancerModuleConfigRequest { + return v.value +} + +func (v *NullableLoadBalancerModuleConfigRequest) Set(val *LoadBalancerModuleConfigRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerModuleConfigRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerModuleConfigRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerModuleConfigRequest(val *LoadBalancerModuleConfigRequest) *NullableLoadBalancerModuleConfigRequest { + return &NullableLoadBalancerModuleConfigRequest{value: val, isSet: true} +} + +func (v NullableLoadBalancerModuleConfigRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerModuleConfigRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_load_balancer_module_request.go b/azion-api/model_load_balancer_module_request.go new file mode 100644 index 0000000..56ac6e0 --- /dev/null +++ b/azion-api/model_load_balancer_module_request.go @@ -0,0 +1,173 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the LoadBalancerModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoadBalancerModuleRequest{} + +// LoadBalancerModuleRequest struct for LoadBalancerModuleRequest +type LoadBalancerModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` + Config NullableLoadBalancerModuleConfigRequest `json:"config,omitempty"` +} + +// NewLoadBalancerModuleRequest instantiates a new LoadBalancerModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLoadBalancerModuleRequest() *LoadBalancerModuleRequest { + this := LoadBalancerModuleRequest{} + return &this +} + +// NewLoadBalancerModuleRequestWithDefaults instantiates a new LoadBalancerModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLoadBalancerModuleRequestWithDefaults() *LoadBalancerModuleRequest { + this := LoadBalancerModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *LoadBalancerModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LoadBalancerModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *LoadBalancerModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *LoadBalancerModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoadBalancerModuleRequest) GetConfig() LoadBalancerModuleConfigRequest { + if o == nil || IsNil(o.Config.Get()) { + var ret LoadBalancerModuleConfigRequest + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoadBalancerModuleRequest) GetConfigOk() (*LoadBalancerModuleConfigRequest, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *LoadBalancerModuleRequest) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableLoadBalancerModuleConfigRequest and assigns it to the Config field. +func (o *LoadBalancerModuleRequest) SetConfig(v LoadBalancerModuleConfigRequest) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *LoadBalancerModuleRequest) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *LoadBalancerModuleRequest) UnsetConfig() { + o.Config.Unset() +} + +func (o LoadBalancerModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoadBalancerModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +type NullableLoadBalancerModuleRequest struct { + value *LoadBalancerModuleRequest + isSet bool +} + +func (v NullableLoadBalancerModuleRequest) Get() *LoadBalancerModuleRequest { + return v.value +} + +func (v *NullableLoadBalancerModuleRequest) Set(val *LoadBalancerModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLoadBalancerModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLoadBalancerModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoadBalancerModuleRequest(val *LoadBalancerModuleRequest) *NullableLoadBalancerModuleRequest { + return &NullableLoadBalancerModuleRequest{value: val, isSet: true} +} + +func (v NullableLoadBalancerModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoadBalancerModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_lockout_policy.go b/azion-api/model_lockout_policy.go new file mode 100644 index 0000000..4a67f15 --- /dev/null +++ b/azion-api/model_lockout_policy.go @@ -0,0 +1,217 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the LockoutPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LockoutPolicy{} + +// LockoutPolicy struct for LockoutPolicy +type LockoutPolicy struct { + Active bool `json:"active"` + // Maximum number of failed login attempts before lockout + MaxAttempts int64 `json:"max_attempts"` + // Blocking period in minutes + BlockingPeriod int64 `json:"blocking_period"` +} + +type _LockoutPolicy LockoutPolicy + +// NewLockoutPolicy instantiates a new LockoutPolicy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLockoutPolicy(active bool, maxAttempts int64, blockingPeriod int64) *LockoutPolicy { + this := LockoutPolicy{} + this.Active = active + this.MaxAttempts = maxAttempts + this.BlockingPeriod = blockingPeriod + return &this +} + +// NewLockoutPolicyWithDefaults instantiates a new LockoutPolicy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLockoutPolicyWithDefaults() *LockoutPolicy { + this := LockoutPolicy{} + return &this +} + +// GetActive returns the Active field value +func (o *LockoutPolicy) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicy) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *LockoutPolicy) SetActive(v bool) { + o.Active = v +} + +// GetMaxAttempts returns the MaxAttempts field value +func (o *LockoutPolicy) GetMaxAttempts() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MaxAttempts +} + +// GetMaxAttemptsOk returns a tuple with the MaxAttempts field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicy) GetMaxAttemptsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MaxAttempts, true +} + +// SetMaxAttempts sets field value +func (o *LockoutPolicy) SetMaxAttempts(v int64) { + o.MaxAttempts = v +} + +// GetBlockingPeriod returns the BlockingPeriod field value +func (o *LockoutPolicy) GetBlockingPeriod() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.BlockingPeriod +} + +// GetBlockingPeriodOk returns a tuple with the BlockingPeriod field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicy) GetBlockingPeriodOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.BlockingPeriod, true +} + +// SetBlockingPeriod sets field value +func (o *LockoutPolicy) SetBlockingPeriod(v int64) { + o.BlockingPeriod = v +} + +func (o LockoutPolicy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LockoutPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["max_attempts"] = o.MaxAttempts + toSerialize["blocking_period"] = o.BlockingPeriod + return toSerialize, nil +} + +func (o *LockoutPolicy) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "max_attempts", + "blocking_period", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLockoutPolicy := _LockoutPolicy{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLockoutPolicy) + + if err != nil { + return err + } + + *o = LockoutPolicy(varLockoutPolicy) + + return err +} + +type NullableLockoutPolicy struct { + value *LockoutPolicy + isSet bool +} + +func (v NullableLockoutPolicy) Get() *LockoutPolicy { + return v.value +} + +func (v *NullableLockoutPolicy) Set(val *LockoutPolicy) { + v.value = val + v.isSet = true +} + +func (v NullableLockoutPolicy) IsSet() bool { + return v.isSet +} + +func (v *NullableLockoutPolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLockoutPolicy(val *LockoutPolicy) *NullableLockoutPolicy { + return &NullableLockoutPolicy{value: val, isSet: true} +} + +func (v NullableLockoutPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLockoutPolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_lockout_policy_request.go b/azion-api/model_lockout_policy_request.go new file mode 100644 index 0000000..cd8d72b --- /dev/null +++ b/azion-api/model_lockout_policy_request.go @@ -0,0 +1,217 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the LockoutPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LockoutPolicyRequest{} + +// LockoutPolicyRequest struct for LockoutPolicyRequest +type LockoutPolicyRequest struct { + Active bool `json:"active"` + // Maximum number of failed login attempts before lockout + MaxAttempts int64 `json:"max_attempts"` + // Blocking period in minutes + BlockingPeriod int64 `json:"blocking_period"` +} + +type _LockoutPolicyRequest LockoutPolicyRequest + +// NewLockoutPolicyRequest instantiates a new LockoutPolicyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLockoutPolicyRequest(active bool, maxAttempts int64, blockingPeriod int64) *LockoutPolicyRequest { + this := LockoutPolicyRequest{} + this.Active = active + this.MaxAttempts = maxAttempts + this.BlockingPeriod = blockingPeriod + return &this +} + +// NewLockoutPolicyRequestWithDefaults instantiates a new LockoutPolicyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLockoutPolicyRequestWithDefaults() *LockoutPolicyRequest { + this := LockoutPolicyRequest{} + return &this +} + +// GetActive returns the Active field value +func (o *LockoutPolicyRequest) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicyRequest) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *LockoutPolicyRequest) SetActive(v bool) { + o.Active = v +} + +// GetMaxAttempts returns the MaxAttempts field value +func (o *LockoutPolicyRequest) GetMaxAttempts() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MaxAttempts +} + +// GetMaxAttemptsOk returns a tuple with the MaxAttempts field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicyRequest) GetMaxAttemptsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MaxAttempts, true +} + +// SetMaxAttempts sets field value +func (o *LockoutPolicyRequest) SetMaxAttempts(v int64) { + o.MaxAttempts = v +} + +// GetBlockingPeriod returns the BlockingPeriod field value +func (o *LockoutPolicyRequest) GetBlockingPeriod() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.BlockingPeriod +} + +// GetBlockingPeriodOk returns a tuple with the BlockingPeriod field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicyRequest) GetBlockingPeriodOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.BlockingPeriod, true +} + +// SetBlockingPeriod sets field value +func (o *LockoutPolicyRequest) SetBlockingPeriod(v int64) { + o.BlockingPeriod = v +} + +func (o LockoutPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LockoutPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["active"] = o.Active + toSerialize["max_attempts"] = o.MaxAttempts + toSerialize["blocking_period"] = o.BlockingPeriod + return toSerialize, nil +} + +func (o *LockoutPolicyRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "active", + "max_attempts", + "blocking_period", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLockoutPolicyRequest := _LockoutPolicyRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLockoutPolicyRequest) + + if err != nil { + return err + } + + *o = LockoutPolicyRequest(varLockoutPolicyRequest) + + return err +} + +type NullableLockoutPolicyRequest struct { + value *LockoutPolicyRequest + isSet bool +} + +func (v NullableLockoutPolicyRequest) Get() *LockoutPolicyRequest { + return v.value +} + +func (v *NullableLockoutPolicyRequest) Set(val *LockoutPolicyRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLockoutPolicyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLockoutPolicyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLockoutPolicyRequest(val *LockoutPolicyRequest) *NullableLockoutPolicyRequest { + return &NullableLockoutPolicyRequest{value: val, isSet: true} +} + +func (v NullableLockoutPolicyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLockoutPolicyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_lockout_policy_response.go b/azion-api/model_lockout_policy_response.go new file mode 100644 index 0000000..7fa4645 --- /dev/null +++ b/azion-api/model_lockout_policy_response.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the LockoutPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LockoutPolicyResponse{} + +// LockoutPolicyResponse struct for LockoutPolicyResponse +type LockoutPolicyResponse struct { + Data LockoutPolicy `json:"data"` +} + +type _LockoutPolicyResponse LockoutPolicyResponse + +// NewLockoutPolicyResponse instantiates a new LockoutPolicyResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLockoutPolicyResponse(data LockoutPolicy) *LockoutPolicyResponse { + this := LockoutPolicyResponse{} + this.Data = data + return &this +} + +// NewLockoutPolicyResponseWithDefaults instantiates a new LockoutPolicyResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLockoutPolicyResponseWithDefaults() *LockoutPolicyResponse { + this := LockoutPolicyResponse{} + return &this +} + +// GetData returns the Data field value +func (o *LockoutPolicyResponse) GetData() LockoutPolicy { + if o == nil { + var ret LockoutPolicy + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *LockoutPolicyResponse) GetDataOk() (*LockoutPolicy, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *LockoutPolicyResponse) SetData(v LockoutPolicy) { + o.Data = v +} + +func (o LockoutPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LockoutPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *LockoutPolicyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLockoutPolicyResponse := _LockoutPolicyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLockoutPolicyResponse) + + if err != nil { + return err + } + + *o = LockoutPolicyResponse(varLockoutPolicyResponse) + + return err +} + +type NullableLockoutPolicyResponse struct { + value *LockoutPolicyResponse + isSet bool +} + +func (v NullableLockoutPolicyResponse) Get() *LockoutPolicyResponse { + return v.value +} + +func (v *NullableLockoutPolicyResponse) Set(val *LockoutPolicyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLockoutPolicyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLockoutPolicyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLockoutPolicyResponse(val *LockoutPolicyResponse) *NullableLockoutPolicyResponse { + return &NullableLockoutPolicyResponse{value: val, isSet: true} +} + +func (v NullableLockoutPolicyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLockoutPolicyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_login_request.go b/azion-api/model_login_request.go new file mode 100644 index 0000000..218e238 --- /dev/null +++ b/azion-api/model_login_request.go @@ -0,0 +1,234 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the LoginRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LoginRequest{} + +// LoginRequest struct for LoginRequest +type LoginRequest struct { + Email string `json:"email"` + // User password + Password string `json:"password"` + AccountId NullableInt64 `json:"account_id,omitempty"` +} + +type _LoginRequest LoginRequest + +// NewLoginRequest instantiates a new LoginRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLoginRequest(email string, password string) *LoginRequest { + this := LoginRequest{} + this.Email = email + this.Password = password + return &this +} + +// NewLoginRequestWithDefaults instantiates a new LoginRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLoginRequestWithDefaults() *LoginRequest { + this := LoginRequest{} + return &this +} + +// GetEmail returns the Email field value +func (o *LoginRequest) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *LoginRequest) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *LoginRequest) SetEmail(v string) { + o.Email = v +} + +// GetPassword returns the Password field value +func (o *LoginRequest) GetPassword() string { + if o == nil { + var ret string + return ret + } + + return o.Password +} + +// GetPasswordOk returns a tuple with the Password field value +// and a boolean to check if the value has been set. +func (o *LoginRequest) GetPasswordOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Password, true +} + +// SetPassword sets field value +func (o *LoginRequest) SetPassword(v string) { + o.Password = v +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *LoginRequest) GetAccountId() int64 { + if o == nil || IsNil(o.AccountId.Get()) { + var ret int64 + return ret + } + return *o.AccountId.Get() +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *LoginRequest) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AccountId.Get(), o.AccountId.IsSet() +} + +// HasAccountId returns a boolean if a field has been set. +func (o *LoginRequest) HasAccountId() bool { + if o != nil && o.AccountId.IsSet() { + return true + } + + return false +} + +// SetAccountId gets a reference to the given NullableInt64 and assigns it to the AccountId field. +func (o *LoginRequest) SetAccountId(v int64) { + o.AccountId.Set(&v) +} +// SetAccountIdNil sets the value for AccountId to be an explicit nil +func (o *LoginRequest) SetAccountIdNil() { + o.AccountId.Set(nil) +} + +// UnsetAccountId ensures that no value is present for AccountId, not even an explicit nil +func (o *LoginRequest) UnsetAccountId() { + o.AccountId.Unset() +} + +func (o LoginRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LoginRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["email"] = o.Email + toSerialize["password"] = o.Password + if o.AccountId.IsSet() { + toSerialize["account_id"] = o.AccountId.Get() + } + return toSerialize, nil +} + +func (o *LoginRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "email", + "password", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLoginRequest := _LoginRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varLoginRequest) + + if err != nil { + return err + } + + *o = LoginRequest(varLoginRequest) + + return err +} + +type NullableLoginRequest struct { + value *LoginRequest + isSet bool +} + +func (v NullableLoginRequest) Get() *LoginRequest { + return v.value +} + +func (v *NullableLoginRequest) Set(val *LoginRequest) { + v.value = val + v.isSet = true +} + +func (v NullableLoginRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableLoginRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoginRequest(val *LoginRequest) *NullableLoginRequest { + return &NullableLoginRequest{value: val, isSet: true} +} + +func (v NullableLoginRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoginRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_login_response.go b/azion-api/model_login_response.go new file mode 100644 index 0000000..6b59f6f --- /dev/null +++ b/azion-api/model_login_response.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// LoginResponse - struct for LoginResponse +type LoginResponse struct { + MFAToken *MFAToken + TokenPair *TokenPair +} + +// MFATokenAsLoginResponse is a convenience function that returns MFAToken wrapped in LoginResponse +func MFATokenAsLoginResponse(v *MFAToken) LoginResponse { + return LoginResponse{ + MFAToken: v, + } +} + +// TokenPairAsLoginResponse is a convenience function that returns TokenPair wrapped in LoginResponse +func TokenPairAsLoginResponse(v *TokenPair) LoginResponse { + return LoginResponse{ + TokenPair: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *LoginResponse) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into MFAToken + err = newStrictDecoder(data).Decode(&dst.MFAToken) + if err == nil { + jsonMFAToken, _ := json.Marshal(dst.MFAToken) + if string(jsonMFAToken) == "{}" { // empty struct + dst.MFAToken = nil + } else { + if err = validator.Validate(dst.MFAToken); err != nil { + dst.MFAToken = nil + } else { + match++ + } + } + } else { + dst.MFAToken = nil + } + + // try to unmarshal data into TokenPair + err = newStrictDecoder(data).Decode(&dst.TokenPair) + if err == nil { + jsonTokenPair, _ := json.Marshal(dst.TokenPair) + if string(jsonTokenPair) == "{}" { // empty struct + dst.TokenPair = nil + } else { + if err = validator.Validate(dst.TokenPair); err != nil { + dst.TokenPair = nil + } else { + match++ + } + } + } else { + dst.TokenPair = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.MFAToken = nil + dst.TokenPair = nil + + return fmt.Errorf("data matches more than one schema in oneOf(LoginResponse)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(LoginResponse)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src LoginResponse) MarshalJSON() ([]byte, error) { + if src.MFAToken != nil { + return json.Marshal(&src.MFAToken) + } + + if src.TokenPair != nil { + return json.Marshal(&src.TokenPair) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *LoginResponse) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.MFAToken != nil { + return obj.MFAToken + } + + if obj.TokenPair != nil { + return obj.TokenPair + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj LoginResponse) GetActualInstanceValue() (interface{}) { + if obj.MFAToken != nil { + return *obj.MFAToken + } + + if obj.TokenPair != nil { + return *obj.TokenPair + } + + // all schemas are nil + return nil +} + +type NullableLoginResponse struct { + value *LoginResponse + isSet bool +} + +func (v NullableLoginResponse) Get() *LoginResponse { + return v.value +} + +func (v *NullableLoginResponse) Set(val *LoginResponse) { + v.value = val + v.isSet = true +} + +func (v NullableLoginResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableLoginResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLoginResponse(val *LoginResponse) *NullableLoginResponse { + return &NullableLoginResponse{value: val, isSet: true} +} + +func (v NullableLoginResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLoginResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_message.go b/azion-api/model_message.go new file mode 100644 index 0000000..58d4476 --- /dev/null +++ b/azion-api/model_message.go @@ -0,0 +1,380 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Message type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Message{} + +// Message struct for Message +type Message struct { + MessageId int64 `json:"message_id"` + ThreadId int64 `json:"thread_id"` + LastEditor string `json:"last_editor"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Message map[string]interface{} `json:"message"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + LastModified time.Time `json:"last_modified"` +} + +type _Message Message + +// NewMessage instantiates a new Message object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMessage(messageId int64, threadId int64, lastEditor string, message map[string]interface{}, lastModified time.Time) *Message { + this := Message{} + this.MessageId = messageId + this.ThreadId = threadId + this.LastEditor = lastEditor + this.Message = message + this.LastModified = lastModified + return &this +} + +// NewMessageWithDefaults instantiates a new Message object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMessageWithDefaults() *Message { + this := Message{} + return &this +} + +// GetMessageId returns the MessageId field value +func (o *Message) GetMessageId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MessageId +} + +// GetMessageIdOk returns a tuple with the MessageId field value +// and a boolean to check if the value has been set. +func (o *Message) GetMessageIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MessageId, true +} + +// SetMessageId sets field value +func (o *Message) SetMessageId(v int64) { + o.MessageId = v +} + +// GetThreadId returns the ThreadId field value +func (o *Message) GetThreadId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ThreadId +} + +// GetThreadIdOk returns a tuple with the ThreadId field value +// and a boolean to check if the value has been set. +func (o *Message) GetThreadIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ThreadId, true +} + +// SetThreadId sets field value +func (o *Message) SetThreadId(v int64) { + o.ThreadId = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Message) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Message) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Message) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Message) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Message) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Message) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Message) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Message) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Message) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Message) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Message) SetDescription(v string) { + o.Description = &v +} + +// GetMessage returns the Message field value +func (o *Message) GetMessage() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *Message) GetMessageOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *Message) SetMessage(v map[string]interface{}) { + o.Message = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *Message) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Message) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *Message) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *Message) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetLastModified returns the LastModified field value +func (o *Message) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Message) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Message) SetLastModified(v time.Time) { + o.LastModified = v +} + +func (o Message) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Message) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["message_id"] = o.MessageId + toSerialize["thread_id"] = o.ThreadId + toSerialize["last_editor"] = o.LastEditor + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["message"] = o.Message + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *Message) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message_id", + "thread_id", + "last_editor", + "message", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessage := _Message{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessage) + + if err != nil { + return err + } + + *o = Message(varMessage) + + return err +} + +type NullableMessage struct { + value *Message + isSet bool +} + +func (v NullableMessage) Get() *Message { + return v.value +} + +func (v *NullableMessage) Set(val *Message) { + v.value = val + v.isSet = true +} + +func (v NullableMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessage(val *Message) *NullableMessage { + return &NullableMessage{value: val, isSet: true} +} + +func (v NullableMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_message_request.go b/azion-api/model_message_request.go new file mode 100644 index 0000000..c9253fb --- /dev/null +++ b/azion-api/model_message_request.go @@ -0,0 +1,267 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MessageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MessageRequest{} + +// MessageRequest struct for MessageRequest +type MessageRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Message map[string]interface{} `json:"message"` + Metadata map[string]interface{} `json:"metadata,omitempty"` +} + +type _MessageRequest MessageRequest + +// NewMessageRequest instantiates a new MessageRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMessageRequest(message map[string]interface{}) *MessageRequest { + this := MessageRequest{} + this.Message = message + return &this +} + +// NewMessageRequestWithDefaults instantiates a new MessageRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMessageRequestWithDefaults() *MessageRequest { + this := MessageRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *MessageRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *MessageRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *MessageRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *MessageRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *MessageRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *MessageRequest) SetDescription(v string) { + o.Description = &v +} + +// GetMessage returns the Message field value +func (o *MessageRequest) GetMessage() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *MessageRequest) GetMessageOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Message, true +} + +// SetMessage sets field value +func (o *MessageRequest) SetMessage(v map[string]interface{}) { + o.Message = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *MessageRequest) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MessageRequest) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *MessageRequest) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *MessageRequest) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +func (o MessageRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MessageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["message"] = o.Message + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + return toSerialize, nil +} + +func (o *MessageRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMessageRequest := _MessageRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMessageRequest) + + if err != nil { + return err + } + + *o = MessageRequest(varMessageRequest) + + return err +} + +type NullableMessageRequest struct { + value *MessageRequest + isSet bool +} + +func (v NullableMessageRequest) Get() *MessageRequest { + return v.value +} + +func (v *NullableMessageRequest) Set(val *MessageRequest) { + v.value = val + v.isSet = true +} + +func (v NullableMessageRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableMessageRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMessageRequest(val *MessageRequest) *NullableMessageRequest { + return &NullableMessageRequest{value: val, isSet: true} +} + +func (v NullableMessageRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMessageRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_mfa_token.go b/azion-api/model_mfa_token.go new file mode 100644 index 0000000..1330277 --- /dev/null +++ b/azion-api/model_mfa_token.go @@ -0,0 +1,276 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the MFAToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MFAToken{} + +// MFAToken Used when user has MFA enabled. Returns a temporary MFA token that must be verified with a TOTP code before receiving full access tokens. +type MFAToken struct { + // The access_token is a short-lived token (e.g., 10 minutes) used for API authentication in the Authorization: Bearer header. + AccessToken string `json:"access_token"` + // Specifies the type of two-factor authentication configured. Currently supports 'TOTP' (Time-based One-Time Password). + TwoFactorRequired bool `json:"two_factor_required"` + // Indicates whether the user has an active TOTP device configured. If false, the user must register a device before using MFA authentication. + TwoFactorType string `json:"two_factor_type"` + // Indicates whether the user already has an active TOTP device configured.If false, the user needs to set up a new device before using MFA authentication. + HasActiveDevice bool `json:"has_active_device"` + // Discriminator field for LoginResponse + ResponseType string `json:"response_type"` +} + +type _MFAToken MFAToken + +// NewMFAToken instantiates a new MFAToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMFAToken(accessToken string, twoFactorRequired bool, twoFactorType string, hasActiveDevice bool, responseType string) *MFAToken { + this := MFAToken{} + this.AccessToken = accessToken + this.TwoFactorRequired = twoFactorRequired + this.TwoFactorType = twoFactorType + this.HasActiveDevice = hasActiveDevice + this.ResponseType = responseType + return &this +} + +// NewMFATokenWithDefaults instantiates a new MFAToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMFATokenWithDefaults() *MFAToken { + this := MFAToken{} + return &this +} + +// GetAccessToken returns the AccessToken field value +func (o *MFAToken) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *MFAToken) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *MFAToken) SetAccessToken(v string) { + o.AccessToken = v +} + +// GetTwoFactorRequired returns the TwoFactorRequired field value +func (o *MFAToken) GetTwoFactorRequired() bool { + if o == nil { + var ret bool + return ret + } + + return o.TwoFactorRequired +} + +// GetTwoFactorRequiredOk returns a tuple with the TwoFactorRequired field value +// and a boolean to check if the value has been set. +func (o *MFAToken) GetTwoFactorRequiredOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.TwoFactorRequired, true +} + +// SetTwoFactorRequired sets field value +func (o *MFAToken) SetTwoFactorRequired(v bool) { + o.TwoFactorRequired = v +} + +// GetTwoFactorType returns the TwoFactorType field value +func (o *MFAToken) GetTwoFactorType() string { + if o == nil { + var ret string + return ret + } + + return o.TwoFactorType +} + +// GetTwoFactorTypeOk returns a tuple with the TwoFactorType field value +// and a boolean to check if the value has been set. +func (o *MFAToken) GetTwoFactorTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TwoFactorType, true +} + +// SetTwoFactorType sets field value +func (o *MFAToken) SetTwoFactorType(v string) { + o.TwoFactorType = v +} + +// GetHasActiveDevice returns the HasActiveDevice field value +func (o *MFAToken) GetHasActiveDevice() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasActiveDevice +} + +// GetHasActiveDeviceOk returns a tuple with the HasActiveDevice field value +// and a boolean to check if the value has been set. +func (o *MFAToken) GetHasActiveDeviceOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasActiveDevice, true +} + +// SetHasActiveDevice sets field value +func (o *MFAToken) SetHasActiveDevice(v bool) { + o.HasActiveDevice = v +} + +// GetResponseType returns the ResponseType field value +func (o *MFAToken) GetResponseType() string { + if o == nil { + var ret string + return ret + } + + return o.ResponseType +} + +// GetResponseTypeOk returns a tuple with the ResponseType field value +// and a boolean to check if the value has been set. +func (o *MFAToken) GetResponseTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResponseType, true +} + +// SetResponseType sets field value +func (o *MFAToken) SetResponseType(v string) { + o.ResponseType = v +} + +func (o MFAToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MFAToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_token"] = o.AccessToken + toSerialize["two_factor_required"] = o.TwoFactorRequired + toSerialize["two_factor_type"] = o.TwoFactorType + toSerialize["has_active_device"] = o.HasActiveDevice + toSerialize["response_type"] = o.ResponseType + return toSerialize, nil +} + +func (o *MFAToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_token", + "two_factor_required", + "two_factor_type", + "has_active_device", + "response_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varMFAToken := _MFAToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varMFAToken) + + if err != nil { + return err + } + + *o = MFAToken(varMFAToken) + + return err +} + +type NullableMFAToken struct { + value *MFAToken + isSet bool +} + +func (v NullableMFAToken) Get() *MFAToken { + return v.value +} + +func (v *NullableMFAToken) Set(val *MFAToken) { + v.value = val + v.isSet = true +} + +func (v NullableMFAToken) IsSet() bool { + return v.isSet +} + +func (v *NullableMFAToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMFAToken(val *MFAToken) *NullableMFAToken { + return &NullableMFAToken{value: val, isSet: true} +} + +func (v NullableMFAToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMFAToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_mtls.go b/azion-api/model_mtls.go new file mode 100644 index 0000000..ce4c486 --- /dev/null +++ b/azion-api/model_mtls.go @@ -0,0 +1,183 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the MTLS type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MTLS{} + +// MTLS struct for MTLS +type MTLS struct { + Enabled NullableBool `json:"enabled,omitempty"` + Config NullableMTLSConfig `json:"config,omitempty"` +} + +// NewMTLS instantiates a new MTLS object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMTLS() *MTLS { + this := MTLS{} + return &this +} + +// NewMTLSWithDefaults instantiates a new MTLS object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMTLSWithDefaults() *MTLS { + this := MTLS{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLS) GetEnabled() bool { + if o == nil || IsNil(o.Enabled.Get()) { + var ret bool + return ret + } + return *o.Enabled.Get() +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLS) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled.Get(), o.Enabled.IsSet() +} + +// HasEnabled returns a boolean if a field has been set. +func (o *MTLS) HasEnabled() bool { + if o != nil && o.Enabled.IsSet() { + return true + } + + return false +} + +// SetEnabled gets a reference to the given NullableBool and assigns it to the Enabled field. +func (o *MTLS) SetEnabled(v bool) { + o.Enabled.Set(&v) +} +// SetEnabledNil sets the value for Enabled to be an explicit nil +func (o *MTLS) SetEnabledNil() { + o.Enabled.Set(nil) +} + +// UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +func (o *MTLS) UnsetEnabled() { + o.Enabled.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLS) GetConfig() MTLSConfig { + if o == nil || IsNil(o.Config.Get()) { + var ret MTLSConfig + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLS) GetConfigOk() (*MTLSConfig, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *MTLS) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableMTLSConfig and assigns it to the Config field. +func (o *MTLS) SetConfig(v MTLSConfig) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *MTLS) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *MTLS) UnsetConfig() { + o.Config.Unset() +} + +func (o MTLS) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MTLS) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Enabled.IsSet() { + toSerialize["enabled"] = o.Enabled.Get() + } + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +type NullableMTLS struct { + value *MTLS + isSet bool +} + +func (v NullableMTLS) Get() *MTLS { + return v.value +} + +func (v *NullableMTLS) Set(val *MTLS) { + v.value = val + v.isSet = true +} + +func (v NullableMTLS) IsSet() bool { + return v.isSet +} + +func (v *NullableMTLS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMTLS(val *MTLS) *NullableMTLS { + return &NullableMTLS{value: val, isSet: true} +} + +func (v NullableMTLS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMTLS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_mtls_config.go b/azion-api/model_mtls_config.go new file mode 100644 index 0000000..991d591 --- /dev/null +++ b/azion-api/model_mtls_config.go @@ -0,0 +1,221 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the MTLSConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MTLSConfig{} + +// MTLSConfig struct for MTLSConfig +type MTLSConfig struct { + Certificate NullableInt64 `json:"certificate,omitempty"` + Crl []int64 `json:"crl,omitempty"` + // * `enforce` - Enforce * `permissive` - Permissive + Verification NullableString `json:"verification,omitempty"` +} + +// NewMTLSConfig instantiates a new MTLSConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMTLSConfig() *MTLSConfig { + this := MTLSConfig{} + return &this +} + +// NewMTLSConfigWithDefaults instantiates a new MTLSConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMTLSConfigWithDefaults() *MTLSConfig { + this := MTLSConfig{} + return &this +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSConfig) GetCertificate() int64 { + if o == nil || IsNil(o.Certificate.Get()) { + var ret int64 + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSConfig) GetCertificateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *MTLSConfig) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableInt64 and assigns it to the Certificate field. +func (o *MTLSConfig) SetCertificate(v int64) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *MTLSConfig) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *MTLSConfig) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetCrl returns the Crl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSConfig) GetCrl() []int64 { + if o == nil { + var ret []int64 + return ret + } + return o.Crl +} + +// GetCrlOk returns a tuple with the Crl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSConfig) GetCrlOk() ([]int64, bool) { + if o == nil || IsNil(o.Crl) { + return nil, false + } + return o.Crl, true +} + +// HasCrl returns a boolean if a field has been set. +func (o *MTLSConfig) HasCrl() bool { + if o != nil && !IsNil(o.Crl) { + return true + } + + return false +} + +// SetCrl gets a reference to the given []int64 and assigns it to the Crl field. +func (o *MTLSConfig) SetCrl(v []int64) { + o.Crl = v +} + +// GetVerification returns the Verification field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSConfig) GetVerification() string { + if o == nil || IsNil(o.Verification.Get()) { + var ret string + return ret + } + return *o.Verification.Get() +} + +// GetVerificationOk returns a tuple with the Verification field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSConfig) GetVerificationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Verification.Get(), o.Verification.IsSet() +} + +// HasVerification returns a boolean if a field has been set. +func (o *MTLSConfig) HasVerification() bool { + if o != nil && o.Verification.IsSet() { + return true + } + + return false +} + +// SetVerification gets a reference to the given NullableString and assigns it to the Verification field. +func (o *MTLSConfig) SetVerification(v string) { + o.Verification.Set(&v) +} +// SetVerificationNil sets the value for Verification to be an explicit nil +func (o *MTLSConfig) SetVerificationNil() { + o.Verification.Set(nil) +} + +// UnsetVerification ensures that no value is present for Verification, not even an explicit nil +func (o *MTLSConfig) UnsetVerification() { + o.Verification.Unset() +} + +func (o MTLSConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MTLSConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if o.Crl != nil { + toSerialize["crl"] = o.Crl + } + if o.Verification.IsSet() { + toSerialize["verification"] = o.Verification.Get() + } + return toSerialize, nil +} + +type NullableMTLSConfig struct { + value *MTLSConfig + isSet bool +} + +func (v NullableMTLSConfig) Get() *MTLSConfig { + return v.value +} + +func (v *NullableMTLSConfig) Set(val *MTLSConfig) { + v.value = val + v.isSet = true +} + +func (v NullableMTLSConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableMTLSConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMTLSConfig(val *MTLSConfig) *NullableMTLSConfig { + return &NullableMTLSConfig{value: val, isSet: true} +} + +func (v NullableMTLSConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMTLSConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_mtls_config_request.go b/azion-api/model_mtls_config_request.go new file mode 100644 index 0000000..e82a071 --- /dev/null +++ b/azion-api/model_mtls_config_request.go @@ -0,0 +1,221 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the MTLSConfigRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MTLSConfigRequest{} + +// MTLSConfigRequest struct for MTLSConfigRequest +type MTLSConfigRequest struct { + Certificate NullableInt64 `json:"certificate,omitempty"` + Crl []int64 `json:"crl,omitempty"` + // * `enforce` - Enforce * `permissive` - Permissive + Verification NullableString `json:"verification,omitempty"` +} + +// NewMTLSConfigRequest instantiates a new MTLSConfigRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMTLSConfigRequest() *MTLSConfigRequest { + this := MTLSConfigRequest{} + return &this +} + +// NewMTLSConfigRequestWithDefaults instantiates a new MTLSConfigRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMTLSConfigRequestWithDefaults() *MTLSConfigRequest { + this := MTLSConfigRequest{} + return &this +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSConfigRequest) GetCertificate() int64 { + if o == nil || IsNil(o.Certificate.Get()) { + var ret int64 + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSConfigRequest) GetCertificateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *MTLSConfigRequest) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableInt64 and assigns it to the Certificate field. +func (o *MTLSConfigRequest) SetCertificate(v int64) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *MTLSConfigRequest) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *MTLSConfigRequest) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetCrl returns the Crl field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSConfigRequest) GetCrl() []int64 { + if o == nil { + var ret []int64 + return ret + } + return o.Crl +} + +// GetCrlOk returns a tuple with the Crl field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSConfigRequest) GetCrlOk() ([]int64, bool) { + if o == nil || IsNil(o.Crl) { + return nil, false + } + return o.Crl, true +} + +// HasCrl returns a boolean if a field has been set. +func (o *MTLSConfigRequest) HasCrl() bool { + if o != nil && !IsNil(o.Crl) { + return true + } + + return false +} + +// SetCrl gets a reference to the given []int64 and assigns it to the Crl field. +func (o *MTLSConfigRequest) SetCrl(v []int64) { + o.Crl = v +} + +// GetVerification returns the Verification field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSConfigRequest) GetVerification() string { + if o == nil || IsNil(o.Verification.Get()) { + var ret string + return ret + } + return *o.Verification.Get() +} + +// GetVerificationOk returns a tuple with the Verification field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSConfigRequest) GetVerificationOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Verification.Get(), o.Verification.IsSet() +} + +// HasVerification returns a boolean if a field has been set. +func (o *MTLSConfigRequest) HasVerification() bool { + if o != nil && o.Verification.IsSet() { + return true + } + + return false +} + +// SetVerification gets a reference to the given NullableString and assigns it to the Verification field. +func (o *MTLSConfigRequest) SetVerification(v string) { + o.Verification.Set(&v) +} +// SetVerificationNil sets the value for Verification to be an explicit nil +func (o *MTLSConfigRequest) SetVerificationNil() { + o.Verification.Set(nil) +} + +// UnsetVerification ensures that no value is present for Verification, not even an explicit nil +func (o *MTLSConfigRequest) UnsetVerification() { + o.Verification.Unset() +} + +func (o MTLSConfigRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MTLSConfigRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if o.Crl != nil { + toSerialize["crl"] = o.Crl + } + if o.Verification.IsSet() { + toSerialize["verification"] = o.Verification.Get() + } + return toSerialize, nil +} + +type NullableMTLSConfigRequest struct { + value *MTLSConfigRequest + isSet bool +} + +func (v NullableMTLSConfigRequest) Get() *MTLSConfigRequest { + return v.value +} + +func (v *NullableMTLSConfigRequest) Set(val *MTLSConfigRequest) { + v.value = val + v.isSet = true +} + +func (v NullableMTLSConfigRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableMTLSConfigRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMTLSConfigRequest(val *MTLSConfigRequest) *NullableMTLSConfigRequest { + return &NullableMTLSConfigRequest{value: val, isSet: true} +} + +func (v NullableMTLSConfigRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMTLSConfigRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_mtls_request.go b/azion-api/model_mtls_request.go new file mode 100644 index 0000000..3472d3b --- /dev/null +++ b/azion-api/model_mtls_request.go @@ -0,0 +1,183 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the MTLSRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MTLSRequest{} + +// MTLSRequest struct for MTLSRequest +type MTLSRequest struct { + Enabled NullableBool `json:"enabled,omitempty"` + Config NullableMTLSConfigRequest `json:"config,omitempty"` +} + +// NewMTLSRequest instantiates a new MTLSRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewMTLSRequest() *MTLSRequest { + this := MTLSRequest{} + return &this +} + +// NewMTLSRequestWithDefaults instantiates a new MTLSRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewMTLSRequestWithDefaults() *MTLSRequest { + this := MTLSRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled.Get()) { + var ret bool + return ret + } + return *o.Enabled.Get() +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSRequest) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return o.Enabled.Get(), o.Enabled.IsSet() +} + +// HasEnabled returns a boolean if a field has been set. +func (o *MTLSRequest) HasEnabled() bool { + if o != nil && o.Enabled.IsSet() { + return true + } + + return false +} + +// SetEnabled gets a reference to the given NullableBool and assigns it to the Enabled field. +func (o *MTLSRequest) SetEnabled(v bool) { + o.Enabled.Set(&v) +} +// SetEnabledNil sets the value for Enabled to be an explicit nil +func (o *MTLSRequest) SetEnabledNil() { + o.Enabled.Set(nil) +} + +// UnsetEnabled ensures that no value is present for Enabled, not even an explicit nil +func (o *MTLSRequest) UnsetEnabled() { + o.Enabled.Unset() +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *MTLSRequest) GetConfig() MTLSConfigRequest { + if o == nil || IsNil(o.Config.Get()) { + var ret MTLSConfigRequest + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *MTLSRequest) GetConfigOk() (*MTLSConfigRequest, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *MTLSRequest) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableMTLSConfigRequest and assigns it to the Config field. +func (o *MTLSRequest) SetConfig(v MTLSConfigRequest) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *MTLSRequest) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *MTLSRequest) UnsetConfig() { + o.Config.Unset() +} + +func (o MTLSRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MTLSRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Enabled.IsSet() { + toSerialize["enabled"] = o.Enabled.Get() + } + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +type NullableMTLSRequest struct { + value *MTLSRequest + isSet bool +} + +func (v NullableMTLSRequest) Get() *MTLSRequest { + return v.value +} + +func (v *NullableMTLSRequest) Set(val *MTLSRequest) { + v.value = val + v.isSet = true +} + +func (v NullableMTLSRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableMTLSRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMTLSRequest(val *MTLSRequest) *NullableMTLSRequest { + return &NullableMTLSRequest{value: val, isSet: true} +} + +func (v NullableMTLSRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMTLSRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_namespace.go b/azion-api/model_namespace.go new file mode 100644 index 0000000..39aff53 --- /dev/null +++ b/azion-api/model_namespace.go @@ -0,0 +1,220 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Namespace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Namespace{} + +// Namespace struct for Namespace +type Namespace struct { + Name string `json:"name"` + CreatedAt NullableTime `json:"created_at"` + LastModified NullableTime `json:"last_modified"` +} + +type _Namespace Namespace + +// NewNamespace instantiates a new Namespace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamespace(name string, createdAt NullableTime, lastModified NullableTime) *Namespace { + this := Namespace{} + this.Name = name + this.CreatedAt = createdAt + this.LastModified = lastModified + return &this +} + +// NewNamespaceWithDefaults instantiates a new Namespace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamespaceWithDefaults() *Namespace { + this := Namespace{} + return &this +} + +// GetName returns the Name field value +func (o *Namespace) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Namespace) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Namespace) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *Namespace) GetCreatedAt() time.Time { + if o == nil || o.CreatedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.CreatedAt.Get() +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Namespace) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.CreatedAt.Get(), o.CreatedAt.IsSet() +} + +// SetCreatedAt sets field value +func (o *Namespace) SetCreatedAt(v time.Time) { + o.CreatedAt.Set(&v) +} + +// GetLastModified returns the LastModified field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *Namespace) GetLastModified() time.Time { + if o == nil || o.LastModified.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastModified.Get() +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Namespace) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastModified.Get(), o.LastModified.IsSet() +} + +// SetLastModified sets field value +func (o *Namespace) SetLastModified(v time.Time) { + o.LastModified.Set(&v) +} + +func (o Namespace) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Namespace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["created_at"] = o.CreatedAt.Get() + toSerialize["last_modified"] = o.LastModified.Get() + return toSerialize, nil +} + +func (o *Namespace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "created_at", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNamespace := _Namespace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNamespace) + + if err != nil { + return err + } + + *o = Namespace(varNamespace) + + return err +} + +type NullableNamespace struct { + value *Namespace + isSet bool +} + +func (v NullableNamespace) Get() *Namespace { + return v.value +} + +func (v *NullableNamespace) Set(val *Namespace) { + v.value = val + v.isSet = true +} + +func (v NullableNamespace) IsSet() bool { + return v.isSet +} + +func (v *NullableNamespace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamespace(val *Namespace) *NullableNamespace { + return &NullableNamespace{value: val, isSet: true} +} + +func (v NullableNamespace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamespace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_namespace_create_request.go b/azion-api/model_namespace_create_request.go new file mode 100644 index 0000000..8cbcbdd --- /dev/null +++ b/azion-api/model_namespace_create_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NamespaceCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NamespaceCreateRequest{} + +// NamespaceCreateRequest struct for NamespaceCreateRequest +type NamespaceCreateRequest struct { + Name string `json:"name"` +} + +type _NamespaceCreateRequest NamespaceCreateRequest + +// NewNamespaceCreateRequest instantiates a new NamespaceCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamespaceCreateRequest(name string) *NamespaceCreateRequest { + this := NamespaceCreateRequest{} + this.Name = name + return &this +} + +// NewNamespaceCreateRequestWithDefaults instantiates a new NamespaceCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamespaceCreateRequestWithDefaults() *NamespaceCreateRequest { + this := NamespaceCreateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *NamespaceCreateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NamespaceCreateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NamespaceCreateRequest) SetName(v string) { + o.Name = v +} + +func (o NamespaceCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NamespaceCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *NamespaceCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNamespaceCreateRequest := _NamespaceCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNamespaceCreateRequest) + + if err != nil { + return err + } + + *o = NamespaceCreateRequest(varNamespaceCreateRequest) + + return err +} + +type NullableNamespaceCreateRequest struct { + value *NamespaceCreateRequest + isSet bool +} + +func (v NullableNamespaceCreateRequest) Get() *NamespaceCreateRequest { + return v.value +} + +func (v *NullableNamespaceCreateRequest) Set(val *NamespaceCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNamespaceCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNamespaceCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamespaceCreateRequest(val *NamespaceCreateRequest) *NullableNamespaceCreateRequest { + return &NullableNamespaceCreateRequest{value: val, isSet: true} +} + +func (v NullableNamespaceCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamespaceCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_namespace_list.go b/azion-api/model_namespace_list.go new file mode 100644 index 0000000..1a68ee7 --- /dev/null +++ b/azion-api/model_namespace_list.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NamespaceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NamespaceList{} + +// NamespaceList struct for NamespaceList +type NamespaceList struct { + Results []Namespace `json:"results"` + Pagination Pagination `json:"pagination"` +} + +type _NamespaceList NamespaceList + +// NewNamespaceList instantiates a new NamespaceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNamespaceList(results []Namespace, pagination Pagination) *NamespaceList { + this := NamespaceList{} + this.Results = results + this.Pagination = pagination + return &this +} + +// NewNamespaceListWithDefaults instantiates a new NamespaceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNamespaceListWithDefaults() *NamespaceList { + this := NamespaceList{} + return &this +} + +// GetResults returns the Results field value +func (o *NamespaceList) GetResults() []Namespace { + if o == nil { + var ret []Namespace + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *NamespaceList) GetResultsOk() ([]Namespace, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *NamespaceList) SetResults(v []Namespace) { + o.Results = v +} + +// GetPagination returns the Pagination field value +func (o *NamespaceList) GetPagination() Pagination { + if o == nil { + var ret Pagination + return ret + } + + return o.Pagination +} + +// GetPaginationOk returns a tuple with the Pagination field value +// and a boolean to check if the value has been set. +func (o *NamespaceList) GetPaginationOk() (*Pagination, bool) { + if o == nil { + return nil, false + } + return &o.Pagination, true +} + +// SetPagination sets field value +func (o *NamespaceList) SetPagination(v Pagination) { + o.Pagination = v +} + +func (o NamespaceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NamespaceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["results"] = o.Results + toSerialize["pagination"] = o.Pagination + return toSerialize, nil +} + +func (o *NamespaceList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "results", + "pagination", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNamespaceList := _NamespaceList{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNamespaceList) + + if err != nil { + return err + } + + *o = NamespaceList(varNamespaceList) + + return err +} + +type NullableNamespaceList struct { + value *NamespaceList + isSet bool +} + +func (v NullableNamespaceList) Get() *NamespaceList { + return v.value +} + +func (v *NullableNamespaceList) Set(val *NamespaceList) { + v.value = val + v.isSet = true +} + +func (v NullableNamespaceList) IsSet() bool { + return v.isSet +} + +func (v *NullableNamespaceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNamespaceList(val *NamespaceList) *NullableNamespaceList { + return &NullableNamespaceList{value: val, isSet: true} +} + +func (v NullableNamespaceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNamespaceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_network_list.go b/azion-api/model_network_list.go new file mode 100644 index 0000000..7a17c1b --- /dev/null +++ b/azion-api/model_network_list.go @@ -0,0 +1,337 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the NetworkList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkList{} + +// NetworkList A Network List item can be one of the following formats: 1. IP Addresses (IPv4/IPv6): - Simple IPv4: 192.168.0.1 - IPv4 with CIDR: 192.168.0.1/24 - Simple IPv6: 2001:db8:3333:4444:5555:6666:7777:8888 - IPv6 with CIDR: 2001:db8::/32 - IP with expiration date: 192.168.0.1 --LT2025-05-29T12:25:23Z (The expiration date format is --LT followed by ISO8601 date in UTC timezone) 2. Country Codes: - Two-character uppercase alphanumeric country code (ISO 3166-1 alpha-2) - Examples: BR, US, DE, JP 3. Autonomous System Numbers (ASN): - Number composed of digits only - Examples: 1234, 5678, 13335 +type NetworkList struct { + Id int64 `json:"id"` + Name string `json:"name"` + // * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR + Type string `json:"type"` + Items []string `json:"items"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` +} + +type _NetworkList NetworkList + +// NewNetworkList instantiates a new NetworkList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetworkList(id int64, name string, type_ string, items []string, lastEditor string, lastModified time.Time) *NetworkList { + this := NetworkList{} + this.Id = id + this.Name = name + this.Type = type_ + this.Items = items + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewNetworkListWithDefaults instantiates a new NetworkList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetworkListWithDefaults() *NetworkList { + this := NetworkList{} + return &this +} + +// GetId returns the Id field value +func (o *NetworkList) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NetworkList) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NetworkList) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *NetworkList) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NetworkList) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NetworkList) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *NetworkList) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NetworkList) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NetworkList) SetType(v string) { + o.Type = v +} + +// GetItems returns the Items field value +func (o *NetworkList) GetItems() []string { + if o == nil { + var ret []string + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *NetworkList) GetItemsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *NetworkList) SetItems(v []string) { + o.Items = v +} + +// GetLastEditor returns the LastEditor field value +func (o *NetworkList) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *NetworkList) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *NetworkList) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *NetworkList) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *NetworkList) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *NetworkList) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NetworkList) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkList) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NetworkList) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NetworkList) SetActive(v bool) { + o.Active = &v +} + +func (o NetworkList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["items"] = o.Items + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *NetworkList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "type", + "items", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNetworkList := _NetworkList{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNetworkList) + + if err != nil { + return err + } + + *o = NetworkList(varNetworkList) + + return err +} + +type NullableNetworkList struct { + value *NetworkList + isSet bool +} + +func (v NullableNetworkList) Get() *NetworkList { + return v.value +} + +func (v *NullableNetworkList) Set(val *NetworkList) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkList) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkList(val *NetworkList) *NullableNetworkList { + return &NullableNetworkList{value: val, isSet: true} +} + +func (v NullableNetworkList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_network_list_request.go b/azion-api/model_network_list_request.go new file mode 100644 index 0000000..39adf73 --- /dev/null +++ b/azion-api/model_network_list_request.go @@ -0,0 +1,252 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NetworkListRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkListRequest{} + +// NetworkListRequest A Network List item can be one of the following formats: 1. IP Addresses (IPv4/IPv6): - Simple IPv4: 192.168.0.1 - IPv4 with CIDR: 192.168.0.1/24 - Simple IPv6: 2001:db8:3333:4444:5555:6666:7777:8888 - IPv6 with CIDR: 2001:db8::/32 - IP with expiration date: 192.168.0.1 --LT2025-05-29T12:25:23Z (The expiration date format is --LT followed by ISO8601 date in UTC timezone) 2. Country Codes: - Two-character uppercase alphanumeric country code (ISO 3166-1 alpha-2) - Examples: BR, US, DE, JP 3. Autonomous System Numbers (ASN): - Number composed of digits only - Examples: 1234, 5678, 13335 +type NetworkListRequest struct { + Name string `json:"name"` + // * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR + Type string `json:"type"` + Items []string `json:"items"` + Active *bool `json:"active,omitempty"` +} + +type _NetworkListRequest NetworkListRequest + +// NewNetworkListRequest instantiates a new NetworkListRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetworkListRequest(name string, type_ string, items []string) *NetworkListRequest { + this := NetworkListRequest{} + this.Name = name + this.Type = type_ + this.Items = items + return &this +} + +// NewNetworkListRequestWithDefaults instantiates a new NetworkListRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetworkListRequestWithDefaults() *NetworkListRequest { + this := NetworkListRequest{} + return &this +} + +// GetName returns the Name field value +func (o *NetworkListRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NetworkListRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NetworkListRequest) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *NetworkListRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NetworkListRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NetworkListRequest) SetType(v string) { + o.Type = v +} + +// GetItems returns the Items field value +func (o *NetworkListRequest) GetItems() []string { + if o == nil { + var ret []string + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *NetworkListRequest) GetItemsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *NetworkListRequest) SetItems(v []string) { + o.Items = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NetworkListRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkListRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NetworkListRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NetworkListRequest) SetActive(v bool) { + o.Active = &v +} + +func (o NetworkListRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkListRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["items"] = o.Items + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *NetworkListRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + "items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNetworkListRequest := _NetworkListRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNetworkListRequest) + + if err != nil { + return err + } + + *o = NetworkListRequest(varNetworkListRequest) + + return err +} + +type NullableNetworkListRequest struct { + value *NetworkListRequest + isSet bool +} + +func (v NullableNetworkListRequest) Get() *NetworkListRequest { + return v.value +} + +func (v *NullableNetworkListRequest) Set(val *NetworkListRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkListRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkListRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkListRequest(val *NetworkListRequest) *NullableNetworkListRequest { + return &NullableNetworkListRequest{value: val, isSet: true} +} + +func (v NullableNetworkListRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkListRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_network_list_response.go b/azion-api/model_network_list_response.go new file mode 100644 index 0000000..80c205d --- /dev/null +++ b/azion-api/model_network_list_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NetworkListResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkListResponse{} + +// NetworkListResponse struct for NetworkListResponse +type NetworkListResponse struct { + State *string `json:"state,omitempty"` + Data NetworkList `json:"data"` +} + +type _NetworkListResponse NetworkListResponse + +// NewNetworkListResponse instantiates a new NetworkListResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetworkListResponse(data NetworkList) *NetworkListResponse { + this := NetworkListResponse{} + this.Data = data + return &this +} + +// NewNetworkListResponseWithDefaults instantiates a new NetworkListResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetworkListResponseWithDefaults() *NetworkListResponse { + this := NetworkListResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *NetworkListResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkListResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *NetworkListResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *NetworkListResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *NetworkListResponse) GetData() NetworkList { + if o == nil { + var ret NetworkList + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *NetworkListResponse) GetDataOk() (*NetworkList, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *NetworkListResponse) SetData(v NetworkList) { + o.Data = v +} + +func (o NetworkListResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkListResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *NetworkListResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNetworkListResponse := _NetworkListResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNetworkListResponse) + + if err != nil { + return err + } + + *o = NetworkListResponse(varNetworkListResponse) + + return err +} + +type NullableNetworkListResponse struct { + value *NetworkListResponse + isSet bool +} + +func (v NullableNetworkListResponse) Get() *NetworkListResponse { + return v.value +} + +func (v *NullableNetworkListResponse) Set(val *NetworkListResponse) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkListResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkListResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkListResponse(val *NetworkListResponse) *NullableNetworkListResponse { + return &NullableNetworkListResponse{value: val, isSet: true} +} + +func (v NullableNetworkListResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkListResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_network_list_summary.go b/azion-api/model_network_list_summary.go new file mode 100644 index 0000000..e213fbb --- /dev/null +++ b/azion-api/model_network_list_summary.go @@ -0,0 +1,309 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the NetworkListSummary type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NetworkListSummary{} + +// NetworkListSummary struct for NetworkListSummary +type NetworkListSummary struct { + Id int64 `json:"id"` + Name string `json:"name"` + // * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR + Type string `json:"type"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` +} + +type _NetworkListSummary NetworkListSummary + +// NewNetworkListSummary instantiates a new NetworkListSummary object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNetworkListSummary(id int64, name string, type_ string, lastEditor string, lastModified time.Time) *NetworkListSummary { + this := NetworkListSummary{} + this.Id = id + this.Name = name + this.Type = type_ + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewNetworkListSummaryWithDefaults instantiates a new NetworkListSummary object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNetworkListSummaryWithDefaults() *NetworkListSummary { + this := NetworkListSummary{} + return &this +} + +// GetId returns the Id field value +func (o *NetworkListSummary) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NetworkListSummary) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NetworkListSummary) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *NetworkListSummary) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NetworkListSummary) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NetworkListSummary) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *NetworkListSummary) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *NetworkListSummary) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *NetworkListSummary) SetType(v string) { + o.Type = v +} + +// GetLastEditor returns the LastEditor field value +func (o *NetworkListSummary) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *NetworkListSummary) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *NetworkListSummary) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *NetworkListSummary) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *NetworkListSummary) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *NetworkListSummary) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NetworkListSummary) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NetworkListSummary) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NetworkListSummary) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NetworkListSummary) SetActive(v bool) { + o.Active = &v +} + +func (o NetworkListSummary) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NetworkListSummary) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *NetworkListSummary) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "type", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNetworkListSummary := _NetworkListSummary{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNetworkListSummary) + + if err != nil { + return err + } + + *o = NetworkListSummary(varNetworkListSummary) + + return err +} + +type NullableNetworkListSummary struct { + value *NetworkListSummary + isSet bool +} + +func (v NullableNetworkListSummary) Get() *NetworkListSummary { + return v.value +} + +func (v *NullableNetworkListSummary) Set(val *NetworkListSummary) { + v.value = val + v.isSet = true +} + +func (v NullableNetworkListSummary) IsSet() bool { + return v.isSet +} + +func (v *NullableNetworkListSummary) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNetworkListSummary(val *NetworkListSummary) *NullableNetworkListSummary { + return &NullableNetworkListSummary{value: val, isSet: true} +} + +func (v NullableNetworkListSummary) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNetworkListSummary) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_groups.go b/azion-api/model_node_groups.go new file mode 100644 index 0000000..18c5f1b --- /dev/null +++ b/azion-api/model_node_groups.go @@ -0,0 +1,251 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodeGroups type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeGroups{} + +// NodeGroups struct for NodeGroups +type NodeGroups struct { + Id int64 `json:"id"` + Name string `json:"name"` + RefCount int64 `json:"ref_count"` + Active *bool `json:"active,omitempty"` +} + +type _NodeGroups NodeGroups + +// NewNodeGroups instantiates a new NodeGroups object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeGroups(id int64, name string, refCount int64) *NodeGroups { + this := NodeGroups{} + this.Id = id + this.Name = name + this.RefCount = refCount + return &this +} + +// NewNodeGroupsWithDefaults instantiates a new NodeGroups object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeGroupsWithDefaults() *NodeGroups { + this := NodeGroups{} + return &this +} + +// GetId returns the Id field value +func (o *NodeGroups) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NodeGroups) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NodeGroups) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *NodeGroups) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NodeGroups) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NodeGroups) SetName(v string) { + o.Name = v +} + +// GetRefCount returns the RefCount field value +func (o *NodeGroups) GetRefCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.RefCount +} + +// GetRefCountOk returns a tuple with the RefCount field value +// and a boolean to check if the value has been set. +func (o *NodeGroups) GetRefCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.RefCount, true +} + +// SetRefCount sets field value +func (o *NodeGroups) SetRefCount(v int64) { + o.RefCount = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NodeGroups) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeGroups) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NodeGroups) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NodeGroups) SetActive(v bool) { + o.Active = &v +} + +func (o NodeGroups) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeGroups) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["ref_count"] = o.RefCount + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *NodeGroups) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "ref_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodeGroups := _NodeGroups{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodeGroups) + + if err != nil { + return err + } + + *o = NodeGroups(varNodeGroups) + + return err +} + +type NullableNodeGroups struct { + value *NodeGroups + isSet bool +} + +func (v NullableNodeGroups) Get() *NodeGroups { + return v.value +} + +func (v *NullableNodeGroups) Set(val *NodeGroups) { + v.value = val + v.isSet = true +} + +func (v NullableNodeGroups) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeGroups) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeGroups(val *NodeGroups) *NullableNodeGroups { + return &NullableNodeGroups{value: val, isSet: true} +} + +func (v NullableNodeGroups) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeGroups) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_groups_by_id.go b/azion-api/model_node_groups_by_id.go new file mode 100644 index 0000000..eb9d6c4 --- /dev/null +++ b/azion-api/model_node_groups_by_id.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodeGroupsById type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeGroupsById{} + +// NodeGroupsById struct for NodeGroupsById +type NodeGroupsById struct { + Id int64 `json:"id"` + Name *string `json:"name,omitempty"` +} + +type _NodeGroupsById NodeGroupsById + +// NewNodeGroupsById instantiates a new NodeGroupsById object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeGroupsById(id int64) *NodeGroupsById { + this := NodeGroupsById{} + this.Id = id + return &this +} + +// NewNodeGroupsByIdWithDefaults instantiates a new NodeGroupsById object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeGroupsByIdWithDefaults() *NodeGroupsById { + this := NodeGroupsById{} + return &this +} + +// GetId returns the Id field value +func (o *NodeGroupsById) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NodeGroupsById) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NodeGroupsById) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NodeGroupsById) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeGroupsById) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NodeGroupsById) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NodeGroupsById) SetName(v string) { + o.Name = &v +} + +func (o NodeGroupsById) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeGroupsById) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +func (o *NodeGroupsById) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodeGroupsById := _NodeGroupsById{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodeGroupsById) + + if err != nil { + return err + } + + *o = NodeGroupsById(varNodeGroupsById) + + return err +} + +type NullableNodeGroupsById struct { + value *NodeGroupsById + isSet bool +} + +func (v NullableNodeGroupsById) Get() *NodeGroupsById { + return v.value +} + +func (v *NullableNodeGroupsById) Set(val *NodeGroupsById) { + v.value = val + v.isSet = true +} + +func (v NullableNodeGroupsById) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeGroupsById) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeGroupsById(val *NodeGroupsById) *NullableNodeGroupsById { + return &NullableNodeGroupsById{value: val, isSet: true} +} + +func (v NullableNodeGroupsById) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeGroupsById) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_groups_by_id_request.go b/azion-api/model_node_groups_by_id_request.go new file mode 100644 index 0000000..162a684 --- /dev/null +++ b/azion-api/model_node_groups_by_id_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the NodeGroupsByIdRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeGroupsByIdRequest{} + +// NodeGroupsByIdRequest struct for NodeGroupsByIdRequest +type NodeGroupsByIdRequest struct { + Name *string `json:"name,omitempty"` + NodeGroup *int64 `json:"node_group,omitempty"` +} + +// NewNodeGroupsByIdRequest instantiates a new NodeGroupsByIdRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeGroupsByIdRequest() *NodeGroupsByIdRequest { + this := NodeGroupsByIdRequest{} + return &this +} + +// NewNodeGroupsByIdRequestWithDefaults instantiates a new NodeGroupsByIdRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeGroupsByIdRequestWithDefaults() *NodeGroupsByIdRequest { + this := NodeGroupsByIdRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NodeGroupsByIdRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeGroupsByIdRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NodeGroupsByIdRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NodeGroupsByIdRequest) SetName(v string) { + o.Name = &v +} + +// GetNodeGroup returns the NodeGroup field value if set, zero value otherwise. +func (o *NodeGroupsByIdRequest) GetNodeGroup() int64 { + if o == nil || IsNil(o.NodeGroup) { + var ret int64 + return ret + } + return *o.NodeGroup +} + +// GetNodeGroupOk returns a tuple with the NodeGroup field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeGroupsByIdRequest) GetNodeGroupOk() (*int64, bool) { + if o == nil || IsNil(o.NodeGroup) { + return nil, false + } + return o.NodeGroup, true +} + +// HasNodeGroup returns a boolean if a field has been set. +func (o *NodeGroupsByIdRequest) HasNodeGroup() bool { + if o != nil && !IsNil(o.NodeGroup) { + return true + } + + return false +} + +// SetNodeGroup gets a reference to the given int64 and assigns it to the NodeGroup field. +func (o *NodeGroupsByIdRequest) SetNodeGroup(v int64) { + o.NodeGroup = &v +} + +func (o NodeGroupsByIdRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeGroupsByIdRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.NodeGroup) { + toSerialize["node_group"] = o.NodeGroup + } + return toSerialize, nil +} + +type NullableNodeGroupsByIdRequest struct { + value *NodeGroupsByIdRequest + isSet bool +} + +func (v NullableNodeGroupsByIdRequest) Get() *NodeGroupsByIdRequest { + return v.value +} + +func (v *NullableNodeGroupsByIdRequest) Set(val *NodeGroupsByIdRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNodeGroupsByIdRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeGroupsByIdRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeGroupsByIdRequest(val *NodeGroupsByIdRequest) *NullableNodeGroupsByIdRequest { + return &NullableNodeGroupsByIdRequest{value: val, isSet: true} +} + +func (v NullableNodeGroupsByIdRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeGroupsByIdRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_groups_request.go b/azion-api/model_node_groups_request.go new file mode 100644 index 0000000..5cb78b5 --- /dev/null +++ b/azion-api/model_node_groups_request.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodeGroupsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeGroupsRequest{} + +// NodeGroupsRequest struct for NodeGroupsRequest +type NodeGroupsRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` +} + +type _NodeGroupsRequest NodeGroupsRequest + +// NewNodeGroupsRequest instantiates a new NodeGroupsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeGroupsRequest(name string) *NodeGroupsRequest { + this := NodeGroupsRequest{} + this.Name = name + return &this +} + +// NewNodeGroupsRequestWithDefaults instantiates a new NodeGroupsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeGroupsRequestWithDefaults() *NodeGroupsRequest { + this := NodeGroupsRequest{} + return &this +} + +// GetName returns the Name field value +func (o *NodeGroupsRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NodeGroupsRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NodeGroupsRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NodeGroupsRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeGroupsRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NodeGroupsRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NodeGroupsRequest) SetActive(v bool) { + o.Active = &v +} + +func (o NodeGroupsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeGroupsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *NodeGroupsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodeGroupsRequest := _NodeGroupsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodeGroupsRequest) + + if err != nil { + return err + } + + *o = NodeGroupsRequest(varNodeGroupsRequest) + + return err +} + +type NullableNodeGroupsRequest struct { + value *NodeGroupsRequest + isSet bool +} + +func (v NullableNodeGroupsRequest) Get() *NodeGroupsRequest { + return v.value +} + +func (v *NullableNodeGroupsRequest) Set(val *NodeGroupsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNodeGroupsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeGroupsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeGroupsRequest(val *NodeGroupsRequest) *NullableNodeGroupsRequest { + return &NullableNodeGroupsRequest{value: val, isSet: true} +} + +func (v NullableNodeGroupsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeGroupsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_service_bind.go b/azion-api/model_node_service_bind.go new file mode 100644 index 0000000..aeb31f3 --- /dev/null +++ b/azion-api/model_node_service_bind.go @@ -0,0 +1,299 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodeServiceBind type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeServiceBind{} + +// NodeServiceBind struct for NodeServiceBind +type NodeServiceBind struct { + Id int64 `json:"id"` + ServiceName string `json:"service_name"` + ServiceId int64 `json:"service_id"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` +} + +type _NodeServiceBind NodeServiceBind + +// NewNodeServiceBind instantiates a new NodeServiceBind object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeServiceBind(id int64, serviceName string, serviceId int64, active bool, lastEditor string, lastModified string) *NodeServiceBind { + this := NodeServiceBind{} + this.Id = id + this.ServiceName = serviceName + this.ServiceId = serviceId + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewNodeServiceBindWithDefaults instantiates a new NodeServiceBind object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeServiceBindWithDefaults() *NodeServiceBind { + this := NodeServiceBind{} + return &this +} + +// GetId returns the Id field value +func (o *NodeServiceBind) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *NodeServiceBind) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *NodeServiceBind) SetId(v int64) { + o.Id = v +} + +// GetServiceName returns the ServiceName field value +func (o *NodeServiceBind) GetServiceName() string { + if o == nil { + var ret string + return ret + } + + return o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value +// and a boolean to check if the value has been set. +func (o *NodeServiceBind) GetServiceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ServiceName, true +} + +// SetServiceName sets field value +func (o *NodeServiceBind) SetServiceName(v string) { + o.ServiceName = v +} + +// GetServiceId returns the ServiceId field value +func (o *NodeServiceBind) GetServiceId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ServiceId +} + +// GetServiceIdOk returns a tuple with the ServiceId field value +// and a boolean to check if the value has been set. +func (o *NodeServiceBind) GetServiceIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ServiceId, true +} + +// SetServiceId sets field value +func (o *NodeServiceBind) SetServiceId(v int64) { + o.ServiceId = v +} + +// GetActive returns the Active field value +func (o *NodeServiceBind) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *NodeServiceBind) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *NodeServiceBind) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *NodeServiceBind) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *NodeServiceBind) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *NodeServiceBind) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *NodeServiceBind) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *NodeServiceBind) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *NodeServiceBind) SetLastModified(v string) { + o.LastModified = v +} + +func (o NodeServiceBind) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeServiceBind) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["service_name"] = o.ServiceName + toSerialize["service_id"] = o.ServiceId + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *NodeServiceBind) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "service_name", + "service_id", + "active", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodeServiceBind := _NodeServiceBind{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodeServiceBind) + + if err != nil { + return err + } + + *o = NodeServiceBind(varNodeServiceBind) + + return err +} + +type NullableNodeServiceBind struct { + value *NodeServiceBind + isSet bool +} + +func (v NullableNodeServiceBind) Get() *NodeServiceBind { + return v.value +} + +func (v *NullableNodeServiceBind) Set(val *NodeServiceBind) { + v.value = val + v.isSet = true +} + +func (v NullableNodeServiceBind) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeServiceBind) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeServiceBind(val *NodeServiceBind) *NullableNodeServiceBind { + return &NullableNodeServiceBind{value: val, isSet: true} +} + +func (v NullableNodeServiceBind) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeServiceBind) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_services.go b/azion-api/model_node_services.go new file mode 100644 index 0000000..a75a297 --- /dev/null +++ b/azion-api/model_node_services.go @@ -0,0 +1,323 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodeServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeServices{} + +// NodeServices struct for NodeServices +type NodeServices struct { + Id *int64 `json:"id,omitempty"` + ServiceName *string `json:"service_name,omitempty"` + ServiceId int64 `json:"service_id"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` +} + +type _NodeServices NodeServices + +// NewNodeServices instantiates a new NodeServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeServices(serviceId int64, lastEditor string, lastModified string) *NodeServices { + this := NodeServices{} + this.ServiceId = serviceId + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewNodeServicesWithDefaults instantiates a new NodeServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeServicesWithDefaults() *NodeServices { + this := NodeServices{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NodeServices) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeServices) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NodeServices) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *NodeServices) SetId(v int64) { + o.Id = &v +} + +// GetServiceName returns the ServiceName field value if set, zero value otherwise. +func (o *NodeServices) GetServiceName() string { + if o == nil || IsNil(o.ServiceName) { + var ret string + return ret + } + return *o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeServices) GetServiceNameOk() (*string, bool) { + if o == nil || IsNil(o.ServiceName) { + return nil, false + } + return o.ServiceName, true +} + +// HasServiceName returns a boolean if a field has been set. +func (o *NodeServices) HasServiceName() bool { + if o != nil && !IsNil(o.ServiceName) { + return true + } + + return false +} + +// SetServiceName gets a reference to the given string and assigns it to the ServiceName field. +func (o *NodeServices) SetServiceName(v string) { + o.ServiceName = &v +} + +// GetServiceId returns the ServiceId field value +func (o *NodeServices) GetServiceId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ServiceId +} + +// GetServiceIdOk returns a tuple with the ServiceId field value +// and a boolean to check if the value has been set. +func (o *NodeServices) GetServiceIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ServiceId, true +} + +// SetServiceId sets field value +func (o *NodeServices) SetServiceId(v int64) { + o.ServiceId = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NodeServices) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeServices) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NodeServices) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NodeServices) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *NodeServices) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *NodeServices) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *NodeServices) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *NodeServices) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *NodeServices) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *NodeServices) SetLastModified(v string) { + o.LastModified = v +} + +func (o NodeServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ServiceName) { + toSerialize["service_name"] = o.ServiceName + } + toSerialize["service_id"] = o.ServiceId + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *NodeServices) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "service_id", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodeServices := _NodeServices{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodeServices) + + if err != nil { + return err + } + + *o = NodeServices(varNodeServices) + + return err +} + +type NullableNodeServices struct { + value *NodeServices + isSet bool +} + +func (v NullableNodeServices) Get() *NodeServices { + return v.value +} + +func (v *NullableNodeServices) Set(val *NodeServices) { + v.value = val + v.isSet = true +} + +func (v NullableNodeServices) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeServices(val *NodeServices) *NullableNodeServices { + return &NullableNodeServices{value: val, isSet: true} +} + +func (v NullableNodeServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_node_services_request.go b/azion-api/model_node_services_request.go new file mode 100644 index 0000000..7d82696 --- /dev/null +++ b/azion-api/model_node_services_request.go @@ -0,0 +1,267 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodeServicesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodeServicesRequest{} + +// NodeServicesRequest struct for NodeServicesRequest +type NodeServicesRequest struct { + Id *int64 `json:"id,omitempty"` + ServiceName *string `json:"service_name,omitempty"` + ServiceId int64 `json:"service_id"` + Active *bool `json:"active,omitempty"` +} + +type _NodeServicesRequest NodeServicesRequest + +// NewNodeServicesRequest instantiates a new NodeServicesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodeServicesRequest(serviceId int64) *NodeServicesRequest { + this := NodeServicesRequest{} + this.ServiceId = serviceId + return &this +} + +// NewNodeServicesRequestWithDefaults instantiates a new NodeServicesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodeServicesRequestWithDefaults() *NodeServicesRequest { + this := NodeServicesRequest{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *NodeServicesRequest) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeServicesRequest) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *NodeServicesRequest) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *NodeServicesRequest) SetId(v int64) { + o.Id = &v +} + +// GetServiceName returns the ServiceName field value if set, zero value otherwise. +func (o *NodeServicesRequest) GetServiceName() string { + if o == nil || IsNil(o.ServiceName) { + var ret string + return ret + } + return *o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeServicesRequest) GetServiceNameOk() (*string, bool) { + if o == nil || IsNil(o.ServiceName) { + return nil, false + } + return o.ServiceName, true +} + +// HasServiceName returns a boolean if a field has been set. +func (o *NodeServicesRequest) HasServiceName() bool { + if o != nil && !IsNil(o.ServiceName) { + return true + } + + return false +} + +// SetServiceName gets a reference to the given string and assigns it to the ServiceName field. +func (o *NodeServicesRequest) SetServiceName(v string) { + o.ServiceName = &v +} + +// GetServiceId returns the ServiceId field value +func (o *NodeServicesRequest) GetServiceId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ServiceId +} + +// GetServiceIdOk returns a tuple with the ServiceId field value +// and a boolean to check if the value has been set. +func (o *NodeServicesRequest) GetServiceIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ServiceId, true +} + +// SetServiceId sets field value +func (o *NodeServicesRequest) SetServiceId(v int64) { + o.ServiceId = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *NodeServicesRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *NodeServicesRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *NodeServicesRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *NodeServicesRequest) SetActive(v bool) { + o.Active = &v +} + +func (o NodeServicesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodeServicesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ServiceName) { + toSerialize["service_name"] = o.ServiceName + } + toSerialize["service_id"] = o.ServiceId + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *NodeServicesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "service_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodeServicesRequest := _NodeServicesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodeServicesRequest) + + if err != nil { + return err + } + + *o = NodeServicesRequest(varNodeServicesRequest) + + return err +} + +type NullableNodeServicesRequest struct { + value *NodeServicesRequest + isSet bool +} + +func (v NullableNodeServicesRequest) Get() *NodeServicesRequest { + return v.value +} + +func (v *NullableNodeServicesRequest) Set(val *NodeServicesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNodeServicesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNodeServicesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodeServicesRequest(val *NodeServicesRequest) *NullableNodeServicesRequest { + return &NullableNodeServicesRequest{value: val, isSet: true} +} + +func (v NullableNodeServicesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodeServicesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_nodes.go b/azion-api/model_nodes.go new file mode 100644 index 0000000..373e247 --- /dev/null +++ b/azion-api/model_nodes.go @@ -0,0 +1,393 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Nodes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Nodes{} + +// Nodes struct for Nodes +type Nodes struct { + Id int64 `json:"id"` + HashId string `json:"hash_id"` + Name string `json:"name"` + // * `waiting_authorization` - waiting_authorization * `authorized` - authorized + Status string `json:"status"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` + Modules interface{} `json:"modules,omitempty"` + ProductVersion string `json:"product_version"` +} + +type _Nodes Nodes + +// NewNodes instantiates a new Nodes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodes(id int64, hashId string, name string, status string, active bool, lastEditor string, lastModified string, productVersion string) *Nodes { + this := Nodes{} + this.Id = id + this.HashId = hashId + this.Name = name + this.Status = status + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + return &this +} + +// NewNodesWithDefaults instantiates a new Nodes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodesWithDefaults() *Nodes { + this := Nodes{} + return &this +} + +// GetId returns the Id field value +func (o *Nodes) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Nodes) SetId(v int64) { + o.Id = v +} + +// GetHashId returns the HashId field value +func (o *Nodes) GetHashId() string { + if o == nil { + var ret string + return ret + } + + return o.HashId +} + +// GetHashIdOk returns a tuple with the HashId field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetHashIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HashId, true +} + +// SetHashId sets field value +func (o *Nodes) SetHashId(v string) { + o.HashId = v +} + +// GetName returns the Name field value +func (o *Nodes) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Nodes) SetName(v string) { + o.Name = v +} + +// GetStatus returns the Status field value +func (o *Nodes) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Nodes) SetStatus(v string) { + o.Status = v +} + +// GetActive returns the Active field value +func (o *Nodes) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Nodes) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Nodes) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Nodes) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Nodes) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Nodes) SetLastModified(v string) { + o.LastModified = v +} + +// GetModules returns the Modules field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Nodes) GetModules() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Nodes) GetModulesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return &o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *Nodes) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given interface{} and assigns it to the Modules field. +func (o *Nodes) SetModules(v interface{}) { + o.Modules = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Nodes) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Nodes) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Nodes) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Nodes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Nodes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["hash_id"] = o.HashId + toSerialize["name"] = o.Name + toSerialize["status"] = o.Status + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if o.Modules != nil { + toSerialize["modules"] = o.Modules + } + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Nodes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "hash_id", + "name", + "status", + "active", + "last_editor", + "last_modified", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodes := _Nodes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodes) + + if err != nil { + return err + } + + *o = Nodes(varNodes) + + return err +} + +type NullableNodes struct { + value *Nodes + isSet bool +} + +func (v NullableNodes) Get() *Nodes { + return v.value +} + +func (v *NullableNodes) Set(val *Nodes) { + v.value = val + v.isSet = true +} + +func (v NullableNodes) IsSet() bool { + return v.isSet +} + +func (v *NullableNodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodes(val *Nodes) *NullableNodes { + return &NullableNodes{value: val, isSet: true} +} + +func (v NullableNodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_nodes_request.go b/azion-api/model_nodes_request.go new file mode 100644 index 0000000..8a38165 --- /dev/null +++ b/azion-api/model_nodes_request.go @@ -0,0 +1,225 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the NodesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &NodesRequest{} + +// NodesRequest struct for NodesRequest +type NodesRequest struct { + Name string `json:"name"` + // * `waiting_authorization` - waiting_authorization * `authorized` - authorized + Status string `json:"status"` + Modules interface{} `json:"modules,omitempty"` +} + +type _NodesRequest NodesRequest + +// NewNodesRequest instantiates a new NodesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewNodesRequest(name string, status string) *NodesRequest { + this := NodesRequest{} + this.Name = name + this.Status = status + return &this +} + +// NewNodesRequestWithDefaults instantiates a new NodesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewNodesRequestWithDefaults() *NodesRequest { + this := NodesRequest{} + return &this +} + +// GetName returns the Name field value +func (o *NodesRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *NodesRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *NodesRequest) SetName(v string) { + o.Name = v +} + +// GetStatus returns the Status field value +func (o *NodesRequest) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *NodesRequest) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *NodesRequest) SetStatus(v string) { + o.Status = v +} + +// GetModules returns the Modules field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *NodesRequest) GetModules() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *NodesRequest) GetModulesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return &o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *NodesRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given interface{} and assigns it to the Modules field. +func (o *NodesRequest) SetModules(v interface{}) { + o.Modules = v +} + +func (o NodesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o NodesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["status"] = o.Status + if o.Modules != nil { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +func (o *NodesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "status", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varNodesRequest := _NodesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varNodesRequest) + + if err != nil { + return err + } + + *o = NodesRequest(varNodesRequest) + + return err +} + +type NullableNodesRequest struct { + value *NodesRequest + isSet bool +} + +func (v NullableNodesRequest) Get() *NodesRequest { + return v.value +} + +func (v *NullableNodesRequest) Set(val *NodesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableNodesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableNodesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableNodesRequest(val *NodesRequest) *NullableNodesRequest { + return &NullableNodesRequest{value: val, isSet: true} +} + +func (v NullableNodesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableNodesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_object_response_async_data.go b/azion-api/model_object_response_async_data.go new file mode 100644 index 0000000..62f1092 --- /dev/null +++ b/azion-api/model_object_response_async_data.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ObjectResponseAsyncData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObjectResponseAsyncData{} + +// ObjectResponseAsyncData struct for ObjectResponseAsyncData +type ObjectResponseAsyncData struct { + ObjectKey string `json:"object_key"` +} + +type _ObjectResponseAsyncData ObjectResponseAsyncData + +// NewObjectResponseAsyncData instantiates a new ObjectResponseAsyncData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObjectResponseAsyncData(objectKey string) *ObjectResponseAsyncData { + this := ObjectResponseAsyncData{} + this.ObjectKey = objectKey + return &this +} + +// NewObjectResponseAsyncDataWithDefaults instantiates a new ObjectResponseAsyncData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObjectResponseAsyncDataWithDefaults() *ObjectResponseAsyncData { + this := ObjectResponseAsyncData{} + return &this +} + +// GetObjectKey returns the ObjectKey field value +func (o *ObjectResponseAsyncData) GetObjectKey() string { + if o == nil { + var ret string + return ret + } + + return o.ObjectKey +} + +// GetObjectKeyOk returns a tuple with the ObjectKey field value +// and a boolean to check if the value has been set. +func (o *ObjectResponseAsyncData) GetObjectKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ObjectKey, true +} + +// SetObjectKey sets field value +func (o *ObjectResponseAsyncData) SetObjectKey(v string) { + o.ObjectKey = v +} + +func (o ObjectResponseAsyncData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObjectResponseAsyncData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["object_key"] = o.ObjectKey + return toSerialize, nil +} + +func (o *ObjectResponseAsyncData) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "object_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObjectResponseAsyncData := _ObjectResponseAsyncData{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObjectResponseAsyncData) + + if err != nil { + return err + } + + *o = ObjectResponseAsyncData(varObjectResponseAsyncData) + + return err +} + +type NullableObjectResponseAsyncData struct { + value *ObjectResponseAsyncData + isSet bool +} + +func (v NullableObjectResponseAsyncData) Get() *ObjectResponseAsyncData { + return v.value +} + +func (v *NullableObjectResponseAsyncData) Set(val *ObjectResponseAsyncData) { + v.value = val + v.isSet = true +} + +func (v NullableObjectResponseAsyncData) IsSet() bool { + return v.isSet +} + +func (v *NullableObjectResponseAsyncData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObjectResponseAsyncData(val *ObjectResponseAsyncData) *NullableObjectResponseAsyncData { + return &NullableObjectResponseAsyncData{value: val, isSet: true} +} + +func (v NullableObjectResponseAsyncData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObjectResponseAsyncData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_object_response_data.go b/azion-api/model_object_response_data.go new file mode 100644 index 0000000..368951a --- /dev/null +++ b/azion-api/model_object_response_data.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ObjectResponseData type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ObjectResponseData{} + +// ObjectResponseData struct for ObjectResponseData +type ObjectResponseData struct { + ObjectKey string `json:"object_key"` +} + +type _ObjectResponseData ObjectResponseData + +// NewObjectResponseData instantiates a new ObjectResponseData object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewObjectResponseData(objectKey string) *ObjectResponseData { + this := ObjectResponseData{} + this.ObjectKey = objectKey + return &this +} + +// NewObjectResponseDataWithDefaults instantiates a new ObjectResponseData object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewObjectResponseDataWithDefaults() *ObjectResponseData { + this := ObjectResponseData{} + return &this +} + +// GetObjectKey returns the ObjectKey field value +func (o *ObjectResponseData) GetObjectKey() string { + if o == nil { + var ret string + return ret + } + + return o.ObjectKey +} + +// GetObjectKeyOk returns a tuple with the ObjectKey field value +// and a boolean to check if the value has been set. +func (o *ObjectResponseData) GetObjectKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ObjectKey, true +} + +// SetObjectKey sets field value +func (o *ObjectResponseData) SetObjectKey(v string) { + o.ObjectKey = v +} + +func (o ObjectResponseData) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ObjectResponseData) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["object_key"] = o.ObjectKey + return toSerialize, nil +} + +func (o *ObjectResponseData) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "object_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varObjectResponseData := _ObjectResponseData{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varObjectResponseData) + + if err != nil { + return err + } + + *o = ObjectResponseData(varObjectResponseData) + + return err +} + +type NullableObjectResponseData struct { + value *ObjectResponseData + isSet bool +} + +func (v NullableObjectResponseData) Get() *ObjectResponseData { + return v.value +} + +func (v *NullableObjectResponseData) Set(val *ObjectResponseData) { + v.value = val + v.isSet = true +} + +func (v NullableObjectResponseData) IsSet() bool { + return v.isSet +} + +func (v *NullableObjectResponseData) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableObjectResponseData(val *ObjectResponseData) *NullableObjectResponseData { + return &NullableObjectResponseData{value: val, isSet: true} +} + +func (v NullableObjectResponseData) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableObjectResponseData) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_order.go b/azion-api/model_order.go new file mode 100644 index 0000000..230dd0a --- /dev/null +++ b/azion-api/model_order.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Order type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Order{} + +// Order struct for Order +type Order struct { + Order []int64 `json:"order"` +} + +type _Order Order + +// NewOrder instantiates a new Order object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrder(order []int64) *Order { + this := Order{} + this.Order = order + return &this +} + +// NewOrderWithDefaults instantiates a new Order object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderWithDefaults() *Order { + this := Order{} + return &this +} + +// GetOrder returns the Order field value +func (o *Order) GetOrder() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *Order) GetOrderOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Order, true +} + +// SetOrder sets field value +func (o *Order) SetOrder(v []int64) { + o.Order = v +} + +func (o Order) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Order) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *Order) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrder := _Order{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrder) + + if err != nil { + return err + } + + *o = Order(varOrder) + + return err +} + +type NullableOrder struct { + value *Order + isSet bool +} + +func (v NullableOrder) Get() *Order { + return v.value +} + +func (v *NullableOrder) Set(val *Order) { + v.value = val + v.isSet = true +} + +func (v NullableOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrder(val *Order) *NullableOrder { + return &NullableOrder{value: val, isSet: true} +} + +func (v NullableOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_order_request.go b/azion-api/model_order_request.go new file mode 100644 index 0000000..63a804c --- /dev/null +++ b/azion-api/model_order_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the OrderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderRequest{} + +// OrderRequest struct for OrderRequest +type OrderRequest struct { + Order []int64 `json:"order"` +} + +type _OrderRequest OrderRequest + +// NewOrderRequest instantiates a new OrderRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderRequest(order []int64) *OrderRequest { + this := OrderRequest{} + this.Order = order + return &this +} + +// NewOrderRequestWithDefaults instantiates a new OrderRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderRequestWithDefaults() *OrderRequest { + this := OrderRequest{} + return &this +} + +// GetOrder returns the Order field value +func (o *OrderRequest) GetOrder() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *OrderRequest) GetOrderOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Order, true +} + +// SetOrder sets field value +func (o *OrderRequest) SetOrder(v []int64) { + o.Order = v +} + +func (o OrderRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *OrderRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderRequest := _OrderRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrderRequest) + + if err != nil { + return err + } + + *o = OrderRequest(varOrderRequest) + + return err +} + +type NullableOrderRequest struct { + value *OrderRequest + isSet bool +} + +func (v NullableOrderRequest) Get() *OrderRequest { + return v.value +} + +func (v *NullableOrderRequest) Set(val *OrderRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOrderRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderRequest(val *OrderRequest) *NullableOrderRequest { + return &NullableOrderRequest{value: val, isSet: true} +} + +func (v NullableOrderRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_organization.go b/azion-api/model_organization.go new file mode 100644 index 0000000..6f23282 --- /dev/null +++ b/azion-api/model_organization.go @@ -0,0 +1,443 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Organization type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Organization{} + +// Organization struct for Organization +type Organization struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ParentId int64 `json:"parent_id"` + Created time.Time `json:"created"` + Info map[string]interface{} `json:"info"` + // * `active` - Active account status, can be used for regular operations. * `suspended` - Suspended account status, for accounts with limited access to support and payments only. * `disabled` - Disabled account status, services are offline, user can only access support. * `closed` - Closed account status, services are offline but can be reactivated. + Status string `json:"status"` + // * `trial` - Trial account status, currently on a trial period. * `online` - Online account status, used for online sales operations. * `regular` - Regular account status, indicates the customer has an active contract. * `overdue` - Overdue status, the account failed necessary payments after retries. * `quarantine` - Quarantine status, the account is suspended due to suspected misuse or security breach. * `violation` - Violation status, temporarily suspended due to administrative, technical, security, or policy violations. * `idle` - Idle status, the account was removed due to inactivity. * `terminated` - Terminated status, the account was shut down by the service provider. * `voluntary` - Voluntary status, the account was canceled by its owner. + Reason string `json:"reason"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _Organization Organization + +// NewOrganization instantiates a new Organization object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganization(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, status string, reason string, type_ string) *Organization { + this := Organization{} + this.Id = id + this.Name = name + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ParentId = parentId + this.Created = created + this.Info = info + this.Status = status + this.Reason = reason + this.Type = type_ + return &this +} + +// NewOrganizationWithDefaults instantiates a new Organization object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganizationWithDefaults() *Organization { + this := Organization{} + return &this +} + +// GetId returns the Id field value +func (o *Organization) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Organization) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Organization) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Organization) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Organization) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Organization) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *Organization) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Organization) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Organization) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Organization) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Organization) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Organization) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Organization) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Organization) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Organization) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetParentId returns the ParentId field value +func (o *Organization) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *Organization) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *Organization) SetParentId(v int64) { + o.ParentId = v +} + +// GetCreated returns the Created field value +func (o *Organization) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Organization) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Organization) SetCreated(v time.Time) { + o.Created = v +} + +// GetInfo returns the Info field value +func (o *Organization) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *Organization) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *Organization) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetStatus returns the Status field value +func (o *Organization) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *Organization) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *Organization) SetStatus(v string) { + o.Status = v +} + +// GetReason returns the Reason field value +func (o *Organization) GetReason() string { + if o == nil { + var ret string + return ret + } + + return o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value +// and a boolean to check if the value has been set. +func (o *Organization) GetReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reason, true +} + +// SetReason sets field value +func (o *Organization) SetReason(v string) { + o.Reason = v +} + +// GetType returns the Type field value +func (o *Organization) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Organization) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Organization) SetType(v string) { + o.Type = v +} + +func (o Organization) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Organization) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["parent_id"] = o.ParentId + toSerialize["created"] = o.Created + toSerialize["info"] = o.Info + toSerialize["status"] = o.Status + toSerialize["reason"] = o.Reason + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Organization) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "active", + "last_editor", + "last_modified", + "parent_id", + "created", + "info", + "status", + "reason", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrganization := _Organization{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrganization) + + if err != nil { + return err + } + + *o = Organization(varOrganization) + + return err +} + +type NullableOrganization struct { + value *Organization + isSet bool +} + +func (v NullableOrganization) Get() *Organization { + return v.value +} + +func (v *NullableOrganization) Set(val *Organization) { + v.value = val + v.isSet = true +} + +func (v NullableOrganization) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganization) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganization(val *Organization) *NullableOrganization { + return &NullableOrganization{value: val, isSet: true} +} + +func (v NullableOrganization) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganization) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_organization_request.go b/azion-api/model_organization_request.go new file mode 100644 index 0000000..c4a23be --- /dev/null +++ b/azion-api/model_organization_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the OrganizationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrganizationRequest{} + +// OrganizationRequest struct for OrganizationRequest +type OrganizationRequest struct { + Name string `json:"name"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _OrganizationRequest OrganizationRequest + +// NewOrganizationRequest instantiates a new OrganizationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrganizationRequest(name string, type_ string) *OrganizationRequest { + this := OrganizationRequest{} + this.Name = name + this.Type = type_ + return &this +} + +// NewOrganizationRequestWithDefaults instantiates a new OrganizationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrganizationRequestWithDefaults() *OrganizationRequest { + this := OrganizationRequest{} + return &this +} + +// GetName returns the Name field value +func (o *OrganizationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *OrganizationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *OrganizationRequest) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *OrganizationRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OrganizationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *OrganizationRequest) SetType(v string) { + o.Type = v +} + +func (o OrganizationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrganizationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *OrganizationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrganizationRequest := _OrganizationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOrganizationRequest) + + if err != nil { + return err + } + + *o = OrganizationRequest(varOrganizationRequest) + + return err +} + +type NullableOrganizationRequest struct { + value *OrganizationRequest + isSet bool +} + +func (v NullableOrganizationRequest) Get() *OrganizationRequest { + return v.value +} + +func (v *NullableOrganizationRequest) Set(val *OrganizationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOrganizationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOrganizationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrganizationRequest(val *OrganizationRequest) *NullableOrganizationRequest { + return &NullableOrganizationRequest{value: val, isSet: true} +} + +func (v NullableOrganizationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrganizationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_origin_ipacl.go b/azion-api/model_origin_ipacl.go new file mode 100644 index 0000000..a07bfd6 --- /dev/null +++ b/azion-api/model_origin_ipacl.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the OriginIPACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OriginIPACL{} + +// OriginIPACL struct for OriginIPACL +type OriginIPACL struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewOriginIPACL instantiates a new OriginIPACL object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOriginIPACL() *OriginIPACL { + this := OriginIPACL{} + return &this +} + +// NewOriginIPACLWithDefaults instantiates a new OriginIPACL object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOriginIPACLWithDefaults() *OriginIPACL { + this := OriginIPACL{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *OriginIPACL) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginIPACL) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *OriginIPACL) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *OriginIPACL) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o OriginIPACL) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OriginIPACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableOriginIPACL struct { + value *OriginIPACL + isSet bool +} + +func (v NullableOriginIPACL) Get() *OriginIPACL { + return v.value +} + +func (v *NullableOriginIPACL) Set(val *OriginIPACL) { + v.value = val + v.isSet = true +} + +func (v NullableOriginIPACL) IsSet() bool { + return v.isSet +} + +func (v *NullableOriginIPACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOriginIPACL(val *OriginIPACL) *NullableOriginIPACL { + return &NullableOriginIPACL{value: val, isSet: true} +} + +func (v NullableOriginIPACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOriginIPACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_origin_ipacl_request.go b/azion-api/model_origin_ipacl_request.go new file mode 100644 index 0000000..22d51e0 --- /dev/null +++ b/azion-api/model_origin_ipacl_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the OriginIPACLRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OriginIPACLRequest{} + +// OriginIPACLRequest struct for OriginIPACLRequest +type OriginIPACLRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewOriginIPACLRequest instantiates a new OriginIPACLRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOriginIPACLRequest() *OriginIPACLRequest { + this := OriginIPACLRequest{} + return &this +} + +// NewOriginIPACLRequestWithDefaults instantiates a new OriginIPACLRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOriginIPACLRequestWithDefaults() *OriginIPACLRequest { + this := OriginIPACLRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *OriginIPACLRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginIPACLRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *OriginIPACLRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *OriginIPACLRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o OriginIPACLRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OriginIPACLRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableOriginIPACLRequest struct { + value *OriginIPACLRequest + isSet bool +} + +func (v NullableOriginIPACLRequest) Get() *OriginIPACLRequest { + return v.value +} + +func (v *NullableOriginIPACLRequest) Set(val *OriginIPACLRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOriginIPACLRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOriginIPACLRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOriginIPACLRequest(val *OriginIPACLRequest) *NullableOriginIPACLRequest { + return &NullableOriginIPACLRequest{value: val, isSet: true} +} + +func (v NullableOriginIPACLRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOriginIPACLRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_origin_shield_config.go b/azion-api/model_origin_shield_config.go new file mode 100644 index 0000000..52515fb --- /dev/null +++ b/azion-api/model_origin_shield_config.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the OriginShieldConfig type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OriginShieldConfig{} + +// OriginShieldConfig struct for OriginShieldConfig +type OriginShieldConfig struct { + OriginIpAcl *OriginIPACL `json:"origin_ip_acl,omitempty"` + Hmac *HMAC `json:"hmac,omitempty"` +} + +// NewOriginShieldConfig instantiates a new OriginShieldConfig object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOriginShieldConfig() *OriginShieldConfig { + this := OriginShieldConfig{} + return &this +} + +// NewOriginShieldConfigWithDefaults instantiates a new OriginShieldConfig object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOriginShieldConfigWithDefaults() *OriginShieldConfig { + this := OriginShieldConfig{} + return &this +} + +// GetOriginIpAcl returns the OriginIpAcl field value if set, zero value otherwise. +func (o *OriginShieldConfig) GetOriginIpAcl() OriginIPACL { + if o == nil || IsNil(o.OriginIpAcl) { + var ret OriginIPACL + return ret + } + return *o.OriginIpAcl +} + +// GetOriginIpAclOk returns a tuple with the OriginIpAcl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginShieldConfig) GetOriginIpAclOk() (*OriginIPACL, bool) { + if o == nil || IsNil(o.OriginIpAcl) { + return nil, false + } + return o.OriginIpAcl, true +} + +// HasOriginIpAcl returns a boolean if a field has been set. +func (o *OriginShieldConfig) HasOriginIpAcl() bool { + if o != nil && !IsNil(o.OriginIpAcl) { + return true + } + + return false +} + +// SetOriginIpAcl gets a reference to the given OriginIPACL and assigns it to the OriginIpAcl field. +func (o *OriginShieldConfig) SetOriginIpAcl(v OriginIPACL) { + o.OriginIpAcl = &v +} + +// GetHmac returns the Hmac field value if set, zero value otherwise. +func (o *OriginShieldConfig) GetHmac() HMAC { + if o == nil || IsNil(o.Hmac) { + var ret HMAC + return ret + } + return *o.Hmac +} + +// GetHmacOk returns a tuple with the Hmac field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginShieldConfig) GetHmacOk() (*HMAC, bool) { + if o == nil || IsNil(o.Hmac) { + return nil, false + } + return o.Hmac, true +} + +// HasHmac returns a boolean if a field has been set. +func (o *OriginShieldConfig) HasHmac() bool { + if o != nil && !IsNil(o.Hmac) { + return true + } + + return false +} + +// SetHmac gets a reference to the given HMAC and assigns it to the Hmac field. +func (o *OriginShieldConfig) SetHmac(v HMAC) { + o.Hmac = &v +} + +func (o OriginShieldConfig) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OriginShieldConfig) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OriginIpAcl) { + toSerialize["origin_ip_acl"] = o.OriginIpAcl + } + if !IsNil(o.Hmac) { + toSerialize["hmac"] = o.Hmac + } + return toSerialize, nil +} + +type NullableOriginShieldConfig struct { + value *OriginShieldConfig + isSet bool +} + +func (v NullableOriginShieldConfig) Get() *OriginShieldConfig { + return v.value +} + +func (v *NullableOriginShieldConfig) Set(val *OriginShieldConfig) { + v.value = val + v.isSet = true +} + +func (v NullableOriginShieldConfig) IsSet() bool { + return v.isSet +} + +func (v *NullableOriginShieldConfig) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOriginShieldConfig(val *OriginShieldConfig) *NullableOriginShieldConfig { + return &NullableOriginShieldConfig{value: val, isSet: true} +} + +func (v NullableOriginShieldConfig) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOriginShieldConfig) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_origin_shield_config_request.go b/azion-api/model_origin_shield_config_request.go new file mode 100644 index 0000000..d91babe --- /dev/null +++ b/azion-api/model_origin_shield_config_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the OriginShieldConfigRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OriginShieldConfigRequest{} + +// OriginShieldConfigRequest struct for OriginShieldConfigRequest +type OriginShieldConfigRequest struct { + OriginIpAcl *OriginIPACLRequest `json:"origin_ip_acl,omitempty"` + Hmac *HMACRequest `json:"hmac,omitempty"` +} + +// NewOriginShieldConfigRequest instantiates a new OriginShieldConfigRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOriginShieldConfigRequest() *OriginShieldConfigRequest { + this := OriginShieldConfigRequest{} + return &this +} + +// NewOriginShieldConfigRequestWithDefaults instantiates a new OriginShieldConfigRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOriginShieldConfigRequestWithDefaults() *OriginShieldConfigRequest { + this := OriginShieldConfigRequest{} + return &this +} + +// GetOriginIpAcl returns the OriginIpAcl field value if set, zero value otherwise. +func (o *OriginShieldConfigRequest) GetOriginIpAcl() OriginIPACLRequest { + if o == nil || IsNil(o.OriginIpAcl) { + var ret OriginIPACLRequest + return ret + } + return *o.OriginIpAcl +} + +// GetOriginIpAclOk returns a tuple with the OriginIpAcl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginShieldConfigRequest) GetOriginIpAclOk() (*OriginIPACLRequest, bool) { + if o == nil || IsNil(o.OriginIpAcl) { + return nil, false + } + return o.OriginIpAcl, true +} + +// HasOriginIpAcl returns a boolean if a field has been set. +func (o *OriginShieldConfigRequest) HasOriginIpAcl() bool { + if o != nil && !IsNil(o.OriginIpAcl) { + return true + } + + return false +} + +// SetOriginIpAcl gets a reference to the given OriginIPACLRequest and assigns it to the OriginIpAcl field. +func (o *OriginShieldConfigRequest) SetOriginIpAcl(v OriginIPACLRequest) { + o.OriginIpAcl = &v +} + +// GetHmac returns the Hmac field value if set, zero value otherwise. +func (o *OriginShieldConfigRequest) GetHmac() HMACRequest { + if o == nil || IsNil(o.Hmac) { + var ret HMACRequest + return ret + } + return *o.Hmac +} + +// GetHmacOk returns a tuple with the Hmac field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginShieldConfigRequest) GetHmacOk() (*HMACRequest, bool) { + if o == nil || IsNil(o.Hmac) { + return nil, false + } + return o.Hmac, true +} + +// HasHmac returns a boolean if a field has been set. +func (o *OriginShieldConfigRequest) HasHmac() bool { + if o != nil && !IsNil(o.Hmac) { + return true + } + + return false +} + +// SetHmac gets a reference to the given HMACRequest and assigns it to the Hmac field. +func (o *OriginShieldConfigRequest) SetHmac(v HMACRequest) { + o.Hmac = &v +} + +func (o OriginShieldConfigRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OriginShieldConfigRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.OriginIpAcl) { + toSerialize["origin_ip_acl"] = o.OriginIpAcl + } + if !IsNil(o.Hmac) { + toSerialize["hmac"] = o.Hmac + } + return toSerialize, nil +} + +type NullableOriginShieldConfigRequest struct { + value *OriginShieldConfigRequest + isSet bool +} + +func (v NullableOriginShieldConfigRequest) Get() *OriginShieldConfigRequest { + return v.value +} + +func (v *NullableOriginShieldConfigRequest) Set(val *OriginShieldConfigRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOriginShieldConfigRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOriginShieldConfigRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOriginShieldConfigRequest(val *OriginShieldConfigRequest) *NullableOriginShieldConfigRequest { + return &NullableOriginShieldConfigRequest{value: val, isSet: true} +} + +func (v NullableOriginShieldConfigRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOriginShieldConfigRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_origin_shield_module.go b/azion-api/model_origin_shield_module.go new file mode 100644 index 0000000..6070b63 --- /dev/null +++ b/azion-api/model_origin_shield_module.go @@ -0,0 +1,173 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the OriginShieldModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OriginShieldModule{} + +// OriginShieldModule struct for OriginShieldModule +type OriginShieldModule struct { + Enabled *bool `json:"enabled,omitempty"` + Config NullableOriginShieldConfig `json:"config,omitempty"` +} + +// NewOriginShieldModule instantiates a new OriginShieldModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOriginShieldModule() *OriginShieldModule { + this := OriginShieldModule{} + return &this +} + +// NewOriginShieldModuleWithDefaults instantiates a new OriginShieldModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOriginShieldModuleWithDefaults() *OriginShieldModule { + this := OriginShieldModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *OriginShieldModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginShieldModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *OriginShieldModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *OriginShieldModule) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OriginShieldModule) GetConfig() OriginShieldConfig { + if o == nil || IsNil(o.Config.Get()) { + var ret OriginShieldConfig + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OriginShieldModule) GetConfigOk() (*OriginShieldConfig, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *OriginShieldModule) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableOriginShieldConfig and assigns it to the Config field. +func (o *OriginShieldModule) SetConfig(v OriginShieldConfig) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *OriginShieldModule) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *OriginShieldModule) UnsetConfig() { + o.Config.Unset() +} + +func (o OriginShieldModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OriginShieldModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +type NullableOriginShieldModule struct { + value *OriginShieldModule + isSet bool +} + +func (v NullableOriginShieldModule) Get() *OriginShieldModule { + return v.value +} + +func (v *NullableOriginShieldModule) Set(val *OriginShieldModule) { + v.value = val + v.isSet = true +} + +func (v NullableOriginShieldModule) IsSet() bool { + return v.isSet +} + +func (v *NullableOriginShieldModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOriginShieldModule(val *OriginShieldModule) *NullableOriginShieldModule { + return &NullableOriginShieldModule{value: val, isSet: true} +} + +func (v NullableOriginShieldModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOriginShieldModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_origin_shield_module_request.go b/azion-api/model_origin_shield_module_request.go new file mode 100644 index 0000000..acb406a --- /dev/null +++ b/azion-api/model_origin_shield_module_request.go @@ -0,0 +1,173 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the OriginShieldModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OriginShieldModuleRequest{} + +// OriginShieldModuleRequest struct for OriginShieldModuleRequest +type OriginShieldModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` + Config NullableOriginShieldConfigRequest `json:"config,omitempty"` +} + +// NewOriginShieldModuleRequest instantiates a new OriginShieldModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOriginShieldModuleRequest() *OriginShieldModuleRequest { + this := OriginShieldModuleRequest{} + return &this +} + +// NewOriginShieldModuleRequestWithDefaults instantiates a new OriginShieldModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOriginShieldModuleRequestWithDefaults() *OriginShieldModuleRequest { + this := OriginShieldModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *OriginShieldModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OriginShieldModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *OriginShieldModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *OriginShieldModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OriginShieldModuleRequest) GetConfig() OriginShieldConfigRequest { + if o == nil || IsNil(o.Config.Get()) { + var ret OriginShieldConfigRequest + return ret + } + return *o.Config.Get() +} + +// GetConfigOk returns a tuple with the Config field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OriginShieldModuleRequest) GetConfigOk() (*OriginShieldConfigRequest, bool) { + if o == nil { + return nil, false + } + return o.Config.Get(), o.Config.IsSet() +} + +// HasConfig returns a boolean if a field has been set. +func (o *OriginShieldModuleRequest) HasConfig() bool { + if o != nil && o.Config.IsSet() { + return true + } + + return false +} + +// SetConfig gets a reference to the given NullableOriginShieldConfigRequest and assigns it to the Config field. +func (o *OriginShieldModuleRequest) SetConfig(v OriginShieldConfigRequest) { + o.Config.Set(&v) +} +// SetConfigNil sets the value for Config to be an explicit nil +func (o *OriginShieldModuleRequest) SetConfigNil() { + o.Config.Set(nil) +} + +// UnsetConfig ensures that no value is present for Config, not even an explicit nil +func (o *OriginShieldModuleRequest) UnsetConfig() { + o.Config.Unset() +} + +func (o OriginShieldModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OriginShieldModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if o.Config.IsSet() { + toSerialize["config"] = o.Config.Get() + } + return toSerialize, nil +} + +type NullableOriginShieldModuleRequest struct { + value *OriginShieldModuleRequest + isSet bool +} + +func (v NullableOriginShieldModuleRequest) Get() *OriginShieldModuleRequest { + return v.value +} + +func (v *NullableOriginShieldModuleRequest) Set(val *OriginShieldModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOriginShieldModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOriginShieldModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOriginShieldModuleRequest(val *OriginShieldModuleRequest) *NullableOriginShieldModuleRequest { + return &NullableOriginShieldModuleRequest{value: val, isSet: true} +} + +func (v NullableOriginShieldModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOriginShieldModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_output.go b/azion-api/model_output.go new file mode 100644 index 0000000..a6672cb --- /dev/null +++ b/azion-api/model_output.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Output type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Output{} + +// Output struct for Output +type Output struct { + // * `standard` - Standard HTTP/HTTPS POST * `kafka` - Apache Kafka * `s3` - Simple Storage Service (S3) * `big_query` - Google BigQuery * `elasticsearch` - Elasticsearch * `splunk` - Splunk * `aws_kinesis_firehose` - AWS Kinesis Data Firehose * `datadog` - Datadog * `qradar` - IBM QRadar * `azure_monitor` - Azure Monitor * `azure_blob_storage` - Azure Blob Storage + Type string `json:"type"` + Attributes Output2 `json:"attributes"` +} + +type _Output Output + +// NewOutput instantiates a new Output object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOutput(type_ string, attributes Output2) *Output { + this := Output{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewOutputWithDefaults instantiates a new Output object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOutputWithDefaults() *Output { + this := Output{} + return &this +} + +// GetType returns the Type field value +func (o *Output) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Output) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Output) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *Output) GetAttributes() Output2 { + if o == nil { + var ret Output2 + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *Output) GetAttributesOk() (*Output2, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *Output) SetAttributes(v Output2) { + o.Attributes = v +} + +func (o Output) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Output) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *Output) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOutput := _Output{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOutput) + + if err != nil { + return err + } + + *o = Output(varOutput) + + return err +} + +type NullableOutput struct { + value *Output + isSet bool +} + +func (v NullableOutput) Get() *Output { + return v.value +} + +func (v *NullableOutput) Set(val *Output) { + v.value = val + v.isSet = true +} + +func (v NullableOutput) IsSet() bool { + return v.isSet +} + +func (v *NullableOutput) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOutput(val *Output) *NullableOutput { + return &NullableOutput{value: val, isSet: true} +} + +func (v NullableOutput) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOutput) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_output2.go b/azion-api/model_output2.go new file mode 100644 index 0000000..0f5d6d6 --- /dev/null +++ b/azion-api/model_output2.go @@ -0,0 +1,514 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// Output2 - struct for Output2 +type Output2 struct { + AWSKinesisFirehoseEndpoint *AWSKinesisFirehoseEndpoint + AzureBlobStorageEndpoint *AzureBlobStorageEndpoint + AzureMonitorEndpoint *AzureMonitorEndpoint + BigQueryEndpoint *BigQueryEndpoint + DatadogEndpoint *DatadogEndpoint + ElasticsearchEndpoint *ElasticsearchEndpoint + HttpPostEndpoint *HttpPostEndpoint + KafkaEndpoint *KafkaEndpoint + QRadarEndpoint *QRadarEndpoint + S3Endpoint *S3Endpoint + SplunkEndpoint *SplunkEndpoint +} + +// AWSKinesisFirehoseEndpointAsOutput2 is a convenience function that returns AWSKinesisFirehoseEndpoint wrapped in Output2 +func AWSKinesisFirehoseEndpointAsOutput2(v *AWSKinesisFirehoseEndpoint) Output2 { + return Output2{ + AWSKinesisFirehoseEndpoint: v, + } +} + +// AzureBlobStorageEndpointAsOutput2 is a convenience function that returns AzureBlobStorageEndpoint wrapped in Output2 +func AzureBlobStorageEndpointAsOutput2(v *AzureBlobStorageEndpoint) Output2 { + return Output2{ + AzureBlobStorageEndpoint: v, + } +} + +// AzureMonitorEndpointAsOutput2 is a convenience function that returns AzureMonitorEndpoint wrapped in Output2 +func AzureMonitorEndpointAsOutput2(v *AzureMonitorEndpoint) Output2 { + return Output2{ + AzureMonitorEndpoint: v, + } +} + +// BigQueryEndpointAsOutput2 is a convenience function that returns BigQueryEndpoint wrapped in Output2 +func BigQueryEndpointAsOutput2(v *BigQueryEndpoint) Output2 { + return Output2{ + BigQueryEndpoint: v, + } +} + +// DatadogEndpointAsOutput2 is a convenience function that returns DatadogEndpoint wrapped in Output2 +func DatadogEndpointAsOutput2(v *DatadogEndpoint) Output2 { + return Output2{ + DatadogEndpoint: v, + } +} + +// ElasticsearchEndpointAsOutput2 is a convenience function that returns ElasticsearchEndpoint wrapped in Output2 +func ElasticsearchEndpointAsOutput2(v *ElasticsearchEndpoint) Output2 { + return Output2{ + ElasticsearchEndpoint: v, + } +} + +// HttpPostEndpointAsOutput2 is a convenience function that returns HttpPostEndpoint wrapped in Output2 +func HttpPostEndpointAsOutput2(v *HttpPostEndpoint) Output2 { + return Output2{ + HttpPostEndpoint: v, + } +} + +// KafkaEndpointAsOutput2 is a convenience function that returns KafkaEndpoint wrapped in Output2 +func KafkaEndpointAsOutput2(v *KafkaEndpoint) Output2 { + return Output2{ + KafkaEndpoint: v, + } +} + +// QRadarEndpointAsOutput2 is a convenience function that returns QRadarEndpoint wrapped in Output2 +func QRadarEndpointAsOutput2(v *QRadarEndpoint) Output2 { + return Output2{ + QRadarEndpoint: v, + } +} + +// S3EndpointAsOutput2 is a convenience function that returns S3Endpoint wrapped in Output2 +func S3EndpointAsOutput2(v *S3Endpoint) Output2 { + return Output2{ + S3Endpoint: v, + } +} + +// SplunkEndpointAsOutput2 is a convenience function that returns SplunkEndpoint wrapped in Output2 +func SplunkEndpointAsOutput2(v *SplunkEndpoint) Output2 { + return Output2{ + SplunkEndpoint: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Output2) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into AWSKinesisFirehoseEndpoint + err = newStrictDecoder(data).Decode(&dst.AWSKinesisFirehoseEndpoint) + if err == nil { + jsonAWSKinesisFirehoseEndpoint, _ := json.Marshal(dst.AWSKinesisFirehoseEndpoint) + if string(jsonAWSKinesisFirehoseEndpoint) == "{}" { // empty struct + dst.AWSKinesisFirehoseEndpoint = nil + } else { + if err = validator.Validate(dst.AWSKinesisFirehoseEndpoint); err != nil { + dst.AWSKinesisFirehoseEndpoint = nil + } else { + match++ + } + } + } else { + dst.AWSKinesisFirehoseEndpoint = nil + } + + // try to unmarshal data into AzureBlobStorageEndpoint + err = newStrictDecoder(data).Decode(&dst.AzureBlobStorageEndpoint) + if err == nil { + jsonAzureBlobStorageEndpoint, _ := json.Marshal(dst.AzureBlobStorageEndpoint) + if string(jsonAzureBlobStorageEndpoint) == "{}" { // empty struct + dst.AzureBlobStorageEndpoint = nil + } else { + if err = validator.Validate(dst.AzureBlobStorageEndpoint); err != nil { + dst.AzureBlobStorageEndpoint = nil + } else { + match++ + } + } + } else { + dst.AzureBlobStorageEndpoint = nil + } + + // try to unmarshal data into AzureMonitorEndpoint + err = newStrictDecoder(data).Decode(&dst.AzureMonitorEndpoint) + if err == nil { + jsonAzureMonitorEndpoint, _ := json.Marshal(dst.AzureMonitorEndpoint) + if string(jsonAzureMonitorEndpoint) == "{}" { // empty struct + dst.AzureMonitorEndpoint = nil + } else { + if err = validator.Validate(dst.AzureMonitorEndpoint); err != nil { + dst.AzureMonitorEndpoint = nil + } else { + match++ + } + } + } else { + dst.AzureMonitorEndpoint = nil + } + + // try to unmarshal data into BigQueryEndpoint + err = newStrictDecoder(data).Decode(&dst.BigQueryEndpoint) + if err == nil { + jsonBigQueryEndpoint, _ := json.Marshal(dst.BigQueryEndpoint) + if string(jsonBigQueryEndpoint) == "{}" { // empty struct + dst.BigQueryEndpoint = nil + } else { + if err = validator.Validate(dst.BigQueryEndpoint); err != nil { + dst.BigQueryEndpoint = nil + } else { + match++ + } + } + } else { + dst.BigQueryEndpoint = nil + } + + // try to unmarshal data into DatadogEndpoint + err = newStrictDecoder(data).Decode(&dst.DatadogEndpoint) + if err == nil { + jsonDatadogEndpoint, _ := json.Marshal(dst.DatadogEndpoint) + if string(jsonDatadogEndpoint) == "{}" { // empty struct + dst.DatadogEndpoint = nil + } else { + if err = validator.Validate(dst.DatadogEndpoint); err != nil { + dst.DatadogEndpoint = nil + } else { + match++ + } + } + } else { + dst.DatadogEndpoint = nil + } + + // try to unmarshal data into ElasticsearchEndpoint + err = newStrictDecoder(data).Decode(&dst.ElasticsearchEndpoint) + if err == nil { + jsonElasticsearchEndpoint, _ := json.Marshal(dst.ElasticsearchEndpoint) + if string(jsonElasticsearchEndpoint) == "{}" { // empty struct + dst.ElasticsearchEndpoint = nil + } else { + if err = validator.Validate(dst.ElasticsearchEndpoint); err != nil { + dst.ElasticsearchEndpoint = nil + } else { + match++ + } + } + } else { + dst.ElasticsearchEndpoint = nil + } + + // try to unmarshal data into HttpPostEndpoint + err = newStrictDecoder(data).Decode(&dst.HttpPostEndpoint) + if err == nil { + jsonHttpPostEndpoint, _ := json.Marshal(dst.HttpPostEndpoint) + if string(jsonHttpPostEndpoint) == "{}" { // empty struct + dst.HttpPostEndpoint = nil + } else { + if err = validator.Validate(dst.HttpPostEndpoint); err != nil { + dst.HttpPostEndpoint = nil + } else { + match++ + } + } + } else { + dst.HttpPostEndpoint = nil + } + + // try to unmarshal data into KafkaEndpoint + err = newStrictDecoder(data).Decode(&dst.KafkaEndpoint) + if err == nil { + jsonKafkaEndpoint, _ := json.Marshal(dst.KafkaEndpoint) + if string(jsonKafkaEndpoint) == "{}" { // empty struct + dst.KafkaEndpoint = nil + } else { + if err = validator.Validate(dst.KafkaEndpoint); err != nil { + dst.KafkaEndpoint = nil + } else { + match++ + } + } + } else { + dst.KafkaEndpoint = nil + } + + // try to unmarshal data into QRadarEndpoint + err = newStrictDecoder(data).Decode(&dst.QRadarEndpoint) + if err == nil { + jsonQRadarEndpoint, _ := json.Marshal(dst.QRadarEndpoint) + if string(jsonQRadarEndpoint) == "{}" { // empty struct + dst.QRadarEndpoint = nil + } else { + if err = validator.Validate(dst.QRadarEndpoint); err != nil { + dst.QRadarEndpoint = nil + } else { + match++ + } + } + } else { + dst.QRadarEndpoint = nil + } + + // try to unmarshal data into S3Endpoint + err = newStrictDecoder(data).Decode(&dst.S3Endpoint) + if err == nil { + jsonS3Endpoint, _ := json.Marshal(dst.S3Endpoint) + if string(jsonS3Endpoint) == "{}" { // empty struct + dst.S3Endpoint = nil + } else { + if err = validator.Validate(dst.S3Endpoint); err != nil { + dst.S3Endpoint = nil + } else { + match++ + } + } + } else { + dst.S3Endpoint = nil + } + + // try to unmarshal data into SplunkEndpoint + err = newStrictDecoder(data).Decode(&dst.SplunkEndpoint) + if err == nil { + jsonSplunkEndpoint, _ := json.Marshal(dst.SplunkEndpoint) + if string(jsonSplunkEndpoint) == "{}" { // empty struct + dst.SplunkEndpoint = nil + } else { + if err = validator.Validate(dst.SplunkEndpoint); err != nil { + dst.SplunkEndpoint = nil + } else { + match++ + } + } + } else { + dst.SplunkEndpoint = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.AWSKinesisFirehoseEndpoint = nil + dst.AzureBlobStorageEndpoint = nil + dst.AzureMonitorEndpoint = nil + dst.BigQueryEndpoint = nil + dst.DatadogEndpoint = nil + dst.ElasticsearchEndpoint = nil + dst.HttpPostEndpoint = nil + dst.KafkaEndpoint = nil + dst.QRadarEndpoint = nil + dst.S3Endpoint = nil + dst.SplunkEndpoint = nil + + return fmt.Errorf("data matches more than one schema in oneOf(Output2)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(Output2)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Output2) MarshalJSON() ([]byte, error) { + if src.AWSKinesisFirehoseEndpoint != nil { + return json.Marshal(&src.AWSKinesisFirehoseEndpoint) + } + + if src.AzureBlobStorageEndpoint != nil { + return json.Marshal(&src.AzureBlobStorageEndpoint) + } + + if src.AzureMonitorEndpoint != nil { + return json.Marshal(&src.AzureMonitorEndpoint) + } + + if src.BigQueryEndpoint != nil { + return json.Marshal(&src.BigQueryEndpoint) + } + + if src.DatadogEndpoint != nil { + return json.Marshal(&src.DatadogEndpoint) + } + + if src.ElasticsearchEndpoint != nil { + return json.Marshal(&src.ElasticsearchEndpoint) + } + + if src.HttpPostEndpoint != nil { + return json.Marshal(&src.HttpPostEndpoint) + } + + if src.KafkaEndpoint != nil { + return json.Marshal(&src.KafkaEndpoint) + } + + if src.QRadarEndpoint != nil { + return json.Marshal(&src.QRadarEndpoint) + } + + if src.S3Endpoint != nil { + return json.Marshal(&src.S3Endpoint) + } + + if src.SplunkEndpoint != nil { + return json.Marshal(&src.SplunkEndpoint) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Output2) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.AWSKinesisFirehoseEndpoint != nil { + return obj.AWSKinesisFirehoseEndpoint + } + + if obj.AzureBlobStorageEndpoint != nil { + return obj.AzureBlobStorageEndpoint + } + + if obj.AzureMonitorEndpoint != nil { + return obj.AzureMonitorEndpoint + } + + if obj.BigQueryEndpoint != nil { + return obj.BigQueryEndpoint + } + + if obj.DatadogEndpoint != nil { + return obj.DatadogEndpoint + } + + if obj.ElasticsearchEndpoint != nil { + return obj.ElasticsearchEndpoint + } + + if obj.HttpPostEndpoint != nil { + return obj.HttpPostEndpoint + } + + if obj.KafkaEndpoint != nil { + return obj.KafkaEndpoint + } + + if obj.QRadarEndpoint != nil { + return obj.QRadarEndpoint + } + + if obj.S3Endpoint != nil { + return obj.S3Endpoint + } + + if obj.SplunkEndpoint != nil { + return obj.SplunkEndpoint + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj Output2) GetActualInstanceValue() (interface{}) { + if obj.AWSKinesisFirehoseEndpoint != nil { + return *obj.AWSKinesisFirehoseEndpoint + } + + if obj.AzureBlobStorageEndpoint != nil { + return *obj.AzureBlobStorageEndpoint + } + + if obj.AzureMonitorEndpoint != nil { + return *obj.AzureMonitorEndpoint + } + + if obj.BigQueryEndpoint != nil { + return *obj.BigQueryEndpoint + } + + if obj.DatadogEndpoint != nil { + return *obj.DatadogEndpoint + } + + if obj.ElasticsearchEndpoint != nil { + return *obj.ElasticsearchEndpoint + } + + if obj.HttpPostEndpoint != nil { + return *obj.HttpPostEndpoint + } + + if obj.KafkaEndpoint != nil { + return *obj.KafkaEndpoint + } + + if obj.QRadarEndpoint != nil { + return *obj.QRadarEndpoint + } + + if obj.S3Endpoint != nil { + return *obj.S3Endpoint + } + + if obj.SplunkEndpoint != nil { + return *obj.SplunkEndpoint + } + + // all schemas are nil + return nil +} + +type NullableOutput2 struct { + value *Output2 + isSet bool +} + +func (v NullableOutput2) Get() *Output2 { + return v.value +} + +func (v *NullableOutput2) Set(val *Output2) { + v.value = val + v.isSet = true +} + +func (v NullableOutput2) IsSet() bool { + return v.isSet +} + +func (v *NullableOutput2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOutput2(val *Output2) *NullableOutput2 { + return &NullableOutput2{value: val, isSet: true} +} + +func (v NullableOutput2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOutput2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_output_request.go b/azion-api/model_output_request.go new file mode 100644 index 0000000..e5618f5 --- /dev/null +++ b/azion-api/model_output_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the OutputRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OutputRequest{} + +// OutputRequest struct for OutputRequest +type OutputRequest struct { + // * `standard` - Standard HTTP/HTTPS POST * `kafka` - Apache Kafka * `s3` - Simple Storage Service (S3) * `big_query` - Google BigQuery * `elasticsearch` - Elasticsearch * `splunk` - Splunk * `aws_kinesis_firehose` - AWS Kinesis Data Firehose * `datadog` - Datadog * `qradar` - IBM QRadar * `azure_monitor` - Azure Monitor * `azure_blob_storage` - Azure Blob Storage + Type string `json:"type"` + Attributes OutputRequest2 `json:"attributes"` +} + +type _OutputRequest OutputRequest + +// NewOutputRequest instantiates a new OutputRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOutputRequest(type_ string, attributes OutputRequest2) *OutputRequest { + this := OutputRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewOutputRequestWithDefaults instantiates a new OutputRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOutputRequestWithDefaults() *OutputRequest { + this := OutputRequest{} + return &this +} + +// GetType returns the Type field value +func (o *OutputRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *OutputRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *OutputRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *OutputRequest) GetAttributes() OutputRequest2 { + if o == nil { + var ret OutputRequest2 + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *OutputRequest) GetAttributesOk() (*OutputRequest2, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *OutputRequest) SetAttributes(v OutputRequest2) { + o.Attributes = v +} + +func (o OutputRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OutputRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *OutputRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOutputRequest := _OutputRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varOutputRequest) + + if err != nil { + return err + } + + *o = OutputRequest(varOutputRequest) + + return err +} + +type NullableOutputRequest struct { + value *OutputRequest + isSet bool +} + +func (v NullableOutputRequest) Get() *OutputRequest { + return v.value +} + +func (v *NullableOutputRequest) Set(val *OutputRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOutputRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOutputRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOutputRequest(val *OutputRequest) *NullableOutputRequest { + return &NullableOutputRequest{value: val, isSet: true} +} + +func (v NullableOutputRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOutputRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_output_request2.go b/azion-api/model_output_request2.go new file mode 100644 index 0000000..a1d55dd --- /dev/null +++ b/azion-api/model_output_request2.go @@ -0,0 +1,514 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// OutputRequest2 - struct for OutputRequest2 +type OutputRequest2 struct { + AWSKinesisFirehoseEndpointRequest *AWSKinesisFirehoseEndpointRequest + AzureBlobStorageEndpointRequest *AzureBlobStorageEndpointRequest + AzureMonitorEndpointRequest *AzureMonitorEndpointRequest + BigQueryEndpointRequest *BigQueryEndpointRequest + DatadogEndpointRequest *DatadogEndpointRequest + ElasticsearchEndpointRequest *ElasticsearchEndpointRequest + HttpPostEndpointRequest *HttpPostEndpointRequest + KafkaEndpointRequest *KafkaEndpointRequest + QRadarEndpointRequest *QRadarEndpointRequest + S3EndpointRequest *S3EndpointRequest + SplunkEndpointRequest *SplunkEndpointRequest +} + +// AWSKinesisFirehoseEndpointRequestAsOutputRequest2 is a convenience function that returns AWSKinesisFirehoseEndpointRequest wrapped in OutputRequest2 +func AWSKinesisFirehoseEndpointRequestAsOutputRequest2(v *AWSKinesisFirehoseEndpointRequest) OutputRequest2 { + return OutputRequest2{ + AWSKinesisFirehoseEndpointRequest: v, + } +} + +// AzureBlobStorageEndpointRequestAsOutputRequest2 is a convenience function that returns AzureBlobStorageEndpointRequest wrapped in OutputRequest2 +func AzureBlobStorageEndpointRequestAsOutputRequest2(v *AzureBlobStorageEndpointRequest) OutputRequest2 { + return OutputRequest2{ + AzureBlobStorageEndpointRequest: v, + } +} + +// AzureMonitorEndpointRequestAsOutputRequest2 is a convenience function that returns AzureMonitorEndpointRequest wrapped in OutputRequest2 +func AzureMonitorEndpointRequestAsOutputRequest2(v *AzureMonitorEndpointRequest) OutputRequest2 { + return OutputRequest2{ + AzureMonitorEndpointRequest: v, + } +} + +// BigQueryEndpointRequestAsOutputRequest2 is a convenience function that returns BigQueryEndpointRequest wrapped in OutputRequest2 +func BigQueryEndpointRequestAsOutputRequest2(v *BigQueryEndpointRequest) OutputRequest2 { + return OutputRequest2{ + BigQueryEndpointRequest: v, + } +} + +// DatadogEndpointRequestAsOutputRequest2 is a convenience function that returns DatadogEndpointRequest wrapped in OutputRequest2 +func DatadogEndpointRequestAsOutputRequest2(v *DatadogEndpointRequest) OutputRequest2 { + return OutputRequest2{ + DatadogEndpointRequest: v, + } +} + +// ElasticsearchEndpointRequestAsOutputRequest2 is a convenience function that returns ElasticsearchEndpointRequest wrapped in OutputRequest2 +func ElasticsearchEndpointRequestAsOutputRequest2(v *ElasticsearchEndpointRequest) OutputRequest2 { + return OutputRequest2{ + ElasticsearchEndpointRequest: v, + } +} + +// HttpPostEndpointRequestAsOutputRequest2 is a convenience function that returns HttpPostEndpointRequest wrapped in OutputRequest2 +func HttpPostEndpointRequestAsOutputRequest2(v *HttpPostEndpointRequest) OutputRequest2 { + return OutputRequest2{ + HttpPostEndpointRequest: v, + } +} + +// KafkaEndpointRequestAsOutputRequest2 is a convenience function that returns KafkaEndpointRequest wrapped in OutputRequest2 +func KafkaEndpointRequestAsOutputRequest2(v *KafkaEndpointRequest) OutputRequest2 { + return OutputRequest2{ + KafkaEndpointRequest: v, + } +} + +// QRadarEndpointRequestAsOutputRequest2 is a convenience function that returns QRadarEndpointRequest wrapped in OutputRequest2 +func QRadarEndpointRequestAsOutputRequest2(v *QRadarEndpointRequest) OutputRequest2 { + return OutputRequest2{ + QRadarEndpointRequest: v, + } +} + +// S3EndpointRequestAsOutputRequest2 is a convenience function that returns S3EndpointRequest wrapped in OutputRequest2 +func S3EndpointRequestAsOutputRequest2(v *S3EndpointRequest) OutputRequest2 { + return OutputRequest2{ + S3EndpointRequest: v, + } +} + +// SplunkEndpointRequestAsOutputRequest2 is a convenience function that returns SplunkEndpointRequest wrapped in OutputRequest2 +func SplunkEndpointRequestAsOutputRequest2(v *SplunkEndpointRequest) OutputRequest2 { + return OutputRequest2{ + SplunkEndpointRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *OutputRequest2) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into AWSKinesisFirehoseEndpointRequest + err = newStrictDecoder(data).Decode(&dst.AWSKinesisFirehoseEndpointRequest) + if err == nil { + jsonAWSKinesisFirehoseEndpointRequest, _ := json.Marshal(dst.AWSKinesisFirehoseEndpointRequest) + if string(jsonAWSKinesisFirehoseEndpointRequest) == "{}" { // empty struct + dst.AWSKinesisFirehoseEndpointRequest = nil + } else { + if err = validator.Validate(dst.AWSKinesisFirehoseEndpointRequest); err != nil { + dst.AWSKinesisFirehoseEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.AWSKinesisFirehoseEndpointRequest = nil + } + + // try to unmarshal data into AzureBlobStorageEndpointRequest + err = newStrictDecoder(data).Decode(&dst.AzureBlobStorageEndpointRequest) + if err == nil { + jsonAzureBlobStorageEndpointRequest, _ := json.Marshal(dst.AzureBlobStorageEndpointRequest) + if string(jsonAzureBlobStorageEndpointRequest) == "{}" { // empty struct + dst.AzureBlobStorageEndpointRequest = nil + } else { + if err = validator.Validate(dst.AzureBlobStorageEndpointRequest); err != nil { + dst.AzureBlobStorageEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.AzureBlobStorageEndpointRequest = nil + } + + // try to unmarshal data into AzureMonitorEndpointRequest + err = newStrictDecoder(data).Decode(&dst.AzureMonitorEndpointRequest) + if err == nil { + jsonAzureMonitorEndpointRequest, _ := json.Marshal(dst.AzureMonitorEndpointRequest) + if string(jsonAzureMonitorEndpointRequest) == "{}" { // empty struct + dst.AzureMonitorEndpointRequest = nil + } else { + if err = validator.Validate(dst.AzureMonitorEndpointRequest); err != nil { + dst.AzureMonitorEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.AzureMonitorEndpointRequest = nil + } + + // try to unmarshal data into BigQueryEndpointRequest + err = newStrictDecoder(data).Decode(&dst.BigQueryEndpointRequest) + if err == nil { + jsonBigQueryEndpointRequest, _ := json.Marshal(dst.BigQueryEndpointRequest) + if string(jsonBigQueryEndpointRequest) == "{}" { // empty struct + dst.BigQueryEndpointRequest = nil + } else { + if err = validator.Validate(dst.BigQueryEndpointRequest); err != nil { + dst.BigQueryEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.BigQueryEndpointRequest = nil + } + + // try to unmarshal data into DatadogEndpointRequest + err = newStrictDecoder(data).Decode(&dst.DatadogEndpointRequest) + if err == nil { + jsonDatadogEndpointRequest, _ := json.Marshal(dst.DatadogEndpointRequest) + if string(jsonDatadogEndpointRequest) == "{}" { // empty struct + dst.DatadogEndpointRequest = nil + } else { + if err = validator.Validate(dst.DatadogEndpointRequest); err != nil { + dst.DatadogEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.DatadogEndpointRequest = nil + } + + // try to unmarshal data into ElasticsearchEndpointRequest + err = newStrictDecoder(data).Decode(&dst.ElasticsearchEndpointRequest) + if err == nil { + jsonElasticsearchEndpointRequest, _ := json.Marshal(dst.ElasticsearchEndpointRequest) + if string(jsonElasticsearchEndpointRequest) == "{}" { // empty struct + dst.ElasticsearchEndpointRequest = nil + } else { + if err = validator.Validate(dst.ElasticsearchEndpointRequest); err != nil { + dst.ElasticsearchEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.ElasticsearchEndpointRequest = nil + } + + // try to unmarshal data into HttpPostEndpointRequest + err = newStrictDecoder(data).Decode(&dst.HttpPostEndpointRequest) + if err == nil { + jsonHttpPostEndpointRequest, _ := json.Marshal(dst.HttpPostEndpointRequest) + if string(jsonHttpPostEndpointRequest) == "{}" { // empty struct + dst.HttpPostEndpointRequest = nil + } else { + if err = validator.Validate(dst.HttpPostEndpointRequest); err != nil { + dst.HttpPostEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.HttpPostEndpointRequest = nil + } + + // try to unmarshal data into KafkaEndpointRequest + err = newStrictDecoder(data).Decode(&dst.KafkaEndpointRequest) + if err == nil { + jsonKafkaEndpointRequest, _ := json.Marshal(dst.KafkaEndpointRequest) + if string(jsonKafkaEndpointRequest) == "{}" { // empty struct + dst.KafkaEndpointRequest = nil + } else { + if err = validator.Validate(dst.KafkaEndpointRequest); err != nil { + dst.KafkaEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.KafkaEndpointRequest = nil + } + + // try to unmarshal data into QRadarEndpointRequest + err = newStrictDecoder(data).Decode(&dst.QRadarEndpointRequest) + if err == nil { + jsonQRadarEndpointRequest, _ := json.Marshal(dst.QRadarEndpointRequest) + if string(jsonQRadarEndpointRequest) == "{}" { // empty struct + dst.QRadarEndpointRequest = nil + } else { + if err = validator.Validate(dst.QRadarEndpointRequest); err != nil { + dst.QRadarEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.QRadarEndpointRequest = nil + } + + // try to unmarshal data into S3EndpointRequest + err = newStrictDecoder(data).Decode(&dst.S3EndpointRequest) + if err == nil { + jsonS3EndpointRequest, _ := json.Marshal(dst.S3EndpointRequest) + if string(jsonS3EndpointRequest) == "{}" { // empty struct + dst.S3EndpointRequest = nil + } else { + if err = validator.Validate(dst.S3EndpointRequest); err != nil { + dst.S3EndpointRequest = nil + } else { + match++ + } + } + } else { + dst.S3EndpointRequest = nil + } + + // try to unmarshal data into SplunkEndpointRequest + err = newStrictDecoder(data).Decode(&dst.SplunkEndpointRequest) + if err == nil { + jsonSplunkEndpointRequest, _ := json.Marshal(dst.SplunkEndpointRequest) + if string(jsonSplunkEndpointRequest) == "{}" { // empty struct + dst.SplunkEndpointRequest = nil + } else { + if err = validator.Validate(dst.SplunkEndpointRequest); err != nil { + dst.SplunkEndpointRequest = nil + } else { + match++ + } + } + } else { + dst.SplunkEndpointRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.AWSKinesisFirehoseEndpointRequest = nil + dst.AzureBlobStorageEndpointRequest = nil + dst.AzureMonitorEndpointRequest = nil + dst.BigQueryEndpointRequest = nil + dst.DatadogEndpointRequest = nil + dst.ElasticsearchEndpointRequest = nil + dst.HttpPostEndpointRequest = nil + dst.KafkaEndpointRequest = nil + dst.QRadarEndpointRequest = nil + dst.S3EndpointRequest = nil + dst.SplunkEndpointRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(OutputRequest2)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(OutputRequest2)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src OutputRequest2) MarshalJSON() ([]byte, error) { + if src.AWSKinesisFirehoseEndpointRequest != nil { + return json.Marshal(&src.AWSKinesisFirehoseEndpointRequest) + } + + if src.AzureBlobStorageEndpointRequest != nil { + return json.Marshal(&src.AzureBlobStorageEndpointRequest) + } + + if src.AzureMonitorEndpointRequest != nil { + return json.Marshal(&src.AzureMonitorEndpointRequest) + } + + if src.BigQueryEndpointRequest != nil { + return json.Marshal(&src.BigQueryEndpointRequest) + } + + if src.DatadogEndpointRequest != nil { + return json.Marshal(&src.DatadogEndpointRequest) + } + + if src.ElasticsearchEndpointRequest != nil { + return json.Marshal(&src.ElasticsearchEndpointRequest) + } + + if src.HttpPostEndpointRequest != nil { + return json.Marshal(&src.HttpPostEndpointRequest) + } + + if src.KafkaEndpointRequest != nil { + return json.Marshal(&src.KafkaEndpointRequest) + } + + if src.QRadarEndpointRequest != nil { + return json.Marshal(&src.QRadarEndpointRequest) + } + + if src.S3EndpointRequest != nil { + return json.Marshal(&src.S3EndpointRequest) + } + + if src.SplunkEndpointRequest != nil { + return json.Marshal(&src.SplunkEndpointRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *OutputRequest2) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.AWSKinesisFirehoseEndpointRequest != nil { + return obj.AWSKinesisFirehoseEndpointRequest + } + + if obj.AzureBlobStorageEndpointRequest != nil { + return obj.AzureBlobStorageEndpointRequest + } + + if obj.AzureMonitorEndpointRequest != nil { + return obj.AzureMonitorEndpointRequest + } + + if obj.BigQueryEndpointRequest != nil { + return obj.BigQueryEndpointRequest + } + + if obj.DatadogEndpointRequest != nil { + return obj.DatadogEndpointRequest + } + + if obj.ElasticsearchEndpointRequest != nil { + return obj.ElasticsearchEndpointRequest + } + + if obj.HttpPostEndpointRequest != nil { + return obj.HttpPostEndpointRequest + } + + if obj.KafkaEndpointRequest != nil { + return obj.KafkaEndpointRequest + } + + if obj.QRadarEndpointRequest != nil { + return obj.QRadarEndpointRequest + } + + if obj.S3EndpointRequest != nil { + return obj.S3EndpointRequest + } + + if obj.SplunkEndpointRequest != nil { + return obj.SplunkEndpointRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj OutputRequest2) GetActualInstanceValue() (interface{}) { + if obj.AWSKinesisFirehoseEndpointRequest != nil { + return *obj.AWSKinesisFirehoseEndpointRequest + } + + if obj.AzureBlobStorageEndpointRequest != nil { + return *obj.AzureBlobStorageEndpointRequest + } + + if obj.AzureMonitorEndpointRequest != nil { + return *obj.AzureMonitorEndpointRequest + } + + if obj.BigQueryEndpointRequest != nil { + return *obj.BigQueryEndpointRequest + } + + if obj.DatadogEndpointRequest != nil { + return *obj.DatadogEndpointRequest + } + + if obj.ElasticsearchEndpointRequest != nil { + return *obj.ElasticsearchEndpointRequest + } + + if obj.HttpPostEndpointRequest != nil { + return *obj.HttpPostEndpointRequest + } + + if obj.KafkaEndpointRequest != nil { + return *obj.KafkaEndpointRequest + } + + if obj.QRadarEndpointRequest != nil { + return *obj.QRadarEndpointRequest + } + + if obj.S3EndpointRequest != nil { + return *obj.S3EndpointRequest + } + + if obj.SplunkEndpointRequest != nil { + return *obj.SplunkEndpointRequest + } + + // all schemas are nil + return nil +} + +type NullableOutputRequest2 struct { + value *OutputRequest2 + isSet bool +} + +func (v NullableOutputRequest2) Get() *OutputRequest2 { + return v.value +} + +func (v *NullableOutputRequest2) Set(val *OutputRequest2) { + v.value = val + v.isSet = true +} + +func (v NullableOutputRequest2) IsSet() bool { + return v.isSet +} + +func (v *NullableOutputRequest2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOutputRequest2(val *OutputRequest2) *NullableOutputRequest2 { + return &NullableOutputRequest2{value: val, isSet: true} +} + +func (v NullableOutputRequest2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOutputRequest2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_page.go b/azion-api/model_page.go new file mode 100644 index 0000000..5ae130c --- /dev/null +++ b/azion-api/model_page.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Page type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Page{} + +// Page struct for Page +type Page struct { + // * `default` - default * `400` - Bad Request * `401` - Unauthorized * `403` - Forbidden * `404` - Not Found * `405` - Method Not Allowed * `406` - Not Acceptable * `408` - Request Timeout * `409` - Conflict * `410` - Gone * `411` - Length Required * `414` - URI Too Long * `415` - Unsupported Media Type * `416` - Range Not Satisfiable * `426` - Upgrade Required * `429` - Too Many Requests * `431` - Request Header Fields Too Large * `500` - Internal Server Error * `501` - Not Implemented * `502` - Bad Gateway * `503` - Service Unavailable * `504` - Gateway Timeout * `505` - HTTP Version Not Supported + Code string `json:"code"` + Page PageConnector `json:"page"` +} + +type _Page Page + +// NewPage instantiates a new Page object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPage(code string, page PageConnector) *Page { + this := Page{} + this.Code = code + this.Page = page + return &this +} + +// NewPageWithDefaults instantiates a new Page object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPageWithDefaults() *Page { + this := Page{} + return &this +} + +// GetCode returns the Code field value +func (o *Page) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *Page) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *Page) SetCode(v string) { + o.Code = v +} + +// GetPage returns the Page field value +func (o *Page) GetPage() PageConnector { + if o == nil { + var ret PageConnector + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *Page) GetPageOk() (*PageConnector, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *Page) SetPage(v PageConnector) { + o.Page = v +} + +func (o Page) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Page) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["page"] = o.Page + return toSerialize, nil +} + +func (o *Page) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "page", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPage := _Page{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPage) + + if err != nil { + return err + } + + *o = Page(varPage) + + return err +} + +type NullablePage struct { + value *Page + isSet bool +} + +func (v NullablePage) Get() *Page { + return v.value +} + +func (v *NullablePage) Set(val *Page) { + v.value = val + v.isSet = true +} + +func (v NullablePage) IsSet() bool { + return v.isSet +} + +func (v *NullablePage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePage(val *Page) *NullablePage { + return &NullablePage{value: val, isSet: true} +} + +func (v NullablePage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_page_connector.go b/azion-api/model_page_connector.go new file mode 100644 index 0000000..c96deec --- /dev/null +++ b/azion-api/model_page_connector.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PageConnector type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageConnector{} + +// PageConnector struct for PageConnector +type PageConnector struct { + Type string `json:"type"` + Attributes PageConnectorAttributes `json:"attributes"` +} + +type _PageConnector PageConnector + +// NewPageConnector instantiates a new PageConnector object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPageConnector(type_ string, attributes PageConnectorAttributes) *PageConnector { + this := PageConnector{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewPageConnectorWithDefaults instantiates a new PageConnector object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPageConnectorWithDefaults() *PageConnector { + this := PageConnector{} + return &this +} + +// GetType returns the Type field value +func (o *PageConnector) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PageConnector) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PageConnector) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *PageConnector) GetAttributes() PageConnectorAttributes { + if o == nil { + var ret PageConnectorAttributes + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *PageConnector) GetAttributesOk() (*PageConnectorAttributes, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *PageConnector) SetAttributes(v PageConnectorAttributes) { + o.Attributes = v +} + +func (o PageConnector) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageConnector) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *PageConnector) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPageConnector := _PageConnector{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPageConnector) + + if err != nil { + return err + } + + *o = PageConnector(varPageConnector) + + return err +} + +type NullablePageConnector struct { + value *PageConnector + isSet bool +} + +func (v NullablePageConnector) Get() *PageConnector { + return v.value +} + +func (v *NullablePageConnector) Set(val *PageConnector) { + v.value = val + v.isSet = true +} + +func (v NullablePageConnector) IsSet() bool { + return v.isSet +} + +func (v *NullablePageConnector) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageConnector(val *PageConnector) *NullablePageConnector { + return &NullablePageConnector{value: val, isSet: true} +} + +func (v NullablePageConnector) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageConnector) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_page_connector_attributes.go b/azion-api/model_page_connector_attributes.go new file mode 100644 index 0000000..a8566a0 --- /dev/null +++ b/azion-api/model_page_connector_attributes.go @@ -0,0 +1,287 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PageConnectorAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageConnectorAttributes{} + +// PageConnectorAttributes struct for PageConnectorAttributes +type PageConnectorAttributes struct { + Connector int64 `json:"connector"` + Ttl *int64 `json:"ttl,omitempty"` + Uri NullableString `json:"uri,omitempty"` + CustomStatusCode NullableInt64 `json:"custom_status_code,omitempty"` +} + +type _PageConnectorAttributes PageConnectorAttributes + +// NewPageConnectorAttributes instantiates a new PageConnectorAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPageConnectorAttributes(connector int64) *PageConnectorAttributes { + this := PageConnectorAttributes{} + this.Connector = connector + return &this +} + +// NewPageConnectorAttributesWithDefaults instantiates a new PageConnectorAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPageConnectorAttributesWithDefaults() *PageConnectorAttributes { + this := PageConnectorAttributes{} + return &this +} + +// GetConnector returns the Connector field value +func (o *PageConnectorAttributes) GetConnector() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Connector +} + +// GetConnectorOk returns a tuple with the Connector field value +// and a boolean to check if the value has been set. +func (o *PageConnectorAttributes) GetConnectorOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Connector, true +} + +// SetConnector sets field value +func (o *PageConnectorAttributes) SetConnector(v int64) { + o.Connector = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *PageConnectorAttributes) GetTtl() int64 { + if o == nil || IsNil(o.Ttl) { + var ret int64 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageConnectorAttributes) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *PageConnectorAttributes) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *PageConnectorAttributes) SetTtl(v int64) { + o.Ttl = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageConnectorAttributes) GetUri() string { + if o == nil || IsNil(o.Uri.Get()) { + var ret string + return ret + } + return *o.Uri.Get() +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PageConnectorAttributes) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uri.Get(), o.Uri.IsSet() +} + +// HasUri returns a boolean if a field has been set. +func (o *PageConnectorAttributes) HasUri() bool { + if o != nil && o.Uri.IsSet() { + return true + } + + return false +} + +// SetUri gets a reference to the given NullableString and assigns it to the Uri field. +func (o *PageConnectorAttributes) SetUri(v string) { + o.Uri.Set(&v) +} +// SetUriNil sets the value for Uri to be an explicit nil +func (o *PageConnectorAttributes) SetUriNil() { + o.Uri.Set(nil) +} + +// UnsetUri ensures that no value is present for Uri, not even an explicit nil +func (o *PageConnectorAttributes) UnsetUri() { + o.Uri.Unset() +} + +// GetCustomStatusCode returns the CustomStatusCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageConnectorAttributes) GetCustomStatusCode() int64 { + if o == nil || IsNil(o.CustomStatusCode.Get()) { + var ret int64 + return ret + } + return *o.CustomStatusCode.Get() +} + +// GetCustomStatusCodeOk returns a tuple with the CustomStatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PageConnectorAttributes) GetCustomStatusCodeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.CustomStatusCode.Get(), o.CustomStatusCode.IsSet() +} + +// HasCustomStatusCode returns a boolean if a field has been set. +func (o *PageConnectorAttributes) HasCustomStatusCode() bool { + if o != nil && o.CustomStatusCode.IsSet() { + return true + } + + return false +} + +// SetCustomStatusCode gets a reference to the given NullableInt64 and assigns it to the CustomStatusCode field. +func (o *PageConnectorAttributes) SetCustomStatusCode(v int64) { + o.CustomStatusCode.Set(&v) +} +// SetCustomStatusCodeNil sets the value for CustomStatusCode to be an explicit nil +func (o *PageConnectorAttributes) SetCustomStatusCodeNil() { + o.CustomStatusCode.Set(nil) +} + +// UnsetCustomStatusCode ensures that no value is present for CustomStatusCode, not even an explicit nil +func (o *PageConnectorAttributes) UnsetCustomStatusCode() { + o.CustomStatusCode.Unset() +} + +func (o PageConnectorAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageConnectorAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector"] = o.Connector + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if o.Uri.IsSet() { + toSerialize["uri"] = o.Uri.Get() + } + if o.CustomStatusCode.IsSet() { + toSerialize["custom_status_code"] = o.CustomStatusCode.Get() + } + return toSerialize, nil +} + +func (o *PageConnectorAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "connector", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPageConnectorAttributes := _PageConnectorAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPageConnectorAttributes) + + if err != nil { + return err + } + + *o = PageConnectorAttributes(varPageConnectorAttributes) + + return err +} + +type NullablePageConnectorAttributes struct { + value *PageConnectorAttributes + isSet bool +} + +func (v NullablePageConnectorAttributes) Get() *PageConnectorAttributes { + return v.value +} + +func (v *NullablePageConnectorAttributes) Set(val *PageConnectorAttributes) { + v.value = val + v.isSet = true +} + +func (v NullablePageConnectorAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullablePageConnectorAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageConnectorAttributes(val *PageConnectorAttributes) *NullablePageConnectorAttributes { + return &NullablePageConnectorAttributes{value: val, isSet: true} +} + +func (v NullablePageConnectorAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageConnectorAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_page_connector_attributes_request.go b/azion-api/model_page_connector_attributes_request.go new file mode 100644 index 0000000..40406a4 --- /dev/null +++ b/azion-api/model_page_connector_attributes_request.go @@ -0,0 +1,287 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PageConnectorAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageConnectorAttributesRequest{} + +// PageConnectorAttributesRequest struct for PageConnectorAttributesRequest +type PageConnectorAttributesRequest struct { + Connector int64 `json:"connector"` + Ttl *int64 `json:"ttl,omitempty"` + Uri NullableString `json:"uri,omitempty"` + CustomStatusCode NullableInt64 `json:"custom_status_code,omitempty"` +} + +type _PageConnectorAttributesRequest PageConnectorAttributesRequest + +// NewPageConnectorAttributesRequest instantiates a new PageConnectorAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPageConnectorAttributesRequest(connector int64) *PageConnectorAttributesRequest { + this := PageConnectorAttributesRequest{} + this.Connector = connector + return &this +} + +// NewPageConnectorAttributesRequestWithDefaults instantiates a new PageConnectorAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPageConnectorAttributesRequestWithDefaults() *PageConnectorAttributesRequest { + this := PageConnectorAttributesRequest{} + return &this +} + +// GetConnector returns the Connector field value +func (o *PageConnectorAttributesRequest) GetConnector() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Connector +} + +// GetConnectorOk returns a tuple with the Connector field value +// and a boolean to check if the value has been set. +func (o *PageConnectorAttributesRequest) GetConnectorOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Connector, true +} + +// SetConnector sets field value +func (o *PageConnectorAttributesRequest) SetConnector(v int64) { + o.Connector = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *PageConnectorAttributesRequest) GetTtl() int64 { + if o == nil || IsNil(o.Ttl) { + var ret int64 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PageConnectorAttributesRequest) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *PageConnectorAttributesRequest) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *PageConnectorAttributesRequest) SetTtl(v int64) { + o.Ttl = &v +} + +// GetUri returns the Uri field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageConnectorAttributesRequest) GetUri() string { + if o == nil || IsNil(o.Uri.Get()) { + var ret string + return ret + } + return *o.Uri.Get() +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PageConnectorAttributesRequest) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Uri.Get(), o.Uri.IsSet() +} + +// HasUri returns a boolean if a field has been set. +func (o *PageConnectorAttributesRequest) HasUri() bool { + if o != nil && o.Uri.IsSet() { + return true + } + + return false +} + +// SetUri gets a reference to the given NullableString and assigns it to the Uri field. +func (o *PageConnectorAttributesRequest) SetUri(v string) { + o.Uri.Set(&v) +} +// SetUriNil sets the value for Uri to be an explicit nil +func (o *PageConnectorAttributesRequest) SetUriNil() { + o.Uri.Set(nil) +} + +// UnsetUri ensures that no value is present for Uri, not even an explicit nil +func (o *PageConnectorAttributesRequest) UnsetUri() { + o.Uri.Unset() +} + +// GetCustomStatusCode returns the CustomStatusCode field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PageConnectorAttributesRequest) GetCustomStatusCode() int64 { + if o == nil || IsNil(o.CustomStatusCode.Get()) { + var ret int64 + return ret + } + return *o.CustomStatusCode.Get() +} + +// GetCustomStatusCodeOk returns a tuple with the CustomStatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PageConnectorAttributesRequest) GetCustomStatusCodeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.CustomStatusCode.Get(), o.CustomStatusCode.IsSet() +} + +// HasCustomStatusCode returns a boolean if a field has been set. +func (o *PageConnectorAttributesRequest) HasCustomStatusCode() bool { + if o != nil && o.CustomStatusCode.IsSet() { + return true + } + + return false +} + +// SetCustomStatusCode gets a reference to the given NullableInt64 and assigns it to the CustomStatusCode field. +func (o *PageConnectorAttributesRequest) SetCustomStatusCode(v int64) { + o.CustomStatusCode.Set(&v) +} +// SetCustomStatusCodeNil sets the value for CustomStatusCode to be an explicit nil +func (o *PageConnectorAttributesRequest) SetCustomStatusCodeNil() { + o.CustomStatusCode.Set(nil) +} + +// UnsetCustomStatusCode ensures that no value is present for CustomStatusCode, not even an explicit nil +func (o *PageConnectorAttributesRequest) UnsetCustomStatusCode() { + o.CustomStatusCode.Unset() +} + +func (o PageConnectorAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageConnectorAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["connector"] = o.Connector + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if o.Uri.IsSet() { + toSerialize["uri"] = o.Uri.Get() + } + if o.CustomStatusCode.IsSet() { + toSerialize["custom_status_code"] = o.CustomStatusCode.Get() + } + return toSerialize, nil +} + +func (o *PageConnectorAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "connector", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPageConnectorAttributesRequest := _PageConnectorAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPageConnectorAttributesRequest) + + if err != nil { + return err + } + + *o = PageConnectorAttributesRequest(varPageConnectorAttributesRequest) + + return err +} + +type NullablePageConnectorAttributesRequest struct { + value *PageConnectorAttributesRequest + isSet bool +} + +func (v NullablePageConnectorAttributesRequest) Get() *PageConnectorAttributesRequest { + return v.value +} + +func (v *NullablePageConnectorAttributesRequest) Set(val *PageConnectorAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePageConnectorAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePageConnectorAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageConnectorAttributesRequest(val *PageConnectorAttributesRequest) *NullablePageConnectorAttributesRequest { + return &NullablePageConnectorAttributesRequest{value: val, isSet: true} +} + +func (v NullablePageConnectorAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageConnectorAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_page_connector_request.go b/azion-api/model_page_connector_request.go new file mode 100644 index 0000000..845183c --- /dev/null +++ b/azion-api/model_page_connector_request.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PageConnectorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageConnectorRequest{} + +// PageConnectorRequest struct for PageConnectorRequest +type PageConnectorRequest struct { + Type string `json:"type"` + Attributes PageConnectorAttributesRequest `json:"attributes"` +} + +type _PageConnectorRequest PageConnectorRequest + +// NewPageConnectorRequest instantiates a new PageConnectorRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPageConnectorRequest(type_ string, attributes PageConnectorAttributesRequest) *PageConnectorRequest { + this := PageConnectorRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewPageConnectorRequestWithDefaults instantiates a new PageConnectorRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPageConnectorRequestWithDefaults() *PageConnectorRequest { + this := PageConnectorRequest{} + return &this +} + +// GetType returns the Type field value +func (o *PageConnectorRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PageConnectorRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PageConnectorRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *PageConnectorRequest) GetAttributes() PageConnectorAttributesRequest { + if o == nil { + var ret PageConnectorAttributesRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *PageConnectorRequest) GetAttributesOk() (*PageConnectorAttributesRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *PageConnectorRequest) SetAttributes(v PageConnectorAttributesRequest) { + o.Attributes = v +} + +func (o PageConnectorRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageConnectorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *PageConnectorRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPageConnectorRequest := _PageConnectorRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPageConnectorRequest) + + if err != nil { + return err + } + + *o = PageConnectorRequest(varPageConnectorRequest) + + return err +} + +type NullablePageConnectorRequest struct { + value *PageConnectorRequest + isSet bool +} + +func (v NullablePageConnectorRequest) Get() *PageConnectorRequest { + return v.value +} + +func (v *NullablePageConnectorRequest) Set(val *PageConnectorRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePageConnectorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePageConnectorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageConnectorRequest(val *PageConnectorRequest) *NullablePageConnectorRequest { + return &NullablePageConnectorRequest{value: val, isSet: true} +} + +func (v NullablePageConnectorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageConnectorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_page_request.go b/azion-api/model_page_request.go new file mode 100644 index 0000000..5565382 --- /dev/null +++ b/azion-api/model_page_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PageRequest{} + +// PageRequest struct for PageRequest +type PageRequest struct { + // * `default` - default * `400` - Bad Request * `401` - Unauthorized * `403` - Forbidden * `404` - Not Found * `405` - Method Not Allowed * `406` - Not Acceptable * `408` - Request Timeout * `409` - Conflict * `410` - Gone * `411` - Length Required * `414` - URI Too Long * `415` - Unsupported Media Type * `416` - Range Not Satisfiable * `426` - Upgrade Required * `429` - Too Many Requests * `431` - Request Header Fields Too Large * `500` - Internal Server Error * `501` - Not Implemented * `502` - Bad Gateway * `503` - Service Unavailable * `504` - Gateway Timeout * `505` - HTTP Version Not Supported + Code string `json:"code"` + Page PageConnectorRequest `json:"page"` +} + +type _PageRequest PageRequest + +// NewPageRequest instantiates a new PageRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPageRequest(code string, page PageConnectorRequest) *PageRequest { + this := PageRequest{} + this.Code = code + this.Page = page + return &this +} + +// NewPageRequestWithDefaults instantiates a new PageRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPageRequestWithDefaults() *PageRequest { + this := PageRequest{} + return &this +} + +// GetCode returns the Code field value +func (o *PageRequest) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *PageRequest) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *PageRequest) SetCode(v string) { + o.Code = v +} + +// GetPage returns the Page field value +func (o *PageRequest) GetPage() PageConnectorRequest { + if o == nil { + var ret PageConnectorRequest + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *PageRequest) GetPageOk() (*PageConnectorRequest, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *PageRequest) SetPage(v PageConnectorRequest) { + o.Page = v +} + +func (o PageRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + toSerialize["page"] = o.Page + return toSerialize, nil +} + +func (o *PageRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "page", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPageRequest := _PageRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPageRequest) + + if err != nil { + return err + } + + *o = PageRequest(varPageRequest) + + return err +} + +type NullablePageRequest struct { + value *PageRequest + isSet bool +} + +func (v NullablePageRequest) Get() *PageRequest { + return v.value +} + +func (v *NullablePageRequest) Set(val *PageRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePageRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePageRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePageRequest(val *PageRequest) *NullablePageRequest { + return &NullablePageRequest{value: val, isSet: true} +} + +func (v NullablePageRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePageRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_account_list.go b/azion-api/model_paginated_account_list.go new file mode 100644 index 0000000..a8f65ad --- /dev/null +++ b/azion-api/model_paginated_account_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedAccountList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedAccountList{} + +// PaginatedAccountList struct for PaginatedAccountList +type PaginatedAccountList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListAccount `json:"results,omitempty"` +} + +// NewPaginatedAccountList instantiates a new PaginatedAccountList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedAccountList() *PaginatedAccountList { + this := PaginatedAccountList{} + return &this +} + +// NewPaginatedAccountListWithDefaults instantiates a new PaginatedAccountList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedAccountListWithDefaults() *PaginatedAccountList { + this := PaginatedAccountList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedAccountList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccountList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedAccountList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedAccountList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedAccountList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccountList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedAccountList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedAccountList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedAccountList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccountList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedAccountList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedAccountList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedAccountList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccountList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedAccountList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedAccountList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedAccountList) GetResults() []ResponseListAccount { + if o == nil || IsNil(o.Results) { + var ret []ResponseListAccount + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedAccountList) GetResultsOk() ([]ResponseListAccount, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedAccountList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListAccount and assigns it to the Results field. +func (o *PaginatedAccountList) SetResults(v []ResponseListAccount) { + o.Results = v +} + +func (o PaginatedAccountList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedAccountList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedAccountList struct { + value *PaginatedAccountList + isSet bool +} + +func (v NullablePaginatedAccountList) Get() *PaginatedAccountList { + return v.value +} + +func (v *NullablePaginatedAccountList) Set(val *PaginatedAccountList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedAccountList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedAccountList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedAccountList(val *PaginatedAccountList) *NullablePaginatedAccountList { + return &NullablePaginatedAccountList{value: val, isSet: true} +} + +func (v NullablePaginatedAccountList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedAccountList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_application_list.go b/azion-api/model_paginated_application_list.go new file mode 100644 index 0000000..7fb1d0b --- /dev/null +++ b/azion-api/model_paginated_application_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedApplicationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedApplicationList{} + +// PaginatedApplicationList struct for PaginatedApplicationList +type PaginatedApplicationList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Application `json:"results,omitempty"` +} + +// NewPaginatedApplicationList instantiates a new PaginatedApplicationList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedApplicationList() *PaginatedApplicationList { + this := PaginatedApplicationList{} + return &this +} + +// NewPaginatedApplicationListWithDefaults instantiates a new PaginatedApplicationList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedApplicationListWithDefaults() *PaginatedApplicationList { + this := PaginatedApplicationList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedApplicationList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApplicationList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedApplicationList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedApplicationList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApplicationList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedApplicationList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedApplicationList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApplicationList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedApplicationList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedApplicationList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApplicationList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedApplicationList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedApplicationList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedApplicationList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedApplicationList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedApplicationList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedApplicationList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedApplicationList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedApplicationList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedApplicationList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedApplicationList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedApplicationList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedApplicationList) GetResults() []Application { + if o == nil || IsNil(o.Results) { + var ret []Application + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedApplicationList) GetResultsOk() ([]Application, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedApplicationList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Application and assigns it to the Results field. +func (o *PaginatedApplicationList) SetResults(v []Application) { + o.Results = v +} + +func (o PaginatedApplicationList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedApplicationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedApplicationList struct { + value *PaginatedApplicationList + isSet bool +} + +func (v NullablePaginatedApplicationList) Get() *PaginatedApplicationList { + return v.value +} + +func (v *NullablePaginatedApplicationList) Set(val *PaginatedApplicationList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedApplicationList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedApplicationList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedApplicationList(val *PaginatedApplicationList) *NullablePaginatedApplicationList { + return &NullablePaginatedApplicationList{value: val, isSet: true} +} + +func (v NullablePaginatedApplicationList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedApplicationList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_bucket_list.go b/azion-api/model_paginated_bucket_list.go new file mode 100644 index 0000000..fd6f3f1 --- /dev/null +++ b/azion-api/model_paginated_bucket_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedBucketList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedBucketList{} + +// PaginatedBucketList struct for PaginatedBucketList +type PaginatedBucketList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Bucket `json:"results,omitempty"` +} + +// NewPaginatedBucketList instantiates a new PaginatedBucketList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedBucketList() *PaginatedBucketList { + this := PaginatedBucketList{} + return &this +} + +// NewPaginatedBucketListWithDefaults instantiates a new PaginatedBucketList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedBucketListWithDefaults() *PaginatedBucketList { + this := PaginatedBucketList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedBucketList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedBucketList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedBucketList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedBucketList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedBucketList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedBucketList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedBucketList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedBucketList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedBucketList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedBucketList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedBucketList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedBucketList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedBucketList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedBucketList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedBucketList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedBucketList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedBucketList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedBucketList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedBucketList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedBucketList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedBucketList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedBucketList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedBucketList) GetResults() []Bucket { + if o == nil || IsNil(o.Results) { + var ret []Bucket + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedBucketList) GetResultsOk() ([]Bucket, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedBucketList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Bucket and assigns it to the Results field. +func (o *PaginatedBucketList) SetResults(v []Bucket) { + o.Results = v +} + +func (o PaginatedBucketList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedBucketList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedBucketList struct { + value *PaginatedBucketList + isSet bool +} + +func (v NullablePaginatedBucketList) Get() *PaginatedBucketList { + return v.value +} + +func (v *NullablePaginatedBucketList) Set(val *PaginatedBucketList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedBucketList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedBucketList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedBucketList(val *PaginatedBucketList) *NullablePaginatedBucketList { + return &NullablePaginatedBucketList{value: val, isSet: true} +} + +func (v NullablePaginatedBucketList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedBucketList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_cache_setting_list.go b/azion-api/model_paginated_cache_setting_list.go new file mode 100644 index 0000000..697519d --- /dev/null +++ b/azion-api/model_paginated_cache_setting_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedCacheSettingList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCacheSettingList{} + +// PaginatedCacheSettingList struct for PaginatedCacheSettingList +type PaginatedCacheSettingList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []CacheSetting `json:"results,omitempty"` +} + +// NewPaginatedCacheSettingList instantiates a new PaginatedCacheSettingList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCacheSettingList() *PaginatedCacheSettingList { + this := PaginatedCacheSettingList{} + return &this +} + +// NewPaginatedCacheSettingListWithDefaults instantiates a new PaginatedCacheSettingList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCacheSettingListWithDefaults() *PaginatedCacheSettingList { + this := PaginatedCacheSettingList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCacheSettingList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCacheSettingList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedCacheSettingList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedCacheSettingList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCacheSettingList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedCacheSettingList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedCacheSettingList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCacheSettingList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedCacheSettingList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedCacheSettingList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCacheSettingList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedCacheSettingList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCacheSettingList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCacheSettingList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCacheSettingList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCacheSettingList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCacheSettingList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCacheSettingList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCacheSettingList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCacheSettingList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCacheSettingList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCacheSettingList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedCacheSettingList) GetResults() []CacheSetting { + if o == nil || IsNil(o.Results) { + var ret []CacheSetting + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCacheSettingList) GetResultsOk() ([]CacheSetting, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedCacheSettingList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CacheSetting and assigns it to the Results field. +func (o *PaginatedCacheSettingList) SetResults(v []CacheSetting) { + o.Results = v +} + +func (o PaginatedCacheSettingList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCacheSettingList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedCacheSettingList struct { + value *PaginatedCacheSettingList + isSet bool +} + +func (v NullablePaginatedCacheSettingList) Get() *PaginatedCacheSettingList { + return v.value +} + +func (v *NullablePaginatedCacheSettingList) Set(val *PaginatedCacheSettingList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCacheSettingList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCacheSettingList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCacheSettingList(val *PaginatedCacheSettingList) *NullablePaginatedCacheSettingList { + return &NullablePaginatedCacheSettingList{value: val, isSet: true} +} + +func (v NullablePaginatedCacheSettingList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCacheSettingList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_certificate_list.go b/azion-api/model_paginated_certificate_list.go new file mode 100644 index 0000000..f2f13a8 --- /dev/null +++ b/azion-api/model_paginated_certificate_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedCertificateList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCertificateList{} + +// PaginatedCertificateList struct for PaginatedCertificateList +type PaginatedCertificateList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Certificate `json:"results,omitempty"` +} + +// NewPaginatedCertificateList instantiates a new PaginatedCertificateList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCertificateList() *PaginatedCertificateList { + this := PaginatedCertificateList{} + return &this +} + +// NewPaginatedCertificateListWithDefaults instantiates a new PaginatedCertificateList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCertificateListWithDefaults() *PaginatedCertificateList { + this := PaginatedCertificateList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCertificateList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedCertificateList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedCertificateList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedCertificateList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedCertificateList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedCertificateList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedCertificateList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedCertificateList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCertificateList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCertificateList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCertificateList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCertificateList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCertificateList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCertificateList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCertificateList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCertificateList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCertificateList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCertificateList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedCertificateList) GetResults() []Certificate { + if o == nil || IsNil(o.Results) { + var ret []Certificate + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateList) GetResultsOk() ([]Certificate, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedCertificateList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Certificate and assigns it to the Results field. +func (o *PaginatedCertificateList) SetResults(v []Certificate) { + o.Results = v +} + +func (o PaginatedCertificateList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCertificateList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedCertificateList struct { + value *PaginatedCertificateList + isSet bool +} + +func (v NullablePaginatedCertificateList) Get() *PaginatedCertificateList { + return v.value +} + +func (v *NullablePaginatedCertificateList) Set(val *PaginatedCertificateList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCertificateList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCertificateList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCertificateList(val *PaginatedCertificateList) *NullablePaginatedCertificateList { + return &NullablePaginatedCertificateList{value: val, isSet: true} +} + +func (v NullablePaginatedCertificateList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCertificateList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_certificate_revocation_list.go b/azion-api/model_paginated_certificate_revocation_list.go new file mode 100644 index 0000000..01695f6 --- /dev/null +++ b/azion-api/model_paginated_certificate_revocation_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedCertificateRevocationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCertificateRevocationList{} + +// PaginatedCertificateRevocationList struct for PaginatedCertificateRevocationList +type PaginatedCertificateRevocationList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []CertificateRevocationList `json:"results,omitempty"` +} + +// NewPaginatedCertificateRevocationList instantiates a new PaginatedCertificateRevocationList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCertificateRevocationList() *PaginatedCertificateRevocationList { + this := PaginatedCertificateRevocationList{} + return &this +} + +// NewPaginatedCertificateRevocationListWithDefaults instantiates a new PaginatedCertificateRevocationList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCertificateRevocationListWithDefaults() *PaginatedCertificateRevocationList { + this := PaginatedCertificateRevocationList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCertificateRevocationList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateRevocationList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedCertificateRevocationList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedCertificateRevocationList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateRevocationList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedCertificateRevocationList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedCertificateRevocationList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateRevocationList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedCertificateRevocationList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedCertificateRevocationList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateRevocationList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedCertificateRevocationList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCertificateRevocationList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCertificateRevocationList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCertificateRevocationList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCertificateRevocationList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCertificateRevocationList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCertificateRevocationList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCertificateRevocationList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCertificateRevocationList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCertificateRevocationList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCertificateRevocationList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedCertificateRevocationList) GetResults() []CertificateRevocationList { + if o == nil || IsNil(o.Results) { + var ret []CertificateRevocationList + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCertificateRevocationList) GetResultsOk() ([]CertificateRevocationList, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedCertificateRevocationList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CertificateRevocationList and assigns it to the Results field. +func (o *PaginatedCertificateRevocationList) SetResults(v []CertificateRevocationList) { + o.Results = v +} + +func (o PaginatedCertificateRevocationList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCertificateRevocationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedCertificateRevocationList struct { + value *PaginatedCertificateRevocationList + isSet bool +} + +func (v NullablePaginatedCertificateRevocationList) Get() *PaginatedCertificateRevocationList { + return v.value +} + +func (v *NullablePaginatedCertificateRevocationList) Set(val *PaginatedCertificateRevocationList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCertificateRevocationList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCertificateRevocationList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCertificateRevocationList(val *PaginatedCertificateRevocationList) *NullablePaginatedCertificateRevocationList { + return &NullablePaginatedCertificateRevocationList{value: val, isSet: true} +} + +func (v NullablePaginatedCertificateRevocationList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCertificateRevocationList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_chat_thread_list.go b/azion-api/model_paginated_chat_thread_list.go new file mode 100644 index 0000000..11ecba8 --- /dev/null +++ b/azion-api/model_paginated_chat_thread_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedChatThreadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedChatThreadList{} + +// PaginatedChatThreadList struct for PaginatedChatThreadList +type PaginatedChatThreadList struct { + Count *int64 `json:"count,omitempty"` + Results []ChatThread `json:"results,omitempty"` +} + +// NewPaginatedChatThreadList instantiates a new PaginatedChatThreadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedChatThreadList() *PaginatedChatThreadList { + this := PaginatedChatThreadList{} + return &this +} + +// NewPaginatedChatThreadListWithDefaults instantiates a new PaginatedChatThreadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedChatThreadListWithDefaults() *PaginatedChatThreadList { + this := PaginatedChatThreadList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedChatThreadList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedChatThreadList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedChatThreadList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedChatThreadList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedChatThreadList) GetResults() []ChatThread { + if o == nil || IsNil(o.Results) { + var ret []ChatThread + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedChatThreadList) GetResultsOk() ([]ChatThread, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedChatThreadList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ChatThread and assigns it to the Results field. +func (o *PaginatedChatThreadList) SetResults(v []ChatThread) { + o.Results = v +} + +func (o PaginatedChatThreadList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedChatThreadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedChatThreadList struct { + value *PaginatedChatThreadList + isSet bool +} + +func (v NullablePaginatedChatThreadList) Get() *PaginatedChatThreadList { + return v.value +} + +func (v *NullablePaginatedChatThreadList) Set(val *PaginatedChatThreadList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedChatThreadList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedChatThreadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedChatThreadList(val *PaginatedChatThreadList) *NullablePaginatedChatThreadList { + return &NullablePaginatedChatThreadList{value: val, isSet: true} +} + +func (v NullablePaginatedChatThreadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedChatThreadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_chunk_list.go b/azion-api/model_paginated_chunk_list.go new file mode 100644 index 0000000..4505a9d --- /dev/null +++ b/azion-api/model_paginated_chunk_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedChunkList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedChunkList{} + +// PaginatedChunkList struct for PaginatedChunkList +type PaginatedChunkList struct { + Count *int64 `json:"count,omitempty"` + Results []Chunk `json:"results,omitempty"` +} + +// NewPaginatedChunkList instantiates a new PaginatedChunkList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedChunkList() *PaginatedChunkList { + this := PaginatedChunkList{} + return &this +} + +// NewPaginatedChunkListWithDefaults instantiates a new PaginatedChunkList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedChunkListWithDefaults() *PaginatedChunkList { + this := PaginatedChunkList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedChunkList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedChunkList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedChunkList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedChunkList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedChunkList) GetResults() []Chunk { + if o == nil || IsNil(o.Results) { + var ret []Chunk + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedChunkList) GetResultsOk() ([]Chunk, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedChunkList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Chunk and assigns it to the Results field. +func (o *PaginatedChunkList) SetResults(v []Chunk) { + o.Results = v +} + +func (o PaginatedChunkList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedChunkList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedChunkList struct { + value *PaginatedChunkList + isSet bool +} + +func (v NullablePaginatedChunkList) Get() *PaginatedChunkList { + return v.value +} + +func (v *NullablePaginatedChunkList) Set(val *PaginatedChunkList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedChunkList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedChunkList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedChunkList(val *PaginatedChunkList) *NullablePaginatedChunkList { + return &NullablePaginatedChunkList{value: val, isSet: true} +} + +func (v NullablePaginatedChunkList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedChunkList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_connector_list.go b/azion-api/model_paginated_connector_list.go new file mode 100644 index 0000000..79e2884 --- /dev/null +++ b/azion-api/model_paginated_connector_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedConnectorList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedConnectorList{} + +// PaginatedConnectorList struct for PaginatedConnectorList +type PaginatedConnectorList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Connector2 `json:"results,omitempty"` +} + +// NewPaginatedConnectorList instantiates a new PaginatedConnectorList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedConnectorList() *PaginatedConnectorList { + this := PaginatedConnectorList{} + return &this +} + +// NewPaginatedConnectorListWithDefaults instantiates a new PaginatedConnectorList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedConnectorListWithDefaults() *PaginatedConnectorList { + this := PaginatedConnectorList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedConnectorList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedConnectorList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedConnectorList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedConnectorList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedConnectorList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedConnectorList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedConnectorList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedConnectorList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedConnectorList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedConnectorList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedConnectorList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedConnectorList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedConnectorList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedConnectorList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedConnectorList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedConnectorList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedConnectorList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedConnectorList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedConnectorList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedConnectorList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedConnectorList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedConnectorList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedConnectorList) GetResults() []Connector2 { + if o == nil || IsNil(o.Results) { + var ret []Connector2 + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedConnectorList) GetResultsOk() ([]Connector2, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedConnectorList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Connector2 and assigns it to the Results field. +func (o *PaginatedConnectorList) SetResults(v []Connector2) { + o.Results = v +} + +func (o PaginatedConnectorList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedConnectorList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedConnectorList struct { + value *PaginatedConnectorList + isSet bool +} + +func (v NullablePaginatedConnectorList) Get() *PaginatedConnectorList { + return v.value +} + +func (v *NullablePaginatedConnectorList) Set(val *PaginatedConnectorList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedConnectorList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedConnectorList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedConnectorList(val *PaginatedConnectorList) *NullablePaginatedConnectorList { + return &NullablePaginatedConnectorList{value: val, isSet: true} +} + +func (v NullablePaginatedConnectorList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedConnectorList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_continuous_deployment_list.go b/azion-api/model_paginated_continuous_deployment_list.go new file mode 100644 index 0000000..a0a68ee --- /dev/null +++ b/azion-api/model_paginated_continuous_deployment_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedContinuousDeploymentList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedContinuousDeploymentList{} + +// PaginatedContinuousDeploymentList struct for PaginatedContinuousDeploymentList +type PaginatedContinuousDeploymentList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListContinuousDeployment `json:"results,omitempty"` +} + +// NewPaginatedContinuousDeploymentList instantiates a new PaginatedContinuousDeploymentList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedContinuousDeploymentList() *PaginatedContinuousDeploymentList { + this := PaginatedContinuousDeploymentList{} + return &this +} + +// NewPaginatedContinuousDeploymentListWithDefaults instantiates a new PaginatedContinuousDeploymentList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedContinuousDeploymentListWithDefaults() *PaginatedContinuousDeploymentList { + this := PaginatedContinuousDeploymentList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedContinuousDeploymentList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContinuousDeploymentList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedContinuousDeploymentList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedContinuousDeploymentList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedContinuousDeploymentList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContinuousDeploymentList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedContinuousDeploymentList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedContinuousDeploymentList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedContinuousDeploymentList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContinuousDeploymentList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedContinuousDeploymentList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedContinuousDeploymentList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedContinuousDeploymentList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContinuousDeploymentList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedContinuousDeploymentList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedContinuousDeploymentList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedContinuousDeploymentList) GetResults() []ResponseListContinuousDeployment { + if o == nil || IsNil(o.Results) { + var ret []ResponseListContinuousDeployment + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedContinuousDeploymentList) GetResultsOk() ([]ResponseListContinuousDeployment, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedContinuousDeploymentList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListContinuousDeployment and assigns it to the Results field. +func (o *PaginatedContinuousDeploymentList) SetResults(v []ResponseListContinuousDeployment) { + o.Results = v +} + +func (o PaginatedContinuousDeploymentList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedContinuousDeploymentList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedContinuousDeploymentList struct { + value *PaginatedContinuousDeploymentList + isSet bool +} + +func (v NullablePaginatedContinuousDeploymentList) Get() *PaginatedContinuousDeploymentList { + return v.value +} + +func (v *NullablePaginatedContinuousDeploymentList) Set(val *PaginatedContinuousDeploymentList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedContinuousDeploymentList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedContinuousDeploymentList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedContinuousDeploymentList(val *PaginatedContinuousDeploymentList) *NullablePaginatedContinuousDeploymentList { + return &NullablePaginatedContinuousDeploymentList{value: val, isSet: true} +} + +func (v NullablePaginatedContinuousDeploymentList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedContinuousDeploymentList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_credential_list.go b/azion-api/model_paginated_credential_list.go new file mode 100644 index 0000000..79644f5 --- /dev/null +++ b/azion-api/model_paginated_credential_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedCredentialList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCredentialList{} + +// PaginatedCredentialList struct for PaginatedCredentialList +type PaginatedCredentialList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Credential `json:"results,omitempty"` +} + +// NewPaginatedCredentialList instantiates a new PaginatedCredentialList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCredentialList() *PaginatedCredentialList { + this := PaginatedCredentialList{} + return &this +} + +// NewPaginatedCredentialListWithDefaults instantiates a new PaginatedCredentialList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCredentialListWithDefaults() *PaginatedCredentialList { + this := PaginatedCredentialList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCredentialList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCredentialList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedCredentialList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedCredentialList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCredentialList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedCredentialList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedCredentialList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCredentialList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedCredentialList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedCredentialList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCredentialList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedCredentialList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCredentialList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCredentialList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCredentialList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCredentialList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCredentialList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCredentialList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCredentialList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCredentialList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCredentialList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCredentialList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedCredentialList) GetResults() []Credential { + if o == nil || IsNil(o.Results) { + var ret []Credential + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCredentialList) GetResultsOk() ([]Credential, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedCredentialList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Credential and assigns it to the Results field. +func (o *PaginatedCredentialList) SetResults(v []Credential) { + o.Results = v +} + +func (o PaginatedCredentialList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCredentialList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedCredentialList struct { + value *PaginatedCredentialList + isSet bool +} + +func (v NullablePaginatedCredentialList) Get() *PaginatedCredentialList { + return v.value +} + +func (v *NullablePaginatedCredentialList) Set(val *PaginatedCredentialList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCredentialList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCredentialList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCredentialList(val *PaginatedCredentialList) *NullablePaginatedCredentialList { + return &NullablePaginatedCredentialList{value: val, isSet: true} +} + +func (v NullablePaginatedCredentialList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCredentialList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_custom_page_list.go b/azion-api/model_paginated_custom_page_list.go new file mode 100644 index 0000000..fe40b84 --- /dev/null +++ b/azion-api/model_paginated_custom_page_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedCustomPageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedCustomPageList{} + +// PaginatedCustomPageList struct for PaginatedCustomPageList +type PaginatedCustomPageList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []CustomPage `json:"results,omitempty"` +} + +// NewPaginatedCustomPageList instantiates a new PaginatedCustomPageList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedCustomPageList() *PaginatedCustomPageList { + this := PaginatedCustomPageList{} + return &this +} + +// NewPaginatedCustomPageListWithDefaults instantiates a new PaginatedCustomPageList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedCustomPageListWithDefaults() *PaginatedCustomPageList { + this := PaginatedCustomPageList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedCustomPageList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCustomPageList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedCustomPageList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedCustomPageList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCustomPageList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedCustomPageList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedCustomPageList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCustomPageList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedCustomPageList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedCustomPageList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCustomPageList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedCustomPageList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCustomPageList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCustomPageList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedCustomPageList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedCustomPageList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedCustomPageList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedCustomPageList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedCustomPageList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedCustomPageList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedCustomPageList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedCustomPageList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedCustomPageList) GetResults() []CustomPage { + if o == nil || IsNil(o.Results) { + var ret []CustomPage + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedCustomPageList) GetResultsOk() ([]CustomPage, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedCustomPageList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []CustomPage and assigns it to the Results field. +func (o *PaginatedCustomPageList) SetResults(v []CustomPage) { + o.Results = v +} + +func (o PaginatedCustomPageList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedCustomPageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedCustomPageList struct { + value *PaginatedCustomPageList + isSet bool +} + +func (v NullablePaginatedCustomPageList) Get() *PaginatedCustomPageList { + return v.value +} + +func (v *NullablePaginatedCustomPageList) Set(val *PaginatedCustomPageList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedCustomPageList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedCustomPageList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedCustomPageList(val *PaginatedCustomPageList) *NullablePaginatedCustomPageList { + return &NullablePaginatedCustomPageList{value: val, isSet: true} +} + +func (v NullablePaginatedCustomPageList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedCustomPageList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_dashboard_list.go b/azion-api/model_paginated_dashboard_list.go new file mode 100644 index 0000000..c799886 --- /dev/null +++ b/azion-api/model_paginated_dashboard_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedDashboardList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDashboardList{} + +// PaginatedDashboardList struct for PaginatedDashboardList +type PaginatedDashboardList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListDashboard `json:"results,omitempty"` +} + +// NewPaginatedDashboardList instantiates a new PaginatedDashboardList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDashboardList() *PaginatedDashboardList { + this := PaginatedDashboardList{} + return &this +} + +// NewPaginatedDashboardListWithDefaults instantiates a new PaginatedDashboardList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDashboardListWithDefaults() *PaginatedDashboardList { + this := PaginatedDashboardList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDashboardList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDashboardList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDashboardList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedDashboardList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedDashboardList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDashboardList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedDashboardList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedDashboardList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedDashboardList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDashboardList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedDashboardList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedDashboardList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedDashboardList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDashboardList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedDashboardList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedDashboardList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDashboardList) GetResults() []ResponseListDashboard { + if o == nil || IsNil(o.Results) { + var ret []ResponseListDashboard + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDashboardList) GetResultsOk() ([]ResponseListDashboard, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDashboardList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListDashboard and assigns it to the Results field. +func (o *PaginatedDashboardList) SetResults(v []ResponseListDashboard) { + o.Results = v +} + +func (o PaginatedDashboardList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDashboardList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedDashboardList struct { + value *PaginatedDashboardList + isSet bool +} + +func (v NullablePaginatedDashboardList) Get() *PaginatedDashboardList { + return v.value +} + +func (v *NullablePaginatedDashboardList) Set(val *PaginatedDashboardList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDashboardList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDashboardList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDashboardList(val *PaginatedDashboardList) *NullablePaginatedDashboardList { + return &NullablePaginatedDashboardList{value: val, isSet: true} +} + +func (v NullablePaginatedDashboardList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDashboardList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_data_source_list.go b/azion-api/model_paginated_data_source_list.go new file mode 100644 index 0000000..1777ea0 --- /dev/null +++ b/azion-api/model_paginated_data_source_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedDataSourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDataSourceList{} + +// PaginatedDataSourceList struct for PaginatedDataSourceList +type PaginatedDataSourceList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []DataSource `json:"results,omitempty"` +} + +// NewPaginatedDataSourceList instantiates a new PaginatedDataSourceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDataSourceList() *PaginatedDataSourceList { + this := PaginatedDataSourceList{} + return &this +} + +// NewPaginatedDataSourceListWithDefaults instantiates a new PaginatedDataSourceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDataSourceListWithDefaults() *PaginatedDataSourceList { + this := PaginatedDataSourceList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDataSourceList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataSourceList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedDataSourceList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedDataSourceList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataSourceList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedDataSourceList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedDataSourceList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataSourceList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedDataSourceList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedDataSourceList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataSourceList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedDataSourceList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDataSourceList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDataSourceList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedDataSourceList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedDataSourceList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedDataSourceList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDataSourceList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDataSourceList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedDataSourceList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedDataSourceList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedDataSourceList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDataSourceList) GetResults() []DataSource { + if o == nil || IsNil(o.Results) { + var ret []DataSource + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataSourceList) GetResultsOk() ([]DataSource, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDataSourceList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DataSource and assigns it to the Results field. +func (o *PaginatedDataSourceList) SetResults(v []DataSource) { + o.Results = v +} + +func (o PaginatedDataSourceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDataSourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedDataSourceList struct { + value *PaginatedDataSourceList + isSet bool +} + +func (v NullablePaginatedDataSourceList) Get() *PaginatedDataSourceList { + return v.value +} + +func (v *NullablePaginatedDataSourceList) Set(val *PaginatedDataSourceList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDataSourceList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDataSourceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDataSourceList(val *PaginatedDataSourceList) *NullablePaginatedDataSourceList { + return &NullablePaginatedDataSourceList{value: val, isSet: true} +} + +func (v NullablePaginatedDataSourceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDataSourceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_data_stream_list.go b/azion-api/model_paginated_data_stream_list.go new file mode 100644 index 0000000..19573c8 --- /dev/null +++ b/azion-api/model_paginated_data_stream_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedDataStreamList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDataStreamList{} + +// PaginatedDataStreamList struct for PaginatedDataStreamList +type PaginatedDataStreamList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []DataStream `json:"results,omitempty"` +} + +// NewPaginatedDataStreamList instantiates a new PaginatedDataStreamList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDataStreamList() *PaginatedDataStreamList { + this := PaginatedDataStreamList{} + return &this +} + +// NewPaginatedDataStreamListWithDefaults instantiates a new PaginatedDataStreamList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDataStreamListWithDefaults() *PaginatedDataStreamList { + this := PaginatedDataStreamList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDataStreamList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataStreamList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedDataStreamList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedDataStreamList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataStreamList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedDataStreamList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedDataStreamList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataStreamList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedDataStreamList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedDataStreamList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataStreamList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedDataStreamList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDataStreamList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDataStreamList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedDataStreamList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedDataStreamList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedDataStreamList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDataStreamList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDataStreamList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedDataStreamList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedDataStreamList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedDataStreamList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDataStreamList) GetResults() []DataStream { + if o == nil || IsNil(o.Results) { + var ret []DataStream + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDataStreamList) GetResultsOk() ([]DataStream, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDataStreamList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DataStream and assigns it to the Results field. +func (o *PaginatedDataStreamList) SetResults(v []DataStream) { + o.Results = v +} + +func (o PaginatedDataStreamList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDataStreamList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedDataStreamList struct { + value *PaginatedDataStreamList + isSet bool +} + +func (v NullablePaginatedDataStreamList) Get() *PaginatedDataStreamList { + return v.value +} + +func (v *NullablePaginatedDataStreamList) Set(val *PaginatedDataStreamList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDataStreamList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDataStreamList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDataStreamList(val *PaginatedDataStreamList) *NullablePaginatedDataStreamList { + return &NullablePaginatedDataStreamList{value: val, isSet: true} +} + +func (v NullablePaginatedDataStreamList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDataStreamList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_database_detail_list.go b/azion-api/model_paginated_database_detail_list.go new file mode 100644 index 0000000..3d98a20 --- /dev/null +++ b/azion-api/model_paginated_database_detail_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedDatabaseDetailList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDatabaseDetailList{} + +// PaginatedDatabaseDetailList struct for PaginatedDatabaseDetailList +type PaginatedDatabaseDetailList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []DatabaseDetail `json:"results,omitempty"` +} + +// NewPaginatedDatabaseDetailList instantiates a new PaginatedDatabaseDetailList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDatabaseDetailList() *PaginatedDatabaseDetailList { + this := PaginatedDatabaseDetailList{} + return &this +} + +// NewPaginatedDatabaseDetailListWithDefaults instantiates a new PaginatedDatabaseDetailList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDatabaseDetailListWithDefaults() *PaginatedDatabaseDetailList { + this := PaginatedDatabaseDetailList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDatabaseDetailList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDatabaseDetailList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedDatabaseDetailList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedDatabaseDetailList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDatabaseDetailList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedDatabaseDetailList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedDatabaseDetailList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDatabaseDetailList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedDatabaseDetailList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedDatabaseDetailList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDatabaseDetailList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedDatabaseDetailList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDatabaseDetailList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDatabaseDetailList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedDatabaseDetailList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedDatabaseDetailList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedDatabaseDetailList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDatabaseDetailList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDatabaseDetailList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedDatabaseDetailList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedDatabaseDetailList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedDatabaseDetailList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDatabaseDetailList) GetResults() []DatabaseDetail { + if o == nil || IsNil(o.Results) { + var ret []DatabaseDetail + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDatabaseDetailList) GetResultsOk() ([]DatabaseDetail, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDatabaseDetailList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DatabaseDetail and assigns it to the Results field. +func (o *PaginatedDatabaseDetailList) SetResults(v []DatabaseDetail) { + o.Results = v +} + +func (o PaginatedDatabaseDetailList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDatabaseDetailList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedDatabaseDetailList struct { + value *PaginatedDatabaseDetailList + isSet bool +} + +func (v NullablePaginatedDatabaseDetailList) Get() *PaginatedDatabaseDetailList { + return v.value +} + +func (v *NullablePaginatedDatabaseDetailList) Set(val *PaginatedDatabaseDetailList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDatabaseDetailList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDatabaseDetailList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDatabaseDetailList(val *PaginatedDatabaseDetailList) *NullablePaginatedDatabaseDetailList { + return &NullablePaginatedDatabaseDetailList{value: val, isSet: true} +} + +func (v NullablePaginatedDatabaseDetailList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDatabaseDetailList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_device_group_list.go b/azion-api/model_paginated_device_group_list.go new file mode 100644 index 0000000..12e7f1c --- /dev/null +++ b/azion-api/model_paginated_device_group_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedDeviceGroupList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDeviceGroupList{} + +// PaginatedDeviceGroupList struct for PaginatedDeviceGroupList +type PaginatedDeviceGroupList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []DeviceGroup `json:"results,omitempty"` +} + +// NewPaginatedDeviceGroupList instantiates a new PaginatedDeviceGroupList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDeviceGroupList() *PaginatedDeviceGroupList { + this := PaginatedDeviceGroupList{} + return &this +} + +// NewPaginatedDeviceGroupListWithDefaults instantiates a new PaginatedDeviceGroupList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDeviceGroupListWithDefaults() *PaginatedDeviceGroupList { + this := PaginatedDeviceGroupList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDeviceGroupList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDeviceGroupList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedDeviceGroupList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedDeviceGroupList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDeviceGroupList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedDeviceGroupList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedDeviceGroupList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDeviceGroupList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedDeviceGroupList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedDeviceGroupList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDeviceGroupList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedDeviceGroupList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDeviceGroupList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDeviceGroupList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedDeviceGroupList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedDeviceGroupList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedDeviceGroupList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedDeviceGroupList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedDeviceGroupList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedDeviceGroupList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedDeviceGroupList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedDeviceGroupList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDeviceGroupList) GetResults() []DeviceGroup { + if o == nil || IsNil(o.Results) { + var ret []DeviceGroup + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDeviceGroupList) GetResultsOk() ([]DeviceGroup, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDeviceGroupList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []DeviceGroup and assigns it to the Results field. +func (o *PaginatedDeviceGroupList) SetResults(v []DeviceGroup) { + o.Results = v +} + +func (o PaginatedDeviceGroupList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDeviceGroupList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedDeviceGroupList struct { + value *PaginatedDeviceGroupList + isSet bool +} + +func (v NullablePaginatedDeviceGroupList) Get() *PaginatedDeviceGroupList { + return v.value +} + +func (v *NullablePaginatedDeviceGroupList) Set(val *PaginatedDeviceGroupList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDeviceGroupList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDeviceGroupList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDeviceGroupList(val *PaginatedDeviceGroupList) *NullablePaginatedDeviceGroupList { + return &NullablePaginatedDeviceGroupList{value: val, isSet: true} +} + +func (v NullablePaginatedDeviceGroupList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDeviceGroupList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_document_list.go b/azion-api/model_paginated_document_list.go new file mode 100644 index 0000000..09a34d2 --- /dev/null +++ b/azion-api/model_paginated_document_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedDocumentList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedDocumentList{} + +// PaginatedDocumentList struct for PaginatedDocumentList +type PaginatedDocumentList struct { + Count *int64 `json:"count,omitempty"` + Results []Document `json:"results,omitempty"` +} + +// NewPaginatedDocumentList instantiates a new PaginatedDocumentList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedDocumentList() *PaginatedDocumentList { + this := PaginatedDocumentList{} + return &this +} + +// NewPaginatedDocumentListWithDefaults instantiates a new PaginatedDocumentList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedDocumentListWithDefaults() *PaginatedDocumentList { + this := PaginatedDocumentList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedDocumentList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDocumentList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedDocumentList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedDocumentList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedDocumentList) GetResults() []Document { + if o == nil || IsNil(o.Results) { + var ret []Document + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedDocumentList) GetResultsOk() ([]Document, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedDocumentList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Document and assigns it to the Results field. +func (o *PaginatedDocumentList) SetResults(v []Document) { + o.Results = v +} + +func (o PaginatedDocumentList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedDocumentList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedDocumentList struct { + value *PaginatedDocumentList + isSet bool +} + +func (v NullablePaginatedDocumentList) Get() *PaginatedDocumentList { + return v.value +} + +func (v *NullablePaginatedDocumentList) Set(val *PaginatedDocumentList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedDocumentList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedDocumentList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedDocumentList(val *PaginatedDocumentList) *NullablePaginatedDocumentList { + return &NullablePaginatedDocumentList{value: val, isSet: true} +} + +func (v NullablePaginatedDocumentList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedDocumentList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_execution_list.go b/azion-api/model_paginated_execution_list.go new file mode 100644 index 0000000..d9a0464 --- /dev/null +++ b/azion-api/model_paginated_execution_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedExecutionList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedExecutionList{} + +// PaginatedExecutionList struct for PaginatedExecutionList +type PaginatedExecutionList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListExecution `json:"results,omitempty"` +} + +// NewPaginatedExecutionList instantiates a new PaginatedExecutionList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedExecutionList() *PaginatedExecutionList { + this := PaginatedExecutionList{} + return &this +} + +// NewPaginatedExecutionListWithDefaults instantiates a new PaginatedExecutionList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedExecutionListWithDefaults() *PaginatedExecutionList { + this := PaginatedExecutionList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedExecutionList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedExecutionList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedExecutionList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedExecutionList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedExecutionList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedExecutionList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedExecutionList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedExecutionList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedExecutionList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedExecutionList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedExecutionList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedExecutionList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedExecutionList) GetResults() []ResponseListExecution { + if o == nil || IsNil(o.Results) { + var ret []ResponseListExecution + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionList) GetResultsOk() ([]ResponseListExecution, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedExecutionList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListExecution and assigns it to the Results field. +func (o *PaginatedExecutionList) SetResults(v []ResponseListExecution) { + o.Results = v +} + +func (o PaginatedExecutionList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedExecutionList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedExecutionList struct { + value *PaginatedExecutionList + isSet bool +} + +func (v NullablePaginatedExecutionList) Get() *PaginatedExecutionList { + return v.value +} + +func (v *NullablePaginatedExecutionList) Set(val *PaginatedExecutionList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedExecutionList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedExecutionList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedExecutionList(val *PaginatedExecutionList) *NullablePaginatedExecutionList { + return &NullablePaginatedExecutionList{value: val, isSet: true} +} + +func (v NullablePaginatedExecutionList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedExecutionList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_execution_script_list.go b/azion-api/model_paginated_execution_script_list.go new file mode 100644 index 0000000..361bb95 --- /dev/null +++ b/azion-api/model_paginated_execution_script_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedExecutionScriptList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedExecutionScriptList{} + +// PaginatedExecutionScriptList struct for PaginatedExecutionScriptList +type PaginatedExecutionScriptList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListExecutionScript `json:"results,omitempty"` +} + +// NewPaginatedExecutionScriptList instantiates a new PaginatedExecutionScriptList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedExecutionScriptList() *PaginatedExecutionScriptList { + this := PaginatedExecutionScriptList{} + return &this +} + +// NewPaginatedExecutionScriptListWithDefaults instantiates a new PaginatedExecutionScriptList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedExecutionScriptListWithDefaults() *PaginatedExecutionScriptList { + this := PaginatedExecutionScriptList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedExecutionScriptList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionScriptList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedExecutionScriptList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedExecutionScriptList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedExecutionScriptList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionScriptList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedExecutionScriptList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedExecutionScriptList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedExecutionScriptList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionScriptList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedExecutionScriptList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedExecutionScriptList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedExecutionScriptList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionScriptList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedExecutionScriptList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedExecutionScriptList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedExecutionScriptList) GetResults() []ResponseListExecutionScript { + if o == nil || IsNil(o.Results) { + var ret []ResponseListExecutionScript + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedExecutionScriptList) GetResultsOk() ([]ResponseListExecutionScript, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedExecutionScriptList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListExecutionScript and assigns it to the Results field. +func (o *PaginatedExecutionScriptList) SetResults(v []ResponseListExecutionScript) { + o.Results = v +} + +func (o PaginatedExecutionScriptList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedExecutionScriptList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedExecutionScriptList struct { + value *PaginatedExecutionScriptList + isSet bool +} + +func (v NullablePaginatedExecutionScriptList) Get() *PaginatedExecutionScriptList { + return v.value +} + +func (v *NullablePaginatedExecutionScriptList) Set(val *PaginatedExecutionScriptList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedExecutionScriptList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedExecutionScriptList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedExecutionScriptList(val *PaginatedExecutionScriptList) *NullablePaginatedExecutionScriptList { + return &NullablePaginatedExecutionScriptList{value: val, isSet: true} +} + +func (v NullablePaginatedExecutionScriptList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedExecutionScriptList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_favorite_list.go b/azion-api/model_paginated_favorite_list.go new file mode 100644 index 0000000..569c0ee --- /dev/null +++ b/azion-api/model_paginated_favorite_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFavoriteList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFavoriteList{} + +// PaginatedFavoriteList struct for PaginatedFavoriteList +type PaginatedFavoriteList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListFavorite `json:"results,omitempty"` +} + +// NewPaginatedFavoriteList instantiates a new PaginatedFavoriteList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFavoriteList() *PaginatedFavoriteList { + this := PaginatedFavoriteList{} + return &this +} + +// NewPaginatedFavoriteListWithDefaults instantiates a new PaginatedFavoriteList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFavoriteListWithDefaults() *PaginatedFavoriteList { + this := PaginatedFavoriteList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFavoriteList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFavoriteList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFavoriteList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFavoriteList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFavoriteList) GetResults() []ResponseListFavorite { + if o == nil || IsNil(o.Results) { + var ret []ResponseListFavorite + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFavoriteList) GetResultsOk() ([]ResponseListFavorite, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFavoriteList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListFavorite and assigns it to the Results field. +func (o *PaginatedFavoriteList) SetResults(v []ResponseListFavorite) { + o.Results = v +} + +func (o PaginatedFavoriteList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFavoriteList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFavoriteList struct { + value *PaginatedFavoriteList + isSet bool +} + +func (v NullablePaginatedFavoriteList) Get() *PaginatedFavoriteList { + return v.value +} + +func (v *NullablePaginatedFavoriteList) Set(val *PaginatedFavoriteList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFavoriteList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFavoriteList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFavoriteList(val *PaginatedFavoriteList) *NullablePaginatedFavoriteList { + return &NullablePaginatedFavoriteList{value: val, isSet: true} +} + +func (v NullablePaginatedFavoriteList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFavoriteList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_firewall_function_instance_list.go b/azion-api/model_paginated_firewall_function_instance_list.go new file mode 100644 index 0000000..77eee13 --- /dev/null +++ b/azion-api/model_paginated_firewall_function_instance_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFirewallFunctionInstanceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFirewallFunctionInstanceList{} + +// PaginatedFirewallFunctionInstanceList struct for PaginatedFirewallFunctionInstanceList +type PaginatedFirewallFunctionInstanceList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []FirewallFunctionInstance `json:"results,omitempty"` +} + +// NewPaginatedFirewallFunctionInstanceList instantiates a new PaginatedFirewallFunctionInstanceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFirewallFunctionInstanceList() *PaginatedFirewallFunctionInstanceList { + this := PaginatedFirewallFunctionInstanceList{} + return &this +} + +// NewPaginatedFirewallFunctionInstanceListWithDefaults instantiates a new PaginatedFirewallFunctionInstanceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFirewallFunctionInstanceListWithDefaults() *PaginatedFirewallFunctionInstanceList { + this := PaginatedFirewallFunctionInstanceList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFirewallFunctionInstanceList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallFunctionInstanceList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFirewallFunctionInstanceList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedFirewallFunctionInstanceList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallFunctionInstanceList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedFirewallFunctionInstanceList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedFirewallFunctionInstanceList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallFunctionInstanceList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedFirewallFunctionInstanceList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedFirewallFunctionInstanceList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallFunctionInstanceList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedFirewallFunctionInstanceList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFirewallFunctionInstanceList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFirewallFunctionInstanceList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFirewallFunctionInstanceList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFirewallFunctionInstanceList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFirewallFunctionInstanceList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFirewallFunctionInstanceList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFirewallFunctionInstanceList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFirewallFunctionInstanceList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFirewallFunctionInstanceList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFirewallFunctionInstanceList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFirewallFunctionInstanceList) GetResults() []FirewallFunctionInstance { + if o == nil || IsNil(o.Results) { + var ret []FirewallFunctionInstance + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallFunctionInstanceList) GetResultsOk() ([]FirewallFunctionInstance, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFirewallFunctionInstanceList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FirewallFunctionInstance and assigns it to the Results field. +func (o *PaginatedFirewallFunctionInstanceList) SetResults(v []FirewallFunctionInstance) { + o.Results = v +} + +func (o PaginatedFirewallFunctionInstanceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFirewallFunctionInstanceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFirewallFunctionInstanceList struct { + value *PaginatedFirewallFunctionInstanceList + isSet bool +} + +func (v NullablePaginatedFirewallFunctionInstanceList) Get() *PaginatedFirewallFunctionInstanceList { + return v.value +} + +func (v *NullablePaginatedFirewallFunctionInstanceList) Set(val *PaginatedFirewallFunctionInstanceList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFirewallFunctionInstanceList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFirewallFunctionInstanceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFirewallFunctionInstanceList(val *PaginatedFirewallFunctionInstanceList) *NullablePaginatedFirewallFunctionInstanceList { + return &NullablePaginatedFirewallFunctionInstanceList{value: val, isSet: true} +} + +func (v NullablePaginatedFirewallFunctionInstanceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFirewallFunctionInstanceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_firewall_list.go b/azion-api/model_paginated_firewall_list.go new file mode 100644 index 0000000..6fefce0 --- /dev/null +++ b/azion-api/model_paginated_firewall_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFirewallList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFirewallList{} + +// PaginatedFirewallList struct for PaginatedFirewallList +type PaginatedFirewallList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Firewall `json:"results,omitempty"` +} + +// NewPaginatedFirewallList instantiates a new PaginatedFirewallList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFirewallList() *PaginatedFirewallList { + this := PaginatedFirewallList{} + return &this +} + +// NewPaginatedFirewallListWithDefaults instantiates a new PaginatedFirewallList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFirewallListWithDefaults() *PaginatedFirewallList { + this := PaginatedFirewallList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFirewallList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFirewallList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedFirewallList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedFirewallList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedFirewallList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedFirewallList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedFirewallList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedFirewallList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFirewallList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFirewallList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFirewallList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFirewallList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFirewallList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFirewallList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFirewallList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFirewallList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFirewallList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFirewallList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFirewallList) GetResults() []Firewall { + if o == nil || IsNil(o.Results) { + var ret []Firewall + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallList) GetResultsOk() ([]Firewall, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFirewallList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Firewall and assigns it to the Results field. +func (o *PaginatedFirewallList) SetResults(v []Firewall) { + o.Results = v +} + +func (o PaginatedFirewallList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFirewallList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFirewallList struct { + value *PaginatedFirewallList + isSet bool +} + +func (v NullablePaginatedFirewallList) Get() *PaginatedFirewallList { + return v.value +} + +func (v *NullablePaginatedFirewallList) Set(val *PaginatedFirewallList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFirewallList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFirewallList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFirewallList(val *PaginatedFirewallList) *NullablePaginatedFirewallList { + return &NullablePaginatedFirewallList{value: val, isSet: true} +} + +func (v NullablePaginatedFirewallList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFirewallList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_firewall_rule_list.go b/azion-api/model_paginated_firewall_rule_list.go new file mode 100644 index 0000000..9971810 --- /dev/null +++ b/azion-api/model_paginated_firewall_rule_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFirewallRuleList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFirewallRuleList{} + +// PaginatedFirewallRuleList struct for PaginatedFirewallRuleList +type PaginatedFirewallRuleList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []FirewallRule `json:"results,omitempty"` +} + +// NewPaginatedFirewallRuleList instantiates a new PaginatedFirewallRuleList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFirewallRuleList() *PaginatedFirewallRuleList { + this := PaginatedFirewallRuleList{} + return &this +} + +// NewPaginatedFirewallRuleListWithDefaults instantiates a new PaginatedFirewallRuleList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFirewallRuleListWithDefaults() *PaginatedFirewallRuleList { + this := PaginatedFirewallRuleList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFirewallRuleList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallRuleList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFirewallRuleList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedFirewallRuleList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallRuleList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedFirewallRuleList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedFirewallRuleList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallRuleList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedFirewallRuleList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedFirewallRuleList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallRuleList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedFirewallRuleList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFirewallRuleList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFirewallRuleList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFirewallRuleList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFirewallRuleList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFirewallRuleList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFirewallRuleList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFirewallRuleList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFirewallRuleList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFirewallRuleList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFirewallRuleList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFirewallRuleList) GetResults() []FirewallRule { + if o == nil || IsNil(o.Results) { + var ret []FirewallRule + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFirewallRuleList) GetResultsOk() ([]FirewallRule, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFirewallRuleList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FirewallRule and assigns it to the Results field. +func (o *PaginatedFirewallRuleList) SetResults(v []FirewallRule) { + o.Results = v +} + +func (o PaginatedFirewallRuleList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFirewallRuleList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFirewallRuleList struct { + value *PaginatedFirewallRuleList + isSet bool +} + +func (v NullablePaginatedFirewallRuleList) Get() *PaginatedFirewallRuleList { + return v.value +} + +func (v *NullablePaginatedFirewallRuleList) Set(val *PaginatedFirewallRuleList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFirewallRuleList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFirewallRuleList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFirewallRuleList(val *PaginatedFirewallRuleList) *NullablePaginatedFirewallRuleList { + return &NullablePaginatedFirewallRuleList{value: val, isSet: true} +} + +func (v NullablePaginatedFirewallRuleList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFirewallRuleList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_folder_list.go b/azion-api/model_paginated_folder_list.go new file mode 100644 index 0000000..4f3f37b --- /dev/null +++ b/azion-api/model_paginated_folder_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFolderList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFolderList{} + +// PaginatedFolderList struct for PaginatedFolderList +type PaginatedFolderList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListFolder `json:"results,omitempty"` +} + +// NewPaginatedFolderList instantiates a new PaginatedFolderList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFolderList() *PaginatedFolderList { + this := PaginatedFolderList{} + return &this +} + +// NewPaginatedFolderListWithDefaults instantiates a new PaginatedFolderList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFolderListWithDefaults() *PaginatedFolderList { + this := PaginatedFolderList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFolderList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFolderList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFolderList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFolderList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedFolderList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFolderList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedFolderList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedFolderList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedFolderList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFolderList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedFolderList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedFolderList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedFolderList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFolderList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedFolderList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedFolderList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFolderList) GetResults() []ResponseListFolder { + if o == nil || IsNil(o.Results) { + var ret []ResponseListFolder + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFolderList) GetResultsOk() ([]ResponseListFolder, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFolderList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListFolder and assigns it to the Results field. +func (o *PaginatedFolderList) SetResults(v []ResponseListFolder) { + o.Results = v +} + +func (o PaginatedFolderList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFolderList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFolderList struct { + value *PaginatedFolderList + isSet bool +} + +func (v NullablePaginatedFolderList) Get() *PaginatedFolderList { + return v.value +} + +func (v *NullablePaginatedFolderList) Set(val *PaginatedFolderList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFolderList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFolderList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFolderList(val *PaginatedFolderList) *NullablePaginatedFolderList { + return &NullablePaginatedFolderList{value: val, isSet: true} +} + +func (v NullablePaginatedFolderList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFolderList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_function_instance_list.go b/azion-api/model_paginated_function_instance_list.go new file mode 100644 index 0000000..89b2c8a --- /dev/null +++ b/azion-api/model_paginated_function_instance_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFunctionInstanceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFunctionInstanceList{} + +// PaginatedFunctionInstanceList struct for PaginatedFunctionInstanceList +type PaginatedFunctionInstanceList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []FunctionInstance `json:"results,omitempty"` +} + +// NewPaginatedFunctionInstanceList instantiates a new PaginatedFunctionInstanceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFunctionInstanceList() *PaginatedFunctionInstanceList { + this := PaginatedFunctionInstanceList{} + return &this +} + +// NewPaginatedFunctionInstanceListWithDefaults instantiates a new PaginatedFunctionInstanceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFunctionInstanceListWithDefaults() *PaginatedFunctionInstanceList { + this := PaginatedFunctionInstanceList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFunctionInstanceList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionInstanceList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFunctionInstanceList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedFunctionInstanceList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionInstanceList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedFunctionInstanceList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedFunctionInstanceList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionInstanceList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedFunctionInstanceList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedFunctionInstanceList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionInstanceList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedFunctionInstanceList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFunctionInstanceList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFunctionInstanceList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFunctionInstanceList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFunctionInstanceList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFunctionInstanceList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFunctionInstanceList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFunctionInstanceList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFunctionInstanceList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFunctionInstanceList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFunctionInstanceList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFunctionInstanceList) GetResults() []FunctionInstance { + if o == nil || IsNil(o.Results) { + var ret []FunctionInstance + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionInstanceList) GetResultsOk() ([]FunctionInstance, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFunctionInstanceList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []FunctionInstance and assigns it to the Results field. +func (o *PaginatedFunctionInstanceList) SetResults(v []FunctionInstance) { + o.Results = v +} + +func (o PaginatedFunctionInstanceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFunctionInstanceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFunctionInstanceList struct { + value *PaginatedFunctionInstanceList + isSet bool +} + +func (v NullablePaginatedFunctionInstanceList) Get() *PaginatedFunctionInstanceList { + return v.value +} + +func (v *NullablePaginatedFunctionInstanceList) Set(val *PaginatedFunctionInstanceList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFunctionInstanceList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFunctionInstanceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFunctionInstanceList(val *PaginatedFunctionInstanceList) *NullablePaginatedFunctionInstanceList { + return &NullablePaginatedFunctionInstanceList{value: val, isSet: true} +} + +func (v NullablePaginatedFunctionInstanceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFunctionInstanceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_functions_list.go b/azion-api/model_paginated_functions_list.go new file mode 100644 index 0000000..a9ef0b5 --- /dev/null +++ b/azion-api/model_paginated_functions_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedFunctionsList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedFunctionsList{} + +// PaginatedFunctionsList struct for PaginatedFunctionsList +type PaginatedFunctionsList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Functions `json:"results,omitempty"` +} + +// NewPaginatedFunctionsList instantiates a new PaginatedFunctionsList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedFunctionsList() *PaginatedFunctionsList { + this := PaginatedFunctionsList{} + return &this +} + +// NewPaginatedFunctionsListWithDefaults instantiates a new PaginatedFunctionsList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedFunctionsListWithDefaults() *PaginatedFunctionsList { + this := PaginatedFunctionsList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedFunctionsList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionsList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedFunctionsList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedFunctionsList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionsList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedFunctionsList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedFunctionsList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionsList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedFunctionsList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedFunctionsList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionsList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedFunctionsList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFunctionsList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFunctionsList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedFunctionsList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedFunctionsList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedFunctionsList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedFunctionsList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedFunctionsList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedFunctionsList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedFunctionsList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedFunctionsList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedFunctionsList) GetResults() []Functions { + if o == nil || IsNil(o.Results) { + var ret []Functions + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedFunctionsList) GetResultsOk() ([]Functions, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedFunctionsList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Functions and assigns it to the Results field. +func (o *PaginatedFunctionsList) SetResults(v []Functions) { + o.Results = v +} + +func (o PaginatedFunctionsList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedFunctionsList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedFunctionsList struct { + value *PaginatedFunctionsList + isSet bool +} + +func (v NullablePaginatedFunctionsList) Get() *PaginatedFunctionsList { + return v.value +} + +func (v *NullablePaginatedFunctionsList) Set(val *PaginatedFunctionsList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedFunctionsList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedFunctionsList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedFunctionsList(val *PaginatedFunctionsList) *NullablePaginatedFunctionsList { + return &NullablePaginatedFunctionsList{value: val, isSet: true} +} + +func (v NullablePaginatedFunctionsList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedFunctionsList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_grant_list.go b/azion-api/model_paginated_grant_list.go new file mode 100644 index 0000000..ddd9f1f --- /dev/null +++ b/azion-api/model_paginated_grant_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedGrantList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGrantList{} + +// PaginatedGrantList struct for PaginatedGrantList +type PaginatedGrantList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListGrant `json:"results,omitempty"` +} + +// NewPaginatedGrantList instantiates a new PaginatedGrantList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGrantList() *PaginatedGrantList { + this := PaginatedGrantList{} + return &this +} + +// NewPaginatedGrantListWithDefaults instantiates a new PaginatedGrantList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGrantListWithDefaults() *PaginatedGrantList { + this := PaginatedGrantList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGrantList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGrantList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGrantList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedGrantList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGrantList) GetResults() []ResponseListGrant { + if o == nil || IsNil(o.Results) { + var ret []ResponseListGrant + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGrantList) GetResultsOk() ([]ResponseListGrant, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGrantList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListGrant and assigns it to the Results field. +func (o *PaginatedGrantList) SetResults(v []ResponseListGrant) { + o.Results = v +} + +func (o PaginatedGrantList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGrantList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedGrantList struct { + value *PaginatedGrantList + isSet bool +} + +func (v NullablePaginatedGrantList) Get() *PaginatedGrantList { + return v.value +} + +func (v *NullablePaginatedGrantList) Set(val *PaginatedGrantList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGrantList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGrantList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGrantList(val *PaginatedGrantList) *NullablePaginatedGrantList { + return &NullablePaginatedGrantList{value: val, isSet: true} +} + +func (v NullablePaginatedGrantList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGrantList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_group_list.go b/azion-api/model_paginated_group_list.go new file mode 100644 index 0000000..6357554 --- /dev/null +++ b/azion-api/model_paginated_group_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedGroupList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedGroupList{} + +// PaginatedGroupList struct for PaginatedGroupList +type PaginatedGroupList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListGroup `json:"results,omitempty"` +} + +// NewPaginatedGroupList instantiates a new PaginatedGroupList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedGroupList() *PaginatedGroupList { + this := PaginatedGroupList{} + return &this +} + +// NewPaginatedGroupListWithDefaults instantiates a new PaginatedGroupList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedGroupListWithDefaults() *PaginatedGroupList { + this := PaginatedGroupList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedGroupList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedGroupList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedGroupList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedGroupList) GetResults() []ResponseListGroup { + if o == nil || IsNil(o.Results) { + var ret []ResponseListGroup + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedGroupList) GetResultsOk() ([]ResponseListGroup, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedGroupList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListGroup and assigns it to the Results field. +func (o *PaginatedGroupList) SetResults(v []ResponseListGroup) { + o.Results = v +} + +func (o PaginatedGroupList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedGroupList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedGroupList struct { + value *PaginatedGroupList + isSet bool +} + +func (v NullablePaginatedGroupList) Get() *PaginatedGroupList { + return v.value +} + +func (v *NullablePaginatedGroupList) Set(val *PaginatedGroupList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedGroupList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedGroupList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedGroupList(val *PaginatedGroupList) *NullablePaginatedGroupList { + return &NullablePaginatedGroupList{value: val, isSet: true} +} + +func (v NullablePaginatedGroupList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedGroupList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_integration_list.go b/azion-api/model_paginated_integration_list.go new file mode 100644 index 0000000..3799894 --- /dev/null +++ b/azion-api/model_paginated_integration_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedIntegrationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedIntegrationList{} + +// PaginatedIntegrationList struct for PaginatedIntegrationList +type PaginatedIntegrationList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListIntegration `json:"results,omitempty"` +} + +// NewPaginatedIntegrationList instantiates a new PaginatedIntegrationList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedIntegrationList() *PaginatedIntegrationList { + this := PaginatedIntegrationList{} + return &this +} + +// NewPaginatedIntegrationListWithDefaults instantiates a new PaginatedIntegrationList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedIntegrationListWithDefaults() *PaginatedIntegrationList { + this := PaginatedIntegrationList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedIntegrationList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedIntegrationList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedIntegrationList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedIntegrationList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedIntegrationList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedIntegrationList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedIntegrationList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedIntegrationList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedIntegrationList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedIntegrationList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedIntegrationList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedIntegrationList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedIntegrationList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedIntegrationList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedIntegrationList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedIntegrationList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedIntegrationList) GetResults() []ResponseListIntegration { + if o == nil || IsNil(o.Results) { + var ret []ResponseListIntegration + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedIntegrationList) GetResultsOk() ([]ResponseListIntegration, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedIntegrationList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListIntegration and assigns it to the Results field. +func (o *PaginatedIntegrationList) SetResults(v []ResponseListIntegration) { + o.Results = v +} + +func (o PaginatedIntegrationList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedIntegrationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedIntegrationList struct { + value *PaginatedIntegrationList + isSet bool +} + +func (v NullablePaginatedIntegrationList) Get() *PaginatedIntegrationList { + return v.value +} + +func (v *NullablePaginatedIntegrationList) Set(val *PaginatedIntegrationList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedIntegrationList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedIntegrationList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedIntegrationList(val *PaginatedIntegrationList) *NullablePaginatedIntegrationList { + return &NullablePaginatedIntegrationList{value: val, isSet: true} +} + +func (v NullablePaginatedIntegrationList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedIntegrationList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_knowledge_base_list.go b/azion-api/model_paginated_knowledge_base_list.go new file mode 100644 index 0000000..513ca56 --- /dev/null +++ b/azion-api/model_paginated_knowledge_base_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedKnowledgeBaseList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedKnowledgeBaseList{} + +// PaginatedKnowledgeBaseList struct for PaginatedKnowledgeBaseList +type PaginatedKnowledgeBaseList struct { + Count *int64 `json:"count,omitempty"` + Results []KnowledgeBase `json:"results,omitempty"` +} + +// NewPaginatedKnowledgeBaseList instantiates a new PaginatedKnowledgeBaseList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedKnowledgeBaseList() *PaginatedKnowledgeBaseList { + this := PaginatedKnowledgeBaseList{} + return &this +} + +// NewPaginatedKnowledgeBaseListWithDefaults instantiates a new PaginatedKnowledgeBaseList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedKnowledgeBaseListWithDefaults() *PaginatedKnowledgeBaseList { + this := PaginatedKnowledgeBaseList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedKnowledgeBaseList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedKnowledgeBaseList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedKnowledgeBaseList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedKnowledgeBaseList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedKnowledgeBaseList) GetResults() []KnowledgeBase { + if o == nil || IsNil(o.Results) { + var ret []KnowledgeBase + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedKnowledgeBaseList) GetResultsOk() ([]KnowledgeBase, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedKnowledgeBaseList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []KnowledgeBase and assigns it to the Results field. +func (o *PaginatedKnowledgeBaseList) SetResults(v []KnowledgeBase) { + o.Results = v +} + +func (o PaginatedKnowledgeBaseList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedKnowledgeBaseList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedKnowledgeBaseList struct { + value *PaginatedKnowledgeBaseList + isSet bool +} + +func (v NullablePaginatedKnowledgeBaseList) Get() *PaginatedKnowledgeBaseList { + return v.value +} + +func (v *NullablePaginatedKnowledgeBaseList) Set(val *PaginatedKnowledgeBaseList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedKnowledgeBaseList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedKnowledgeBaseList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedKnowledgeBaseList(val *PaginatedKnowledgeBaseList) *NullablePaginatedKnowledgeBaseList { + return &NullablePaginatedKnowledgeBaseList{value: val, isSet: true} +} + +func (v NullablePaginatedKnowledgeBaseList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedKnowledgeBaseList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_message_list.go b/azion-api/model_paginated_message_list.go new file mode 100644 index 0000000..008f92b --- /dev/null +++ b/azion-api/model_paginated_message_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedMessageList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedMessageList{} + +// PaginatedMessageList struct for PaginatedMessageList +type PaginatedMessageList struct { + Count *int64 `json:"count,omitempty"` + Results []Message `json:"results,omitempty"` +} + +// NewPaginatedMessageList instantiates a new PaginatedMessageList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedMessageList() *PaginatedMessageList { + this := PaginatedMessageList{} + return &this +} + +// NewPaginatedMessageListWithDefaults instantiates a new PaginatedMessageList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedMessageListWithDefaults() *PaginatedMessageList { + this := PaginatedMessageList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedMessageList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedMessageList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedMessageList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedMessageList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedMessageList) GetResults() []Message { + if o == nil || IsNil(o.Results) { + var ret []Message + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedMessageList) GetResultsOk() ([]Message, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedMessageList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Message and assigns it to the Results field. +func (o *PaginatedMessageList) SetResults(v []Message) { + o.Results = v +} + +func (o PaginatedMessageList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedMessageList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedMessageList struct { + value *PaginatedMessageList + isSet bool +} + +func (v NullablePaginatedMessageList) Get() *PaginatedMessageList { + return v.value +} + +func (v *NullablePaginatedMessageList) Set(val *PaginatedMessageList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedMessageList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedMessageList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedMessageList(val *PaginatedMessageList) *NullablePaginatedMessageList { + return &NullablePaginatedMessageList{value: val, isSet: true} +} + +func (v NullablePaginatedMessageList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedMessageList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_network_list_summary_list.go b/azion-api/model_paginated_network_list_summary_list.go new file mode 100644 index 0000000..3535330 --- /dev/null +++ b/azion-api/model_paginated_network_list_summary_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedNetworkListSummaryList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNetworkListSummaryList{} + +// PaginatedNetworkListSummaryList struct for PaginatedNetworkListSummaryList +type PaginatedNetworkListSummaryList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []NetworkListSummary `json:"results,omitempty"` +} + +// NewPaginatedNetworkListSummaryList instantiates a new PaginatedNetworkListSummaryList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedNetworkListSummaryList() *PaginatedNetworkListSummaryList { + this := PaginatedNetworkListSummaryList{} + return &this +} + +// NewPaginatedNetworkListSummaryListWithDefaults instantiates a new PaginatedNetworkListSummaryList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedNetworkListSummaryListWithDefaults() *PaginatedNetworkListSummaryList { + this := PaginatedNetworkListSummaryList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedNetworkListSummaryList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNetworkListSummaryList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedNetworkListSummaryList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedNetworkListSummaryList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNetworkListSummaryList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedNetworkListSummaryList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedNetworkListSummaryList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNetworkListSummaryList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedNetworkListSummaryList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedNetworkListSummaryList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNetworkListSummaryList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedNetworkListSummaryList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedNetworkListSummaryList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedNetworkListSummaryList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedNetworkListSummaryList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedNetworkListSummaryList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedNetworkListSummaryList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedNetworkListSummaryList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedNetworkListSummaryList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedNetworkListSummaryList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedNetworkListSummaryList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedNetworkListSummaryList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedNetworkListSummaryList) GetResults() []NetworkListSummary { + if o == nil || IsNil(o.Results) { + var ret []NetworkListSummary + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNetworkListSummaryList) GetResultsOk() ([]NetworkListSummary, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedNetworkListSummaryList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []NetworkListSummary and assigns it to the Results field. +func (o *PaginatedNetworkListSummaryList) SetResults(v []NetworkListSummary) { + o.Results = v +} + +func (o PaginatedNetworkListSummaryList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedNetworkListSummaryList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedNetworkListSummaryList struct { + value *PaginatedNetworkListSummaryList + isSet bool +} + +func (v NullablePaginatedNetworkListSummaryList) Get() *PaginatedNetworkListSummaryList { + return v.value +} + +func (v *NullablePaginatedNetworkListSummaryList) Set(val *PaginatedNetworkListSummaryList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedNetworkListSummaryList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedNetworkListSummaryList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedNetworkListSummaryList(val *PaginatedNetworkListSummaryList) *NullablePaginatedNetworkListSummaryList { + return &NullablePaginatedNetworkListSummaryList{value: val, isSet: true} +} + +func (v NullablePaginatedNetworkListSummaryList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedNetworkListSummaryList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_node_groups_by_id_list.go b/azion-api/model_paginated_node_groups_by_id_list.go new file mode 100644 index 0000000..c870a0b --- /dev/null +++ b/azion-api/model_paginated_node_groups_by_id_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedNodeGroupsByIdList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNodeGroupsByIdList{} + +// PaginatedNodeGroupsByIdList struct for PaginatedNodeGroupsByIdList +type PaginatedNodeGroupsByIdList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListNodeGroupsById `json:"results,omitempty"` +} + +// NewPaginatedNodeGroupsByIdList instantiates a new PaginatedNodeGroupsByIdList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedNodeGroupsByIdList() *PaginatedNodeGroupsByIdList { + this := PaginatedNodeGroupsByIdList{} + return &this +} + +// NewPaginatedNodeGroupsByIdListWithDefaults instantiates a new PaginatedNodeGroupsByIdList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedNodeGroupsByIdListWithDefaults() *PaginatedNodeGroupsByIdList { + this := PaginatedNodeGroupsByIdList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedNodeGroupsByIdList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodeGroupsByIdList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedNodeGroupsByIdList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedNodeGroupsByIdList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedNodeGroupsByIdList) GetResults() []ResponseListNodeGroupsById { + if o == nil || IsNil(o.Results) { + var ret []ResponseListNodeGroupsById + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodeGroupsByIdList) GetResultsOk() ([]ResponseListNodeGroupsById, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedNodeGroupsByIdList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListNodeGroupsById and assigns it to the Results field. +func (o *PaginatedNodeGroupsByIdList) SetResults(v []ResponseListNodeGroupsById) { + o.Results = v +} + +func (o PaginatedNodeGroupsByIdList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedNodeGroupsByIdList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedNodeGroupsByIdList struct { + value *PaginatedNodeGroupsByIdList + isSet bool +} + +func (v NullablePaginatedNodeGroupsByIdList) Get() *PaginatedNodeGroupsByIdList { + return v.value +} + +func (v *NullablePaginatedNodeGroupsByIdList) Set(val *PaginatedNodeGroupsByIdList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedNodeGroupsByIdList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedNodeGroupsByIdList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedNodeGroupsByIdList(val *PaginatedNodeGroupsByIdList) *NullablePaginatedNodeGroupsByIdList { + return &NullablePaginatedNodeGroupsByIdList{value: val, isSet: true} +} + +func (v NullablePaginatedNodeGroupsByIdList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedNodeGroupsByIdList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_node_groups_list.go b/azion-api/model_paginated_node_groups_list.go new file mode 100644 index 0000000..7452c17 --- /dev/null +++ b/azion-api/model_paginated_node_groups_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedNodeGroupsList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNodeGroupsList{} + +// PaginatedNodeGroupsList struct for PaginatedNodeGroupsList +type PaginatedNodeGroupsList struct { + Count *int64 `json:"count,omitempty"` + Results []NodeGroups `json:"results,omitempty"` +} + +// NewPaginatedNodeGroupsList instantiates a new PaginatedNodeGroupsList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedNodeGroupsList() *PaginatedNodeGroupsList { + this := PaginatedNodeGroupsList{} + return &this +} + +// NewPaginatedNodeGroupsListWithDefaults instantiates a new PaginatedNodeGroupsList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedNodeGroupsListWithDefaults() *PaginatedNodeGroupsList { + this := PaginatedNodeGroupsList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedNodeGroupsList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodeGroupsList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedNodeGroupsList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedNodeGroupsList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedNodeGroupsList) GetResults() []NodeGroups { + if o == nil || IsNil(o.Results) { + var ret []NodeGroups + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodeGroupsList) GetResultsOk() ([]NodeGroups, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedNodeGroupsList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []NodeGroups and assigns it to the Results field. +func (o *PaginatedNodeGroupsList) SetResults(v []NodeGroups) { + o.Results = v +} + +func (o PaginatedNodeGroupsList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedNodeGroupsList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedNodeGroupsList struct { + value *PaginatedNodeGroupsList + isSet bool +} + +func (v NullablePaginatedNodeGroupsList) Get() *PaginatedNodeGroupsList { + return v.value +} + +func (v *NullablePaginatedNodeGroupsList) Set(val *PaginatedNodeGroupsList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedNodeGroupsList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedNodeGroupsList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedNodeGroupsList(val *PaginatedNodeGroupsList) *NullablePaginatedNodeGroupsList { + return &NullablePaginatedNodeGroupsList{value: val, isSet: true} +} + +func (v NullablePaginatedNodeGroupsList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedNodeGroupsList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_node_services_list.go b/azion-api/model_paginated_node_services_list.go new file mode 100644 index 0000000..1038ae7 --- /dev/null +++ b/azion-api/model_paginated_node_services_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedNodeServicesList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNodeServicesList{} + +// PaginatedNodeServicesList struct for PaginatedNodeServicesList +type PaginatedNodeServicesList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListNodeServices `json:"results,omitempty"` +} + +// NewPaginatedNodeServicesList instantiates a new PaginatedNodeServicesList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedNodeServicesList() *PaginatedNodeServicesList { + this := PaginatedNodeServicesList{} + return &this +} + +// NewPaginatedNodeServicesListWithDefaults instantiates a new PaginatedNodeServicesList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedNodeServicesListWithDefaults() *PaginatedNodeServicesList { + this := PaginatedNodeServicesList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedNodeServicesList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodeServicesList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedNodeServicesList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedNodeServicesList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedNodeServicesList) GetResults() []ResponseListNodeServices { + if o == nil || IsNil(o.Results) { + var ret []ResponseListNodeServices + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodeServicesList) GetResultsOk() ([]ResponseListNodeServices, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedNodeServicesList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListNodeServices and assigns it to the Results field. +func (o *PaginatedNodeServicesList) SetResults(v []ResponseListNodeServices) { + o.Results = v +} + +func (o PaginatedNodeServicesList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedNodeServicesList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedNodeServicesList struct { + value *PaginatedNodeServicesList + isSet bool +} + +func (v NullablePaginatedNodeServicesList) Get() *PaginatedNodeServicesList { + return v.value +} + +func (v *NullablePaginatedNodeServicesList) Set(val *PaginatedNodeServicesList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedNodeServicesList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedNodeServicesList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedNodeServicesList(val *PaginatedNodeServicesList) *NullablePaginatedNodeServicesList { + return &NullablePaginatedNodeServicesList{value: val, isSet: true} +} + +func (v NullablePaginatedNodeServicesList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedNodeServicesList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_nodes_list.go b/azion-api/model_paginated_nodes_list.go new file mode 100644 index 0000000..96ad3e1 --- /dev/null +++ b/azion-api/model_paginated_nodes_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedNodesList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedNodesList{} + +// PaginatedNodesList struct for PaginatedNodesList +type PaginatedNodesList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListNodes `json:"results,omitempty"` +} + +// NewPaginatedNodesList instantiates a new PaginatedNodesList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedNodesList() *PaginatedNodesList { + this := PaginatedNodesList{} + return &this +} + +// NewPaginatedNodesListWithDefaults instantiates a new PaginatedNodesList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedNodesListWithDefaults() *PaginatedNodesList { + this := PaginatedNodesList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedNodesList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodesList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedNodesList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedNodesList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedNodesList) GetResults() []ResponseListNodes { + if o == nil || IsNil(o.Results) { + var ret []ResponseListNodes + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedNodesList) GetResultsOk() ([]ResponseListNodes, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedNodesList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListNodes and assigns it to the Results field. +func (o *PaginatedNodesList) SetResults(v []ResponseListNodes) { + o.Results = v +} + +func (o PaginatedNodesList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedNodesList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedNodesList struct { + value *PaginatedNodesList + isSet bool +} + +func (v NullablePaginatedNodesList) Get() *PaginatedNodesList { + return v.value +} + +func (v *NullablePaginatedNodesList) Set(val *PaginatedNodesList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedNodesList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedNodesList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedNodesList(val *PaginatedNodesList) *NullablePaginatedNodesList { + return &NullablePaginatedNodesList{value: val, isSet: true} +} + +func (v NullablePaginatedNodesList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedNodesList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_payment_history_list.go b/azion-api/model_paginated_payment_history_list.go new file mode 100644 index 0000000..de638e2 --- /dev/null +++ b/azion-api/model_paginated_payment_history_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedPaymentHistoryList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPaymentHistoryList{} + +// PaginatedPaymentHistoryList struct for PaginatedPaymentHistoryList +type PaginatedPaymentHistoryList struct { + Count *int64 `json:"count,omitempty"` + Results []PaymentHistory `json:"results,omitempty"` +} + +// NewPaginatedPaymentHistoryList instantiates a new PaginatedPaymentHistoryList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPaymentHistoryList() *PaginatedPaymentHistoryList { + this := PaginatedPaymentHistoryList{} + return &this +} + +// NewPaginatedPaymentHistoryListWithDefaults instantiates a new PaginatedPaymentHistoryList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPaymentHistoryListWithDefaults() *PaginatedPaymentHistoryList { + this := PaginatedPaymentHistoryList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPaymentHistoryList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPaymentHistoryList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPaymentHistoryList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedPaymentHistoryList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPaymentHistoryList) GetResults() []PaymentHistory { + if o == nil || IsNil(o.Results) { + var ret []PaymentHistory + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPaymentHistoryList) GetResultsOk() ([]PaymentHistory, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPaymentHistoryList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []PaymentHistory and assigns it to the Results field. +func (o *PaginatedPaymentHistoryList) SetResults(v []PaymentHistory) { + o.Results = v +} + +func (o PaginatedPaymentHistoryList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPaymentHistoryList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedPaymentHistoryList struct { + value *PaginatedPaymentHistoryList + isSet bool +} + +func (v NullablePaginatedPaymentHistoryList) Get() *PaginatedPaymentHistoryList { + return v.value +} + +func (v *NullablePaginatedPaymentHistoryList) Set(val *PaginatedPaymentHistoryList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPaymentHistoryList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPaymentHistoryList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPaymentHistoryList(val *PaginatedPaymentHistoryList) *NullablePaginatedPaymentHistoryList { + return &NullablePaginatedPaymentHistoryList{value: val, isSet: true} +} + +func (v NullablePaginatedPaymentHistoryList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPaymentHistoryList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_platform_list.go b/azion-api/model_paginated_platform_list.go new file mode 100644 index 0000000..12b3e29 --- /dev/null +++ b/azion-api/model_paginated_platform_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedPlatformList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPlatformList{} + +// PaginatedPlatformList struct for PaginatedPlatformList +type PaginatedPlatformList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListPlatform `json:"results,omitempty"` +} + +// NewPaginatedPlatformList instantiates a new PaginatedPlatformList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPlatformList() *PaginatedPlatformList { + this := PaginatedPlatformList{} + return &this +} + +// NewPaginatedPlatformListWithDefaults instantiates a new PaginatedPlatformList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPlatformListWithDefaults() *PaginatedPlatformList { + this := PaginatedPlatformList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPlatformList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPlatformList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPlatformList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedPlatformList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedPlatformList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPlatformList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedPlatformList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedPlatformList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedPlatformList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPlatformList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedPlatformList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedPlatformList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedPlatformList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPlatformList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedPlatformList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedPlatformList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPlatformList) GetResults() []ResponseListPlatform { + if o == nil || IsNil(o.Results) { + var ret []ResponseListPlatform + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPlatformList) GetResultsOk() ([]ResponseListPlatform, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPlatformList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListPlatform and assigns it to the Results field. +func (o *PaginatedPlatformList) SetResults(v []ResponseListPlatform) { + o.Results = v +} + +func (o PaginatedPlatformList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPlatformList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedPlatformList struct { + value *PaginatedPlatformList + isSet bool +} + +func (v NullablePaginatedPlatformList) Get() *PaginatedPlatformList { + return v.value +} + +func (v *NullablePaginatedPlatformList) Set(val *PaginatedPlatformList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPlatformList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPlatformList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPlatformList(val *PaginatedPlatformList) *NullablePaginatedPlatformList { + return &NullablePaginatedPlatformList{value: val, isSet: true} +} + +func (v NullablePaginatedPlatformList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPlatformList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_policy_list.go b/azion-api/model_paginated_policy_list.go new file mode 100644 index 0000000..eca27da --- /dev/null +++ b/azion-api/model_paginated_policy_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedPolicyList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedPolicyList{} + +// PaginatedPolicyList struct for PaginatedPolicyList +type PaginatedPolicyList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []Policy `json:"results,omitempty"` +} + +// NewPaginatedPolicyList instantiates a new PaginatedPolicyList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedPolicyList() *PaginatedPolicyList { + this := PaginatedPolicyList{} + return &this +} + +// NewPaginatedPolicyListWithDefaults instantiates a new PaginatedPolicyList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedPolicyListWithDefaults() *PaginatedPolicyList { + this := PaginatedPolicyList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedPolicyList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPolicyList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedPolicyList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedPolicyList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedPolicyList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPolicyList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedPolicyList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedPolicyList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedPolicyList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPolicyList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedPolicyList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedPolicyList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedPolicyList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPolicyList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedPolicyList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedPolicyList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedPolicyList) GetResults() []Policy { + if o == nil || IsNil(o.Results) { + var ret []Policy + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedPolicyList) GetResultsOk() ([]Policy, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedPolicyList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Policy and assigns it to the Results field. +func (o *PaginatedPolicyList) SetResults(v []Policy) { + o.Results = v +} + +func (o PaginatedPolicyList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedPolicyList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedPolicyList struct { + value *PaginatedPolicyList + isSet bool +} + +func (v NullablePaginatedPolicyList) Get() *PaginatedPolicyList { + return v.value +} + +func (v *NullablePaginatedPolicyList) Set(val *PaginatedPolicyList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedPolicyList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedPolicyList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedPolicyList(val *PaginatedPolicyList) *NullablePaginatedPolicyList { + return &NullablePaginatedPolicyList{value: val, isSet: true} +} + +func (v NullablePaginatedPolicyList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedPolicyList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_record_list.go b/azion-api/model_paginated_record_list.go new file mode 100644 index 0000000..966d6d7 --- /dev/null +++ b/azion-api/model_paginated_record_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedRecordList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRecordList{} + +// PaginatedRecordList struct for PaginatedRecordList +type PaginatedRecordList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Record `json:"results,omitempty"` +} + +// NewPaginatedRecordList instantiates a new PaginatedRecordList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRecordList() *PaginatedRecordList { + this := PaginatedRecordList{} + return &this +} + +// NewPaginatedRecordListWithDefaults instantiates a new PaginatedRecordList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRecordListWithDefaults() *PaginatedRecordList { + this := PaginatedRecordList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRecordList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRecordList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedRecordList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedRecordList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRecordList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedRecordList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedRecordList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRecordList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedRecordList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedRecordList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRecordList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedRecordList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRecordList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRecordList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRecordList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRecordList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRecordList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRecordList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRecordList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRecordList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRecordList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRecordList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRecordList) GetResults() []Record { + if o == nil || IsNil(o.Results) { + var ret []Record + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRecordList) GetResultsOk() ([]Record, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRecordList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Record and assigns it to the Results field. +func (o *PaginatedRecordList) SetResults(v []Record) { + o.Results = v +} + +func (o PaginatedRecordList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRecordList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedRecordList struct { + value *PaginatedRecordList + isSet bool +} + +func (v NullablePaginatedRecordList) Get() *PaginatedRecordList { + return v.value +} + +func (v *NullablePaginatedRecordList) Set(val *PaginatedRecordList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRecordList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRecordList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRecordList(val *PaginatedRecordList) *NullablePaginatedRecordList { + return &NullablePaginatedRecordList{value: val, isSet: true} +} + +func (v NullablePaginatedRecordList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRecordList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_report_list.go b/azion-api/model_paginated_report_list.go new file mode 100644 index 0000000..66e1673 --- /dev/null +++ b/azion-api/model_paginated_report_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedReportList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedReportList{} + +// PaginatedReportList struct for PaginatedReportList +type PaginatedReportList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListReport `json:"results,omitempty"` +} + +// NewPaginatedReportList instantiates a new PaginatedReportList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedReportList() *PaginatedReportList { + this := PaginatedReportList{} + return &this +} + +// NewPaginatedReportListWithDefaults instantiates a new PaginatedReportList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedReportListWithDefaults() *PaginatedReportList { + this := PaginatedReportList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedReportList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedReportList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedReportList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedReportList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedReportList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedReportList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedReportList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedReportList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedReportList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedReportList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedReportList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedReportList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedReportList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedReportList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedReportList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedReportList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedReportList) GetResults() []ResponseListReport { + if o == nil || IsNil(o.Results) { + var ret []ResponseListReport + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedReportList) GetResultsOk() ([]ResponseListReport, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedReportList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListReport and assigns it to the Results field. +func (o *PaginatedReportList) SetResults(v []ResponseListReport) { + o.Results = v +} + +func (o PaginatedReportList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedReportList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedReportList struct { + value *PaginatedReportList + isSet bool +} + +func (v NullablePaginatedReportList) Get() *PaginatedReportList { + return v.value +} + +func (v *NullablePaginatedReportList) Set(val *PaginatedReportList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedReportList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedReportList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedReportList(val *PaginatedReportList) *NullablePaginatedReportList { + return &NullablePaginatedReportList{value: val, isSet: true} +} + +func (v NullablePaginatedReportList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedReportList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_repository_list.go b/azion-api/model_paginated_repository_list.go new file mode 100644 index 0000000..d40494d --- /dev/null +++ b/azion-api/model_paginated_repository_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedRepositoryList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRepositoryList{} + +// PaginatedRepositoryList struct for PaginatedRepositoryList +type PaginatedRepositoryList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListRepository `json:"results,omitempty"` +} + +// NewPaginatedRepositoryList instantiates a new PaginatedRepositoryList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRepositoryList() *PaginatedRepositoryList { + this := PaginatedRepositoryList{} + return &this +} + +// NewPaginatedRepositoryListWithDefaults instantiates a new PaginatedRepositoryList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRepositoryListWithDefaults() *PaginatedRepositoryList { + this := PaginatedRepositoryList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRepositoryList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRepositoryList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedRepositoryList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedRepositoryList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedRepositoryList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedRepositoryList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedRepositoryList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedRepositoryList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedRepositoryList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedRepositoryList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedRepositoryList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedRepositoryList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRepositoryList) GetResults() []ResponseListRepository { + if o == nil || IsNil(o.Results) { + var ret []ResponseListRepository + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRepositoryList) GetResultsOk() ([]ResponseListRepository, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRepositoryList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListRepository and assigns it to the Results field. +func (o *PaginatedRepositoryList) SetResults(v []ResponseListRepository) { + o.Results = v +} + +func (o PaginatedRepositoryList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRepositoryList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedRepositoryList struct { + value *PaginatedRepositoryList + isSet bool +} + +func (v NullablePaginatedRepositoryList) Get() *PaginatedRepositoryList { + return v.value +} + +func (v *NullablePaginatedRepositoryList) Set(val *PaginatedRepositoryList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRepositoryList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRepositoryList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRepositoryList(val *PaginatedRepositoryList) *NullablePaginatedRepositoryList { + return &NullablePaginatedRepositoryList{value: val, isSet: true} +} + +func (v NullablePaginatedRepositoryList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRepositoryList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_request_phase_rule_list.go b/azion-api/model_paginated_request_phase_rule_list.go new file mode 100644 index 0000000..d992f68 --- /dev/null +++ b/azion-api/model_paginated_request_phase_rule_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedRequestPhaseRuleList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRequestPhaseRuleList{} + +// PaginatedRequestPhaseRuleList struct for PaginatedRequestPhaseRuleList +type PaginatedRequestPhaseRuleList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []RequestPhaseRule `json:"results,omitempty"` +} + +// NewPaginatedRequestPhaseRuleList instantiates a new PaginatedRequestPhaseRuleList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRequestPhaseRuleList() *PaginatedRequestPhaseRuleList { + this := PaginatedRequestPhaseRuleList{} + return &this +} + +// NewPaginatedRequestPhaseRuleListWithDefaults instantiates a new PaginatedRequestPhaseRuleList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRequestPhaseRuleListWithDefaults() *PaginatedRequestPhaseRuleList { + this := PaginatedRequestPhaseRuleList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRequestPhaseRuleList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRequestPhaseRuleList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedRequestPhaseRuleList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedRequestPhaseRuleList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRequestPhaseRuleList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedRequestPhaseRuleList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedRequestPhaseRuleList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRequestPhaseRuleList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedRequestPhaseRuleList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedRequestPhaseRuleList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRequestPhaseRuleList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedRequestPhaseRuleList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRequestPhaseRuleList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRequestPhaseRuleList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedRequestPhaseRuleList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedRequestPhaseRuleList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedRequestPhaseRuleList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedRequestPhaseRuleList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedRequestPhaseRuleList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedRequestPhaseRuleList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedRequestPhaseRuleList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedRequestPhaseRuleList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRequestPhaseRuleList) GetResults() []RequestPhaseRule { + if o == nil || IsNil(o.Results) { + var ret []RequestPhaseRule + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRequestPhaseRuleList) GetResultsOk() ([]RequestPhaseRule, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRequestPhaseRuleList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []RequestPhaseRule and assigns it to the Results field. +func (o *PaginatedRequestPhaseRuleList) SetResults(v []RequestPhaseRule) { + o.Results = v +} + +func (o PaginatedRequestPhaseRuleList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRequestPhaseRuleList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedRequestPhaseRuleList struct { + value *PaginatedRequestPhaseRuleList + isSet bool +} + +func (v NullablePaginatedRequestPhaseRuleList) Get() *PaginatedRequestPhaseRuleList { + return v.value +} + +func (v *NullablePaginatedRequestPhaseRuleList) Set(val *PaginatedRequestPhaseRuleList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRequestPhaseRuleList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRequestPhaseRuleList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRequestPhaseRuleList(val *PaginatedRequestPhaseRuleList) *NullablePaginatedRequestPhaseRuleList { + return &NullablePaginatedRequestPhaseRuleList{value: val, isSet: true} +} + +func (v NullablePaginatedRequestPhaseRuleList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRequestPhaseRuleList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_response_payment_method_list.go b/azion-api/model_paginated_response_payment_method_list.go new file mode 100644 index 0000000..7b74bb8 --- /dev/null +++ b/azion-api/model_paginated_response_payment_method_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedResponsePaymentMethodList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedResponsePaymentMethodList{} + +// PaginatedResponsePaymentMethodList struct for PaginatedResponsePaymentMethodList +type PaginatedResponsePaymentMethodList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponsePaymentMethod `json:"results,omitempty"` +} + +// NewPaginatedResponsePaymentMethodList instantiates a new PaginatedResponsePaymentMethodList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedResponsePaymentMethodList() *PaginatedResponsePaymentMethodList { + this := PaginatedResponsePaymentMethodList{} + return &this +} + +// NewPaginatedResponsePaymentMethodListWithDefaults instantiates a new PaginatedResponsePaymentMethodList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedResponsePaymentMethodListWithDefaults() *PaginatedResponsePaymentMethodList { + this := PaginatedResponsePaymentMethodList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedResponsePaymentMethodList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePaymentMethodList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedResponsePaymentMethodList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedResponsePaymentMethodList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedResponsePaymentMethodList) GetResults() []ResponsePaymentMethod { + if o == nil || IsNil(o.Results) { + var ret []ResponsePaymentMethod + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePaymentMethodList) GetResultsOk() ([]ResponsePaymentMethod, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedResponsePaymentMethodList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponsePaymentMethod and assigns it to the Results field. +func (o *PaginatedResponsePaymentMethodList) SetResults(v []ResponsePaymentMethod) { + o.Results = v +} + +func (o PaginatedResponsePaymentMethodList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedResponsePaymentMethodList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedResponsePaymentMethodList struct { + value *PaginatedResponsePaymentMethodList + isSet bool +} + +func (v NullablePaginatedResponsePaymentMethodList) Get() *PaginatedResponsePaymentMethodList { + return v.value +} + +func (v *NullablePaginatedResponsePaymentMethodList) Set(val *PaginatedResponsePaymentMethodList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedResponsePaymentMethodList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedResponsePaymentMethodList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedResponsePaymentMethodList(val *PaginatedResponsePaymentMethodList) *NullablePaginatedResponsePaymentMethodList { + return &NullablePaginatedResponsePaymentMethodList{value: val, isSet: true} +} + +func (v NullablePaginatedResponsePaymentMethodList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedResponsePaymentMethodList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_response_phase_rule_list.go b/azion-api/model_paginated_response_phase_rule_list.go new file mode 100644 index 0000000..60b2ffe --- /dev/null +++ b/azion-api/model_paginated_response_phase_rule_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedResponsePhaseRuleList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedResponsePhaseRuleList{} + +// PaginatedResponsePhaseRuleList struct for PaginatedResponsePhaseRuleList +type PaginatedResponsePhaseRuleList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []ResponsePhaseRule `json:"results,omitempty"` +} + +// NewPaginatedResponsePhaseRuleList instantiates a new PaginatedResponsePhaseRuleList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedResponsePhaseRuleList() *PaginatedResponsePhaseRuleList { + this := PaginatedResponsePhaseRuleList{} + return &this +} + +// NewPaginatedResponsePhaseRuleListWithDefaults instantiates a new PaginatedResponsePhaseRuleList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedResponsePhaseRuleListWithDefaults() *PaginatedResponsePhaseRuleList { + this := PaginatedResponsePhaseRuleList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedResponsePhaseRuleList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePhaseRuleList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedResponsePhaseRuleList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedResponsePhaseRuleList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePhaseRuleList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedResponsePhaseRuleList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedResponsePhaseRuleList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePhaseRuleList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedResponsePhaseRuleList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedResponsePhaseRuleList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePhaseRuleList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedResponsePhaseRuleList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedResponsePhaseRuleList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedResponsePhaseRuleList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedResponsePhaseRuleList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedResponsePhaseRuleList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedResponsePhaseRuleList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedResponsePhaseRuleList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedResponsePhaseRuleList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedResponsePhaseRuleList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedResponsePhaseRuleList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedResponsePhaseRuleList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedResponsePhaseRuleList) GetResults() []ResponsePhaseRule { + if o == nil || IsNil(o.Results) { + var ret []ResponsePhaseRule + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedResponsePhaseRuleList) GetResultsOk() ([]ResponsePhaseRule, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedResponsePhaseRuleList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponsePhaseRule and assigns it to the Results field. +func (o *PaginatedResponsePhaseRuleList) SetResults(v []ResponsePhaseRule) { + o.Results = v +} + +func (o PaginatedResponsePhaseRuleList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedResponsePhaseRuleList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedResponsePhaseRuleList struct { + value *PaginatedResponsePhaseRuleList + isSet bool +} + +func (v NullablePaginatedResponsePhaseRuleList) Get() *PaginatedResponsePhaseRuleList { + return v.value +} + +func (v *NullablePaginatedResponsePhaseRuleList) Set(val *PaginatedResponsePhaseRuleList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedResponsePhaseRuleList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedResponsePhaseRuleList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedResponsePhaseRuleList(val *PaginatedResponsePhaseRuleList) *NullablePaginatedResponsePhaseRuleList { + return &NullablePaginatedResponsePhaseRuleList{value: val, isSet: true} +} + +func (v NullablePaginatedResponsePhaseRuleList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedResponsePhaseRuleList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_row_list.go b/azion-api/model_paginated_row_list.go new file mode 100644 index 0000000..0d4ed23 --- /dev/null +++ b/azion-api/model_paginated_row_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedRowList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedRowList{} + +// PaginatedRowList struct for PaginatedRowList +type PaginatedRowList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []ResponseListRow `json:"results,omitempty"` +} + +// NewPaginatedRowList instantiates a new PaginatedRowList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedRowList() *PaginatedRowList { + this := PaginatedRowList{} + return &this +} + +// NewPaginatedRowListWithDefaults instantiates a new PaginatedRowList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedRowListWithDefaults() *PaginatedRowList { + this := PaginatedRowList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedRowList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRowList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedRowList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedRowList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedRowList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRowList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedRowList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedRowList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedRowList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRowList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedRowList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedRowList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedRowList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRowList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedRowList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedRowList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedRowList) GetResults() []ResponseListRow { + if o == nil || IsNil(o.Results) { + var ret []ResponseListRow + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedRowList) GetResultsOk() ([]ResponseListRow, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedRowList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListRow and assigns it to the Results field. +func (o *PaginatedRowList) SetResults(v []ResponseListRow) { + o.Results = v +} + +func (o PaginatedRowList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedRowList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedRowList struct { + value *PaginatedRowList + isSet bool +} + +func (v NullablePaginatedRowList) Get() *PaginatedRowList { + return v.value +} + +func (v *NullablePaginatedRowList) Set(val *PaginatedRowList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedRowList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedRowList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedRowList(val *PaginatedRowList) *NullablePaginatedRowList { + return &NullablePaginatedRowList{value: val, isSet: true} +} + +func (v NullablePaginatedRowList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedRowList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_service_resource_list.go b/azion-api/model_paginated_service_resource_list.go new file mode 100644 index 0000000..c758f18 --- /dev/null +++ b/azion-api/model_paginated_service_resource_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedServiceResourceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedServiceResourceList{} + +// PaginatedServiceResourceList struct for PaginatedServiceResourceList +type PaginatedServiceResourceList struct { + Count *int64 `json:"count,omitempty"` + Results []ServiceResource `json:"results,omitempty"` +} + +// NewPaginatedServiceResourceList instantiates a new PaginatedServiceResourceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedServiceResourceList() *PaginatedServiceResourceList { + this := PaginatedServiceResourceList{} + return &this +} + +// NewPaginatedServiceResourceListWithDefaults instantiates a new PaginatedServiceResourceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedServiceResourceListWithDefaults() *PaginatedServiceResourceList { + this := PaginatedServiceResourceList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedServiceResourceList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedServiceResourceList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedServiceResourceList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedServiceResourceList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedServiceResourceList) GetResults() []ServiceResource { + if o == nil || IsNil(o.Results) { + var ret []ServiceResource + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedServiceResourceList) GetResultsOk() ([]ServiceResource, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedServiceResourceList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ServiceResource and assigns it to the Results field. +func (o *PaginatedServiceResourceList) SetResults(v []ServiceResource) { + o.Results = v +} + +func (o PaginatedServiceResourceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedServiceResourceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedServiceResourceList struct { + value *PaginatedServiceResourceList + isSet bool +} + +func (v NullablePaginatedServiceResourceList) Get() *PaginatedServiceResourceList { + return v.value +} + +func (v *NullablePaginatedServiceResourceList) Set(val *PaginatedServiceResourceList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedServiceResourceList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedServiceResourceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedServiceResourceList(val *PaginatedServiceResourceList) *NullablePaginatedServiceResourceList { + return &NullablePaginatedServiceResourceList{value: val, isSet: true} +} + +func (v NullablePaginatedServiceResourceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedServiceResourceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_service_token_list.go b/azion-api/model_paginated_service_token_list.go new file mode 100644 index 0000000..e65b1c6 --- /dev/null +++ b/azion-api/model_paginated_service_token_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedServiceTokenList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedServiceTokenList{} + +// PaginatedServiceTokenList struct for PaginatedServiceTokenList +type PaginatedServiceTokenList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListServiceToken `json:"results,omitempty"` +} + +// NewPaginatedServiceTokenList instantiates a new PaginatedServiceTokenList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedServiceTokenList() *PaginatedServiceTokenList { + this := PaginatedServiceTokenList{} + return &this +} + +// NewPaginatedServiceTokenListWithDefaults instantiates a new PaginatedServiceTokenList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedServiceTokenListWithDefaults() *PaginatedServiceTokenList { + this := PaginatedServiceTokenList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedServiceTokenList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedServiceTokenList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedServiceTokenList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedServiceTokenList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedServiceTokenList) GetResults() []ResponseListServiceToken { + if o == nil || IsNil(o.Results) { + var ret []ResponseListServiceToken + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedServiceTokenList) GetResultsOk() ([]ResponseListServiceToken, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedServiceTokenList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListServiceToken and assigns it to the Results field. +func (o *PaginatedServiceTokenList) SetResults(v []ResponseListServiceToken) { + o.Results = v +} + +func (o PaginatedServiceTokenList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedServiceTokenList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedServiceTokenList struct { + value *PaginatedServiceTokenList + isSet bool +} + +func (v NullablePaginatedServiceTokenList) Get() *PaginatedServiceTokenList { + return v.value +} + +func (v *NullablePaginatedServiceTokenList) Set(val *PaginatedServiceTokenList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedServiceTokenList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedServiceTokenList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedServiceTokenList(val *PaginatedServiceTokenList) *NullablePaginatedServiceTokenList { + return &NullablePaginatedServiceTokenList{value: val, isSet: true} +} + +func (v NullablePaginatedServiceTokenList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedServiceTokenList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_services_list.go b/azion-api/model_paginated_services_list.go new file mode 100644 index 0000000..6cc3bc5 --- /dev/null +++ b/azion-api/model_paginated_services_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedServicesList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedServicesList{} + +// PaginatedServicesList struct for PaginatedServicesList +type PaginatedServicesList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListServices `json:"results,omitempty"` +} + +// NewPaginatedServicesList instantiates a new PaginatedServicesList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedServicesList() *PaginatedServicesList { + this := PaginatedServicesList{} + return &this +} + +// NewPaginatedServicesListWithDefaults instantiates a new PaginatedServicesList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedServicesListWithDefaults() *PaginatedServicesList { + this := PaginatedServicesList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedServicesList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedServicesList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedServicesList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedServicesList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedServicesList) GetResults() []ResponseListServices { + if o == nil || IsNil(o.Results) { + var ret []ResponseListServices + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedServicesList) GetResultsOk() ([]ResponseListServices, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedServicesList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListServices and assigns it to the Results field. +func (o *PaginatedServicesList) SetResults(v []ResponseListServices) { + o.Results = v +} + +func (o PaginatedServicesList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedServicesList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedServicesList struct { + value *PaginatedServicesList + isSet bool +} + +func (v NullablePaginatedServicesList) Get() *PaginatedServicesList { + return v.value +} + +func (v *NullablePaginatedServicesList) Set(val *PaginatedServicesList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedServicesList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedServicesList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedServicesList(val *PaginatedServicesList) *NullablePaginatedServicesList { + return &NullablePaginatedServicesList{value: val, isSet: true} +} + +func (v NullablePaginatedServicesList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedServicesList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_template_list.go b/azion-api/model_paginated_template_list.go new file mode 100644 index 0000000..e98afca --- /dev/null +++ b/azion-api/model_paginated_template_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedTemplateList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTemplateList{} + +// PaginatedTemplateList struct for PaginatedTemplateList +type PaginatedTemplateList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Template `json:"results,omitempty"` +} + +// NewPaginatedTemplateList instantiates a new PaginatedTemplateList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTemplateList() *PaginatedTemplateList { + this := PaginatedTemplateList{} + return &this +} + +// NewPaginatedTemplateListWithDefaults instantiates a new PaginatedTemplateList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTemplateListWithDefaults() *PaginatedTemplateList { + this := PaginatedTemplateList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedTemplateList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTemplateList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedTemplateList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedTemplateList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTemplateList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedTemplateList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedTemplateList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTemplateList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedTemplateList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedTemplateList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTemplateList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedTemplateList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTemplateList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTemplateList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedTemplateList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedTemplateList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedTemplateList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedTemplateList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedTemplateList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedTemplateList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedTemplateList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedTemplateList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedTemplateList) GetResults() []Template { + if o == nil || IsNil(o.Results) { + var ret []Template + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTemplateList) GetResultsOk() ([]Template, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedTemplateList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Template and assigns it to the Results field. +func (o *PaginatedTemplateList) SetResults(v []Template) { + o.Results = v +} + +func (o PaginatedTemplateList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTemplateList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedTemplateList struct { + value *PaginatedTemplateList + isSet bool +} + +func (v NullablePaginatedTemplateList) Get() *PaginatedTemplateList { + return v.value +} + +func (v *NullablePaginatedTemplateList) Set(val *PaginatedTemplateList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTemplateList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTemplateList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTemplateList(val *PaginatedTemplateList) *NullablePaginatedTemplateList { + return &NullablePaginatedTemplateList{value: val, isSet: true} +} + +func (v NullablePaginatedTemplateList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTemplateList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_tool_list.go b/azion-api/model_paginated_tool_list.go new file mode 100644 index 0000000..080362c --- /dev/null +++ b/azion-api/model_paginated_tool_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedToolList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedToolList{} + +// PaginatedToolList struct for PaginatedToolList +type PaginatedToolList struct { + Count *int64 `json:"count,omitempty"` + Results []Tool `json:"results,omitempty"` +} + +// NewPaginatedToolList instantiates a new PaginatedToolList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedToolList() *PaginatedToolList { + this := PaginatedToolList{} + return &this +} + +// NewPaginatedToolListWithDefaults instantiates a new PaginatedToolList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedToolListWithDefaults() *PaginatedToolList { + this := PaginatedToolList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedToolList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedToolList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedToolList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedToolList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedToolList) GetResults() []Tool { + if o == nil || IsNil(o.Results) { + var ret []Tool + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedToolList) GetResultsOk() ([]Tool, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedToolList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Tool and assigns it to the Results field. +func (o *PaginatedToolList) SetResults(v []Tool) { + o.Results = v +} + +func (o PaginatedToolList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedToolList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedToolList struct { + value *PaginatedToolList + isSet bool +} + +func (v NullablePaginatedToolList) Get() *PaginatedToolList { + return v.value +} + +func (v *NullablePaginatedToolList) Set(val *PaginatedToolList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedToolList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedToolList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedToolList(val *PaginatedToolList) *NullablePaginatedToolList { + return &NullablePaginatedToolList{value: val, isSet: true} +} + +func (v NullablePaginatedToolList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedToolList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_totp_device_list.go b/azion-api/model_paginated_totp_device_list.go new file mode 100644 index 0000000..57b511b --- /dev/null +++ b/azion-api/model_paginated_totp_device_list.go @@ -0,0 +1,275 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedTOTPDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedTOTPDeviceList{} + +// PaginatedTOTPDeviceList struct for PaginatedTOTPDeviceList +type PaginatedTOTPDeviceList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + Results []TOTPDeviceList `json:"results,omitempty"` +} + +// NewPaginatedTOTPDeviceList instantiates a new PaginatedTOTPDeviceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedTOTPDeviceList() *PaginatedTOTPDeviceList { + this := PaginatedTOTPDeviceList{} + return &this +} + +// NewPaginatedTOTPDeviceListWithDefaults instantiates a new PaginatedTOTPDeviceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedTOTPDeviceListWithDefaults() *PaginatedTOTPDeviceList { + this := PaginatedTOTPDeviceList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedTOTPDeviceList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTOTPDeviceList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedTOTPDeviceList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedTOTPDeviceList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedTOTPDeviceList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTOTPDeviceList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedTOTPDeviceList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedTOTPDeviceList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedTOTPDeviceList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTOTPDeviceList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedTOTPDeviceList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedTOTPDeviceList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedTOTPDeviceList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTOTPDeviceList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedTOTPDeviceList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedTOTPDeviceList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedTOTPDeviceList) GetResults() []TOTPDeviceList { + if o == nil || IsNil(o.Results) { + var ret []TOTPDeviceList + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedTOTPDeviceList) GetResultsOk() ([]TOTPDeviceList, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedTOTPDeviceList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []TOTPDeviceList and assigns it to the Results field. +func (o *PaginatedTOTPDeviceList) SetResults(v []TOTPDeviceList) { + o.Results = v +} + +func (o PaginatedTOTPDeviceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedTOTPDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedTOTPDeviceList struct { + value *PaginatedTOTPDeviceList + isSet bool +} + +func (v NullablePaginatedTOTPDeviceList) Get() *PaginatedTOTPDeviceList { + return v.value +} + +func (v *NullablePaginatedTOTPDeviceList) Set(val *PaginatedTOTPDeviceList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedTOTPDeviceList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedTOTPDeviceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedTOTPDeviceList(val *PaginatedTOTPDeviceList) *NullablePaginatedTOTPDeviceList { + return &NullablePaginatedTOTPDeviceList{value: val, isSet: true} +} + +func (v NullablePaginatedTOTPDeviceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedTOTPDeviceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_user_list.go b/azion-api/model_paginated_user_list.go new file mode 100644 index 0000000..d887982 --- /dev/null +++ b/azion-api/model_paginated_user_list.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedUserList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedUserList{} + +// PaginatedUserList struct for PaginatedUserList +type PaginatedUserList struct { + Count *int64 `json:"count,omitempty"` + Results []ResponseListUser `json:"results,omitempty"` +} + +// NewPaginatedUserList instantiates a new PaginatedUserList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedUserList() *PaginatedUserList { + this := PaginatedUserList{} + return &this +} + +// NewPaginatedUserListWithDefaults instantiates a new PaginatedUserList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedUserListWithDefaults() *PaginatedUserList { + this := PaginatedUserList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedUserList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUserList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedUserList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedUserList) SetCount(v int64) { + o.Count = &v +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedUserList) GetResults() []ResponseListUser { + if o == nil || IsNil(o.Results) { + var ret []ResponseListUser + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedUserList) GetResultsOk() ([]ResponseListUser, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedUserList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []ResponseListUser and assigns it to the Results field. +func (o *PaginatedUserList) SetResults(v []ResponseListUser) { + o.Results = v +} + +func (o PaginatedUserList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedUserList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedUserList struct { + value *PaginatedUserList + isSet bool +} + +func (v NullablePaginatedUserList) Get() *PaginatedUserList { + return v.value +} + +func (v *NullablePaginatedUserList) Set(val *PaginatedUserList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedUserList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedUserList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedUserList(val *PaginatedUserList) *NullablePaginatedUserList { + return &NullablePaginatedUserList{value: val, isSet: true} +} + +func (v NullablePaginatedUserList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedUserList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_waf_list.go b/azion-api/model_paginated_waf_list.go new file mode 100644 index 0000000..d5b0b7f --- /dev/null +++ b/azion-api/model_paginated_waf_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedWAFList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedWAFList{} + +// PaginatedWAFList struct for PaginatedWAFList +type PaginatedWAFList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []WAF `json:"results,omitempty"` +} + +// NewPaginatedWAFList instantiates a new PaginatedWAFList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedWAFList() *PaginatedWAFList { + this := PaginatedWAFList{} + return &this +} + +// NewPaginatedWAFListWithDefaults instantiates a new PaginatedWAFList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedWAFListWithDefaults() *PaginatedWAFList { + this := PaginatedWAFList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedWAFList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedWAFList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedWAFList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedWAFList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedWAFList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedWAFList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedWAFList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedWAFList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWAFList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWAFList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedWAFList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedWAFList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedWAFList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWAFList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWAFList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedWAFList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedWAFList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedWAFList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedWAFList) GetResults() []WAF { + if o == nil || IsNil(o.Results) { + var ret []WAF + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFList) GetResultsOk() ([]WAF, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedWAFList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []WAF and assigns it to the Results field. +func (o *PaginatedWAFList) SetResults(v []WAF) { + o.Results = v +} + +func (o PaginatedWAFList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedWAFList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedWAFList struct { + value *PaginatedWAFList + isSet bool +} + +func (v NullablePaginatedWAFList) Get() *PaginatedWAFList { + return v.value +} + +func (v *NullablePaginatedWAFList) Set(val *PaginatedWAFList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedWAFList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedWAFList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedWAFList(val *PaginatedWAFList) *NullablePaginatedWAFList { + return &NullablePaginatedWAFList{value: val, isSet: true} +} + +func (v NullablePaginatedWAFList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedWAFList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_waf_rule_list.go b/azion-api/model_paginated_waf_rule_list.go new file mode 100644 index 0000000..c21a5bd --- /dev/null +++ b/azion-api/model_paginated_waf_rule_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedWAFRuleList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedWAFRuleList{} + +// PaginatedWAFRuleList struct for PaginatedWAFRuleList +type PaginatedWAFRuleList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []WAFRule `json:"results,omitempty"` +} + +// NewPaginatedWAFRuleList instantiates a new PaginatedWAFRuleList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedWAFRuleList() *PaginatedWAFRuleList { + this := PaginatedWAFRuleList{} + return &this +} + +// NewPaginatedWAFRuleListWithDefaults instantiates a new PaginatedWAFRuleList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedWAFRuleListWithDefaults() *PaginatedWAFRuleList { + this := PaginatedWAFRuleList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedWAFRuleList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFRuleList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedWAFRuleList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedWAFRuleList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFRuleList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedWAFRuleList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedWAFRuleList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFRuleList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedWAFRuleList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedWAFRuleList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFRuleList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedWAFRuleList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWAFRuleList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWAFRuleList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedWAFRuleList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedWAFRuleList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedWAFRuleList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWAFRuleList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWAFRuleList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedWAFRuleList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedWAFRuleList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedWAFRuleList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedWAFRuleList) GetResults() []WAFRule { + if o == nil || IsNil(o.Results) { + var ret []WAFRule + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWAFRuleList) GetResultsOk() ([]WAFRule, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedWAFRuleList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []WAFRule and assigns it to the Results field. +func (o *PaginatedWAFRuleList) SetResults(v []WAFRule) { + o.Results = v +} + +func (o PaginatedWAFRuleList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedWAFRuleList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedWAFRuleList struct { + value *PaginatedWAFRuleList + isSet bool +} + +func (v NullablePaginatedWAFRuleList) Get() *PaginatedWAFRuleList { + return v.value +} + +func (v *NullablePaginatedWAFRuleList) Set(val *PaginatedWAFRuleList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedWAFRuleList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedWAFRuleList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedWAFRuleList(val *PaginatedWAFRuleList) *NullablePaginatedWAFRuleList { + return &NullablePaginatedWAFRuleList{value: val, isSet: true} +} + +func (v NullablePaginatedWAFRuleList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedWAFRuleList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_workload_deployment_list.go b/azion-api/model_paginated_workload_deployment_list.go new file mode 100644 index 0000000..1221cdd --- /dev/null +++ b/azion-api/model_paginated_workload_deployment_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedWorkloadDeploymentList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedWorkloadDeploymentList{} + +// PaginatedWorkloadDeploymentList struct for PaginatedWorkloadDeploymentList +type PaginatedWorkloadDeploymentList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []WorkloadDeployment `json:"results,omitempty"` +} + +// NewPaginatedWorkloadDeploymentList instantiates a new PaginatedWorkloadDeploymentList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedWorkloadDeploymentList() *PaginatedWorkloadDeploymentList { + this := PaginatedWorkloadDeploymentList{} + return &this +} + +// NewPaginatedWorkloadDeploymentListWithDefaults instantiates a new PaginatedWorkloadDeploymentList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedWorkloadDeploymentListWithDefaults() *PaginatedWorkloadDeploymentList { + this := PaginatedWorkloadDeploymentList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedWorkloadDeploymentList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadDeploymentList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedWorkloadDeploymentList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedWorkloadDeploymentList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadDeploymentList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedWorkloadDeploymentList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedWorkloadDeploymentList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadDeploymentList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedWorkloadDeploymentList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedWorkloadDeploymentList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadDeploymentList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedWorkloadDeploymentList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWorkloadDeploymentList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWorkloadDeploymentList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedWorkloadDeploymentList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedWorkloadDeploymentList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedWorkloadDeploymentList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWorkloadDeploymentList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWorkloadDeploymentList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedWorkloadDeploymentList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedWorkloadDeploymentList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedWorkloadDeploymentList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedWorkloadDeploymentList) GetResults() []WorkloadDeployment { + if o == nil || IsNil(o.Results) { + var ret []WorkloadDeployment + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadDeploymentList) GetResultsOk() ([]WorkloadDeployment, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedWorkloadDeploymentList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []WorkloadDeployment and assigns it to the Results field. +func (o *PaginatedWorkloadDeploymentList) SetResults(v []WorkloadDeployment) { + o.Results = v +} + +func (o PaginatedWorkloadDeploymentList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedWorkloadDeploymentList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedWorkloadDeploymentList struct { + value *PaginatedWorkloadDeploymentList + isSet bool +} + +func (v NullablePaginatedWorkloadDeploymentList) Get() *PaginatedWorkloadDeploymentList { + return v.value +} + +func (v *NullablePaginatedWorkloadDeploymentList) Set(val *PaginatedWorkloadDeploymentList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedWorkloadDeploymentList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedWorkloadDeploymentList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedWorkloadDeploymentList(val *PaginatedWorkloadDeploymentList) *NullablePaginatedWorkloadDeploymentList { + return &NullablePaginatedWorkloadDeploymentList{value: val, isSet: true} +} + +func (v NullablePaginatedWorkloadDeploymentList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedWorkloadDeploymentList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_workload_list.go b/azion-api/model_paginated_workload_list.go new file mode 100644 index 0000000..a29586b --- /dev/null +++ b/azion-api/model_paginated_workload_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedWorkloadList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedWorkloadList{} + +// PaginatedWorkloadList struct for PaginatedWorkloadList +type PaginatedWorkloadList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Workload `json:"results,omitempty"` +} + +// NewPaginatedWorkloadList instantiates a new PaginatedWorkloadList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedWorkloadList() *PaginatedWorkloadList { + this := PaginatedWorkloadList{} + return &this +} + +// NewPaginatedWorkloadListWithDefaults instantiates a new PaginatedWorkloadList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedWorkloadListWithDefaults() *PaginatedWorkloadList { + this := PaginatedWorkloadList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedWorkloadList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedWorkloadList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedWorkloadList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedWorkloadList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedWorkloadList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedWorkloadList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedWorkloadList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedWorkloadList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWorkloadList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWorkloadList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedWorkloadList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedWorkloadList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedWorkloadList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedWorkloadList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedWorkloadList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedWorkloadList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedWorkloadList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedWorkloadList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedWorkloadList) GetResults() []Workload { + if o == nil || IsNil(o.Results) { + var ret []Workload + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedWorkloadList) GetResultsOk() ([]Workload, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedWorkloadList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Workload and assigns it to the Results field. +func (o *PaginatedWorkloadList) SetResults(v []Workload) { + o.Results = v +} + +func (o PaginatedWorkloadList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedWorkloadList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedWorkloadList struct { + value *PaginatedWorkloadList + isSet bool +} + +func (v NullablePaginatedWorkloadList) Get() *PaginatedWorkloadList { + return v.value +} + +func (v *NullablePaginatedWorkloadList) Set(val *PaginatedWorkloadList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedWorkloadList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedWorkloadList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedWorkloadList(val *PaginatedWorkloadList) *NullablePaginatedWorkloadList { + return &NullablePaginatedWorkloadList{value: val, isSet: true} +} + +func (v NullablePaginatedWorkloadList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedWorkloadList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_paginated_zone_list.go b/azion-api/model_paginated_zone_list.go new file mode 100644 index 0000000..df13e45 --- /dev/null +++ b/azion-api/model_paginated_zone_list.go @@ -0,0 +1,369 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PaginatedZoneList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaginatedZoneList{} + +// PaginatedZoneList struct for PaginatedZoneList +type PaginatedZoneList struct { + // Total number of items + Count *int64 `json:"count,omitempty"` + // Total number of pages + TotalPages *int64 `json:"total_pages,omitempty"` + // Current page number + Page *int64 `json:"page,omitempty"` + // Number of items per page + PageSize *int64 `json:"page_size,omitempty"` + // URL to the next page of results + Next NullableString `json:"next,omitempty"` + // URL to the previous page of results + Previous NullableString `json:"previous,omitempty"` + Results []Zone `json:"results,omitempty"` +} + +// NewPaginatedZoneList instantiates a new PaginatedZoneList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaginatedZoneList() *PaginatedZoneList { + this := PaginatedZoneList{} + return &this +} + +// NewPaginatedZoneListWithDefaults instantiates a new PaginatedZoneList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginatedZoneListWithDefaults() *PaginatedZoneList { + this := PaginatedZoneList{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *PaginatedZoneList) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedZoneList) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *PaginatedZoneList) SetCount(v int64) { + o.Count = &v +} + +// GetTotalPages returns the TotalPages field value if set, zero value otherwise. +func (o *PaginatedZoneList) GetTotalPages() int64 { + if o == nil || IsNil(o.TotalPages) { + var ret int64 + return ret + } + return *o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedZoneList) GetTotalPagesOk() (*int64, bool) { + if o == nil || IsNil(o.TotalPages) { + return nil, false + } + return o.TotalPages, true +} + +// HasTotalPages returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasTotalPages() bool { + if o != nil && !IsNil(o.TotalPages) { + return true + } + + return false +} + +// SetTotalPages gets a reference to the given int64 and assigns it to the TotalPages field. +func (o *PaginatedZoneList) SetTotalPages(v int64) { + o.TotalPages = &v +} + +// GetPage returns the Page field value if set, zero value otherwise. +func (o *PaginatedZoneList) GetPage() int64 { + if o == nil || IsNil(o.Page) { + var ret int64 + return ret + } + return *o.Page +} + +// GetPageOk returns a tuple with the Page field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedZoneList) GetPageOk() (*int64, bool) { + if o == nil || IsNil(o.Page) { + return nil, false + } + return o.Page, true +} + +// HasPage returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasPage() bool { + if o != nil && !IsNil(o.Page) { + return true + } + + return false +} + +// SetPage gets a reference to the given int64 and assigns it to the Page field. +func (o *PaginatedZoneList) SetPage(v int64) { + o.Page = &v +} + +// GetPageSize returns the PageSize field value if set, zero value otherwise. +func (o *PaginatedZoneList) GetPageSize() int64 { + if o == nil || IsNil(o.PageSize) { + var ret int64 + return ret + } + return *o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedZoneList) GetPageSizeOk() (*int64, bool) { + if o == nil || IsNil(o.PageSize) { + return nil, false + } + return o.PageSize, true +} + +// HasPageSize returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasPageSize() bool { + if o != nil && !IsNil(o.PageSize) { + return true + } + + return false +} + +// SetPageSize gets a reference to the given int64 and assigns it to the PageSize field. +func (o *PaginatedZoneList) SetPageSize(v int64) { + o.PageSize = &v +} + +// GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedZoneList) GetNext() string { + if o == nil || IsNil(o.Next.Get()) { + var ret string + return ret + } + return *o.Next.Get() +} + +// GetNextOk returns a tuple with the Next field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedZoneList) GetNextOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Next.Get(), o.Next.IsSet() +} + +// HasNext returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasNext() bool { + if o != nil && o.Next.IsSet() { + return true + } + + return false +} + +// SetNext gets a reference to the given NullableString and assigns it to the Next field. +func (o *PaginatedZoneList) SetNext(v string) { + o.Next.Set(&v) +} +// SetNextNil sets the value for Next to be an explicit nil +func (o *PaginatedZoneList) SetNextNil() { + o.Next.Set(nil) +} + +// UnsetNext ensures that no value is present for Next, not even an explicit nil +func (o *PaginatedZoneList) UnsetNext() { + o.Next.Unset() +} + +// GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PaginatedZoneList) GetPrevious() string { + if o == nil || IsNil(o.Previous.Get()) { + var ret string + return ret + } + return *o.Previous.Get() +} + +// GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaginatedZoneList) GetPreviousOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Previous.Get(), o.Previous.IsSet() +} + +// HasPrevious returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasPrevious() bool { + if o != nil && o.Previous.IsSet() { + return true + } + + return false +} + +// SetPrevious gets a reference to the given NullableString and assigns it to the Previous field. +func (o *PaginatedZoneList) SetPrevious(v string) { + o.Previous.Set(&v) +} +// SetPreviousNil sets the value for Previous to be an explicit nil +func (o *PaginatedZoneList) SetPreviousNil() { + o.Previous.Set(nil) +} + +// UnsetPrevious ensures that no value is present for Previous, not even an explicit nil +func (o *PaginatedZoneList) UnsetPrevious() { + o.Previous.Unset() +} + +// GetResults returns the Results field value if set, zero value otherwise. +func (o *PaginatedZoneList) GetResults() []Zone { + if o == nil || IsNil(o.Results) { + var ret []Zone + return ret + } + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaginatedZoneList) GetResultsOk() ([]Zone, bool) { + if o == nil || IsNil(o.Results) { + return nil, false + } + return o.Results, true +} + +// HasResults returns a boolean if a field has been set. +func (o *PaginatedZoneList) HasResults() bool { + if o != nil && !IsNil(o.Results) { + return true + } + + return false +} + +// SetResults gets a reference to the given []Zone and assigns it to the Results field. +func (o *PaginatedZoneList) SetResults(v []Zone) { + o.Results = v +} + +func (o PaginatedZoneList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaginatedZoneList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.TotalPages) { + toSerialize["total_pages"] = o.TotalPages + } + if !IsNil(o.Page) { + toSerialize["page"] = o.Page + } + if !IsNil(o.PageSize) { + toSerialize["page_size"] = o.PageSize + } + if o.Next.IsSet() { + toSerialize["next"] = o.Next.Get() + } + if o.Previous.IsSet() { + toSerialize["previous"] = o.Previous.Get() + } + if !IsNil(o.Results) { + toSerialize["results"] = o.Results + } + return toSerialize, nil +} + +type NullablePaginatedZoneList struct { + value *PaginatedZoneList + isSet bool +} + +func (v NullablePaginatedZoneList) Get() *PaginatedZoneList { + return v.value +} + +func (v *NullablePaginatedZoneList) Set(val *PaginatedZoneList) { + v.value = val + v.isSet = true +} + +func (v NullablePaginatedZoneList) IsSet() bool { + return v.isSet +} + +func (v *NullablePaginatedZoneList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaginatedZoneList(val *PaginatedZoneList) *NullablePaginatedZoneList { + return &NullablePaginatedZoneList{value: val, isSet: true} +} + +func (v NullablePaginatedZoneList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaginatedZoneList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_pagination.go b/azion-api/model_pagination.go new file mode 100644 index 0000000..6d6f366 --- /dev/null +++ b/azion-api/model_pagination.go @@ -0,0 +1,299 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Pagination type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Pagination{} + +// Pagination struct for Pagination +type Pagination struct { + Page int64 `json:"page"` + PageSize int64 `json:"page_size"` + TotalCount int64 `json:"total_count"` + TotalPages int64 `json:"total_pages"` + HasNext bool `json:"has_next"` + HasPrevious bool `json:"has_previous"` +} + +type _Pagination Pagination + +// NewPagination instantiates a new Pagination object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPagination(page int64, pageSize int64, totalCount int64, totalPages int64, hasNext bool, hasPrevious bool) *Pagination { + this := Pagination{} + this.Page = page + this.PageSize = pageSize + this.TotalCount = totalCount + this.TotalPages = totalPages + this.HasNext = hasNext + this.HasPrevious = hasPrevious + return &this +} + +// NewPaginationWithDefaults instantiates a new Pagination object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaginationWithDefaults() *Pagination { + this := Pagination{} + return &this +} + +// GetPage returns the Page field value +func (o *Pagination) GetPage() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Page +} + +// GetPageOk returns a tuple with the Page field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetPageOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Page, true +} + +// SetPage sets field value +func (o *Pagination) SetPage(v int64) { + o.Page = v +} + +// GetPageSize returns the PageSize field value +func (o *Pagination) GetPageSize() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.PageSize +} + +// GetPageSizeOk returns a tuple with the PageSize field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetPageSizeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.PageSize, true +} + +// SetPageSize sets field value +func (o *Pagination) SetPageSize(v int64) { + o.PageSize = v +} + +// GetTotalCount returns the TotalCount field value +func (o *Pagination) GetTotalCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetTotalCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TotalCount, true +} + +// SetTotalCount sets field value +func (o *Pagination) SetTotalCount(v int64) { + o.TotalCount = v +} + +// GetTotalPages returns the TotalPages field value +func (o *Pagination) GetTotalPages() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.TotalPages +} + +// GetTotalPagesOk returns a tuple with the TotalPages field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetTotalPagesOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.TotalPages, true +} + +// SetTotalPages sets field value +func (o *Pagination) SetTotalPages(v int64) { + o.TotalPages = v +} + +// GetHasNext returns the HasNext field value +func (o *Pagination) GetHasNext() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasNext +} + +// GetHasNextOk returns a tuple with the HasNext field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetHasNextOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasNext, true +} + +// SetHasNext sets field value +func (o *Pagination) SetHasNext(v bool) { + o.HasNext = v +} + +// GetHasPrevious returns the HasPrevious field value +func (o *Pagination) GetHasPrevious() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasPrevious +} + +// GetHasPreviousOk returns a tuple with the HasPrevious field value +// and a boolean to check if the value has been set. +func (o *Pagination) GetHasPreviousOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasPrevious, true +} + +// SetHasPrevious sets field value +func (o *Pagination) SetHasPrevious(v bool) { + o.HasPrevious = v +} + +func (o Pagination) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Pagination) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["page"] = o.Page + toSerialize["page_size"] = o.PageSize + toSerialize["total_count"] = o.TotalCount + toSerialize["total_pages"] = o.TotalPages + toSerialize["has_next"] = o.HasNext + toSerialize["has_previous"] = o.HasPrevious + return toSerialize, nil +} + +func (o *Pagination) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "page", + "page_size", + "total_count", + "total_pages", + "has_next", + "has_previous", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPagination := _Pagination{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPagination) + + if err != nil { + return err + } + + *o = Pagination(varPagination) + + return err +} + +type NullablePagination struct { + value *Pagination + isSet bool +} + +func (v NullablePagination) Get() *Pagination { + return v.value +} + +func (v *NullablePagination) Set(val *Pagination) { + v.value = val + v.isSet = true +} + +func (v NullablePagination) IsSet() bool { + return v.isSet +} + +func (v *NullablePagination) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePagination(val *Pagination) *NullablePagination { + return &NullablePagination{value: val, isSet: true} +} + +func (v NullablePagination) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePagination) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patch_continuous_deployment_request.go b/azion-api/model_patch_continuous_deployment_request.go new file mode 100644 index 0000000..bdb1118 --- /dev/null +++ b/azion-api/model_patch_continuous_deployment_request.go @@ -0,0 +1,343 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchContinuousDeploymentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchContinuousDeploymentRequest{} + +// PatchContinuousDeploymentRequest struct for PatchContinuousDeploymentRequest +type PatchContinuousDeploymentRequest struct { + Name *string `json:"name,omitempty"` + Repository *string `json:"repository,omitempty"` + Branch *string `json:"branch,omitempty"` + BuildContext []BuildContextFieldRequest `json:"build_context,omitempty"` + DeployContext map[string]interface{} `json:"deploy_context,omitempty"` + IntegrationId *int64 `json:"integration_id,omitempty"` + ExecutionScriptId *int64 `json:"execution_script_id,omitempty"` +} + +// NewPatchContinuousDeploymentRequest instantiates a new PatchContinuousDeploymentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchContinuousDeploymentRequest() *PatchContinuousDeploymentRequest { + this := PatchContinuousDeploymentRequest{} + return &this +} + +// NewPatchContinuousDeploymentRequestWithDefaults instantiates a new PatchContinuousDeploymentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchContinuousDeploymentRequestWithDefaults() *PatchContinuousDeploymentRequest { + this := PatchContinuousDeploymentRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchContinuousDeploymentRequest) SetName(v string) { + o.Name = &v +} + +// GetRepository returns the Repository field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetRepository() string { + if o == nil || IsNil(o.Repository) { + var ret string + return ret + } + return *o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetRepositoryOk() (*string, bool) { + if o == nil || IsNil(o.Repository) { + return nil, false + } + return o.Repository, true +} + +// HasRepository returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasRepository() bool { + if o != nil && !IsNil(o.Repository) { + return true + } + + return false +} + +// SetRepository gets a reference to the given string and assigns it to the Repository field. +func (o *PatchContinuousDeploymentRequest) SetRepository(v string) { + o.Repository = &v +} + +// GetBranch returns the Branch field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetBranch() string { + if o == nil || IsNil(o.Branch) { + var ret string + return ret + } + return *o.Branch +} + +// GetBranchOk returns a tuple with the Branch field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetBranchOk() (*string, bool) { + if o == nil || IsNil(o.Branch) { + return nil, false + } + return o.Branch, true +} + +// HasBranch returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasBranch() bool { + if o != nil && !IsNil(o.Branch) { + return true + } + + return false +} + +// SetBranch gets a reference to the given string and assigns it to the Branch field. +func (o *PatchContinuousDeploymentRequest) SetBranch(v string) { + o.Branch = &v +} + +// GetBuildContext returns the BuildContext field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetBuildContext() []BuildContextFieldRequest { + if o == nil || IsNil(o.BuildContext) { + var ret []BuildContextFieldRequest + return ret + } + return o.BuildContext +} + +// GetBuildContextOk returns a tuple with the BuildContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetBuildContextOk() ([]BuildContextFieldRequest, bool) { + if o == nil || IsNil(o.BuildContext) { + return nil, false + } + return o.BuildContext, true +} + +// HasBuildContext returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasBuildContext() bool { + if o != nil && !IsNil(o.BuildContext) { + return true + } + + return false +} + +// SetBuildContext gets a reference to the given []BuildContextFieldRequest and assigns it to the BuildContext field. +func (o *PatchContinuousDeploymentRequest) SetBuildContext(v []BuildContextFieldRequest) { + o.BuildContext = v +} + +// GetDeployContext returns the DeployContext field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetDeployContext() map[string]interface{} { + if o == nil || IsNil(o.DeployContext) { + var ret map[string]interface{} + return ret + } + return o.DeployContext +} + +// GetDeployContextOk returns a tuple with the DeployContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetDeployContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DeployContext) { + return map[string]interface{}{}, false + } + return o.DeployContext, true +} + +// HasDeployContext returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasDeployContext() bool { + if o != nil && !IsNil(o.DeployContext) { + return true + } + + return false +} + +// SetDeployContext gets a reference to the given map[string]interface{} and assigns it to the DeployContext field. +func (o *PatchContinuousDeploymentRequest) SetDeployContext(v map[string]interface{}) { + o.DeployContext = v +} + +// GetIntegrationId returns the IntegrationId field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetIntegrationId() int64 { + if o == nil || IsNil(o.IntegrationId) { + var ret int64 + return ret + } + return *o.IntegrationId +} + +// GetIntegrationIdOk returns a tuple with the IntegrationId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetIntegrationIdOk() (*int64, bool) { + if o == nil || IsNil(o.IntegrationId) { + return nil, false + } + return o.IntegrationId, true +} + +// HasIntegrationId returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasIntegrationId() bool { + if o != nil && !IsNil(o.IntegrationId) { + return true + } + + return false +} + +// SetIntegrationId gets a reference to the given int64 and assigns it to the IntegrationId field. +func (o *PatchContinuousDeploymentRequest) SetIntegrationId(v int64) { + o.IntegrationId = &v +} + +// GetExecutionScriptId returns the ExecutionScriptId field value if set, zero value otherwise. +func (o *PatchContinuousDeploymentRequest) GetExecutionScriptId() int64 { + if o == nil || IsNil(o.ExecutionScriptId) { + var ret int64 + return ret + } + return *o.ExecutionScriptId +} + +// GetExecutionScriptIdOk returns a tuple with the ExecutionScriptId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchContinuousDeploymentRequest) GetExecutionScriptIdOk() (*int64, bool) { + if o == nil || IsNil(o.ExecutionScriptId) { + return nil, false + } + return o.ExecutionScriptId, true +} + +// HasExecutionScriptId returns a boolean if a field has been set. +func (o *PatchContinuousDeploymentRequest) HasExecutionScriptId() bool { + if o != nil && !IsNil(o.ExecutionScriptId) { + return true + } + + return false +} + +// SetExecutionScriptId gets a reference to the given int64 and assigns it to the ExecutionScriptId field. +func (o *PatchContinuousDeploymentRequest) SetExecutionScriptId(v int64) { + o.ExecutionScriptId = &v +} + +func (o PatchContinuousDeploymentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchContinuousDeploymentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Repository) { + toSerialize["repository"] = o.Repository + } + if !IsNil(o.Branch) { + toSerialize["branch"] = o.Branch + } + if !IsNil(o.BuildContext) { + toSerialize["build_context"] = o.BuildContext + } + if !IsNil(o.DeployContext) { + toSerialize["deploy_context"] = o.DeployContext + } + if !IsNil(o.IntegrationId) { + toSerialize["integration_id"] = o.IntegrationId + } + if !IsNil(o.ExecutionScriptId) { + toSerialize["execution_script_id"] = o.ExecutionScriptId + } + return toSerialize, nil +} + +type NullablePatchContinuousDeploymentRequest struct { + value *PatchContinuousDeploymentRequest + isSet bool +} + +func (v NullablePatchContinuousDeploymentRequest) Get() *PatchContinuousDeploymentRequest { + return v.value +} + +func (v *NullablePatchContinuousDeploymentRequest) Set(val *PatchContinuousDeploymentRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchContinuousDeploymentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchContinuousDeploymentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchContinuousDeploymentRequest(val *PatchContinuousDeploymentRequest) *NullablePatchContinuousDeploymentRequest { + return &NullablePatchContinuousDeploymentRequest{value: val, isSet: true} +} + +func (v NullablePatchContinuousDeploymentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchContinuousDeploymentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_account_request.go b/azion-api/model_patched_account_request.go new file mode 100644 index 0000000..a4ee5d5 --- /dev/null +++ b/azion-api/model_patched_account_request.go @@ -0,0 +1,248 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// PatchedAccountRequest - struct for PatchedAccountRequest +type PatchedAccountRequest struct { + PatchedBrandRequest *PatchedBrandRequest + PatchedOrganizationRequest *PatchedOrganizationRequest + PatchedResellerRequest *PatchedResellerRequest + PatchedWorkspaceRequest *PatchedWorkspaceRequest +} + +// PatchedBrandRequestAsPatchedAccountRequest is a convenience function that returns PatchedBrandRequest wrapped in PatchedAccountRequest +func PatchedBrandRequestAsPatchedAccountRequest(v *PatchedBrandRequest) PatchedAccountRequest { + return PatchedAccountRequest{ + PatchedBrandRequest: v, + } +} + +// PatchedOrganizationRequestAsPatchedAccountRequest is a convenience function that returns PatchedOrganizationRequest wrapped in PatchedAccountRequest +func PatchedOrganizationRequestAsPatchedAccountRequest(v *PatchedOrganizationRequest) PatchedAccountRequest { + return PatchedAccountRequest{ + PatchedOrganizationRequest: v, + } +} + +// PatchedResellerRequestAsPatchedAccountRequest is a convenience function that returns PatchedResellerRequest wrapped in PatchedAccountRequest +func PatchedResellerRequestAsPatchedAccountRequest(v *PatchedResellerRequest) PatchedAccountRequest { + return PatchedAccountRequest{ + PatchedResellerRequest: v, + } +} + +// PatchedWorkspaceRequestAsPatchedAccountRequest is a convenience function that returns PatchedWorkspaceRequest wrapped in PatchedAccountRequest +func PatchedWorkspaceRequestAsPatchedAccountRequest(v *PatchedWorkspaceRequest) PatchedAccountRequest { + return PatchedAccountRequest{ + PatchedWorkspaceRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *PatchedAccountRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into PatchedBrandRequest + err = newStrictDecoder(data).Decode(&dst.PatchedBrandRequest) + if err == nil { + jsonPatchedBrandRequest, _ := json.Marshal(dst.PatchedBrandRequest) + if string(jsonPatchedBrandRequest) == "{}" { // empty struct + dst.PatchedBrandRequest = nil + } else { + if err = validator.Validate(dst.PatchedBrandRequest); err != nil { + dst.PatchedBrandRequest = nil + } else { + match++ + } + } + } else { + dst.PatchedBrandRequest = nil + } + + // try to unmarshal data into PatchedOrganizationRequest + err = newStrictDecoder(data).Decode(&dst.PatchedOrganizationRequest) + if err == nil { + jsonPatchedOrganizationRequest, _ := json.Marshal(dst.PatchedOrganizationRequest) + if string(jsonPatchedOrganizationRequest) == "{}" { // empty struct + dst.PatchedOrganizationRequest = nil + } else { + if err = validator.Validate(dst.PatchedOrganizationRequest); err != nil { + dst.PatchedOrganizationRequest = nil + } else { + match++ + } + } + } else { + dst.PatchedOrganizationRequest = nil + } + + // try to unmarshal data into PatchedResellerRequest + err = newStrictDecoder(data).Decode(&dst.PatchedResellerRequest) + if err == nil { + jsonPatchedResellerRequest, _ := json.Marshal(dst.PatchedResellerRequest) + if string(jsonPatchedResellerRequest) == "{}" { // empty struct + dst.PatchedResellerRequest = nil + } else { + if err = validator.Validate(dst.PatchedResellerRequest); err != nil { + dst.PatchedResellerRequest = nil + } else { + match++ + } + } + } else { + dst.PatchedResellerRequest = nil + } + + // try to unmarshal data into PatchedWorkspaceRequest + err = newStrictDecoder(data).Decode(&dst.PatchedWorkspaceRequest) + if err == nil { + jsonPatchedWorkspaceRequest, _ := json.Marshal(dst.PatchedWorkspaceRequest) + if string(jsonPatchedWorkspaceRequest) == "{}" { // empty struct + dst.PatchedWorkspaceRequest = nil + } else { + if err = validator.Validate(dst.PatchedWorkspaceRequest); err != nil { + dst.PatchedWorkspaceRequest = nil + } else { + match++ + } + } + } else { + dst.PatchedWorkspaceRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.PatchedBrandRequest = nil + dst.PatchedOrganizationRequest = nil + dst.PatchedResellerRequest = nil + dst.PatchedWorkspaceRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(PatchedAccountRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(PatchedAccountRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PatchedAccountRequest) MarshalJSON() ([]byte, error) { + if src.PatchedBrandRequest != nil { + return json.Marshal(&src.PatchedBrandRequest) + } + + if src.PatchedOrganizationRequest != nil { + return json.Marshal(&src.PatchedOrganizationRequest) + } + + if src.PatchedResellerRequest != nil { + return json.Marshal(&src.PatchedResellerRequest) + } + + if src.PatchedWorkspaceRequest != nil { + return json.Marshal(&src.PatchedWorkspaceRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *PatchedAccountRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.PatchedBrandRequest != nil { + return obj.PatchedBrandRequest + } + + if obj.PatchedOrganizationRequest != nil { + return obj.PatchedOrganizationRequest + } + + if obj.PatchedResellerRequest != nil { + return obj.PatchedResellerRequest + } + + if obj.PatchedWorkspaceRequest != nil { + return obj.PatchedWorkspaceRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj PatchedAccountRequest) GetActualInstanceValue() (interface{}) { + if obj.PatchedBrandRequest != nil { + return *obj.PatchedBrandRequest + } + + if obj.PatchedOrganizationRequest != nil { + return *obj.PatchedOrganizationRequest + } + + if obj.PatchedResellerRequest != nil { + return *obj.PatchedResellerRequest + } + + if obj.PatchedWorkspaceRequest != nil { + return *obj.PatchedWorkspaceRequest + } + + // all schemas are nil + return nil +} + +type NullablePatchedAccountRequest struct { + value *PatchedAccountRequest + isSet bool +} + +func (v NullablePatchedAccountRequest) Get() *PatchedAccountRequest { + return v.value +} + +func (v *NullablePatchedAccountRequest) Set(val *PatchedAccountRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedAccountRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedAccountRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedAccountRequest(val *PatchedAccountRequest) *NullablePatchedAccountRequest { + return &NullablePatchedAccountRequest{value: val, isSet: true} +} + +func (v NullablePatchedAccountRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedAccountRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_application_request.go b/azion-api/model_patched_application_request.go new file mode 100644 index 0000000..d625d4f --- /dev/null +++ b/azion-api/model_patched_application_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedApplicationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedApplicationRequest{} + +// PatchedApplicationRequest struct for PatchedApplicationRequest +type PatchedApplicationRequest struct { + Name *string `json:"name,omitempty"` + Modules *ApplicationModulesRequest `json:"modules,omitempty"` + Active *bool `json:"active,omitempty"` + Debug *bool `json:"debug,omitempty"` +} + +// NewPatchedApplicationRequest instantiates a new PatchedApplicationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedApplicationRequest() *PatchedApplicationRequest { + this := PatchedApplicationRequest{} + return &this +} + +// NewPatchedApplicationRequestWithDefaults instantiates a new PatchedApplicationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedApplicationRequestWithDefaults() *PatchedApplicationRequest { + this := PatchedApplicationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedApplicationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedApplicationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedApplicationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedApplicationRequest) SetName(v string) { + o.Name = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *PatchedApplicationRequest) GetModules() ApplicationModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret ApplicationModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedApplicationRequest) GetModulesOk() (*ApplicationModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *PatchedApplicationRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given ApplicationModulesRequest and assigns it to the Modules field. +func (o *PatchedApplicationRequest) SetModules(v ApplicationModulesRequest) { + o.Modules = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedApplicationRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedApplicationRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedApplicationRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedApplicationRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *PatchedApplicationRequest) GetDebug() bool { + if o == nil || IsNil(o.Debug) { + var ret bool + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedApplicationRequest) GetDebugOk() (*bool, bool) { + if o == nil || IsNil(o.Debug) { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *PatchedApplicationRequest) HasDebug() bool { + if o != nil && !IsNil(o.Debug) { + return true + } + + return false +} + +// SetDebug gets a reference to the given bool and assigns it to the Debug field. +func (o *PatchedApplicationRequest) SetDebug(v bool) { + o.Debug = &v +} + +func (o PatchedApplicationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedApplicationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Debug) { + toSerialize["debug"] = o.Debug + } + return toSerialize, nil +} + +type NullablePatchedApplicationRequest struct { + value *PatchedApplicationRequest + isSet bool +} + +func (v NullablePatchedApplicationRequest) Get() *PatchedApplicationRequest { + return v.value +} + +func (v *NullablePatchedApplicationRequest) Set(val *PatchedApplicationRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedApplicationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedApplicationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedApplicationRequest(val *PatchedApplicationRequest) *NullablePatchedApplicationRequest { + return &NullablePatchedApplicationRequest{value: val, isSet: true} +} + +func (v NullablePatchedApplicationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedApplicationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_brand_request.go b/azion-api/model_patched_brand_request.go new file mode 100644 index 0000000..682c8b1 --- /dev/null +++ b/azion-api/model_patched_brand_request.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PatchedBrandRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedBrandRequest{} + +// PatchedBrandRequest struct for PatchedBrandRequest +type PatchedBrandRequest struct { + Name *string `json:"name,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _PatchedBrandRequest PatchedBrandRequest + +// NewPatchedBrandRequest instantiates a new PatchedBrandRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedBrandRequest(type_ string) *PatchedBrandRequest { + this := PatchedBrandRequest{} + this.Type = type_ + return &this +} + +// NewPatchedBrandRequestWithDefaults instantiates a new PatchedBrandRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedBrandRequestWithDefaults() *PatchedBrandRequest { + this := PatchedBrandRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedBrandRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedBrandRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedBrandRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedBrandRequest) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value +func (o *PatchedBrandRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PatchedBrandRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PatchedBrandRequest) SetType(v string) { + o.Type = v +} + +func (o PatchedBrandRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedBrandRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *PatchedBrandRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchedBrandRequest := _PatchedBrandRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchedBrandRequest) + + if err != nil { + return err + } + + *o = PatchedBrandRequest(varPatchedBrandRequest) + + return err +} + +type NullablePatchedBrandRequest struct { + value *PatchedBrandRequest + isSet bool +} + +func (v NullablePatchedBrandRequest) Get() *PatchedBrandRequest { + return v.value +} + +func (v *NullablePatchedBrandRequest) Set(val *PatchedBrandRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedBrandRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedBrandRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedBrandRequest(val *PatchedBrandRequest) *NullablePatchedBrandRequest { + return &NullablePatchedBrandRequest{value: val, isSet: true} +} + +func (v NullablePatchedBrandRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedBrandRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_bucket_request.go b/azion-api/model_patched_bucket_request.go new file mode 100644 index 0000000..15d6274 --- /dev/null +++ b/azion-api/model_patched_bucket_request.go @@ -0,0 +1,128 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedBucketRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedBucketRequest{} + +// PatchedBucketRequest struct for PatchedBucketRequest +type PatchedBucketRequest struct { + // * `read_only` - read_only * `read_write` - read_write * `restricted` - restricted + WorkloadsAccess *string `json:"workloads_access,omitempty"` +} + +// NewPatchedBucketRequest instantiates a new PatchedBucketRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedBucketRequest() *PatchedBucketRequest { + this := PatchedBucketRequest{} + return &this +} + +// NewPatchedBucketRequestWithDefaults instantiates a new PatchedBucketRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedBucketRequestWithDefaults() *PatchedBucketRequest { + this := PatchedBucketRequest{} + return &this +} + +// GetWorkloadsAccess returns the WorkloadsAccess field value if set, zero value otherwise. +func (o *PatchedBucketRequest) GetWorkloadsAccess() string { + if o == nil || IsNil(o.WorkloadsAccess) { + var ret string + return ret + } + return *o.WorkloadsAccess +} + +// GetWorkloadsAccessOk returns a tuple with the WorkloadsAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedBucketRequest) GetWorkloadsAccessOk() (*string, bool) { + if o == nil || IsNil(o.WorkloadsAccess) { + return nil, false + } + return o.WorkloadsAccess, true +} + +// HasWorkloadsAccess returns a boolean if a field has been set. +func (o *PatchedBucketRequest) HasWorkloadsAccess() bool { + if o != nil && !IsNil(o.WorkloadsAccess) { + return true + } + + return false +} + +// SetWorkloadsAccess gets a reference to the given string and assigns it to the WorkloadsAccess field. +func (o *PatchedBucketRequest) SetWorkloadsAccess(v string) { + o.WorkloadsAccess = &v +} + +func (o PatchedBucketRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedBucketRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.WorkloadsAccess) { + toSerialize["workloads_access"] = o.WorkloadsAccess + } + return toSerialize, nil +} + +type NullablePatchedBucketRequest struct { + value *PatchedBucketRequest + isSet bool +} + +func (v NullablePatchedBucketRequest) Get() *PatchedBucketRequest { + return v.value +} + +func (v *NullablePatchedBucketRequest) Set(val *PatchedBucketRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedBucketRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedBucketRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedBucketRequest(val *PatchedBucketRequest) *NullablePatchedBucketRequest { + return &NullablePatchedBucketRequest{value: val, isSet: true} +} + +func (v NullablePatchedBucketRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedBucketRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_cache_setting_request.go b/azion-api/model_patched_cache_setting_request.go new file mode 100644 index 0000000..12a16f5 --- /dev/null +++ b/azion-api/model_patched_cache_setting_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedCacheSettingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCacheSettingRequest{} + +// PatchedCacheSettingRequest struct for PatchedCacheSettingRequest +type PatchedCacheSettingRequest struct { + Name *string `json:"name,omitempty"` + BrowserCache *BrowserCacheModuleRequest `json:"browser_cache,omitempty"` + Modules *CacheSettingsModulesRequest `json:"modules,omitempty"` +} + +// NewPatchedCacheSettingRequest instantiates a new PatchedCacheSettingRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedCacheSettingRequest() *PatchedCacheSettingRequest { + this := PatchedCacheSettingRequest{} + return &this +} + +// NewPatchedCacheSettingRequestWithDefaults instantiates a new PatchedCacheSettingRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedCacheSettingRequestWithDefaults() *PatchedCacheSettingRequest { + this := PatchedCacheSettingRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedCacheSettingRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCacheSettingRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedCacheSettingRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedCacheSettingRequest) SetName(v string) { + o.Name = &v +} + +// GetBrowserCache returns the BrowserCache field value if set, zero value otherwise. +func (o *PatchedCacheSettingRequest) GetBrowserCache() BrowserCacheModuleRequest { + if o == nil || IsNil(o.BrowserCache) { + var ret BrowserCacheModuleRequest + return ret + } + return *o.BrowserCache +} + +// GetBrowserCacheOk returns a tuple with the BrowserCache field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCacheSettingRequest) GetBrowserCacheOk() (*BrowserCacheModuleRequest, bool) { + if o == nil || IsNil(o.BrowserCache) { + return nil, false + } + return o.BrowserCache, true +} + +// HasBrowserCache returns a boolean if a field has been set. +func (o *PatchedCacheSettingRequest) HasBrowserCache() bool { + if o != nil && !IsNil(o.BrowserCache) { + return true + } + + return false +} + +// SetBrowserCache gets a reference to the given BrowserCacheModuleRequest and assigns it to the BrowserCache field. +func (o *PatchedCacheSettingRequest) SetBrowserCache(v BrowserCacheModuleRequest) { + o.BrowserCache = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *PatchedCacheSettingRequest) GetModules() CacheSettingsModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret CacheSettingsModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCacheSettingRequest) GetModulesOk() (*CacheSettingsModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *PatchedCacheSettingRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given CacheSettingsModulesRequest and assigns it to the Modules field. +func (o *PatchedCacheSettingRequest) SetModules(v CacheSettingsModulesRequest) { + o.Modules = &v +} + +func (o PatchedCacheSettingRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCacheSettingRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.BrowserCache) { + toSerialize["browser_cache"] = o.BrowserCache + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +type NullablePatchedCacheSettingRequest struct { + value *PatchedCacheSettingRequest + isSet bool +} + +func (v NullablePatchedCacheSettingRequest) Get() *PatchedCacheSettingRequest { + return v.value +} + +func (v *NullablePatchedCacheSettingRequest) Set(val *PatchedCacheSettingRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedCacheSettingRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedCacheSettingRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedCacheSettingRequest(val *PatchedCacheSettingRequest) *NullablePatchedCacheSettingRequest { + return &NullablePatchedCacheSettingRequest{value: val, isSet: true} +} + +func (v NullablePatchedCacheSettingRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedCacheSettingRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_certificate.go b/azion-api/model_patched_certificate.go new file mode 100644 index 0000000..6acc74d --- /dev/null +++ b/azion-api/model_patched_certificate.go @@ -0,0 +1,878 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedCertificate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCertificate{} + +// PatchedCertificate struct for PatchedCertificate +type PatchedCertificate struct { + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Certificate NullableString `json:"certificate,omitempty"` + PrivateKey NullableString `json:"private_key,omitempty"` + Issuer NullableString `json:"issuer,omitempty"` + SubjectName []string `json:"subject_name,omitempty"` + Validity NullableString `json:"validity,omitempty"` + // The value can't be changed after the certificate creation. * `certificate` - Certificate * `trusted_ca_certificate` - Trusted CA Certificate + Type *string `json:"type,omitempty"` + Managed *bool `json:"managed,omitempty"` + // * `challenge_verification` - Challenge Verification * `active` - Active * `pending` - Pending * `failed` - Failed + Status *string `json:"status,omitempty"` + StatusDetail *string `json:"status_detail,omitempty"` + Csr NullableString `json:"csr,omitempty"` + // * `dns` - Uses DNS to solve the ACME challenge. * `http` - Uses HTTP to solve the ACME challenge. + Challenge *string `json:"challenge,omitempty"` + // * `lets_encrypt` - lets_encrypt + Authority *string `json:"authority,omitempty"` + KeyAlgorithm *string `json:"key_algorithm,omitempty"` + Active *bool `json:"active,omitempty"` + ProductVersion *string `json:"product_version,omitempty"` + LastEditor *string `json:"last_editor,omitempty"` + // Timestamp of the last modification made to the certificate content on the platform. + LastModified *time.Time `json:"last_modified,omitempty"` + // Timestamp indicating when the managed certificate was renewed on our platform. + RenewedAt NullableTime `json:"renewed_at,omitempty"` +} + +// NewPatchedCertificate instantiates a new PatchedCertificate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedCertificate() *PatchedCertificate { + this := PatchedCertificate{} + return &this +} + +// NewPatchedCertificateWithDefaults instantiates a new PatchedCertificate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedCertificateWithDefaults() *PatchedCertificate { + this := PatchedCertificate{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PatchedCertificate) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PatchedCertificate) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *PatchedCertificate) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedCertificate) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedCertificate) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedCertificate) SetName(v string) { + o.Name = &v +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCertificate) GetCertificate() string { + if o == nil || IsNil(o.Certificate.Get()) { + var ret string + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCertificate) GetCertificateOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *PatchedCertificate) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableString and assigns it to the Certificate field. +func (o *PatchedCertificate) SetCertificate(v string) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *PatchedCertificate) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *PatchedCertificate) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetPrivateKey returns the PrivateKey field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCertificate) GetPrivateKey() string { + if o == nil || IsNil(o.PrivateKey.Get()) { + var ret string + return ret + } + return *o.PrivateKey.Get() +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCertificate) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrivateKey.Get(), o.PrivateKey.IsSet() +} + +// HasPrivateKey returns a boolean if a field has been set. +func (o *PatchedCertificate) HasPrivateKey() bool { + if o != nil && o.PrivateKey.IsSet() { + return true + } + + return false +} + +// SetPrivateKey gets a reference to the given NullableString and assigns it to the PrivateKey field. +func (o *PatchedCertificate) SetPrivateKey(v string) { + o.PrivateKey.Set(&v) +} +// SetPrivateKeyNil sets the value for PrivateKey to be an explicit nil +func (o *PatchedCertificate) SetPrivateKeyNil() { + o.PrivateKey.Set(nil) +} + +// UnsetPrivateKey ensures that no value is present for PrivateKey, not even an explicit nil +func (o *PatchedCertificate) UnsetPrivateKey() { + o.PrivateKey.Unset() +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCertificate) GetIssuer() string { + if o == nil || IsNil(o.Issuer.Get()) { + var ret string + return ret + } + return *o.Issuer.Get() +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCertificate) GetIssuerOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Issuer.Get(), o.Issuer.IsSet() +} + +// HasIssuer returns a boolean if a field has been set. +func (o *PatchedCertificate) HasIssuer() bool { + if o != nil && o.Issuer.IsSet() { + return true + } + + return false +} + +// SetIssuer gets a reference to the given NullableString and assigns it to the Issuer field. +func (o *PatchedCertificate) SetIssuer(v string) { + o.Issuer.Set(&v) +} +// SetIssuerNil sets the value for Issuer to be an explicit nil +func (o *PatchedCertificate) SetIssuerNil() { + o.Issuer.Set(nil) +} + +// UnsetIssuer ensures that no value is present for Issuer, not even an explicit nil +func (o *PatchedCertificate) UnsetIssuer() { + o.Issuer.Unset() +} + +// GetSubjectName returns the SubjectName field value if set, zero value otherwise. +func (o *PatchedCertificate) GetSubjectName() []string { + if o == nil || IsNil(o.SubjectName) { + var ret []string + return ret + } + return o.SubjectName +} + +// GetSubjectNameOk returns a tuple with the SubjectName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetSubjectNameOk() ([]string, bool) { + if o == nil || IsNil(o.SubjectName) { + return nil, false + } + return o.SubjectName, true +} + +// HasSubjectName returns a boolean if a field has been set. +func (o *PatchedCertificate) HasSubjectName() bool { + if o != nil && !IsNil(o.SubjectName) { + return true + } + + return false +} + +// SetSubjectName gets a reference to the given []string and assigns it to the SubjectName field. +func (o *PatchedCertificate) SetSubjectName(v []string) { + o.SubjectName = v +} + +// GetValidity returns the Validity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCertificate) GetValidity() string { + if o == nil || IsNil(o.Validity.Get()) { + var ret string + return ret + } + return *o.Validity.Get() +} + +// GetValidityOk returns a tuple with the Validity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCertificate) GetValidityOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Validity.Get(), o.Validity.IsSet() +} + +// HasValidity returns a boolean if a field has been set. +func (o *PatchedCertificate) HasValidity() bool { + if o != nil && o.Validity.IsSet() { + return true + } + + return false +} + +// SetValidity gets a reference to the given NullableString and assigns it to the Validity field. +func (o *PatchedCertificate) SetValidity(v string) { + o.Validity.Set(&v) +} +// SetValidityNil sets the value for Validity to be an explicit nil +func (o *PatchedCertificate) SetValidityNil() { + o.Validity.Set(nil) +} + +// UnsetValidity ensures that no value is present for Validity, not even an explicit nil +func (o *PatchedCertificate) UnsetValidity() { + o.Validity.Unset() +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PatchedCertificate) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PatchedCertificate) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PatchedCertificate) SetType(v string) { + o.Type = &v +} + +// GetManaged returns the Managed field value if set, zero value otherwise. +func (o *PatchedCertificate) GetManaged() bool { + if o == nil || IsNil(o.Managed) { + var ret bool + return ret + } + return *o.Managed +} + +// GetManagedOk returns a tuple with the Managed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetManagedOk() (*bool, bool) { + if o == nil || IsNil(o.Managed) { + return nil, false + } + return o.Managed, true +} + +// HasManaged returns a boolean if a field has been set. +func (o *PatchedCertificate) HasManaged() bool { + if o != nil && !IsNil(o.Managed) { + return true + } + + return false +} + +// SetManaged gets a reference to the given bool and assigns it to the Managed field. +func (o *PatchedCertificate) SetManaged(v bool) { + o.Managed = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PatchedCertificate) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PatchedCertificate) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *PatchedCertificate) SetStatus(v string) { + o.Status = &v +} + +// GetStatusDetail returns the StatusDetail field value if set, zero value otherwise. +func (o *PatchedCertificate) GetStatusDetail() string { + if o == nil || IsNil(o.StatusDetail) { + var ret string + return ret + } + return *o.StatusDetail +} + +// GetStatusDetailOk returns a tuple with the StatusDetail field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetStatusDetailOk() (*string, bool) { + if o == nil || IsNil(o.StatusDetail) { + return nil, false + } + return o.StatusDetail, true +} + +// HasStatusDetail returns a boolean if a field has been set. +func (o *PatchedCertificate) HasStatusDetail() bool { + if o != nil && !IsNil(o.StatusDetail) { + return true + } + + return false +} + +// SetStatusDetail gets a reference to the given string and assigns it to the StatusDetail field. +func (o *PatchedCertificate) SetStatusDetail(v string) { + o.StatusDetail = &v +} + +// GetCsr returns the Csr field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCertificate) GetCsr() string { + if o == nil || IsNil(o.Csr.Get()) { + var ret string + return ret + } + return *o.Csr.Get() +} + +// GetCsrOk returns a tuple with the Csr field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCertificate) GetCsrOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Csr.Get(), o.Csr.IsSet() +} + +// HasCsr returns a boolean if a field has been set. +func (o *PatchedCertificate) HasCsr() bool { + if o != nil && o.Csr.IsSet() { + return true + } + + return false +} + +// SetCsr gets a reference to the given NullableString and assigns it to the Csr field. +func (o *PatchedCertificate) SetCsr(v string) { + o.Csr.Set(&v) +} +// SetCsrNil sets the value for Csr to be an explicit nil +func (o *PatchedCertificate) SetCsrNil() { + o.Csr.Set(nil) +} + +// UnsetCsr ensures that no value is present for Csr, not even an explicit nil +func (o *PatchedCertificate) UnsetCsr() { + o.Csr.Unset() +} + +// GetChallenge returns the Challenge field value if set, zero value otherwise. +func (o *PatchedCertificate) GetChallenge() string { + if o == nil || IsNil(o.Challenge) { + var ret string + return ret + } + return *o.Challenge +} + +// GetChallengeOk returns a tuple with the Challenge field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetChallengeOk() (*string, bool) { + if o == nil || IsNil(o.Challenge) { + return nil, false + } + return o.Challenge, true +} + +// HasChallenge returns a boolean if a field has been set. +func (o *PatchedCertificate) HasChallenge() bool { + if o != nil && !IsNil(o.Challenge) { + return true + } + + return false +} + +// SetChallenge gets a reference to the given string and assigns it to the Challenge field. +func (o *PatchedCertificate) SetChallenge(v string) { + o.Challenge = &v +} + +// GetAuthority returns the Authority field value if set, zero value otherwise. +func (o *PatchedCertificate) GetAuthority() string { + if o == nil || IsNil(o.Authority) { + var ret string + return ret + } + return *o.Authority +} + +// GetAuthorityOk returns a tuple with the Authority field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetAuthorityOk() (*string, bool) { + if o == nil || IsNil(o.Authority) { + return nil, false + } + return o.Authority, true +} + +// HasAuthority returns a boolean if a field has been set. +func (o *PatchedCertificate) HasAuthority() bool { + if o != nil && !IsNil(o.Authority) { + return true + } + + return false +} + +// SetAuthority gets a reference to the given string and assigns it to the Authority field. +func (o *PatchedCertificate) SetAuthority(v string) { + o.Authority = &v +} + +// GetKeyAlgorithm returns the KeyAlgorithm field value if set, zero value otherwise. +func (o *PatchedCertificate) GetKeyAlgorithm() string { + if o == nil || IsNil(o.KeyAlgorithm) { + var ret string + return ret + } + return *o.KeyAlgorithm +} + +// GetKeyAlgorithmOk returns a tuple with the KeyAlgorithm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetKeyAlgorithmOk() (*string, bool) { + if o == nil || IsNil(o.KeyAlgorithm) { + return nil, false + } + return o.KeyAlgorithm, true +} + +// HasKeyAlgorithm returns a boolean if a field has been set. +func (o *PatchedCertificate) HasKeyAlgorithm() bool { + if o != nil && !IsNil(o.KeyAlgorithm) { + return true + } + + return false +} + +// SetKeyAlgorithm gets a reference to the given string and assigns it to the KeyAlgorithm field. +func (o *PatchedCertificate) SetKeyAlgorithm(v string) { + o.KeyAlgorithm = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedCertificate) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedCertificate) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedCertificate) SetActive(v bool) { + o.Active = &v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise. +func (o *PatchedCertificate) GetProductVersion() string { + if o == nil || IsNil(o.ProductVersion) { + var ret string + return ret + } + return *o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetProductVersionOk() (*string, bool) { + if o == nil || IsNil(o.ProductVersion) { + return nil, false + } + return o.ProductVersion, true +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *PatchedCertificate) HasProductVersion() bool { + if o != nil && !IsNil(o.ProductVersion) { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given string and assigns it to the ProductVersion field. +func (o *PatchedCertificate) SetProductVersion(v string) { + o.ProductVersion = &v +} + +// GetLastEditor returns the LastEditor field value if set, zero value otherwise. +func (o *PatchedCertificate) GetLastEditor() string { + if o == nil || IsNil(o.LastEditor) { + var ret string + return ret + } + return *o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetLastEditorOk() (*string, bool) { + if o == nil || IsNil(o.LastEditor) { + return nil, false + } + return o.LastEditor, true +} + +// HasLastEditor returns a boolean if a field has been set. +func (o *PatchedCertificate) HasLastEditor() bool { + if o != nil && !IsNil(o.LastEditor) { + return true + } + + return false +} + +// SetLastEditor gets a reference to the given string and assigns it to the LastEditor field. +func (o *PatchedCertificate) SetLastEditor(v string) { + o.LastEditor = &v +} + +// GetLastModified returns the LastModified field value if set, zero value otherwise. +func (o *PatchedCertificate) GetLastModified() time.Time { + if o == nil || IsNil(o.LastModified) { + var ret time.Time + return ret + } + return *o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificate) GetLastModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastModified) { + return nil, false + } + return o.LastModified, true +} + +// HasLastModified returns a boolean if a field has been set. +func (o *PatchedCertificate) HasLastModified() bool { + if o != nil && !IsNil(o.LastModified) { + return true + } + + return false +} + +// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field. +func (o *PatchedCertificate) SetLastModified(v time.Time) { + o.LastModified = &v +} + +// GetRenewedAt returns the RenewedAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedCertificate) GetRenewedAt() time.Time { + if o == nil || IsNil(o.RenewedAt.Get()) { + var ret time.Time + return ret + } + return *o.RenewedAt.Get() +} + +// GetRenewedAtOk returns a tuple with the RenewedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedCertificate) GetRenewedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RenewedAt.Get(), o.RenewedAt.IsSet() +} + +// HasRenewedAt returns a boolean if a field has been set. +func (o *PatchedCertificate) HasRenewedAt() bool { + if o != nil && o.RenewedAt.IsSet() { + return true + } + + return false +} + +// SetRenewedAt gets a reference to the given NullableTime and assigns it to the RenewedAt field. +func (o *PatchedCertificate) SetRenewedAt(v time.Time) { + o.RenewedAt.Set(&v) +} +// SetRenewedAtNil sets the value for RenewedAt to be an explicit nil +func (o *PatchedCertificate) SetRenewedAtNil() { + o.RenewedAt.Set(nil) +} + +// UnsetRenewedAt ensures that no value is present for RenewedAt, not even an explicit nil +func (o *PatchedCertificate) UnsetRenewedAt() { + o.RenewedAt.Unset() +} + +func (o PatchedCertificate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCertificate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if o.PrivateKey.IsSet() { + toSerialize["private_key"] = o.PrivateKey.Get() + } + if o.Issuer.IsSet() { + toSerialize["issuer"] = o.Issuer.Get() + } + if !IsNil(o.SubjectName) { + toSerialize["subject_name"] = o.SubjectName + } + if o.Validity.IsSet() { + toSerialize["validity"] = o.Validity.Get() + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Managed) { + toSerialize["managed"] = o.Managed + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.StatusDetail) { + toSerialize["status_detail"] = o.StatusDetail + } + if o.Csr.IsSet() { + toSerialize["csr"] = o.Csr.Get() + } + if !IsNil(o.Challenge) { + toSerialize["challenge"] = o.Challenge + } + if !IsNil(o.Authority) { + toSerialize["authority"] = o.Authority + } + if !IsNil(o.KeyAlgorithm) { + toSerialize["key_algorithm"] = o.KeyAlgorithm + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.ProductVersion) { + toSerialize["product_version"] = o.ProductVersion + } + if !IsNil(o.LastEditor) { + toSerialize["last_editor"] = o.LastEditor + } + if !IsNil(o.LastModified) { + toSerialize["last_modified"] = o.LastModified + } + if o.RenewedAt.IsSet() { + toSerialize["renewed_at"] = o.RenewedAt.Get() + } + return toSerialize, nil +} + +type NullablePatchedCertificate struct { + value *PatchedCertificate + isSet bool +} + +func (v NullablePatchedCertificate) Get() *PatchedCertificate { + return v.value +} + +func (v *NullablePatchedCertificate) Set(val *PatchedCertificate) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedCertificate) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedCertificate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedCertificate(val *PatchedCertificate) *NullablePatchedCertificate { + return &NullablePatchedCertificate{value: val, isSet: true} +} + +func (v NullablePatchedCertificate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedCertificate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_certificate_revocation_list.go b/azion-api/model_patched_certificate_revocation_list.go new file mode 100644 index 0000000..a57a99a --- /dev/null +++ b/azion-api/model_patched_certificate_revocation_list.go @@ -0,0 +1,456 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedCertificateRevocationList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCertificateRevocationList{} + +// PatchedCertificateRevocationList struct for PatchedCertificateRevocationList +type PatchedCertificateRevocationList struct { + Id *int64 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + // Indicates if the certificate revocation list is active. This field cannot be set to false. + Active *bool `json:"active,omitempty"` + LastEditor *string `json:"last_editor,omitempty"` + // Timestamp of the last modification made to the certificate content on the platform. + LastModified *time.Time `json:"last_modified,omitempty"` + ProductVersion *string `json:"product_version,omitempty"` + Issuer *string `json:"issuer,omitempty"` + // Timestamp of the last update issued by the certification revocation list issuer. + LastUpdate *time.Time `json:"last_update,omitempty"` + // Timestamp of the next scheduled update from the certification revocation list issuer. + NextUpdate *time.Time `json:"next_update,omitempty"` + Crl *string `json:"crl,omitempty"` +} + +// NewPatchedCertificateRevocationList instantiates a new PatchedCertificateRevocationList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedCertificateRevocationList() *PatchedCertificateRevocationList { + this := PatchedCertificateRevocationList{} + return &this +} + +// NewPatchedCertificateRevocationListWithDefaults instantiates a new PatchedCertificateRevocationList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedCertificateRevocationListWithDefaults() *PatchedCertificateRevocationList { + this := PatchedCertificateRevocationList{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *PatchedCertificateRevocationList) SetId(v int64) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedCertificateRevocationList) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedCertificateRevocationList) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetLastEditor() string { + if o == nil || IsNil(o.LastEditor) { + var ret string + return ret + } + return *o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetLastEditorOk() (*string, bool) { + if o == nil || IsNil(o.LastEditor) { + return nil, false + } + return o.LastEditor, true +} + +// HasLastEditor returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasLastEditor() bool { + if o != nil && !IsNil(o.LastEditor) { + return true + } + + return false +} + +// SetLastEditor gets a reference to the given string and assigns it to the LastEditor field. +func (o *PatchedCertificateRevocationList) SetLastEditor(v string) { + o.LastEditor = &v +} + +// GetLastModified returns the LastModified field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetLastModified() time.Time { + if o == nil || IsNil(o.LastModified) { + var ret time.Time + return ret + } + return *o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetLastModifiedOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastModified) { + return nil, false + } + return o.LastModified, true +} + +// HasLastModified returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasLastModified() bool { + if o != nil && !IsNil(o.LastModified) { + return true + } + + return false +} + +// SetLastModified gets a reference to the given time.Time and assigns it to the LastModified field. +func (o *PatchedCertificateRevocationList) SetLastModified(v time.Time) { + o.LastModified = &v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetProductVersion() string { + if o == nil || IsNil(o.ProductVersion) { + var ret string + return ret + } + return *o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetProductVersionOk() (*string, bool) { + if o == nil || IsNil(o.ProductVersion) { + return nil, false + } + return o.ProductVersion, true +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasProductVersion() bool { + if o != nil && !IsNil(o.ProductVersion) { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given string and assigns it to the ProductVersion field. +func (o *PatchedCertificateRevocationList) SetProductVersion(v string) { + o.ProductVersion = &v +} + +// GetIssuer returns the Issuer field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetIssuer() string { + if o == nil || IsNil(o.Issuer) { + var ret string + return ret + } + return *o.Issuer +} + +// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetIssuerOk() (*string, bool) { + if o == nil || IsNil(o.Issuer) { + return nil, false + } + return o.Issuer, true +} + +// HasIssuer returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasIssuer() bool { + if o != nil && !IsNil(o.Issuer) { + return true + } + + return false +} + +// SetIssuer gets a reference to the given string and assigns it to the Issuer field. +func (o *PatchedCertificateRevocationList) SetIssuer(v string) { + o.Issuer = &v +} + +// GetLastUpdate returns the LastUpdate field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetLastUpdate() time.Time { + if o == nil || IsNil(o.LastUpdate) { + var ret time.Time + return ret + } + return *o.LastUpdate +} + +// GetLastUpdateOk returns a tuple with the LastUpdate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetLastUpdateOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastUpdate) { + return nil, false + } + return o.LastUpdate, true +} + +// HasLastUpdate returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasLastUpdate() bool { + if o != nil && !IsNil(o.LastUpdate) { + return true + } + + return false +} + +// SetLastUpdate gets a reference to the given time.Time and assigns it to the LastUpdate field. +func (o *PatchedCertificateRevocationList) SetLastUpdate(v time.Time) { + o.LastUpdate = &v +} + +// GetNextUpdate returns the NextUpdate field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetNextUpdate() time.Time { + if o == nil || IsNil(o.NextUpdate) { + var ret time.Time + return ret + } + return *o.NextUpdate +} + +// GetNextUpdateOk returns a tuple with the NextUpdate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetNextUpdateOk() (*time.Time, bool) { + if o == nil || IsNil(o.NextUpdate) { + return nil, false + } + return o.NextUpdate, true +} + +// HasNextUpdate returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasNextUpdate() bool { + if o != nil && !IsNil(o.NextUpdate) { + return true + } + + return false +} + +// SetNextUpdate gets a reference to the given time.Time and assigns it to the NextUpdate field. +func (o *PatchedCertificateRevocationList) SetNextUpdate(v time.Time) { + o.NextUpdate = &v +} + +// GetCrl returns the Crl field value if set, zero value otherwise. +func (o *PatchedCertificateRevocationList) GetCrl() string { + if o == nil || IsNil(o.Crl) { + var ret string + return ret + } + return *o.Crl +} + +// GetCrlOk returns a tuple with the Crl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCertificateRevocationList) GetCrlOk() (*string, bool) { + if o == nil || IsNil(o.Crl) { + return nil, false + } + return o.Crl, true +} + +// HasCrl returns a boolean if a field has been set. +func (o *PatchedCertificateRevocationList) HasCrl() bool { + if o != nil && !IsNil(o.Crl) { + return true + } + + return false +} + +// SetCrl gets a reference to the given string and assigns it to the Crl field. +func (o *PatchedCertificateRevocationList) SetCrl(v string) { + o.Crl = &v +} + +func (o PatchedCertificateRevocationList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCertificateRevocationList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.LastEditor) { + toSerialize["last_editor"] = o.LastEditor + } + if !IsNil(o.LastModified) { + toSerialize["last_modified"] = o.LastModified + } + if !IsNil(o.ProductVersion) { + toSerialize["product_version"] = o.ProductVersion + } + if !IsNil(o.Issuer) { + toSerialize["issuer"] = o.Issuer + } + if !IsNil(o.LastUpdate) { + toSerialize["last_update"] = o.LastUpdate + } + if !IsNil(o.NextUpdate) { + toSerialize["next_update"] = o.NextUpdate + } + if !IsNil(o.Crl) { + toSerialize["crl"] = o.Crl + } + return toSerialize, nil +} + +type NullablePatchedCertificateRevocationList struct { + value *PatchedCertificateRevocationList + isSet bool +} + +func (v NullablePatchedCertificateRevocationList) Get() *PatchedCertificateRevocationList { + return v.value +} + +func (v *NullablePatchedCertificateRevocationList) Set(val *PatchedCertificateRevocationList) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedCertificateRevocationList) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedCertificateRevocationList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedCertificateRevocationList(val *PatchedCertificateRevocationList) *NullablePatchedCertificateRevocationList { + return &NullablePatchedCertificateRevocationList{value: val, isSet: true} +} + +func (v NullablePatchedCertificateRevocationList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedCertificateRevocationList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_chat_thread_request.go b/azion-api/model_patched_chat_thread_request.go new file mode 100644 index 0000000..4cfe3c6 --- /dev/null +++ b/azion-api/model_patched_chat_thread_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedChatThreadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedChatThreadRequest{} + +// PatchedChatThreadRequest struct for PatchedChatThreadRequest +type PatchedChatThreadRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewPatchedChatThreadRequest instantiates a new PatchedChatThreadRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedChatThreadRequest() *PatchedChatThreadRequest { + this := PatchedChatThreadRequest{} + return &this +} + +// NewPatchedChatThreadRequestWithDefaults instantiates a new PatchedChatThreadRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedChatThreadRequestWithDefaults() *PatchedChatThreadRequest { + this := PatchedChatThreadRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedChatThreadRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedChatThreadRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedChatThreadRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedChatThreadRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedChatThreadRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedChatThreadRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedChatThreadRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedChatThreadRequest) SetDescription(v string) { + o.Description = &v +} + +func (o PatchedChatThreadRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedChatThreadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullablePatchedChatThreadRequest struct { + value *PatchedChatThreadRequest + isSet bool +} + +func (v NullablePatchedChatThreadRequest) Get() *PatchedChatThreadRequest { + return v.value +} + +func (v *NullablePatchedChatThreadRequest) Set(val *PatchedChatThreadRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedChatThreadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedChatThreadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedChatThreadRequest(val *PatchedChatThreadRequest) *NullablePatchedChatThreadRequest { + return &NullablePatchedChatThreadRequest{value: val, isSet: true} +} + +func (v NullablePatchedChatThreadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedChatThreadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_connector_http_request.go b/azion-api/model_patched_connector_http_request.go new file mode 100644 index 0000000..b569590 --- /dev/null +++ b/azion-api/model_patched_connector_http_request.go @@ -0,0 +1,268 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PatchedConnectorHTTPRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedConnectorHTTPRequest{} + +// PatchedConnectorHTTPRequest struct for PatchedConnectorHTTPRequest +type PatchedConnectorHTTPRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + // Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest + Type string `json:"type"` + Attributes *ConnectorHTTPAttributesRequest `json:"attributes,omitempty"` +} + +type _PatchedConnectorHTTPRequest PatchedConnectorHTTPRequest + +// NewPatchedConnectorHTTPRequest instantiates a new PatchedConnectorHTTPRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedConnectorHTTPRequest(type_ string) *PatchedConnectorHTTPRequest { + this := PatchedConnectorHTTPRequest{} + this.Type = type_ + return &this +} + +// NewPatchedConnectorHTTPRequestWithDefaults instantiates a new PatchedConnectorHTTPRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedConnectorHTTPRequestWithDefaults() *PatchedConnectorHTTPRequest { + this := PatchedConnectorHTTPRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedConnectorHTTPRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedConnectorHTTPRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedConnectorHTTPRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedConnectorHTTPRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedConnectorHTTPRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedConnectorHTTPRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedConnectorHTTPRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedConnectorHTTPRequest) SetActive(v bool) { + o.Active = &v +} + +// GetType returns the Type field value +func (o *PatchedConnectorHTTPRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PatchedConnectorHTTPRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PatchedConnectorHTTPRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *PatchedConnectorHTTPRequest) GetAttributes() ConnectorHTTPAttributesRequest { + if o == nil || IsNil(o.Attributes) { + var ret ConnectorHTTPAttributesRequest + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedConnectorHTTPRequest) GetAttributesOk() (*ConnectorHTTPAttributesRequest, bool) { + if o == nil || IsNil(o.Attributes) { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *PatchedConnectorHTTPRequest) HasAttributes() bool { + if o != nil && !IsNil(o.Attributes) { + return true + } + + return false +} + +// SetAttributes gets a reference to the given ConnectorHTTPAttributesRequest and assigns it to the Attributes field. +func (o *PatchedConnectorHTTPRequest) SetAttributes(v ConnectorHTTPAttributesRequest) { + o.Attributes = &v +} + +func (o PatchedConnectorHTTPRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedConnectorHTTPRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["type"] = o.Type + if !IsNil(o.Attributes) { + toSerialize["attributes"] = o.Attributes + } + return toSerialize, nil +} + +func (o *PatchedConnectorHTTPRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchedConnectorHTTPRequest := _PatchedConnectorHTTPRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchedConnectorHTTPRequest) + + if err != nil { + return err + } + + *o = PatchedConnectorHTTPRequest(varPatchedConnectorHTTPRequest) + + return err +} + +type NullablePatchedConnectorHTTPRequest struct { + value *PatchedConnectorHTTPRequest + isSet bool +} + +func (v NullablePatchedConnectorHTTPRequest) Get() *PatchedConnectorHTTPRequest { + return v.value +} + +func (v *NullablePatchedConnectorHTTPRequest) Set(val *PatchedConnectorHTTPRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedConnectorHTTPRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedConnectorHTTPRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedConnectorHTTPRequest(val *PatchedConnectorHTTPRequest) *NullablePatchedConnectorHTTPRequest { + return &NullablePatchedConnectorHTTPRequest{value: val, isSet: true} +} + +func (v NullablePatchedConnectorHTTPRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedConnectorHTTPRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_connector_request.go b/azion-api/model_patched_connector_request.go new file mode 100644 index 0000000..d381b85 --- /dev/null +++ b/azion-api/model_patched_connector_request.go @@ -0,0 +1,268 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PatchedConnectorRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedConnectorRequest{} + +// PatchedConnectorRequest struct for PatchedConnectorRequest +type PatchedConnectorRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + // Type of the connector * `http` - HTTP * `storage` - Storage * `live_ingest` - Live Ingest + Type string `json:"type"` + Attributes *ConnectorStorageAttributesRequest `json:"attributes,omitempty"` +} + +type _PatchedConnectorRequest PatchedConnectorRequest + +// NewPatchedConnectorRequest instantiates a new PatchedConnectorRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedConnectorRequest(type_ string) *PatchedConnectorRequest { + this := PatchedConnectorRequest{} + this.Type = type_ + return &this +} + +// NewPatchedConnectorRequestWithDefaults instantiates a new PatchedConnectorRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedConnectorRequestWithDefaults() *PatchedConnectorRequest { + this := PatchedConnectorRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedConnectorRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedConnectorRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedConnectorRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedConnectorRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedConnectorRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedConnectorRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedConnectorRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedConnectorRequest) SetActive(v bool) { + o.Active = &v +} + +// GetType returns the Type field value +func (o *PatchedConnectorRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PatchedConnectorRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PatchedConnectorRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *PatchedConnectorRequest) GetAttributes() ConnectorStorageAttributesRequest { + if o == nil || IsNil(o.Attributes) { + var ret ConnectorStorageAttributesRequest + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedConnectorRequest) GetAttributesOk() (*ConnectorStorageAttributesRequest, bool) { + if o == nil || IsNil(o.Attributes) { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *PatchedConnectorRequest) HasAttributes() bool { + if o != nil && !IsNil(o.Attributes) { + return true + } + + return false +} + +// SetAttributes gets a reference to the given ConnectorStorageAttributesRequest and assigns it to the Attributes field. +func (o *PatchedConnectorRequest) SetAttributes(v ConnectorStorageAttributesRequest) { + o.Attributes = &v +} + +func (o PatchedConnectorRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedConnectorRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["type"] = o.Type + if !IsNil(o.Attributes) { + toSerialize["attributes"] = o.Attributes + } + return toSerialize, nil +} + +func (o *PatchedConnectorRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchedConnectorRequest := _PatchedConnectorRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchedConnectorRequest) + + if err != nil { + return err + } + + *o = PatchedConnectorRequest(varPatchedConnectorRequest) + + return err +} + +type NullablePatchedConnectorRequest struct { + value *PatchedConnectorRequest + isSet bool +} + +func (v NullablePatchedConnectorRequest) Get() *PatchedConnectorRequest { + return v.value +} + +func (v *NullablePatchedConnectorRequest) Set(val *PatchedConnectorRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedConnectorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedConnectorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedConnectorRequest(val *PatchedConnectorRequest) *NullablePatchedConnectorRequest { + return &NullablePatchedConnectorRequest{value: val, isSet: true} +} + +func (v NullablePatchedConnectorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedConnectorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_connector_request2.go b/azion-api/model_patched_connector_request2.go new file mode 100644 index 0000000..dd8a97e --- /dev/null +++ b/azion-api/model_patched_connector_request2.go @@ -0,0 +1,172 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// PatchedConnectorRequest2 - struct for PatchedConnectorRequest2 +type PatchedConnectorRequest2 struct { + PatchedConnectorHTTPRequest *PatchedConnectorHTTPRequest + PatchedConnectorRequest *PatchedConnectorRequest +} + +// PatchedConnectorHTTPRequestAsPatchedConnectorRequest2 is a convenience function that returns PatchedConnectorHTTPRequest wrapped in PatchedConnectorRequest2 +func PatchedConnectorHTTPRequestAsPatchedConnectorRequest2(v *PatchedConnectorHTTPRequest) PatchedConnectorRequest2 { + return PatchedConnectorRequest2{ + PatchedConnectorHTTPRequest: v, + } +} + +// PatchedConnectorRequestAsPatchedConnectorRequest2 is a convenience function that returns PatchedConnectorRequest wrapped in PatchedConnectorRequest2 +func PatchedConnectorRequestAsPatchedConnectorRequest2(v *PatchedConnectorRequest) PatchedConnectorRequest2 { + return PatchedConnectorRequest2{ + PatchedConnectorRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *PatchedConnectorRequest2) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into PatchedConnectorHTTPRequest + err = newStrictDecoder(data).Decode(&dst.PatchedConnectorHTTPRequest) + if err == nil { + jsonPatchedConnectorHTTPRequest, _ := json.Marshal(dst.PatchedConnectorHTTPRequest) + if string(jsonPatchedConnectorHTTPRequest) == "{}" { // empty struct + dst.PatchedConnectorHTTPRequest = nil + } else { + if err = validator.Validate(dst.PatchedConnectorHTTPRequest); err != nil { + dst.PatchedConnectorHTTPRequest = nil + } else { + match++ + } + } + } else { + dst.PatchedConnectorHTTPRequest = nil + } + + // try to unmarshal data into PatchedConnectorRequest + err = newStrictDecoder(data).Decode(&dst.PatchedConnectorRequest) + if err == nil { + jsonPatchedConnectorRequest, _ := json.Marshal(dst.PatchedConnectorRequest) + if string(jsonPatchedConnectorRequest) == "{}" { // empty struct + dst.PatchedConnectorRequest = nil + } else { + if err = validator.Validate(dst.PatchedConnectorRequest); err != nil { + dst.PatchedConnectorRequest = nil + } else { + match++ + } + } + } else { + dst.PatchedConnectorRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.PatchedConnectorHTTPRequest = nil + dst.PatchedConnectorRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(PatchedConnectorRequest2)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(PatchedConnectorRequest2)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src PatchedConnectorRequest2) MarshalJSON() ([]byte, error) { + if src.PatchedConnectorHTTPRequest != nil { + return json.Marshal(&src.PatchedConnectorHTTPRequest) + } + + if src.PatchedConnectorRequest != nil { + return json.Marshal(&src.PatchedConnectorRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *PatchedConnectorRequest2) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.PatchedConnectorHTTPRequest != nil { + return obj.PatchedConnectorHTTPRequest + } + + if obj.PatchedConnectorRequest != nil { + return obj.PatchedConnectorRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj PatchedConnectorRequest2) GetActualInstanceValue() (interface{}) { + if obj.PatchedConnectorHTTPRequest != nil { + return *obj.PatchedConnectorHTTPRequest + } + + if obj.PatchedConnectorRequest != nil { + return *obj.PatchedConnectorRequest + } + + // all schemas are nil + return nil +} + +type NullablePatchedConnectorRequest2 struct { + value *PatchedConnectorRequest2 + isSet bool +} + +func (v NullablePatchedConnectorRequest2) Get() *PatchedConnectorRequest2 { + return v.value +} + +func (v *NullablePatchedConnectorRequest2) Set(val *PatchedConnectorRequest2) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedConnectorRequest2) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedConnectorRequest2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedConnectorRequest2(val *PatchedConnectorRequest2) *NullablePatchedConnectorRequest2 { + return &NullablePatchedConnectorRequest2{value: val, isSet: true} +} + +func (v NullablePatchedConnectorRequest2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedConnectorRequest2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_custom_page_request.go b/azion-api/model_patched_custom_page_request.go new file mode 100644 index 0000000..081915e --- /dev/null +++ b/azion-api/model_patched_custom_page_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedCustomPageRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedCustomPageRequest{} + +// PatchedCustomPageRequest struct for PatchedCustomPageRequest +type PatchedCustomPageRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Pages []PageRequest `json:"pages,omitempty"` +} + +// NewPatchedCustomPageRequest instantiates a new PatchedCustomPageRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedCustomPageRequest() *PatchedCustomPageRequest { + this := PatchedCustomPageRequest{} + return &this +} + +// NewPatchedCustomPageRequestWithDefaults instantiates a new PatchedCustomPageRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedCustomPageRequestWithDefaults() *PatchedCustomPageRequest { + this := PatchedCustomPageRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedCustomPageRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCustomPageRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedCustomPageRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedCustomPageRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedCustomPageRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCustomPageRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedCustomPageRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedCustomPageRequest) SetActive(v bool) { + o.Active = &v +} + +// GetPages returns the Pages field value if set, zero value otherwise. +func (o *PatchedCustomPageRequest) GetPages() []PageRequest { + if o == nil || IsNil(o.Pages) { + var ret []PageRequest + return ret + } + return o.Pages +} + +// GetPagesOk returns a tuple with the Pages field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedCustomPageRequest) GetPagesOk() ([]PageRequest, bool) { + if o == nil || IsNil(o.Pages) { + return nil, false + } + return o.Pages, true +} + +// HasPages returns a boolean if a field has been set. +func (o *PatchedCustomPageRequest) HasPages() bool { + if o != nil && !IsNil(o.Pages) { + return true + } + + return false +} + +// SetPages gets a reference to the given []PageRequest and assigns it to the Pages field. +func (o *PatchedCustomPageRequest) SetPages(v []PageRequest) { + o.Pages = v +} + +func (o PatchedCustomPageRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedCustomPageRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Pages) { + toSerialize["pages"] = o.Pages + } + return toSerialize, nil +} + +type NullablePatchedCustomPageRequest struct { + value *PatchedCustomPageRequest + isSet bool +} + +func (v NullablePatchedCustomPageRequest) Get() *PatchedCustomPageRequest { + return v.value +} + +func (v *NullablePatchedCustomPageRequest) Set(val *PatchedCustomPageRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedCustomPageRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedCustomPageRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedCustomPageRequest(val *PatchedCustomPageRequest) *NullablePatchedCustomPageRequest { + return &NullablePatchedCustomPageRequest{value: val, isSet: true} +} + +func (v NullablePatchedCustomPageRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedCustomPageRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_dashboard_request.go b/azion-api/model_patched_dashboard_request.go new file mode 100644 index 0000000..a164320 --- /dev/null +++ b/azion-api/model_patched_dashboard_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedDashboardRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDashboardRequest{} + +// PatchedDashboardRequest struct for PatchedDashboardRequest +type PatchedDashboardRequest struct { + Name *string `json:"name,omitempty"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope *string `json:"scope,omitempty"` +} + +// NewPatchedDashboardRequest instantiates a new PatchedDashboardRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedDashboardRequest() *PatchedDashboardRequest { + this := PatchedDashboardRequest{} + return &this +} + +// NewPatchedDashboardRequestWithDefaults instantiates a new PatchedDashboardRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedDashboardRequestWithDefaults() *PatchedDashboardRequest { + this := PatchedDashboardRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedDashboardRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDashboardRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedDashboardRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedDashboardRequest) SetName(v string) { + o.Name = &v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *PatchedDashboardRequest) GetScope() string { + if o == nil || IsNil(o.Scope) { + var ret string + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDashboardRequest) GetScopeOk() (*string, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *PatchedDashboardRequest) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given string and assigns it to the Scope field. +func (o *PatchedDashboardRequest) SetScope(v string) { + o.Scope = &v +} + +func (o PatchedDashboardRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDashboardRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + return toSerialize, nil +} + +type NullablePatchedDashboardRequest struct { + value *PatchedDashboardRequest + isSet bool +} + +func (v NullablePatchedDashboardRequest) Get() *PatchedDashboardRequest { + return v.value +} + +func (v *NullablePatchedDashboardRequest) Set(val *PatchedDashboardRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedDashboardRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedDashboardRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedDashboardRequest(val *PatchedDashboardRequest) *NullablePatchedDashboardRequest { + return &NullablePatchedDashboardRequest{value: val, isSet: true} +} + +func (v NullablePatchedDashboardRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedDashboardRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_data_stream_request.go b/azion-api/model_patched_data_stream_request.go new file mode 100644 index 0000000..a55c620 --- /dev/null +++ b/azion-api/model_patched_data_stream_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedDataStreamRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDataStreamRequest{} + +// PatchedDataStreamRequest struct for PatchedDataStreamRequest +type PatchedDataStreamRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Inputs []InputInputDataSourceAttributesRequest `json:"inputs,omitempty"` + Transform []TransformRequest `json:"transform,omitempty"` +} + +// NewPatchedDataStreamRequest instantiates a new PatchedDataStreamRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedDataStreamRequest() *PatchedDataStreamRequest { + this := PatchedDataStreamRequest{} + return &this +} + +// NewPatchedDataStreamRequestWithDefaults instantiates a new PatchedDataStreamRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedDataStreamRequestWithDefaults() *PatchedDataStreamRequest { + this := PatchedDataStreamRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedDataStreamRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDataStreamRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedDataStreamRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedDataStreamRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedDataStreamRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDataStreamRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedDataStreamRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedDataStreamRequest) SetActive(v bool) { + o.Active = &v +} + +// GetInputs returns the Inputs field value if set, zero value otherwise. +func (o *PatchedDataStreamRequest) GetInputs() []InputInputDataSourceAttributesRequest { + if o == nil || IsNil(o.Inputs) { + var ret []InputInputDataSourceAttributesRequest + return ret + } + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDataStreamRequest) GetInputsOk() ([]InputInputDataSourceAttributesRequest, bool) { + if o == nil || IsNil(o.Inputs) { + return nil, false + } + return o.Inputs, true +} + +// HasInputs returns a boolean if a field has been set. +func (o *PatchedDataStreamRequest) HasInputs() bool { + if o != nil && !IsNil(o.Inputs) { + return true + } + + return false +} + +// SetInputs gets a reference to the given []InputInputDataSourceAttributesRequest and assigns it to the Inputs field. +func (o *PatchedDataStreamRequest) SetInputs(v []InputInputDataSourceAttributesRequest) { + o.Inputs = v +} + +// GetTransform returns the Transform field value if set, zero value otherwise. +func (o *PatchedDataStreamRequest) GetTransform() []TransformRequest { + if o == nil || IsNil(o.Transform) { + var ret []TransformRequest + return ret + } + return o.Transform +} + +// GetTransformOk returns a tuple with the Transform field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDataStreamRequest) GetTransformOk() ([]TransformRequest, bool) { + if o == nil || IsNil(o.Transform) { + return nil, false + } + return o.Transform, true +} + +// HasTransform returns a boolean if a field has been set. +func (o *PatchedDataStreamRequest) HasTransform() bool { + if o != nil && !IsNil(o.Transform) { + return true + } + + return false +} + +// SetTransform gets a reference to the given []TransformRequest and assigns it to the Transform field. +func (o *PatchedDataStreamRequest) SetTransform(v []TransformRequest) { + o.Transform = v +} + +func (o PatchedDataStreamRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDataStreamRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Inputs) { + toSerialize["inputs"] = o.Inputs + } + if !IsNil(o.Transform) { + toSerialize["transform"] = o.Transform + } + return toSerialize, nil +} + +type NullablePatchedDataStreamRequest struct { + value *PatchedDataStreamRequest + isSet bool +} + +func (v NullablePatchedDataStreamRequest) Get() *PatchedDataStreamRequest { + return v.value +} + +func (v *NullablePatchedDataStreamRequest) Set(val *PatchedDataStreamRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedDataStreamRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedDataStreamRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedDataStreamRequest(val *PatchedDataStreamRequest) *NullablePatchedDataStreamRequest { + return &NullablePatchedDataStreamRequest{value: val, isSet: true} +} + +func (v NullablePatchedDataStreamRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedDataStreamRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_device_group_request.go b/azion-api/model_patched_device_group_request.go new file mode 100644 index 0000000..c00ee6e --- /dev/null +++ b/azion-api/model_patched_device_group_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedDeviceGroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDeviceGroupRequest{} + +// PatchedDeviceGroupRequest struct for PatchedDeviceGroupRequest +type PatchedDeviceGroupRequest struct { + Name *string `json:"name,omitempty"` + // Enter a valid regular expression pattern to identify user agents. + UserAgent *string `json:"user_agent,omitempty"` +} + +// NewPatchedDeviceGroupRequest instantiates a new PatchedDeviceGroupRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedDeviceGroupRequest() *PatchedDeviceGroupRequest { + this := PatchedDeviceGroupRequest{} + return &this +} + +// NewPatchedDeviceGroupRequestWithDefaults instantiates a new PatchedDeviceGroupRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedDeviceGroupRequestWithDefaults() *PatchedDeviceGroupRequest { + this := PatchedDeviceGroupRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedDeviceGroupRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDeviceGroupRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedDeviceGroupRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedDeviceGroupRequest) SetName(v string) { + o.Name = &v +} + +// GetUserAgent returns the UserAgent field value if set, zero value otherwise. +func (o *PatchedDeviceGroupRequest) GetUserAgent() string { + if o == nil || IsNil(o.UserAgent) { + var ret string + return ret + } + return *o.UserAgent +} + +// GetUserAgentOk returns a tuple with the UserAgent field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDeviceGroupRequest) GetUserAgentOk() (*string, bool) { + if o == nil || IsNil(o.UserAgent) { + return nil, false + } + return o.UserAgent, true +} + +// HasUserAgent returns a boolean if a field has been set. +func (o *PatchedDeviceGroupRequest) HasUserAgent() bool { + if o != nil && !IsNil(o.UserAgent) { + return true + } + + return false +} + +// SetUserAgent gets a reference to the given string and assigns it to the UserAgent field. +func (o *PatchedDeviceGroupRequest) SetUserAgent(v string) { + o.UserAgent = &v +} + +func (o PatchedDeviceGroupRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDeviceGroupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.UserAgent) { + toSerialize["user_agent"] = o.UserAgent + } + return toSerialize, nil +} + +type NullablePatchedDeviceGroupRequest struct { + value *PatchedDeviceGroupRequest + isSet bool +} + +func (v NullablePatchedDeviceGroupRequest) Get() *PatchedDeviceGroupRequest { + return v.value +} + +func (v *NullablePatchedDeviceGroupRequest) Set(val *PatchedDeviceGroupRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedDeviceGroupRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedDeviceGroupRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedDeviceGroupRequest(val *PatchedDeviceGroupRequest) *NullablePatchedDeviceGroupRequest { + return &NullablePatchedDeviceGroupRequest{value: val, isSet: true} +} + +func (v NullablePatchedDeviceGroupRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedDeviceGroupRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_dnssec_request.go b/azion-api/model_patched_dnssec_request.go new file mode 100644 index 0000000..1554028 --- /dev/null +++ b/azion-api/model_patched_dnssec_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedDNSSECRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedDNSSECRequest{} + +// PatchedDNSSECRequest struct for PatchedDNSSECRequest +type PatchedDNSSECRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewPatchedDNSSECRequest instantiates a new PatchedDNSSECRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedDNSSECRequest() *PatchedDNSSECRequest { + this := PatchedDNSSECRequest{} + return &this +} + +// NewPatchedDNSSECRequestWithDefaults instantiates a new PatchedDNSSECRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedDNSSECRequestWithDefaults() *PatchedDNSSECRequest { + this := PatchedDNSSECRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *PatchedDNSSECRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedDNSSECRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *PatchedDNSSECRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *PatchedDNSSECRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o PatchedDNSSECRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedDNSSECRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullablePatchedDNSSECRequest struct { + value *PatchedDNSSECRequest + isSet bool +} + +func (v NullablePatchedDNSSECRequest) Get() *PatchedDNSSECRequest { + return v.value +} + +func (v *NullablePatchedDNSSECRequest) Set(val *PatchedDNSSECRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedDNSSECRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedDNSSECRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedDNSSECRequest(val *PatchedDNSSECRequest) *NullablePatchedDNSSECRequest { + return &NullablePatchedDNSSECRequest{value: val, isSet: true} +} + +func (v NullablePatchedDNSSECRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedDNSSECRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_firewall_function_instance_request.go b/azion-api/model_patched_firewall_function_instance_request.go new file mode 100644 index 0000000..de6cbe1 --- /dev/null +++ b/azion-api/model_patched_firewall_function_instance_request.go @@ -0,0 +1,272 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedFirewallFunctionInstanceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFirewallFunctionInstanceRequest{} + +// PatchedFirewallFunctionInstanceRequest Serializer for Firewall Function Instances +type PatchedFirewallFunctionInstanceRequest struct { + Name *string `json:"name,omitempty"` + Args interface{} `json:"args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + Function *int64 `json:"function,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedFirewallFunctionInstanceRequest instantiates a new PatchedFirewallFunctionInstanceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFirewallFunctionInstanceRequest() *PatchedFirewallFunctionInstanceRequest { + this := PatchedFirewallFunctionInstanceRequest{} + return &this +} + +// NewPatchedFirewallFunctionInstanceRequestWithDefaults instantiates a new PatchedFirewallFunctionInstanceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFirewallFunctionInstanceRequestWithDefaults() *PatchedFirewallFunctionInstanceRequest { + this := PatchedFirewallFunctionInstanceRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFirewallFunctionInstanceRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallFunctionInstanceRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFirewallFunctionInstanceRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFirewallFunctionInstanceRequest) SetName(v string) { + o.Name = &v +} + +// GetArgs returns the Args field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedFirewallFunctionInstanceRequest) GetArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedFirewallFunctionInstanceRequest) GetArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.Args) { + return nil, false + } + return &o.Args, true +} + +// HasArgs returns a boolean if a field has been set. +func (o *PatchedFirewallFunctionInstanceRequest) HasArgs() bool { + if o != nil && !IsNil(o.Args) { + return true + } + + return false +} + +// SetArgs gets a reference to the given interface{} and assigns it to the Args field. +func (o *PatchedFirewallFunctionInstanceRequest) SetArgs(v interface{}) { + o.Args = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *PatchedFirewallFunctionInstanceRequest) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallFunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *PatchedFirewallFunctionInstanceRequest) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *PatchedFirewallFunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetFunction returns the Function field value if set, zero value otherwise. +func (o *PatchedFirewallFunctionInstanceRequest) GetFunction() int64 { + if o == nil || IsNil(o.Function) { + var ret int64 + return ret + } + return *o.Function +} + +// GetFunctionOk returns a tuple with the Function field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallFunctionInstanceRequest) GetFunctionOk() (*int64, bool) { + if o == nil || IsNil(o.Function) { + return nil, false + } + return o.Function, true +} + +// HasFunction returns a boolean if a field has been set. +func (o *PatchedFirewallFunctionInstanceRequest) HasFunction() bool { + if o != nil && !IsNil(o.Function) { + return true + } + + return false +} + +// SetFunction gets a reference to the given int64 and assigns it to the Function field. +func (o *PatchedFirewallFunctionInstanceRequest) SetFunction(v int64) { + o.Function = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedFirewallFunctionInstanceRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallFunctionInstanceRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedFirewallFunctionInstanceRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedFirewallFunctionInstanceRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedFirewallFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFirewallFunctionInstanceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Args != nil { + toSerialize["args"] = o.Args + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + if !IsNil(o.Function) { + toSerialize["function"] = o.Function + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedFirewallFunctionInstanceRequest struct { + value *PatchedFirewallFunctionInstanceRequest + isSet bool +} + +func (v NullablePatchedFirewallFunctionInstanceRequest) Get() *PatchedFirewallFunctionInstanceRequest { + return v.value +} + +func (v *NullablePatchedFirewallFunctionInstanceRequest) Set(val *PatchedFirewallFunctionInstanceRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFirewallFunctionInstanceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFirewallFunctionInstanceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFirewallFunctionInstanceRequest(val *PatchedFirewallFunctionInstanceRequest) *NullablePatchedFirewallFunctionInstanceRequest { + return &NullablePatchedFirewallFunctionInstanceRequest{value: val, isSet: true} +} + +func (v NullablePatchedFirewallFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFirewallFunctionInstanceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_firewall_request.go b/azion-api/model_patched_firewall_request.go new file mode 100644 index 0000000..af7c7f7 --- /dev/null +++ b/azion-api/model_patched_firewall_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedFirewallRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFirewallRequest{} + +// PatchedFirewallRequest struct for PatchedFirewallRequest +type PatchedFirewallRequest struct { + Name *string `json:"name,omitempty"` + Modules *FirewallModulesRequest `json:"modules,omitempty"` + Debug *bool `json:"debug,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedFirewallRequest instantiates a new PatchedFirewallRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFirewallRequest() *PatchedFirewallRequest { + this := PatchedFirewallRequest{} + return &this +} + +// NewPatchedFirewallRequestWithDefaults instantiates a new PatchedFirewallRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFirewallRequestWithDefaults() *PatchedFirewallRequest { + this := PatchedFirewallRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFirewallRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFirewallRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFirewallRequest) SetName(v string) { + o.Name = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise. +func (o *PatchedFirewallRequest) GetModules() FirewallModulesRequest { + if o == nil || IsNil(o.Modules) { + var ret FirewallModulesRequest + return ret + } + return *o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRequest) GetModulesOk() (*FirewallModulesRequest, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *PatchedFirewallRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given FirewallModulesRequest and assigns it to the Modules field. +func (o *PatchedFirewallRequest) SetModules(v FirewallModulesRequest) { + o.Modules = &v +} + +// GetDebug returns the Debug field value if set, zero value otherwise. +func (o *PatchedFirewallRequest) GetDebug() bool { + if o == nil || IsNil(o.Debug) { + var ret bool + return ret + } + return *o.Debug +} + +// GetDebugOk returns a tuple with the Debug field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRequest) GetDebugOk() (*bool, bool) { + if o == nil || IsNil(o.Debug) { + return nil, false + } + return o.Debug, true +} + +// HasDebug returns a boolean if a field has been set. +func (o *PatchedFirewallRequest) HasDebug() bool { + if o != nil && !IsNil(o.Debug) { + return true + } + + return false +} + +// SetDebug gets a reference to the given bool and assigns it to the Debug field. +func (o *PatchedFirewallRequest) SetDebug(v bool) { + o.Debug = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedFirewallRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedFirewallRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedFirewallRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedFirewallRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFirewallRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Modules) { + toSerialize["modules"] = o.Modules + } + if !IsNil(o.Debug) { + toSerialize["debug"] = o.Debug + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedFirewallRequest struct { + value *PatchedFirewallRequest + isSet bool +} + +func (v NullablePatchedFirewallRequest) Get() *PatchedFirewallRequest { + return v.value +} + +func (v *NullablePatchedFirewallRequest) Set(val *PatchedFirewallRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFirewallRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFirewallRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFirewallRequest(val *PatchedFirewallRequest) *NullablePatchedFirewallRequest { + return &NullablePatchedFirewallRequest{value: val, isSet: true} +} + +func (v NullablePatchedFirewallRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFirewallRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_firewall_rule_request.go b/azion-api/model_patched_firewall_rule_request.go new file mode 100644 index 0000000..0fa2249 --- /dev/null +++ b/azion-api/model_patched_firewall_rule_request.go @@ -0,0 +1,271 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedFirewallRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFirewallRuleRequest{} + +// PatchedFirewallRuleRequest struct for PatchedFirewallRuleRequest +type PatchedFirewallRuleRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Criteria [][]FirewallCriterionFieldRequest `json:"criteria,omitempty"` + Behaviors []FirewallBehaviorRequest `json:"behaviors,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewPatchedFirewallRuleRequest instantiates a new PatchedFirewallRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFirewallRuleRequest() *PatchedFirewallRuleRequest { + this := PatchedFirewallRuleRequest{} + return &this +} + +// NewPatchedFirewallRuleRequestWithDefaults instantiates a new PatchedFirewallRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFirewallRuleRequestWithDefaults() *PatchedFirewallRuleRequest { + this := PatchedFirewallRuleRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFirewallRuleRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRuleRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFirewallRuleRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFirewallRuleRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedFirewallRuleRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRuleRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedFirewallRuleRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedFirewallRuleRequest) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value if set, zero value otherwise. +func (o *PatchedFirewallRuleRequest) GetCriteria() [][]FirewallCriterionFieldRequest { + if o == nil || IsNil(o.Criteria) { + var ret [][]FirewallCriterionFieldRequest + return ret + } + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRuleRequest) GetCriteriaOk() ([][]FirewallCriterionFieldRequest, bool) { + if o == nil || IsNil(o.Criteria) { + return nil, false + } + return o.Criteria, true +} + +// HasCriteria returns a boolean if a field has been set. +func (o *PatchedFirewallRuleRequest) HasCriteria() bool { + if o != nil && !IsNil(o.Criteria) { + return true + } + + return false +} + +// SetCriteria gets a reference to the given [][]FirewallCriterionFieldRequest and assigns it to the Criteria field. +func (o *PatchedFirewallRuleRequest) SetCriteria(v [][]FirewallCriterionFieldRequest) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value if set, zero value otherwise. +func (o *PatchedFirewallRuleRequest) GetBehaviors() []FirewallBehaviorRequest { + if o == nil || IsNil(o.Behaviors) { + var ret []FirewallBehaviorRequest + return ret + } + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRuleRequest) GetBehaviorsOk() ([]FirewallBehaviorRequest, bool) { + if o == nil || IsNil(o.Behaviors) { + return nil, false + } + return o.Behaviors, true +} + +// HasBehaviors returns a boolean if a field has been set. +func (o *PatchedFirewallRuleRequest) HasBehaviors() bool { + if o != nil && !IsNil(o.Behaviors) { + return true + } + + return false +} + +// SetBehaviors gets a reference to the given []FirewallBehaviorRequest and assigns it to the Behaviors field. +func (o *PatchedFirewallRuleRequest) SetBehaviors(v []FirewallBehaviorRequest) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedFirewallRuleRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFirewallRuleRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedFirewallRuleRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedFirewallRuleRequest) SetDescription(v string) { + o.Description = &v +} + +func (o PatchedFirewallRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFirewallRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Criteria) { + toSerialize["criteria"] = o.Criteria + } + if !IsNil(o.Behaviors) { + toSerialize["behaviors"] = o.Behaviors + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullablePatchedFirewallRuleRequest struct { + value *PatchedFirewallRuleRequest + isSet bool +} + +func (v NullablePatchedFirewallRuleRequest) Get() *PatchedFirewallRuleRequest { + return v.value +} + +func (v *NullablePatchedFirewallRuleRequest) Set(val *PatchedFirewallRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFirewallRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFirewallRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFirewallRuleRequest(val *PatchedFirewallRuleRequest) *NullablePatchedFirewallRuleRequest { + return &NullablePatchedFirewallRuleRequest{value: val, isSet: true} +} + +func (v NullablePatchedFirewallRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFirewallRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_folder_request.go b/azion-api/model_patched_folder_request.go new file mode 100644 index 0000000..62f609f --- /dev/null +++ b/azion-api/model_patched_folder_request.go @@ -0,0 +1,164 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedFolderRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFolderRequest{} + +// PatchedFolderRequest struct for PatchedFolderRequest +type PatchedFolderRequest struct { + Name *string `json:"name,omitempty"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope *string `json:"scope,omitempty"` +} + +// NewPatchedFolderRequest instantiates a new PatchedFolderRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFolderRequest() *PatchedFolderRequest { + this := PatchedFolderRequest{} + return &this +} + +// NewPatchedFolderRequestWithDefaults instantiates a new PatchedFolderRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFolderRequestWithDefaults() *PatchedFolderRequest { + this := PatchedFolderRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFolderRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFolderRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFolderRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFolderRequest) SetName(v string) { + o.Name = &v +} + +// GetScope returns the Scope field value if set, zero value otherwise. +func (o *PatchedFolderRequest) GetScope() string { + if o == nil || IsNil(o.Scope) { + var ret string + return ret + } + return *o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFolderRequest) GetScopeOk() (*string, bool) { + if o == nil || IsNil(o.Scope) { + return nil, false + } + return o.Scope, true +} + +// HasScope returns a boolean if a field has been set. +func (o *PatchedFolderRequest) HasScope() bool { + if o != nil && !IsNil(o.Scope) { + return true + } + + return false +} + +// SetScope gets a reference to the given string and assigns it to the Scope field. +func (o *PatchedFolderRequest) SetScope(v string) { + o.Scope = &v +} + +func (o PatchedFolderRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFolderRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Scope) { + toSerialize["scope"] = o.Scope + } + return toSerialize, nil +} + +type NullablePatchedFolderRequest struct { + value *PatchedFolderRequest + isSet bool +} + +func (v NullablePatchedFolderRequest) Get() *PatchedFolderRequest { + return v.value +} + +func (v *NullablePatchedFolderRequest) Set(val *PatchedFolderRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFolderRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFolderRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFolderRequest(val *PatchedFolderRequest) *NullablePatchedFolderRequest { + return &NullablePatchedFolderRequest{value: val, isSet: true} +} + +func (v NullablePatchedFolderRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFolderRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_function_instance_request.go b/azion-api/model_patched_function_instance_request.go new file mode 100644 index 0000000..6ad8a47 --- /dev/null +++ b/azion-api/model_patched_function_instance_request.go @@ -0,0 +1,272 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedFunctionInstanceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFunctionInstanceRequest{} + +// PatchedFunctionInstanceRequest Serializer for Application Function Instances +type PatchedFunctionInstanceRequest struct { + Name *string `json:"name,omitempty"` + Args interface{} `json:"args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` + Function *int64 `json:"function,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedFunctionInstanceRequest instantiates a new PatchedFunctionInstanceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFunctionInstanceRequest() *PatchedFunctionInstanceRequest { + this := PatchedFunctionInstanceRequest{} + return &this +} + +// NewPatchedFunctionInstanceRequestWithDefaults instantiates a new PatchedFunctionInstanceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFunctionInstanceRequestWithDefaults() *PatchedFunctionInstanceRequest { + this := PatchedFunctionInstanceRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFunctionInstanceRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionInstanceRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFunctionInstanceRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFunctionInstanceRequest) SetName(v string) { + o.Name = &v +} + +// GetArgs returns the Args field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedFunctionInstanceRequest) GetArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Args +} + +// GetArgsOk returns a tuple with the Args field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedFunctionInstanceRequest) GetArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.Args) { + return nil, false + } + return &o.Args, true +} + +// HasArgs returns a boolean if a field has been set. +func (o *PatchedFunctionInstanceRequest) HasArgs() bool { + if o != nil && !IsNil(o.Args) { + return true + } + + return false +} + +// SetArgs gets a reference to the given interface{} and assigns it to the Args field. +func (o *PatchedFunctionInstanceRequest) SetArgs(v interface{}) { + o.Args = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *PatchedFunctionInstanceRequest) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionInstanceRequest) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *PatchedFunctionInstanceRequest) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *PatchedFunctionInstanceRequest) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +// GetFunction returns the Function field value if set, zero value otherwise. +func (o *PatchedFunctionInstanceRequest) GetFunction() int64 { + if o == nil || IsNil(o.Function) { + var ret int64 + return ret + } + return *o.Function +} + +// GetFunctionOk returns a tuple with the Function field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionInstanceRequest) GetFunctionOk() (*int64, bool) { + if o == nil || IsNil(o.Function) { + return nil, false + } + return o.Function, true +} + +// HasFunction returns a boolean if a field has been set. +func (o *PatchedFunctionInstanceRequest) HasFunction() bool { + if o != nil && !IsNil(o.Function) { + return true + } + + return false +} + +// SetFunction gets a reference to the given int64 and assigns it to the Function field. +func (o *PatchedFunctionInstanceRequest) SetFunction(v int64) { + o.Function = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedFunctionInstanceRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionInstanceRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedFunctionInstanceRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedFunctionInstanceRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFunctionInstanceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Args != nil { + toSerialize["args"] = o.Args + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + if !IsNil(o.Function) { + toSerialize["function"] = o.Function + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedFunctionInstanceRequest struct { + value *PatchedFunctionInstanceRequest + isSet bool +} + +func (v NullablePatchedFunctionInstanceRequest) Get() *PatchedFunctionInstanceRequest { + return v.value +} + +func (v *NullablePatchedFunctionInstanceRequest) Set(val *PatchedFunctionInstanceRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFunctionInstanceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFunctionInstanceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFunctionInstanceRequest(val *PatchedFunctionInstanceRequest) *NullablePatchedFunctionInstanceRequest { + return &NullablePatchedFunctionInstanceRequest{value: val, isSet: true} +} + +func (v NullablePatchedFunctionInstanceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFunctionInstanceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_functions_request.go b/azion-api/model_patched_functions_request.go new file mode 100644 index 0000000..e2cff03 --- /dev/null +++ b/azion-api/model_patched_functions_request.go @@ -0,0 +1,347 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedFunctionsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedFunctionsRequest{} + +// PatchedFunctionsRequest struct for PatchedFunctionsRequest +type PatchedFunctionsRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + // * `azion_js` - Azion JavaScript + Runtime *string `json:"runtime,omitempty"` + // * `firewall` - Firewall * `application` - Application + ExecutionEnvironment *string `json:"execution_environment,omitempty"` + // String containing the function code. Maximum size: 20MB. + Code *string `json:"code,omitempty"` + DefaultArgs interface{} `json:"default_args,omitempty"` + AzionForm *FunctionsAzionForm `json:"azion_form,omitempty"` +} + +// NewPatchedFunctionsRequest instantiates a new PatchedFunctionsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedFunctionsRequest() *PatchedFunctionsRequest { + this := PatchedFunctionsRequest{} + return &this +} + +// NewPatchedFunctionsRequestWithDefaults instantiates a new PatchedFunctionsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedFunctionsRequestWithDefaults() *PatchedFunctionsRequest { + this := PatchedFunctionsRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedFunctionsRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionsRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedFunctionsRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedFunctionsRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionsRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedFunctionsRequest) SetActive(v bool) { + o.Active = &v +} + +// GetRuntime returns the Runtime field value if set, zero value otherwise. +func (o *PatchedFunctionsRequest) GetRuntime() string { + if o == nil || IsNil(o.Runtime) { + var ret string + return ret + } + return *o.Runtime +} + +// GetRuntimeOk returns a tuple with the Runtime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionsRequest) GetRuntimeOk() (*string, bool) { + if o == nil || IsNil(o.Runtime) { + return nil, false + } + return o.Runtime, true +} + +// HasRuntime returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasRuntime() bool { + if o != nil && !IsNil(o.Runtime) { + return true + } + + return false +} + +// SetRuntime gets a reference to the given string and assigns it to the Runtime field. +func (o *PatchedFunctionsRequest) SetRuntime(v string) { + o.Runtime = &v +} + +// GetExecutionEnvironment returns the ExecutionEnvironment field value if set, zero value otherwise. +func (o *PatchedFunctionsRequest) GetExecutionEnvironment() string { + if o == nil || IsNil(o.ExecutionEnvironment) { + var ret string + return ret + } + return *o.ExecutionEnvironment +} + +// GetExecutionEnvironmentOk returns a tuple with the ExecutionEnvironment field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionsRequest) GetExecutionEnvironmentOk() (*string, bool) { + if o == nil || IsNil(o.ExecutionEnvironment) { + return nil, false + } + return o.ExecutionEnvironment, true +} + +// HasExecutionEnvironment returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasExecutionEnvironment() bool { + if o != nil && !IsNil(o.ExecutionEnvironment) { + return true + } + + return false +} + +// SetExecutionEnvironment gets a reference to the given string and assigns it to the ExecutionEnvironment field. +func (o *PatchedFunctionsRequest) SetExecutionEnvironment(v string) { + o.ExecutionEnvironment = &v +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *PatchedFunctionsRequest) GetCode() string { + if o == nil || IsNil(o.Code) { + var ret string + return ret + } + return *o.Code +} + +// GetCodeOk returns a tuple with the Code field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionsRequest) GetCodeOk() (*string, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given string and assigns it to the Code field. +func (o *PatchedFunctionsRequest) SetCode(v string) { + o.Code = &v +} + +// GetDefaultArgs returns the DefaultArgs field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedFunctionsRequest) GetDefaultArgs() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.DefaultArgs +} + +// GetDefaultArgsOk returns a tuple with the DefaultArgs field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedFunctionsRequest) GetDefaultArgsOk() (*interface{}, bool) { + if o == nil || IsNil(o.DefaultArgs) { + return nil, false + } + return &o.DefaultArgs, true +} + +// HasDefaultArgs returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasDefaultArgs() bool { + if o != nil && !IsNil(o.DefaultArgs) { + return true + } + + return false +} + +// SetDefaultArgs gets a reference to the given interface{} and assigns it to the DefaultArgs field. +func (o *PatchedFunctionsRequest) SetDefaultArgs(v interface{}) { + o.DefaultArgs = v +} + +// GetAzionForm returns the AzionForm field value if set, zero value otherwise. +func (o *PatchedFunctionsRequest) GetAzionForm() FunctionsAzionForm { + if o == nil || IsNil(o.AzionForm) { + var ret FunctionsAzionForm + return ret + } + return *o.AzionForm +} + +// GetAzionFormOk returns a tuple with the AzionForm field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedFunctionsRequest) GetAzionFormOk() (*FunctionsAzionForm, bool) { + if o == nil || IsNil(o.AzionForm) { + return nil, false + } + return o.AzionForm, true +} + +// HasAzionForm returns a boolean if a field has been set. +func (o *PatchedFunctionsRequest) HasAzionForm() bool { + if o != nil && !IsNil(o.AzionForm) { + return true + } + + return false +} + +// SetAzionForm gets a reference to the given FunctionsAzionForm and assigns it to the AzionForm field. +func (o *PatchedFunctionsRequest) SetAzionForm(v FunctionsAzionForm) { + o.AzionForm = &v +} + +func (o PatchedFunctionsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedFunctionsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Runtime) { + toSerialize["runtime"] = o.Runtime + } + if !IsNil(o.ExecutionEnvironment) { + toSerialize["execution_environment"] = o.ExecutionEnvironment + } + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if o.DefaultArgs != nil { + toSerialize["default_args"] = o.DefaultArgs + } + if !IsNil(o.AzionForm) { + toSerialize["azion_form"] = o.AzionForm + } + return toSerialize, nil +} + +type NullablePatchedFunctionsRequest struct { + value *PatchedFunctionsRequest + isSet bool +} + +func (v NullablePatchedFunctionsRequest) Get() *PatchedFunctionsRequest { + return v.value +} + +func (v *NullablePatchedFunctionsRequest) Set(val *PatchedFunctionsRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedFunctionsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedFunctionsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedFunctionsRequest(val *PatchedFunctionsRequest) *NullablePatchedFunctionsRequest { + return &NullablePatchedFunctionsRequest{value: val, isSet: true} +} + +func (v NullablePatchedFunctionsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedFunctionsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_grant_request.go b/azion-api/model_patched_grant_request.go new file mode 100644 index 0000000..38f564e --- /dev/null +++ b/azion-api/model_patched_grant_request.go @@ -0,0 +1,318 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" +) + +// checks if the PatchedGrantRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedGrantRequest{} + +// PatchedGrantRequest struct for PatchedGrantRequest +type PatchedGrantRequest struct { + Identity NullableInt64 `json:"identity,omitempty"` + Roles []int64 `json:"roles,omitempty"` + Policies []int64 `json:"policies,omitempty"` + Expires *time.Time `json:"expires,omitempty"` + Owner *bool `json:"owner,omitempty"` + AccountId *int64 `json:"account_id,omitempty"` +} + +// NewPatchedGrantRequest instantiates a new PatchedGrantRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedGrantRequest() *PatchedGrantRequest { + this := PatchedGrantRequest{} + return &this +} + +// NewPatchedGrantRequestWithDefaults instantiates a new PatchedGrantRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedGrantRequestWithDefaults() *PatchedGrantRequest { + this := PatchedGrantRequest{} + return &this +} + +// GetIdentity returns the Identity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedGrantRequest) GetIdentity() int64 { + if o == nil || IsNil(o.Identity.Get()) { + var ret int64 + return ret + } + return *o.Identity.Get() +} + +// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedGrantRequest) GetIdentityOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Identity.Get(), o.Identity.IsSet() +} + +// HasIdentity returns a boolean if a field has been set. +func (o *PatchedGrantRequest) HasIdentity() bool { + if o != nil && o.Identity.IsSet() { + return true + } + + return false +} + +// SetIdentity gets a reference to the given NullableInt64 and assigns it to the Identity field. +func (o *PatchedGrantRequest) SetIdentity(v int64) { + o.Identity.Set(&v) +} +// SetIdentityNil sets the value for Identity to be an explicit nil +func (o *PatchedGrantRequest) SetIdentityNil() { + o.Identity.Set(nil) +} + +// UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +func (o *PatchedGrantRequest) UnsetIdentity() { + o.Identity.Unset() +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *PatchedGrantRequest) GetRoles() []int64 { + if o == nil || IsNil(o.Roles) { + var ret []int64 + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGrantRequest) GetRolesOk() ([]int64, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *PatchedGrantRequest) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []int64 and assigns it to the Roles field. +func (o *PatchedGrantRequest) SetRoles(v []int64) { + o.Roles = v +} + +// GetPolicies returns the Policies field value if set, zero value otherwise. +func (o *PatchedGrantRequest) GetPolicies() []int64 { + if o == nil || IsNil(o.Policies) { + var ret []int64 + return ret + } + return o.Policies +} + +// GetPoliciesOk returns a tuple with the Policies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGrantRequest) GetPoliciesOk() ([]int64, bool) { + if o == nil || IsNil(o.Policies) { + return nil, false + } + return o.Policies, true +} + +// HasPolicies returns a boolean if a field has been set. +func (o *PatchedGrantRequest) HasPolicies() bool { + if o != nil && !IsNil(o.Policies) { + return true + } + + return false +} + +// SetPolicies gets a reference to the given []int64 and assigns it to the Policies field. +func (o *PatchedGrantRequest) SetPolicies(v []int64) { + o.Policies = v +} + +// GetExpires returns the Expires field value if set, zero value otherwise. +func (o *PatchedGrantRequest) GetExpires() time.Time { + if o == nil || IsNil(o.Expires) { + var ret time.Time + return ret + } + return *o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGrantRequest) GetExpiresOk() (*time.Time, bool) { + if o == nil || IsNil(o.Expires) { + return nil, false + } + return o.Expires, true +} + +// HasExpires returns a boolean if a field has been set. +func (o *PatchedGrantRequest) HasExpires() bool { + if o != nil && !IsNil(o.Expires) { + return true + } + + return false +} + +// SetExpires gets a reference to the given time.Time and assigns it to the Expires field. +func (o *PatchedGrantRequest) SetExpires(v time.Time) { + o.Expires = &v +} + +// GetOwner returns the Owner field value if set, zero value otherwise. +func (o *PatchedGrantRequest) GetOwner() bool { + if o == nil || IsNil(o.Owner) { + var ret bool + return ret + } + return *o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGrantRequest) GetOwnerOk() (*bool, bool) { + if o == nil || IsNil(o.Owner) { + return nil, false + } + return o.Owner, true +} + +// HasOwner returns a boolean if a field has been set. +func (o *PatchedGrantRequest) HasOwner() bool { + if o != nil && !IsNil(o.Owner) { + return true + } + + return false +} + +// SetOwner gets a reference to the given bool and assigns it to the Owner field. +func (o *PatchedGrantRequest) SetOwner(v bool) { + o.Owner = &v +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise. +func (o *PatchedGrantRequest) GetAccountId() int64 { + if o == nil || IsNil(o.AccountId) { + var ret int64 + return ret + } + return *o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGrantRequest) GetAccountIdOk() (*int64, bool) { + if o == nil || IsNil(o.AccountId) { + return nil, false + } + return o.AccountId, true +} + +// HasAccountId returns a boolean if a field has been set. +func (o *PatchedGrantRequest) HasAccountId() bool { + if o != nil && !IsNil(o.AccountId) { + return true + } + + return false +} + +// SetAccountId gets a reference to the given int64 and assigns it to the AccountId field. +func (o *PatchedGrantRequest) SetAccountId(v int64) { + o.AccountId = &v +} + +func (o PatchedGrantRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedGrantRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Identity.IsSet() { + toSerialize["identity"] = o.Identity.Get() + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Policies) { + toSerialize["policies"] = o.Policies + } + if !IsNil(o.Expires) { + toSerialize["expires"] = o.Expires + } + if !IsNil(o.Owner) { + toSerialize["owner"] = o.Owner + } + if !IsNil(o.AccountId) { + toSerialize["account_id"] = o.AccountId + } + return toSerialize, nil +} + +type NullablePatchedGrantRequest struct { + value *PatchedGrantRequest + isSet bool +} + +func (v NullablePatchedGrantRequest) Get() *PatchedGrantRequest { + return v.value +} + +func (v *NullablePatchedGrantRequest) Set(val *PatchedGrantRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedGrantRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedGrantRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedGrantRequest(val *PatchedGrantRequest) *NullablePatchedGrantRequest { + return &NullablePatchedGrantRequest{value: val, isSet: true} +} + +func (v NullablePatchedGrantRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedGrantRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_group_request.go b/azion-api/model_patched_group_request.go new file mode 100644 index 0000000..f1c972b --- /dev/null +++ b/azion-api/model_patched_group_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedGroupRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedGroupRequest{} + +// PatchedGroupRequest struct for PatchedGroupRequest +type PatchedGroupRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedGroupRequest instantiates a new PatchedGroupRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedGroupRequest() *PatchedGroupRequest { + this := PatchedGroupRequest{} + return &this +} + +// NewPatchedGroupRequestWithDefaults instantiates a new PatchedGroupRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedGroupRequestWithDefaults() *PatchedGroupRequest { + this := PatchedGroupRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedGroupRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGroupRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedGroupRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedGroupRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedGroupRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedGroupRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedGroupRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedGroupRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedGroupRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedGroupRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedGroupRequest struct { + value *PatchedGroupRequest + isSet bool +} + +func (v NullablePatchedGroupRequest) Get() *PatchedGroupRequest { + return v.value +} + +func (v *NullablePatchedGroupRequest) Set(val *PatchedGroupRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedGroupRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedGroupRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedGroupRequest(val *PatchedGroupRequest) *NullablePatchedGroupRequest { + return &NullablePatchedGroupRequest{value: val, isSet: true} +} + +func (v NullablePatchedGroupRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedGroupRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_knowledge_base_request.go b/azion-api/model_patched_knowledge_base_request.go new file mode 100644 index 0000000..523d30f --- /dev/null +++ b/azion-api/model_patched_knowledge_base_request.go @@ -0,0 +1,200 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedKnowledgeBaseRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedKnowledgeBaseRequest{} + +// PatchedKnowledgeBaseRequest struct for PatchedKnowledgeBaseRequest +type PatchedKnowledgeBaseRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + // * `text-embedding-3-small` - text-embedding-3-small + EmbeddingModel *string `json:"embedding_model,omitempty"` +} + +// NewPatchedKnowledgeBaseRequest instantiates a new PatchedKnowledgeBaseRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedKnowledgeBaseRequest() *PatchedKnowledgeBaseRequest { + this := PatchedKnowledgeBaseRequest{} + return &this +} + +// NewPatchedKnowledgeBaseRequestWithDefaults instantiates a new PatchedKnowledgeBaseRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedKnowledgeBaseRequestWithDefaults() *PatchedKnowledgeBaseRequest { + this := PatchedKnowledgeBaseRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedKnowledgeBaseRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedKnowledgeBaseRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedKnowledgeBaseRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedKnowledgeBaseRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedKnowledgeBaseRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedKnowledgeBaseRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedKnowledgeBaseRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedKnowledgeBaseRequest) SetDescription(v string) { + o.Description = &v +} + +// GetEmbeddingModel returns the EmbeddingModel field value if set, zero value otherwise. +func (o *PatchedKnowledgeBaseRequest) GetEmbeddingModel() string { + if o == nil || IsNil(o.EmbeddingModel) { + var ret string + return ret + } + return *o.EmbeddingModel +} + +// GetEmbeddingModelOk returns a tuple with the EmbeddingModel field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedKnowledgeBaseRequest) GetEmbeddingModelOk() (*string, bool) { + if o == nil || IsNil(o.EmbeddingModel) { + return nil, false + } + return o.EmbeddingModel, true +} + +// HasEmbeddingModel returns a boolean if a field has been set. +func (o *PatchedKnowledgeBaseRequest) HasEmbeddingModel() bool { + if o != nil && !IsNil(o.EmbeddingModel) { + return true + } + + return false +} + +// SetEmbeddingModel gets a reference to the given string and assigns it to the EmbeddingModel field. +func (o *PatchedKnowledgeBaseRequest) SetEmbeddingModel(v string) { + o.EmbeddingModel = &v +} + +func (o PatchedKnowledgeBaseRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedKnowledgeBaseRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.EmbeddingModel) { + toSerialize["embedding_model"] = o.EmbeddingModel + } + return toSerialize, nil +} + +type NullablePatchedKnowledgeBaseRequest struct { + value *PatchedKnowledgeBaseRequest + isSet bool +} + +func (v NullablePatchedKnowledgeBaseRequest) Get() *PatchedKnowledgeBaseRequest { + return v.value +} + +func (v *NullablePatchedKnowledgeBaseRequest) Set(val *PatchedKnowledgeBaseRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedKnowledgeBaseRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedKnowledgeBaseRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedKnowledgeBaseRequest(val *PatchedKnowledgeBaseRequest) *NullablePatchedKnowledgeBaseRequest { + return &NullablePatchedKnowledgeBaseRequest{value: val, isSet: true} +} + +func (v NullablePatchedKnowledgeBaseRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedKnowledgeBaseRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_network_list_request.go b/azion-api/model_patched_network_list_request.go new file mode 100644 index 0000000..3031826 --- /dev/null +++ b/azion-api/model_patched_network_list_request.go @@ -0,0 +1,236 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedNetworkListRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedNetworkListRequest{} + +// PatchedNetworkListRequest A Network List item can be one of the following formats: 1. IP Addresses (IPv4/IPv6): - Simple IPv4: 192.168.0.1 - IPv4 with CIDR: 192.168.0.1/24 - Simple IPv6: 2001:db8:3333:4444:5555:6666:7777:8888 - IPv6 with CIDR: 2001:db8::/32 - IP with expiration date: 192.168.0.1 --LT2025-05-29T12:25:23Z (The expiration date format is --LT followed by ISO8601 date in UTC timezone) 2. Country Codes: - Two-character uppercase alphanumeric country code (ISO 3166-1 alpha-2) - Examples: BR, US, DE, JP 3. Autonomous System Numbers (ASN): - Number composed of digits only - Examples: 1234, 5678, 13335 +type PatchedNetworkListRequest struct { + Name *string `json:"name,omitempty"` + // * `asn` - ASN * `countries` - Countries * `ip_cidr` - IP/CIDR + Type *string `json:"type,omitempty"` + Items []string `json:"items,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedNetworkListRequest instantiates a new PatchedNetworkListRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedNetworkListRequest() *PatchedNetworkListRequest { + this := PatchedNetworkListRequest{} + return &this +} + +// NewPatchedNetworkListRequestWithDefaults instantiates a new PatchedNetworkListRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedNetworkListRequestWithDefaults() *PatchedNetworkListRequest { + this := PatchedNetworkListRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedNetworkListRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedNetworkListRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedNetworkListRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedNetworkListRequest) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PatchedNetworkListRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedNetworkListRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PatchedNetworkListRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PatchedNetworkListRequest) SetType(v string) { + o.Type = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *PatchedNetworkListRequest) GetItems() []string { + if o == nil || IsNil(o.Items) { + var ret []string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedNetworkListRequest) GetItemsOk() ([]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *PatchedNetworkListRequest) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *PatchedNetworkListRequest) SetItems(v []string) { + o.Items = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedNetworkListRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedNetworkListRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedNetworkListRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedNetworkListRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedNetworkListRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedNetworkListRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedNetworkListRequest struct { + value *PatchedNetworkListRequest + isSet bool +} + +func (v NullablePatchedNetworkListRequest) Get() *PatchedNetworkListRequest { + return v.value +} + +func (v *NullablePatchedNetworkListRequest) Set(val *PatchedNetworkListRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedNetworkListRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedNetworkListRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedNetworkListRequest(val *PatchedNetworkListRequest) *NullablePatchedNetworkListRequest { + return &NullablePatchedNetworkListRequest{value: val, isSet: true} +} + +func (v NullablePatchedNetworkListRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedNetworkListRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_nodes_request.go b/azion-api/model_patched_nodes_request.go new file mode 100644 index 0000000..37fac95 --- /dev/null +++ b/azion-api/model_patched_nodes_request.go @@ -0,0 +1,201 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedNodesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedNodesRequest{} + +// PatchedNodesRequest struct for PatchedNodesRequest +type PatchedNodesRequest struct { + Name *string `json:"name,omitempty"` + // * `waiting_authorization` - waiting_authorization * `authorized` - authorized + Status *string `json:"status,omitempty"` + Modules interface{} `json:"modules,omitempty"` +} + +// NewPatchedNodesRequest instantiates a new PatchedNodesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedNodesRequest() *PatchedNodesRequest { + this := PatchedNodesRequest{} + return &this +} + +// NewPatchedNodesRequestWithDefaults instantiates a new PatchedNodesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedNodesRequestWithDefaults() *PatchedNodesRequest { + this := PatchedNodesRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedNodesRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedNodesRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedNodesRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedNodesRequest) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *PatchedNodesRequest) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedNodesRequest) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *PatchedNodesRequest) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *PatchedNodesRequest) SetStatus(v string) { + o.Status = &v +} + +// GetModules returns the Modules field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedNodesRequest) GetModules() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedNodesRequest) GetModulesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return &o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *PatchedNodesRequest) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given interface{} and assigns it to the Modules field. +func (o *PatchedNodesRequest) SetModules(v interface{}) { + o.Modules = v +} + +func (o PatchedNodesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedNodesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if o.Modules != nil { + toSerialize["modules"] = o.Modules + } + return toSerialize, nil +} + +type NullablePatchedNodesRequest struct { + value *PatchedNodesRequest + isSet bool +} + +func (v NullablePatchedNodesRequest) Get() *PatchedNodesRequest { + return v.value +} + +func (v *NullablePatchedNodesRequest) Set(val *PatchedNodesRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedNodesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedNodesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedNodesRequest(val *PatchedNodesRequest) *NullablePatchedNodesRequest { + return &NullablePatchedNodesRequest{value: val, isSet: true} +} + +func (v NullablePatchedNodesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedNodesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_organization_request.go b/azion-api/model_patched_organization_request.go new file mode 100644 index 0000000..41511a2 --- /dev/null +++ b/azion-api/model_patched_organization_request.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PatchedOrganizationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedOrganizationRequest{} + +// PatchedOrganizationRequest struct for PatchedOrganizationRequest +type PatchedOrganizationRequest struct { + Name *string `json:"name,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _PatchedOrganizationRequest PatchedOrganizationRequest + +// NewPatchedOrganizationRequest instantiates a new PatchedOrganizationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedOrganizationRequest(type_ string) *PatchedOrganizationRequest { + this := PatchedOrganizationRequest{} + this.Type = type_ + return &this +} + +// NewPatchedOrganizationRequestWithDefaults instantiates a new PatchedOrganizationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedOrganizationRequestWithDefaults() *PatchedOrganizationRequest { + this := PatchedOrganizationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedOrganizationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedOrganizationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedOrganizationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedOrganizationRequest) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value +func (o *PatchedOrganizationRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PatchedOrganizationRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PatchedOrganizationRequest) SetType(v string) { + o.Type = v +} + +func (o PatchedOrganizationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedOrganizationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *PatchedOrganizationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchedOrganizationRequest := _PatchedOrganizationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchedOrganizationRequest) + + if err != nil { + return err + } + + *o = PatchedOrganizationRequest(varPatchedOrganizationRequest) + + return err +} + +type NullablePatchedOrganizationRequest struct { + value *PatchedOrganizationRequest + isSet bool +} + +func (v NullablePatchedOrganizationRequest) Get() *PatchedOrganizationRequest { + return v.value +} + +func (v *NullablePatchedOrganizationRequest) Set(val *PatchedOrganizationRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedOrganizationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedOrganizationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedOrganizationRequest(val *PatchedOrganizationRequest) *NullablePatchedOrganizationRequest { + return &NullablePatchedOrganizationRequest{value: val, isSet: true} +} + +func (v NullablePatchedOrganizationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedOrganizationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_partial_update_request.go b/azion-api/model_patched_partial_update_request.go new file mode 100644 index 0000000..dd201e1 --- /dev/null +++ b/azion-api/model_patched_partial_update_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedPartialUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPartialUpdateRequest{} + +// PatchedPartialUpdateRequest struct for PatchedPartialUpdateRequest +type PatchedPartialUpdateRequest struct { + IsDefault *bool `json:"is_default,omitempty"` +} + +// NewPatchedPartialUpdateRequest instantiates a new PatchedPartialUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedPartialUpdateRequest() *PatchedPartialUpdateRequest { + this := PatchedPartialUpdateRequest{} + return &this +} + +// NewPatchedPartialUpdateRequestWithDefaults instantiates a new PatchedPartialUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedPartialUpdateRequestWithDefaults() *PatchedPartialUpdateRequest { + this := PatchedPartialUpdateRequest{} + return &this +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *PatchedPartialUpdateRequest) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPartialUpdateRequest) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *PatchedPartialUpdateRequest) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *PatchedPartialUpdateRequest) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o PatchedPartialUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPartialUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +type NullablePatchedPartialUpdateRequest struct { + value *PatchedPartialUpdateRequest + isSet bool +} + +func (v NullablePatchedPartialUpdateRequest) Get() *PatchedPartialUpdateRequest { + return v.value +} + +func (v *NullablePatchedPartialUpdateRequest) Set(val *PatchedPartialUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedPartialUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedPartialUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedPartialUpdateRequest(val *PatchedPartialUpdateRequest) *NullablePatchedPartialUpdateRequest { + return &NullablePatchedPartialUpdateRequest{value: val, isSet: true} +} + +func (v NullablePatchedPartialUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedPartialUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_policy_request.go b/azion-api/model_patched_policy_request.go new file mode 100644 index 0000000..1c46dc1 --- /dev/null +++ b/azion-api/model_patched_policy_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedPolicyRequest{} + +// PatchedPolicyRequest struct for PatchedPolicyRequest +type PatchedPolicyRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Rules []PolicyRuleRequest `json:"rules,omitempty"` +} + +// NewPatchedPolicyRequest instantiates a new PatchedPolicyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedPolicyRequest() *PatchedPolicyRequest { + this := PatchedPolicyRequest{} + return &this +} + +// NewPatchedPolicyRequestWithDefaults instantiates a new PatchedPolicyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedPolicyRequestWithDefaults() *PatchedPolicyRequest { + this := PatchedPolicyRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedPolicyRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPolicyRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedPolicyRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedPolicyRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedPolicyRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPolicyRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedPolicyRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedPolicyRequest) SetActive(v bool) { + o.Active = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *PatchedPolicyRequest) GetRules() []PolicyRuleRequest { + if o == nil || IsNil(o.Rules) { + var ret []PolicyRuleRequest + return ret + } + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedPolicyRequest) GetRulesOk() ([]PolicyRuleRequest, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *PatchedPolicyRequest) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []PolicyRuleRequest and assigns it to the Rules field. +func (o *PatchedPolicyRequest) SetRules(v []PolicyRuleRequest) { + o.Rules = v +} + +func (o PatchedPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + return toSerialize, nil +} + +type NullablePatchedPolicyRequest struct { + value *PatchedPolicyRequest + isSet bool +} + +func (v NullablePatchedPolicyRequest) Get() *PatchedPolicyRequest { + return v.value +} + +func (v *NullablePatchedPolicyRequest) Set(val *PatchedPolicyRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedPolicyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedPolicyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedPolicyRequest(val *PatchedPolicyRequest) *NullablePatchedPolicyRequest { + return &NullablePatchedPolicyRequest{value: val, isSet: true} +} + +func (v NullablePatchedPolicyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedPolicyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_record_request.go b/azion-api/model_patched_record_request.go new file mode 100644 index 0000000..60e0a42 --- /dev/null +++ b/azion-api/model_patched_record_request.go @@ -0,0 +1,345 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedRecordRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedRecordRequest{} + +// PatchedRecordRequest struct for PatchedRecordRequest +type PatchedRecordRequest struct { + Description *string `json:"description,omitempty"` + Name *string `json:"name,omitempty"` + Ttl *int64 `json:"ttl,omitempty"` + // * `A` - A * `AAAA` - AAAA * `ANAME` - ANAME * `CNAME` - CNAME * `MX` - MX * `NS` - NS * `PTR` - PTR * `SRV` - SRV * `TXT` - TXT * `CAA` - CAA * `DS` - DS + Type *string `json:"type,omitempty"` + Rdata []string `json:"rdata,omitempty"` + // * `simple` - simple * `weighted` - weighted + Policy *string `json:"policy,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} + +// NewPatchedRecordRequest instantiates a new PatchedRecordRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedRecordRequest() *PatchedRecordRequest { + this := PatchedRecordRequest{} + return &this +} + +// NewPatchedRecordRequestWithDefaults instantiates a new PatchedRecordRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedRecordRequestWithDefaults() *PatchedRecordRequest { + this := PatchedRecordRequest{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedRecordRequest) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedRecordRequest) SetName(v string) { + o.Name = &v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetTtl() int64 { + if o == nil || IsNil(o.Ttl) { + var ret int64 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *PatchedRecordRequest) SetTtl(v int64) { + o.Ttl = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PatchedRecordRequest) SetType(v string) { + o.Type = &v +} + +// GetRdata returns the Rdata field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetRdata() []string { + if o == nil || IsNil(o.Rdata) { + var ret []string + return ret + } + return o.Rdata +} + +// GetRdataOk returns a tuple with the Rdata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetRdataOk() ([]string, bool) { + if o == nil || IsNil(o.Rdata) { + return nil, false + } + return o.Rdata, true +} + +// HasRdata returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasRdata() bool { + if o != nil && !IsNil(o.Rdata) { + return true + } + + return false +} + +// SetRdata gets a reference to the given []string and assigns it to the Rdata field. +func (o *PatchedRecordRequest) SetRdata(v []string) { + o.Rdata = v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetPolicy() string { + if o == nil || IsNil(o.Policy) { + var ret string + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetPolicyOk() (*string, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *PatchedRecordRequest) SetPolicy(v string) { + o.Policy = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *PatchedRecordRequest) GetWeight() int64 { + if o == nil || IsNil(o.Weight) { + var ret int64 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRecordRequest) GetWeightOk() (*int64, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *PatchedRecordRequest) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int64 and assigns it to the Weight field. +func (o *PatchedRecordRequest) SetWeight(v int64) { + o.Weight = &v +} + +func (o PatchedRecordRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedRecordRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Rdata) { + toSerialize["rdata"] = o.Rdata + } + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +type NullablePatchedRecordRequest struct { + value *PatchedRecordRequest + isSet bool +} + +func (v NullablePatchedRecordRequest) Get() *PatchedRecordRequest { + return v.value +} + +func (v *NullablePatchedRecordRequest) Set(val *PatchedRecordRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedRecordRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedRecordRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedRecordRequest(val *PatchedRecordRequest) *NullablePatchedRecordRequest { + return &NullablePatchedRecordRequest{value: val, isSet: true} +} + +func (v NullablePatchedRecordRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedRecordRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_request_phase_rule.go b/azion-api/model_patched_request_phase_rule.go new file mode 100644 index 0000000..d5aad54 --- /dev/null +++ b/azion-api/model_patched_request_phase_rule.go @@ -0,0 +1,271 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedRequestPhaseRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedRequestPhaseRule{} + +// PatchedRequestPhaseRule struct for PatchedRequestPhaseRule +type PatchedRequestPhaseRule struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Criteria [][]ApplicationCriterionFieldRequest `json:"criteria,omitempty"` + Behaviors []RequestPhaseBehavior2 `json:"behaviors,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewPatchedRequestPhaseRule instantiates a new PatchedRequestPhaseRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedRequestPhaseRule() *PatchedRequestPhaseRule { + this := PatchedRequestPhaseRule{} + return &this +} + +// NewPatchedRequestPhaseRuleWithDefaults instantiates a new PatchedRequestPhaseRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedRequestPhaseRuleWithDefaults() *PatchedRequestPhaseRule { + this := PatchedRequestPhaseRule{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedRequestPhaseRule) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRequestPhaseRule) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedRequestPhaseRule) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedRequestPhaseRule) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedRequestPhaseRule) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRequestPhaseRule) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedRequestPhaseRule) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedRequestPhaseRule) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value if set, zero value otherwise. +func (o *PatchedRequestPhaseRule) GetCriteria() [][]ApplicationCriterionFieldRequest { + if o == nil || IsNil(o.Criteria) { + var ret [][]ApplicationCriterionFieldRequest + return ret + } + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRequestPhaseRule) GetCriteriaOk() ([][]ApplicationCriterionFieldRequest, bool) { + if o == nil || IsNil(o.Criteria) { + return nil, false + } + return o.Criteria, true +} + +// HasCriteria returns a boolean if a field has been set. +func (o *PatchedRequestPhaseRule) HasCriteria() bool { + if o != nil && !IsNil(o.Criteria) { + return true + } + + return false +} + +// SetCriteria gets a reference to the given [][]ApplicationCriterionFieldRequest and assigns it to the Criteria field. +func (o *PatchedRequestPhaseRule) SetCriteria(v [][]ApplicationCriterionFieldRequest) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value if set, zero value otherwise. +func (o *PatchedRequestPhaseRule) GetBehaviors() []RequestPhaseBehavior2 { + if o == nil || IsNil(o.Behaviors) { + var ret []RequestPhaseBehavior2 + return ret + } + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRequestPhaseRule) GetBehaviorsOk() ([]RequestPhaseBehavior2, bool) { + if o == nil || IsNil(o.Behaviors) { + return nil, false + } + return o.Behaviors, true +} + +// HasBehaviors returns a boolean if a field has been set. +func (o *PatchedRequestPhaseRule) HasBehaviors() bool { + if o != nil && !IsNil(o.Behaviors) { + return true + } + + return false +} + +// SetBehaviors gets a reference to the given []RequestPhaseBehavior2 and assigns it to the Behaviors field. +func (o *PatchedRequestPhaseRule) SetBehaviors(v []RequestPhaseBehavior2) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedRequestPhaseRule) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedRequestPhaseRule) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedRequestPhaseRule) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedRequestPhaseRule) SetDescription(v string) { + o.Description = &v +} + +func (o PatchedRequestPhaseRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedRequestPhaseRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Criteria) { + toSerialize["criteria"] = o.Criteria + } + if !IsNil(o.Behaviors) { + toSerialize["behaviors"] = o.Behaviors + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullablePatchedRequestPhaseRule struct { + value *PatchedRequestPhaseRule + isSet bool +} + +func (v NullablePatchedRequestPhaseRule) Get() *PatchedRequestPhaseRule { + return v.value +} + +func (v *NullablePatchedRequestPhaseRule) Set(val *PatchedRequestPhaseRule) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedRequestPhaseRule) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedRequestPhaseRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedRequestPhaseRule(val *PatchedRequestPhaseRule) *NullablePatchedRequestPhaseRule { + return &NullablePatchedRequestPhaseRule{value: val, isSet: true} +} + +func (v NullablePatchedRequestPhaseRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedRequestPhaseRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_reseller_request.go b/azion-api/model_patched_reseller_request.go new file mode 100644 index 0000000..21938bb --- /dev/null +++ b/azion-api/model_patched_reseller_request.go @@ -0,0 +1,269 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PatchedResellerRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedResellerRequest{} + +// PatchedResellerRequest struct for PatchedResellerRequest +type PatchedResellerRequest struct { + Name *string `json:"name,omitempty"` + // * `USD` - USD * `BRL` - BRL + CurrencyIsoCode *string `json:"currency_iso_code,omitempty"` + TermsOfServiceUrl *string `json:"terms_of_service_url,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _PatchedResellerRequest PatchedResellerRequest + +// NewPatchedResellerRequest instantiates a new PatchedResellerRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedResellerRequest(type_ string) *PatchedResellerRequest { + this := PatchedResellerRequest{} + this.Type = type_ + return &this +} + +// NewPatchedResellerRequestWithDefaults instantiates a new PatchedResellerRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedResellerRequestWithDefaults() *PatchedResellerRequest { + this := PatchedResellerRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedResellerRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResellerRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedResellerRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedResellerRequest) SetName(v string) { + o.Name = &v +} + +// GetCurrencyIsoCode returns the CurrencyIsoCode field value if set, zero value otherwise. +func (o *PatchedResellerRequest) GetCurrencyIsoCode() string { + if o == nil || IsNil(o.CurrencyIsoCode) { + var ret string + return ret + } + return *o.CurrencyIsoCode +} + +// GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResellerRequest) GetCurrencyIsoCodeOk() (*string, bool) { + if o == nil || IsNil(o.CurrencyIsoCode) { + return nil, false + } + return o.CurrencyIsoCode, true +} + +// HasCurrencyIsoCode returns a boolean if a field has been set. +func (o *PatchedResellerRequest) HasCurrencyIsoCode() bool { + if o != nil && !IsNil(o.CurrencyIsoCode) { + return true + } + + return false +} + +// SetCurrencyIsoCode gets a reference to the given string and assigns it to the CurrencyIsoCode field. +func (o *PatchedResellerRequest) SetCurrencyIsoCode(v string) { + o.CurrencyIsoCode = &v +} + +// GetTermsOfServiceUrl returns the TermsOfServiceUrl field value if set, zero value otherwise. +func (o *PatchedResellerRequest) GetTermsOfServiceUrl() string { + if o == nil || IsNil(o.TermsOfServiceUrl) { + var ret string + return ret + } + return *o.TermsOfServiceUrl +} + +// GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResellerRequest) GetTermsOfServiceUrlOk() (*string, bool) { + if o == nil || IsNil(o.TermsOfServiceUrl) { + return nil, false + } + return o.TermsOfServiceUrl, true +} + +// HasTermsOfServiceUrl returns a boolean if a field has been set. +func (o *PatchedResellerRequest) HasTermsOfServiceUrl() bool { + if o != nil && !IsNil(o.TermsOfServiceUrl) { + return true + } + + return false +} + +// SetTermsOfServiceUrl gets a reference to the given string and assigns it to the TermsOfServiceUrl field. +func (o *PatchedResellerRequest) SetTermsOfServiceUrl(v string) { + o.TermsOfServiceUrl = &v +} + +// GetType returns the Type field value +func (o *PatchedResellerRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PatchedResellerRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PatchedResellerRequest) SetType(v string) { + o.Type = v +} + +func (o PatchedResellerRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedResellerRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.CurrencyIsoCode) { + toSerialize["currency_iso_code"] = o.CurrencyIsoCode + } + if !IsNil(o.TermsOfServiceUrl) { + toSerialize["terms_of_service_url"] = o.TermsOfServiceUrl + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *PatchedResellerRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchedResellerRequest := _PatchedResellerRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchedResellerRequest) + + if err != nil { + return err + } + + *o = PatchedResellerRequest(varPatchedResellerRequest) + + return err +} + +type NullablePatchedResellerRequest struct { + value *PatchedResellerRequest + isSet bool +} + +func (v NullablePatchedResellerRequest) Get() *PatchedResellerRequest { + return v.value +} + +func (v *NullablePatchedResellerRequest) Set(val *PatchedResellerRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedResellerRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedResellerRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedResellerRequest(val *PatchedResellerRequest) *NullablePatchedResellerRequest { + return &NullablePatchedResellerRequest{value: val, isSet: true} +} + +func (v NullablePatchedResellerRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedResellerRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_response_phase_rule_request.go b/azion-api/model_patched_response_phase_rule_request.go new file mode 100644 index 0000000..6693c77 --- /dev/null +++ b/azion-api/model_patched_response_phase_rule_request.go @@ -0,0 +1,271 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedResponsePhaseRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedResponsePhaseRuleRequest{} + +// PatchedResponsePhaseRuleRequest struct for PatchedResponsePhaseRuleRequest +type PatchedResponsePhaseRuleRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Criteria [][]ApplicationCriterionFieldRequest `json:"criteria,omitempty"` + Behaviors []ResponsePhaseBehaviorRequest `json:"behaviors,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewPatchedResponsePhaseRuleRequest instantiates a new PatchedResponsePhaseRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedResponsePhaseRuleRequest() *PatchedResponsePhaseRuleRequest { + this := PatchedResponsePhaseRuleRequest{} + return &this +} + +// NewPatchedResponsePhaseRuleRequestWithDefaults instantiates a new PatchedResponsePhaseRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedResponsePhaseRuleRequestWithDefaults() *PatchedResponsePhaseRuleRequest { + this := PatchedResponsePhaseRuleRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedResponsePhaseRuleRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResponsePhaseRuleRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedResponsePhaseRuleRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedResponsePhaseRuleRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedResponsePhaseRuleRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResponsePhaseRuleRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedResponsePhaseRuleRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedResponsePhaseRuleRequest) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value if set, zero value otherwise. +func (o *PatchedResponsePhaseRuleRequest) GetCriteria() [][]ApplicationCriterionFieldRequest { + if o == nil || IsNil(o.Criteria) { + var ret [][]ApplicationCriterionFieldRequest + return ret + } + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResponsePhaseRuleRequest) GetCriteriaOk() ([][]ApplicationCriterionFieldRequest, bool) { + if o == nil || IsNil(o.Criteria) { + return nil, false + } + return o.Criteria, true +} + +// HasCriteria returns a boolean if a field has been set. +func (o *PatchedResponsePhaseRuleRequest) HasCriteria() bool { + if o != nil && !IsNil(o.Criteria) { + return true + } + + return false +} + +// SetCriteria gets a reference to the given [][]ApplicationCriterionFieldRequest and assigns it to the Criteria field. +func (o *PatchedResponsePhaseRuleRequest) SetCriteria(v [][]ApplicationCriterionFieldRequest) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value if set, zero value otherwise. +func (o *PatchedResponsePhaseRuleRequest) GetBehaviors() []ResponsePhaseBehaviorRequest { + if o == nil || IsNil(o.Behaviors) { + var ret []ResponsePhaseBehaviorRequest + return ret + } + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResponsePhaseRuleRequest) GetBehaviorsOk() ([]ResponsePhaseBehaviorRequest, bool) { + if o == nil || IsNil(o.Behaviors) { + return nil, false + } + return o.Behaviors, true +} + +// HasBehaviors returns a boolean if a field has been set. +func (o *PatchedResponsePhaseRuleRequest) HasBehaviors() bool { + if o != nil && !IsNil(o.Behaviors) { + return true + } + + return false +} + +// SetBehaviors gets a reference to the given []ResponsePhaseBehaviorRequest and assigns it to the Behaviors field. +func (o *PatchedResponsePhaseRuleRequest) SetBehaviors(v []ResponsePhaseBehaviorRequest) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedResponsePhaseRuleRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedResponsePhaseRuleRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedResponsePhaseRuleRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedResponsePhaseRuleRequest) SetDescription(v string) { + o.Description = &v +} + +func (o PatchedResponsePhaseRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedResponsePhaseRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Criteria) { + toSerialize["criteria"] = o.Criteria + } + if !IsNil(o.Behaviors) { + toSerialize["behaviors"] = o.Behaviors + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullablePatchedResponsePhaseRuleRequest struct { + value *PatchedResponsePhaseRuleRequest + isSet bool +} + +func (v NullablePatchedResponsePhaseRuleRequest) Get() *PatchedResponsePhaseRuleRequest { + return v.value +} + +func (v *NullablePatchedResponsePhaseRuleRequest) Set(val *PatchedResponsePhaseRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedResponsePhaseRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedResponsePhaseRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedResponsePhaseRuleRequest(val *PatchedResponsePhaseRuleRequest) *NullablePatchedResponsePhaseRuleRequest { + return &NullablePatchedResponsePhaseRuleRequest{value: val, isSet: true} +} + +func (v NullablePatchedResponsePhaseRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedResponsePhaseRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_service_token_update_request.go b/azion-api/model_patched_service_token_update_request.go new file mode 100644 index 0000000..d6a9226 --- /dev/null +++ b/azion-api/model_patched_service_token_update_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedServiceTokenUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedServiceTokenUpdateRequest{} + +// PatchedServiceTokenUpdateRequest struct for PatchedServiceTokenUpdateRequest +type PatchedServiceTokenUpdateRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + Description *string `json:"description,omitempty"` +} + +// NewPatchedServiceTokenUpdateRequest instantiates a new PatchedServiceTokenUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedServiceTokenUpdateRequest() *PatchedServiceTokenUpdateRequest { + this := PatchedServiceTokenUpdateRequest{} + return &this +} + +// NewPatchedServiceTokenUpdateRequestWithDefaults instantiates a new PatchedServiceTokenUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedServiceTokenUpdateRequestWithDefaults() *PatchedServiceTokenUpdateRequest { + this := PatchedServiceTokenUpdateRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedServiceTokenUpdateRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServiceTokenUpdateRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedServiceTokenUpdateRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedServiceTokenUpdateRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedServiceTokenUpdateRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServiceTokenUpdateRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedServiceTokenUpdateRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedServiceTokenUpdateRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedServiceTokenUpdateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServiceTokenUpdateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedServiceTokenUpdateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedServiceTokenUpdateRequest) SetDescription(v string) { + o.Description = &v +} + +func (o PatchedServiceTokenUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedServiceTokenUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +type NullablePatchedServiceTokenUpdateRequest struct { + value *PatchedServiceTokenUpdateRequest + isSet bool +} + +func (v NullablePatchedServiceTokenUpdateRequest) Get() *PatchedServiceTokenUpdateRequest { + return v.value +} + +func (v *NullablePatchedServiceTokenUpdateRequest) Set(val *PatchedServiceTokenUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedServiceTokenUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedServiceTokenUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedServiceTokenUpdateRequest(val *PatchedServiceTokenUpdateRequest) *NullablePatchedServiceTokenUpdateRequest { + return &NullablePatchedServiceTokenUpdateRequest{value: val, isSet: true} +} + +func (v NullablePatchedServiceTokenUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedServiceTokenUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_services_request.go b/azion-api/model_patched_services_request.go new file mode 100644 index 0000000..3b6bb30 --- /dev/null +++ b/azion-api/model_patched_services_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedServicesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedServicesRequest{} + +// PatchedServicesRequest struct for PatchedServicesRequest +type PatchedServicesRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + MinVersion *string `json:"min_version,omitempty"` + Permissions *int64 `json:"permissions,omitempty"` +} + +// NewPatchedServicesRequest instantiates a new PatchedServicesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedServicesRequest() *PatchedServicesRequest { + this := PatchedServicesRequest{} + return &this +} + +// NewPatchedServicesRequestWithDefaults instantiates a new PatchedServicesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedServicesRequestWithDefaults() *PatchedServicesRequest { + this := PatchedServicesRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedServicesRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServicesRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedServicesRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedServicesRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedServicesRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServicesRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedServicesRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedServicesRequest) SetActive(v bool) { + o.Active = &v +} + +// GetMinVersion returns the MinVersion field value if set, zero value otherwise. +func (o *PatchedServicesRequest) GetMinVersion() string { + if o == nil || IsNil(o.MinVersion) { + var ret string + return ret + } + return *o.MinVersion +} + +// GetMinVersionOk returns a tuple with the MinVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServicesRequest) GetMinVersionOk() (*string, bool) { + if o == nil || IsNil(o.MinVersion) { + return nil, false + } + return o.MinVersion, true +} + +// HasMinVersion returns a boolean if a field has been set. +func (o *PatchedServicesRequest) HasMinVersion() bool { + if o != nil && !IsNil(o.MinVersion) { + return true + } + + return false +} + +// SetMinVersion gets a reference to the given string and assigns it to the MinVersion field. +func (o *PatchedServicesRequest) SetMinVersion(v string) { + o.MinVersion = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *PatchedServicesRequest) GetPermissions() int64 { + if o == nil || IsNil(o.Permissions) { + var ret int64 + return ret + } + return *o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedServicesRequest) GetPermissionsOk() (*int64, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *PatchedServicesRequest) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given int64 and assigns it to the Permissions field. +func (o *PatchedServicesRequest) SetPermissions(v int64) { + o.Permissions = &v +} + +func (o PatchedServicesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedServicesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.MinVersion) { + toSerialize["min_version"] = o.MinVersion + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + return toSerialize, nil +} + +type NullablePatchedServicesRequest struct { + value *PatchedServicesRequest + isSet bool +} + +func (v NullablePatchedServicesRequest) Get() *PatchedServicesRequest { + return v.value +} + +func (v *NullablePatchedServicesRequest) Set(val *PatchedServicesRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedServicesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedServicesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedServicesRequest(val *PatchedServicesRequest) *NullablePatchedServicesRequest { + return &NullablePatchedServicesRequest{value: val, isSet: true} +} + +func (v NullablePatchedServicesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedServicesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_template_request.go b/azion-api/model_patched_template_request.go new file mode 100644 index 0000000..087fd24 --- /dev/null +++ b/azion-api/model_patched_template_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedTemplateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedTemplateRequest{} + +// PatchedTemplateRequest struct for PatchedTemplateRequest +type PatchedTemplateRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + DataSet *string `json:"data_set,omitempty"` +} + +// NewPatchedTemplateRequest instantiates a new PatchedTemplateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedTemplateRequest() *PatchedTemplateRequest { + this := PatchedTemplateRequest{} + return &this +} + +// NewPatchedTemplateRequestWithDefaults instantiates a new PatchedTemplateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedTemplateRequestWithDefaults() *PatchedTemplateRequest { + this := PatchedTemplateRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedTemplateRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedTemplateRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedTemplateRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedTemplateRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedTemplateRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedTemplateRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDataSet returns the DataSet field value if set, zero value otherwise. +func (o *PatchedTemplateRequest) GetDataSet() string { + if o == nil || IsNil(o.DataSet) { + var ret string + return ret + } + return *o.DataSet +} + +// GetDataSetOk returns a tuple with the DataSet field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedTemplateRequest) GetDataSetOk() (*string, bool) { + if o == nil || IsNil(o.DataSet) { + return nil, false + } + return o.DataSet, true +} + +// HasDataSet returns a boolean if a field has been set. +func (o *PatchedTemplateRequest) HasDataSet() bool { + if o != nil && !IsNil(o.DataSet) { + return true + } + + return false +} + +// SetDataSet gets a reference to the given string and assigns it to the DataSet field. +func (o *PatchedTemplateRequest) SetDataSet(v string) { + o.DataSet = &v +} + +func (o PatchedTemplateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedTemplateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.DataSet) { + toSerialize["data_set"] = o.DataSet + } + return toSerialize, nil +} + +type NullablePatchedTemplateRequest struct { + value *PatchedTemplateRequest + isSet bool +} + +func (v NullablePatchedTemplateRequest) Get() *PatchedTemplateRequest { + return v.value +} + +func (v *NullablePatchedTemplateRequest) Set(val *PatchedTemplateRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedTemplateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedTemplateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedTemplateRequest(val *PatchedTemplateRequest) *NullablePatchedTemplateRequest { + return &NullablePatchedTemplateRequest{value: val, isSet: true} +} + +func (v NullablePatchedTemplateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedTemplateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_tool_request.go b/azion-api/model_patched_tool_request.go new file mode 100644 index 0000000..2fa7b21 --- /dev/null +++ b/azion-api/model_patched_tool_request.go @@ -0,0 +1,271 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedToolRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedToolRequest{} + +// PatchedToolRequest struct for PatchedToolRequest +type PatchedToolRequest struct { + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + Type *string `json:"type,omitempty"` + JsonSchema map[string]interface{} `json:"json_schema,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedToolRequest instantiates a new PatchedToolRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedToolRequest() *PatchedToolRequest { + this := PatchedToolRequest{} + return &this +} + +// NewPatchedToolRequestWithDefaults instantiates a new PatchedToolRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedToolRequestWithDefaults() *PatchedToolRequest { + this := PatchedToolRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedToolRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedToolRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedToolRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedToolRequest) SetName(v string) { + o.Name = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *PatchedToolRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedToolRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *PatchedToolRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *PatchedToolRequest) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *PatchedToolRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedToolRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *PatchedToolRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *PatchedToolRequest) SetType(v string) { + o.Type = &v +} + +// GetJsonSchema returns the JsonSchema field value if set, zero value otherwise. +func (o *PatchedToolRequest) GetJsonSchema() map[string]interface{} { + if o == nil || IsNil(o.JsonSchema) { + var ret map[string]interface{} + return ret + } + return o.JsonSchema +} + +// GetJsonSchemaOk returns a tuple with the JsonSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedToolRequest) GetJsonSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.JsonSchema) { + return map[string]interface{}{}, false + } + return o.JsonSchema, true +} + +// HasJsonSchema returns a boolean if a field has been set. +func (o *PatchedToolRequest) HasJsonSchema() bool { + if o != nil && !IsNil(o.JsonSchema) { + return true + } + + return false +} + +// SetJsonSchema gets a reference to the given map[string]interface{} and assigns it to the JsonSchema field. +func (o *PatchedToolRequest) SetJsonSchema(v map[string]interface{}) { + o.JsonSchema = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedToolRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedToolRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedToolRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedToolRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedToolRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedToolRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.JsonSchema) { + toSerialize["json_schema"] = o.JsonSchema + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedToolRequest struct { + value *PatchedToolRequest + isSet bool +} + +func (v NullablePatchedToolRequest) Get() *PatchedToolRequest { + return v.value +} + +func (v *NullablePatchedToolRequest) Set(val *PatchedToolRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedToolRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedToolRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedToolRequest(val *PatchedToolRequest) *NullablePatchedToolRequest { + return &NullablePatchedToolRequest{value: val, isSet: true} +} + +func (v NullablePatchedToolRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedToolRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_update_zone_request.go b/azion-api/model_patched_update_zone_request.go new file mode 100644 index 0000000..030990f --- /dev/null +++ b/azion-api/model_patched_update_zone_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedUpdateZoneRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUpdateZoneRequest{} + +// PatchedUpdateZoneRequest struct for PatchedUpdateZoneRequest +type PatchedUpdateZoneRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedUpdateZoneRequest instantiates a new PatchedUpdateZoneRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedUpdateZoneRequest() *PatchedUpdateZoneRequest { + this := PatchedUpdateZoneRequest{} + return &this +} + +// NewPatchedUpdateZoneRequestWithDefaults instantiates a new PatchedUpdateZoneRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedUpdateZoneRequestWithDefaults() *PatchedUpdateZoneRequest { + this := PatchedUpdateZoneRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedUpdateZoneRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUpdateZoneRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedUpdateZoneRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedUpdateZoneRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedUpdateZoneRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUpdateZoneRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedUpdateZoneRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedUpdateZoneRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedUpdateZoneRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUpdateZoneRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedUpdateZoneRequest struct { + value *PatchedUpdateZoneRequest + isSet bool +} + +func (v NullablePatchedUpdateZoneRequest) Get() *PatchedUpdateZoneRequest { + return v.value +} + +func (v *NullablePatchedUpdateZoneRequest) Set(val *PatchedUpdateZoneRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedUpdateZoneRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedUpdateZoneRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedUpdateZoneRequest(val *PatchedUpdateZoneRequest) *NullablePatchedUpdateZoneRequest { + return &NullablePatchedUpdateZoneRequest{value: val, isSet: true} +} + +func (v NullablePatchedUpdateZoneRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedUpdateZoneRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_user_request.go b/azion-api/model_patched_user_request.go new file mode 100644 index 0000000..c9d16ea --- /dev/null +++ b/azion-api/model_patched_user_request.go @@ -0,0 +1,308 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedUserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedUserRequest{} + +// PatchedUserRequest struct for PatchedUserRequest +type PatchedUserRequest struct { + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Active *bool `json:"active,omitempty"` + TwoFactorEnabled *bool `json:"two_factor_enabled,omitempty"` + // User-specific preferences in JSON format. + Preferences map[string]interface{} `json:"preferences,omitempty"` + Phone *string `json:"phone,omitempty"` +} + +// NewPatchedUserRequest instantiates a new PatchedUserRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedUserRequest() *PatchedUserRequest { + this := PatchedUserRequest{} + return &this +} + +// NewPatchedUserRequestWithDefaults instantiates a new PatchedUserRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedUserRequestWithDefaults() *PatchedUserRequest { + this := PatchedUserRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedUserRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUserRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedUserRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedUserRequest) SetName(v string) { + o.Name = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *PatchedUserRequest) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUserRequest) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *PatchedUserRequest) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *PatchedUserRequest) SetEmail(v string) { + o.Email = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedUserRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUserRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedUserRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedUserRequest) SetActive(v bool) { + o.Active = &v +} + +// GetTwoFactorEnabled returns the TwoFactorEnabled field value if set, zero value otherwise. +func (o *PatchedUserRequest) GetTwoFactorEnabled() bool { + if o == nil || IsNil(o.TwoFactorEnabled) { + var ret bool + return ret + } + return *o.TwoFactorEnabled +} + +// GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUserRequest) GetTwoFactorEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.TwoFactorEnabled) { + return nil, false + } + return o.TwoFactorEnabled, true +} + +// HasTwoFactorEnabled returns a boolean if a field has been set. +func (o *PatchedUserRequest) HasTwoFactorEnabled() bool { + if o != nil && !IsNil(o.TwoFactorEnabled) { + return true + } + + return false +} + +// SetTwoFactorEnabled gets a reference to the given bool and assigns it to the TwoFactorEnabled field. +func (o *PatchedUserRequest) SetTwoFactorEnabled(v bool) { + o.TwoFactorEnabled = &v +} + +// GetPreferences returns the Preferences field value if set, zero value otherwise. +func (o *PatchedUserRequest) GetPreferences() map[string]interface{} { + if o == nil || IsNil(o.Preferences) { + var ret map[string]interface{} + return ret + } + return o.Preferences +} + +// GetPreferencesOk returns a tuple with the Preferences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUserRequest) GetPreferencesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Preferences) { + return map[string]interface{}{}, false + } + return o.Preferences, true +} + +// HasPreferences returns a boolean if a field has been set. +func (o *PatchedUserRequest) HasPreferences() bool { + if o != nil && !IsNil(o.Preferences) { + return true + } + + return false +} + +// SetPreferences gets a reference to the given map[string]interface{} and assigns it to the Preferences field. +func (o *PatchedUserRequest) SetPreferences(v map[string]interface{}) { + o.Preferences = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *PatchedUserRequest) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedUserRequest) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *PatchedUserRequest) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *PatchedUserRequest) SetPhone(v string) { + o.Phone = &v +} + +func (o PatchedUserRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedUserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.TwoFactorEnabled) { + toSerialize["two_factor_enabled"] = o.TwoFactorEnabled + } + if !IsNil(o.Preferences) { + toSerialize["preferences"] = o.Preferences + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + return toSerialize, nil +} + +type NullablePatchedUserRequest struct { + value *PatchedUserRequest + isSet bool +} + +func (v NullablePatchedUserRequest) Get() *PatchedUserRequest { + return v.value +} + +func (v *NullablePatchedUserRequest) Set(val *PatchedUserRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedUserRequest(val *PatchedUserRequest) *NullablePatchedUserRequest { + return &NullablePatchedUserRequest{value: val, isSet: true} +} + +func (v NullablePatchedUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_waf_request.go b/azion-api/model_patched_waf_request.go new file mode 100644 index 0000000..ea80e5f --- /dev/null +++ b/azion-api/model_patched_waf_request.go @@ -0,0 +1,245 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedWAFRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedWAFRequest{} + +// PatchedWAFRequest struct for PatchedWAFRequest +type PatchedWAFRequest struct { + Active *bool `json:"active,omitempty"` + Name *string `json:"name,omitempty"` + ProductVersion NullableString `json:"product_version,omitempty"` + EngineSettings *WAFEngineSettingsFieldRequest `json:"engine_settings,omitempty"` +} + +// NewPatchedWAFRequest instantiates a new PatchedWAFRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedWAFRequest() *PatchedWAFRequest { + this := PatchedWAFRequest{} + return &this +} + +// NewPatchedWAFRequestWithDefaults instantiates a new PatchedWAFRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedWAFRequestWithDefaults() *PatchedWAFRequest { + this := PatchedWAFRequest{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedWAFRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedWAFRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedWAFRequest) SetActive(v bool) { + o.Active = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedWAFRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedWAFRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedWAFRequest) SetName(v string) { + o.Name = &v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedWAFRequest) GetProductVersion() string { + if o == nil || IsNil(o.ProductVersion.Get()) { + var ret string + return ret + } + return *o.ProductVersion.Get() +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedWAFRequest) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProductVersion.Get(), o.ProductVersion.IsSet() +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *PatchedWAFRequest) HasProductVersion() bool { + if o != nil && o.ProductVersion.IsSet() { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given NullableString and assigns it to the ProductVersion field. +func (o *PatchedWAFRequest) SetProductVersion(v string) { + o.ProductVersion.Set(&v) +} +// SetProductVersionNil sets the value for ProductVersion to be an explicit nil +func (o *PatchedWAFRequest) SetProductVersionNil() { + o.ProductVersion.Set(nil) +} + +// UnsetProductVersion ensures that no value is present for ProductVersion, not even an explicit nil +func (o *PatchedWAFRequest) UnsetProductVersion() { + o.ProductVersion.Unset() +} + +// GetEngineSettings returns the EngineSettings field value if set, zero value otherwise. +func (o *PatchedWAFRequest) GetEngineSettings() WAFEngineSettingsFieldRequest { + if o == nil || IsNil(o.EngineSettings) { + var ret WAFEngineSettingsFieldRequest + return ret + } + return *o.EngineSettings +} + +// GetEngineSettingsOk returns a tuple with the EngineSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRequest) GetEngineSettingsOk() (*WAFEngineSettingsFieldRequest, bool) { + if o == nil || IsNil(o.EngineSettings) { + return nil, false + } + return o.EngineSettings, true +} + +// HasEngineSettings returns a boolean if a field has been set. +func (o *PatchedWAFRequest) HasEngineSettings() bool { + if o != nil && !IsNil(o.EngineSettings) { + return true + } + + return false +} + +// SetEngineSettings gets a reference to the given WAFEngineSettingsFieldRequest and assigns it to the EngineSettings field. +func (o *PatchedWAFRequest) SetEngineSettings(v WAFEngineSettingsFieldRequest) { + o.EngineSettings = &v +} + +func (o PatchedWAFRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedWAFRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.ProductVersion.IsSet() { + toSerialize["product_version"] = o.ProductVersion.Get() + } + if !IsNil(o.EngineSettings) { + toSerialize["engine_settings"] = o.EngineSettings + } + return toSerialize, nil +} + +type NullablePatchedWAFRequest struct { + value *PatchedWAFRequest + isSet bool +} + +func (v NullablePatchedWAFRequest) Get() *PatchedWAFRequest { + return v.value +} + +func (v *NullablePatchedWAFRequest) Set(val *PatchedWAFRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedWAFRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedWAFRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedWAFRequest(val *PatchedWAFRequest) *NullablePatchedWAFRequest { + return &NullablePatchedWAFRequest{value: val, isSet: true} +} + +func (v NullablePatchedWAFRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedWAFRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_waf_rule_request.go b/azion-api/model_patched_waf_rule_request.go new file mode 100644 index 0000000..64c61e4 --- /dev/null +++ b/azion-api/model_patched_waf_rule_request.go @@ -0,0 +1,319 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedWAFRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedWAFRuleRequest{} + +// PatchedWAFRuleRequest struct for PatchedWAFRuleRequest +type PatchedWAFRuleRequest struct { + // 0 - All Rules
1 - Validation of protocol compliance: weird request, unable to parse
2 - Request too big, stored on disk and not parsed
10 - Validation of protocol compliance: invalid HEX encoding (null bytes)
11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)
12 - Validation of protocol compliance: invalid formatted URL
13 - Validation of protocol compliance: invalid POST format
14 - Validation of protocol compliance: invalid POST boundary
15 - Validation of protocol compliance: invalid JSON
16 - Validation of protocol compliance: POST with no body
17 - Possible SQL Injection attack: validation with libinjection_sql
18 - Possible XSS attack: validation with libinjection_xss
1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies
1001 - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies
1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies
1003 - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies
1004 - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies
1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies
1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies
1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies
1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String
1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String
1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies
1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies
1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies
1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies
1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies
1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies
1100 - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies
1101 - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies
1102 - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies
1103 - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies
1104 - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies
1105 - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies
1106 - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies
1107 - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies
1108 - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies
1109 - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies
1110 - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies
1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR
1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies
1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies
1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies
1203 - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies
1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies
1205 - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies
1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies
1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies
1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies
1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies
1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies
1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies
1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies
1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies
1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies
1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies
1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies
1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies
1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies
1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies
1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies
1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file
2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering * `0` - All Rules * `1` - Validation of protocol compliance: weird request, unable to parse * `2` - Request too big, stored on disk and not parsed * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) * `12` - Validation of protocol compliance: invalid formatted URL * `13` - Validation of protocol compliance: invalid POST format * `14` - Validation of protocol compliance: invalid POST boundary * `15` - Validation of protocol compliance: invalid JSON * `16` - Validation of protocol compliance: POST with no body * `17` - Possible SQL Injection attack: validation with libinjection_sql * `18` - Possible XSS attack: validation with libinjection_xss * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies * `1001` - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies * `1003` - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies * `1004` - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies * `1100` - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies * `1101` - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies * `1102` - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies * `1103` - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies * `1104` - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies * `1105` - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies * `1106` - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies * `1107` - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies * `1108` - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies * `1109` - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies * `1110` - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies * `1203` - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies * `1205` - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + RuleId *int64 `json:"rule_id,omitempty"` + Name *string `json:"name,omitempty"` + Path NullableString `json:"path,omitempty"` + Conditions []WAFExceptionConditionRequest `json:"conditions,omitempty"` + // * `regex` - regex * `contains` - contains + Operator *string `json:"operator,omitempty"` + Active *bool `json:"active,omitempty"` +} + +// NewPatchedWAFRuleRequest instantiates a new PatchedWAFRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedWAFRuleRequest() *PatchedWAFRuleRequest { + this := PatchedWAFRuleRequest{} + return &this +} + +// NewPatchedWAFRuleRequestWithDefaults instantiates a new PatchedWAFRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedWAFRuleRequestWithDefaults() *PatchedWAFRuleRequest { + this := PatchedWAFRuleRequest{} + return &this +} + +// GetRuleId returns the RuleId field value if set, zero value otherwise. +func (o *PatchedWAFRuleRequest) GetRuleId() int64 { + if o == nil || IsNil(o.RuleId) { + var ret int64 + return ret + } + return *o.RuleId +} + +// GetRuleIdOk returns a tuple with the RuleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRuleRequest) GetRuleIdOk() (*int64, bool) { + if o == nil || IsNil(o.RuleId) { + return nil, false + } + return o.RuleId, true +} + +// HasRuleId returns a boolean if a field has been set. +func (o *PatchedWAFRuleRequest) HasRuleId() bool { + if o != nil && !IsNil(o.RuleId) { + return true + } + + return false +} + +// SetRuleId gets a reference to the given int64 and assigns it to the RuleId field. +func (o *PatchedWAFRuleRequest) SetRuleId(v int64) { + o.RuleId = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedWAFRuleRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRuleRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedWAFRuleRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedWAFRuleRequest) SetName(v string) { + o.Name = &v +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *PatchedWAFRuleRequest) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PatchedWAFRuleRequest) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *PatchedWAFRuleRequest) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *PatchedWAFRuleRequest) SetPath(v string) { + o.Path.Set(&v) +} +// SetPathNil sets the value for Path to be an explicit nil +func (o *PatchedWAFRuleRequest) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *PatchedWAFRuleRequest) UnsetPath() { + o.Path.Unset() +} + +// GetConditions returns the Conditions field value if set, zero value otherwise. +func (o *PatchedWAFRuleRequest) GetConditions() []WAFExceptionConditionRequest { + if o == nil || IsNil(o.Conditions) { + var ret []WAFExceptionConditionRequest + return ret + } + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRuleRequest) GetConditionsOk() ([]WAFExceptionConditionRequest, bool) { + if o == nil || IsNil(o.Conditions) { + return nil, false + } + return o.Conditions, true +} + +// HasConditions returns a boolean if a field has been set. +func (o *PatchedWAFRuleRequest) HasConditions() bool { + if o != nil && !IsNil(o.Conditions) { + return true + } + + return false +} + +// SetConditions gets a reference to the given []WAFExceptionConditionRequest and assigns it to the Conditions field. +func (o *PatchedWAFRuleRequest) SetConditions(v []WAFExceptionConditionRequest) { + o.Conditions = v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *PatchedWAFRuleRequest) GetOperator() string { + if o == nil || IsNil(o.Operator) { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRuleRequest) GetOperatorOk() (*string, bool) { + if o == nil || IsNil(o.Operator) { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *PatchedWAFRuleRequest) HasOperator() bool { + if o != nil && !IsNil(o.Operator) { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *PatchedWAFRuleRequest) SetOperator(v string) { + o.Operator = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedWAFRuleRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWAFRuleRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedWAFRuleRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedWAFRuleRequest) SetActive(v bool) { + o.Active = &v +} + +func (o PatchedWAFRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedWAFRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RuleId) { + toSerialize["rule_id"] = o.RuleId + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + if !IsNil(o.Conditions) { + toSerialize["conditions"] = o.Conditions + } + if !IsNil(o.Operator) { + toSerialize["operator"] = o.Operator + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +type NullablePatchedWAFRuleRequest struct { + value *PatchedWAFRuleRequest + isSet bool +} + +func (v NullablePatchedWAFRuleRequest) Get() *PatchedWAFRuleRequest { + return v.value +} + +func (v *NullablePatchedWAFRuleRequest) Set(val *PatchedWAFRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedWAFRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedWAFRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedWAFRuleRequest(val *PatchedWAFRuleRequest) *NullablePatchedWAFRuleRequest { + return &NullablePatchedWAFRuleRequest{value: val, isSet: true} +} + +func (v NullablePatchedWAFRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedWAFRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_workload_deployment_request.go b/azion-api/model_patched_workload_deployment_request.go new file mode 100644 index 0000000..8ba118f --- /dev/null +++ b/azion-api/model_patched_workload_deployment_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedWorkloadDeploymentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedWorkloadDeploymentRequest{} + +// PatchedWorkloadDeploymentRequest struct for PatchedWorkloadDeploymentRequest +type PatchedWorkloadDeploymentRequest struct { + Name *string `json:"name,omitempty"` + Current *bool `json:"current,omitempty"` + Active *bool `json:"active,omitempty"` + Strategy *DeploymentStrategyDefaultDeploymentStrategyRequest `json:"strategy,omitempty"` +} + +// NewPatchedWorkloadDeploymentRequest instantiates a new PatchedWorkloadDeploymentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedWorkloadDeploymentRequest() *PatchedWorkloadDeploymentRequest { + this := PatchedWorkloadDeploymentRequest{} + return &this +} + +// NewPatchedWorkloadDeploymentRequestWithDefaults instantiates a new PatchedWorkloadDeploymentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedWorkloadDeploymentRequestWithDefaults() *PatchedWorkloadDeploymentRequest { + this := PatchedWorkloadDeploymentRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedWorkloadDeploymentRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadDeploymentRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedWorkloadDeploymentRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedWorkloadDeploymentRequest) SetName(v string) { + o.Name = &v +} + +// GetCurrent returns the Current field value if set, zero value otherwise. +func (o *PatchedWorkloadDeploymentRequest) GetCurrent() bool { + if o == nil || IsNil(o.Current) { + var ret bool + return ret + } + return *o.Current +} + +// GetCurrentOk returns a tuple with the Current field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadDeploymentRequest) GetCurrentOk() (*bool, bool) { + if o == nil || IsNil(o.Current) { + return nil, false + } + return o.Current, true +} + +// HasCurrent returns a boolean if a field has been set. +func (o *PatchedWorkloadDeploymentRequest) HasCurrent() bool { + if o != nil && !IsNil(o.Current) { + return true + } + + return false +} + +// SetCurrent gets a reference to the given bool and assigns it to the Current field. +func (o *PatchedWorkloadDeploymentRequest) SetCurrent(v bool) { + o.Current = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedWorkloadDeploymentRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadDeploymentRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedWorkloadDeploymentRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedWorkloadDeploymentRequest) SetActive(v bool) { + o.Active = &v +} + +// GetStrategy returns the Strategy field value if set, zero value otherwise. +func (o *PatchedWorkloadDeploymentRequest) GetStrategy() DeploymentStrategyDefaultDeploymentStrategyRequest { + if o == nil || IsNil(o.Strategy) { + var ret DeploymentStrategyDefaultDeploymentStrategyRequest + return ret + } + return *o.Strategy +} + +// GetStrategyOk returns a tuple with the Strategy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadDeploymentRequest) GetStrategyOk() (*DeploymentStrategyDefaultDeploymentStrategyRequest, bool) { + if o == nil || IsNil(o.Strategy) { + return nil, false + } + return o.Strategy, true +} + +// HasStrategy returns a boolean if a field has been set. +func (o *PatchedWorkloadDeploymentRequest) HasStrategy() bool { + if o != nil && !IsNil(o.Strategy) { + return true + } + + return false +} + +// SetStrategy gets a reference to the given DeploymentStrategyDefaultDeploymentStrategyRequest and assigns it to the Strategy field. +func (o *PatchedWorkloadDeploymentRequest) SetStrategy(v DeploymentStrategyDefaultDeploymentStrategyRequest) { + o.Strategy = &v +} + +func (o PatchedWorkloadDeploymentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedWorkloadDeploymentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Current) { + toSerialize["current"] = o.Current + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Strategy) { + toSerialize["strategy"] = o.Strategy + } + return toSerialize, nil +} + +type NullablePatchedWorkloadDeploymentRequest struct { + value *PatchedWorkloadDeploymentRequest + isSet bool +} + +func (v NullablePatchedWorkloadDeploymentRequest) Get() *PatchedWorkloadDeploymentRequest { + return v.value +} + +func (v *NullablePatchedWorkloadDeploymentRequest) Set(val *PatchedWorkloadDeploymentRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedWorkloadDeploymentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedWorkloadDeploymentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedWorkloadDeploymentRequest(val *PatchedWorkloadDeploymentRequest) *NullablePatchedWorkloadDeploymentRequest { + return &NullablePatchedWorkloadDeploymentRequest{value: val, isSet: true} +} + +func (v NullablePatchedWorkloadDeploymentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedWorkloadDeploymentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_workload_request.go b/azion-api/model_patched_workload_request.go new file mode 100644 index 0000000..1663ab9 --- /dev/null +++ b/azion-api/model_patched_workload_request.go @@ -0,0 +1,380 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the PatchedWorkloadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedWorkloadRequest{} + +// PatchedWorkloadRequest struct for PatchedWorkloadRequest +type PatchedWorkloadRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + // * `1` - Production Infrastructure (All Locations) * `2` - Staging Infrastructure + Infrastructure *int64 `json:"infrastructure,omitempty"` + Tls *TLSWorkloadRequest `json:"tls,omitempty"` + Protocols *ProtocolsRequest `json:"protocols,omitempty"` + Mtls *MTLSRequest `json:"mtls,omitempty"` + Domains []string `json:"domains,omitempty"` + WorkloadDomainAllowAccess *bool `json:"workload_domain_allow_access,omitempty"` +} + +// NewPatchedWorkloadRequest instantiates a new PatchedWorkloadRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedWorkloadRequest() *PatchedWorkloadRequest { + this := PatchedWorkloadRequest{} + return &this +} + +// NewPatchedWorkloadRequestWithDefaults instantiates a new PatchedWorkloadRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedWorkloadRequestWithDefaults() *PatchedWorkloadRequest { + this := PatchedWorkloadRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedWorkloadRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *PatchedWorkloadRequest) SetActive(v bool) { + o.Active = &v +} + +// GetInfrastructure returns the Infrastructure field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetInfrastructure() int64 { + if o == nil || IsNil(o.Infrastructure) { + var ret int64 + return ret + } + return *o.Infrastructure +} + +// GetInfrastructureOk returns a tuple with the Infrastructure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetInfrastructureOk() (*int64, bool) { + if o == nil || IsNil(o.Infrastructure) { + return nil, false + } + return o.Infrastructure, true +} + +// HasInfrastructure returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasInfrastructure() bool { + if o != nil && !IsNil(o.Infrastructure) { + return true + } + + return false +} + +// SetInfrastructure gets a reference to the given int64 and assigns it to the Infrastructure field. +func (o *PatchedWorkloadRequest) SetInfrastructure(v int64) { + o.Infrastructure = &v +} + +// GetTls returns the Tls field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetTls() TLSWorkloadRequest { + if o == nil || IsNil(o.Tls) { + var ret TLSWorkloadRequest + return ret + } + return *o.Tls +} + +// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetTlsOk() (*TLSWorkloadRequest, bool) { + if o == nil || IsNil(o.Tls) { + return nil, false + } + return o.Tls, true +} + +// HasTls returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasTls() bool { + if o != nil && !IsNil(o.Tls) { + return true + } + + return false +} + +// SetTls gets a reference to the given TLSWorkloadRequest and assigns it to the Tls field. +func (o *PatchedWorkloadRequest) SetTls(v TLSWorkloadRequest) { + o.Tls = &v +} + +// GetProtocols returns the Protocols field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetProtocols() ProtocolsRequest { + if o == nil || IsNil(o.Protocols) { + var ret ProtocolsRequest + return ret + } + return *o.Protocols +} + +// GetProtocolsOk returns a tuple with the Protocols field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetProtocolsOk() (*ProtocolsRequest, bool) { + if o == nil || IsNil(o.Protocols) { + return nil, false + } + return o.Protocols, true +} + +// HasProtocols returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasProtocols() bool { + if o != nil && !IsNil(o.Protocols) { + return true + } + + return false +} + +// SetProtocols gets a reference to the given ProtocolsRequest and assigns it to the Protocols field. +func (o *PatchedWorkloadRequest) SetProtocols(v ProtocolsRequest) { + o.Protocols = &v +} + +// GetMtls returns the Mtls field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetMtls() MTLSRequest { + if o == nil || IsNil(o.Mtls) { + var ret MTLSRequest + return ret + } + return *o.Mtls +} + +// GetMtlsOk returns a tuple with the Mtls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetMtlsOk() (*MTLSRequest, bool) { + if o == nil || IsNil(o.Mtls) { + return nil, false + } + return o.Mtls, true +} + +// HasMtls returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasMtls() bool { + if o != nil && !IsNil(o.Mtls) { + return true + } + + return false +} + +// SetMtls gets a reference to the given MTLSRequest and assigns it to the Mtls field. +func (o *PatchedWorkloadRequest) SetMtls(v MTLSRequest) { + o.Mtls = &v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *PatchedWorkloadRequest) SetDomains(v []string) { + o.Domains = v +} + +// GetWorkloadDomainAllowAccess returns the WorkloadDomainAllowAccess field value if set, zero value otherwise. +func (o *PatchedWorkloadRequest) GetWorkloadDomainAllowAccess() bool { + if o == nil || IsNil(o.WorkloadDomainAllowAccess) { + var ret bool + return ret + } + return *o.WorkloadDomainAllowAccess +} + +// GetWorkloadDomainAllowAccessOk returns a tuple with the WorkloadDomainAllowAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkloadRequest) GetWorkloadDomainAllowAccessOk() (*bool, bool) { + if o == nil || IsNil(o.WorkloadDomainAllowAccess) { + return nil, false + } + return o.WorkloadDomainAllowAccess, true +} + +// HasWorkloadDomainAllowAccess returns a boolean if a field has been set. +func (o *PatchedWorkloadRequest) HasWorkloadDomainAllowAccess() bool { + if o != nil && !IsNil(o.WorkloadDomainAllowAccess) { + return true + } + + return false +} + +// SetWorkloadDomainAllowAccess gets a reference to the given bool and assigns it to the WorkloadDomainAllowAccess field. +func (o *PatchedWorkloadRequest) SetWorkloadDomainAllowAccess(v bool) { + o.WorkloadDomainAllowAccess = &v +} + +func (o PatchedWorkloadRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedWorkloadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Infrastructure) { + toSerialize["infrastructure"] = o.Infrastructure + } + if !IsNil(o.Tls) { + toSerialize["tls"] = o.Tls + } + if !IsNil(o.Protocols) { + toSerialize["protocols"] = o.Protocols + } + if !IsNil(o.Mtls) { + toSerialize["mtls"] = o.Mtls + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.WorkloadDomainAllowAccess) { + toSerialize["workload_domain_allow_access"] = o.WorkloadDomainAllowAccess + } + return toSerialize, nil +} + +type NullablePatchedWorkloadRequest struct { + value *PatchedWorkloadRequest + isSet bool +} + +func (v NullablePatchedWorkloadRequest) Get() *PatchedWorkloadRequest { + return v.value +} + +func (v *NullablePatchedWorkloadRequest) Set(val *PatchedWorkloadRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedWorkloadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedWorkloadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedWorkloadRequest(val *PatchedWorkloadRequest) *NullablePatchedWorkloadRequest { + return &NullablePatchedWorkloadRequest{value: val, isSet: true} +} + +func (v NullablePatchedWorkloadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedWorkloadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_patched_workspace_request.go b/azion-api/model_patched_workspace_request.go new file mode 100644 index 0000000..c17185d --- /dev/null +++ b/azion-api/model_patched_workspace_request.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PatchedWorkspaceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PatchedWorkspaceRequest{} + +// PatchedWorkspaceRequest struct for PatchedWorkspaceRequest +type PatchedWorkspaceRequest struct { + Name *string `json:"name,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _PatchedWorkspaceRequest PatchedWorkspaceRequest + +// NewPatchedWorkspaceRequest instantiates a new PatchedWorkspaceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPatchedWorkspaceRequest(type_ string) *PatchedWorkspaceRequest { + this := PatchedWorkspaceRequest{} + this.Type = type_ + return &this +} + +// NewPatchedWorkspaceRequestWithDefaults instantiates a new PatchedWorkspaceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPatchedWorkspaceRequestWithDefaults() *PatchedWorkspaceRequest { + this := PatchedWorkspaceRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PatchedWorkspaceRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PatchedWorkspaceRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PatchedWorkspaceRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PatchedWorkspaceRequest) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value +func (o *PatchedWorkspaceRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *PatchedWorkspaceRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *PatchedWorkspaceRequest) SetType(v string) { + o.Type = v +} + +func (o PatchedWorkspaceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PatchedWorkspaceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *PatchedWorkspaceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPatchedWorkspaceRequest := _PatchedWorkspaceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPatchedWorkspaceRequest) + + if err != nil { + return err + } + + *o = PatchedWorkspaceRequest(varPatchedWorkspaceRequest) + + return err +} + +type NullablePatchedWorkspaceRequest struct { + value *PatchedWorkspaceRequest + isSet bool +} + +func (v NullablePatchedWorkspaceRequest) Get() *PatchedWorkspaceRequest { + return v.value +} + +func (v *NullablePatchedWorkspaceRequest) Set(val *PatchedWorkspaceRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePatchedWorkspaceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePatchedWorkspaceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePatchedWorkspaceRequest(val *PatchedWorkspaceRequest) *NullablePatchedWorkspaceRequest { + return &NullablePatchedWorkspaceRequest{value: val, isSet: true} +} + +func (v NullablePatchedWorkspaceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePatchedWorkspaceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_payment_history.go b/azion-api/model_payment_history.go new file mode 100644 index 0000000..44a73a1 --- /dev/null +++ b/azion-api/model_payment_history.go @@ -0,0 +1,335 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PaymentHistory type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentHistory{} + +// PaymentHistory struct for PaymentHistory +type PaymentHistory struct { + AmountWithCurrency string `json:"amount_with_currency"` + InvoiceNumber NullableString `json:"invoice_number"` + InvoiceUrl NullableString `json:"invoice_url"` + Status string `json:"status"` + PaymentDue string `json:"payment_due"` + CardBrand NullableString `json:"card_brand"` + PaymentMethodDetails NullableString `json:"payment_method_details"` +} + +type _PaymentHistory PaymentHistory + +// NewPaymentHistory instantiates a new PaymentHistory object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaymentHistory(amountWithCurrency string, invoiceNumber NullableString, invoiceUrl NullableString, status string, paymentDue string, cardBrand NullableString, paymentMethodDetails NullableString) *PaymentHistory { + this := PaymentHistory{} + this.AmountWithCurrency = amountWithCurrency + this.InvoiceNumber = invoiceNumber + this.InvoiceUrl = invoiceUrl + this.Status = status + this.PaymentDue = paymentDue + this.CardBrand = cardBrand + this.PaymentMethodDetails = paymentMethodDetails + return &this +} + +// NewPaymentHistoryWithDefaults instantiates a new PaymentHistory object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaymentHistoryWithDefaults() *PaymentHistory { + this := PaymentHistory{} + return &this +} + +// GetAmountWithCurrency returns the AmountWithCurrency field value +func (o *PaymentHistory) GetAmountWithCurrency() string { + if o == nil { + var ret string + return ret + } + + return o.AmountWithCurrency +} + +// GetAmountWithCurrencyOk returns a tuple with the AmountWithCurrency field value +// and a boolean to check if the value has been set. +func (o *PaymentHistory) GetAmountWithCurrencyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AmountWithCurrency, true +} + +// SetAmountWithCurrency sets field value +func (o *PaymentHistory) SetAmountWithCurrency(v string) { + o.AmountWithCurrency = v +} + +// GetInvoiceNumber returns the InvoiceNumber field value +// If the value is explicit nil, the zero value for string will be returned +func (o *PaymentHistory) GetInvoiceNumber() string { + if o == nil || o.InvoiceNumber.Get() == nil { + var ret string + return ret + } + + return *o.InvoiceNumber.Get() +} + +// GetInvoiceNumberOk returns a tuple with the InvoiceNumber field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaymentHistory) GetInvoiceNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InvoiceNumber.Get(), o.InvoiceNumber.IsSet() +} + +// SetInvoiceNumber sets field value +func (o *PaymentHistory) SetInvoiceNumber(v string) { + o.InvoiceNumber.Set(&v) +} + +// GetInvoiceUrl returns the InvoiceUrl field value +// If the value is explicit nil, the zero value for string will be returned +func (o *PaymentHistory) GetInvoiceUrl() string { + if o == nil || o.InvoiceUrl.Get() == nil { + var ret string + return ret + } + + return *o.InvoiceUrl.Get() +} + +// GetInvoiceUrlOk returns a tuple with the InvoiceUrl field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaymentHistory) GetInvoiceUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.InvoiceUrl.Get(), o.InvoiceUrl.IsSet() +} + +// SetInvoiceUrl sets field value +func (o *PaymentHistory) SetInvoiceUrl(v string) { + o.InvoiceUrl.Set(&v) +} + +// GetStatus returns the Status field value +func (o *PaymentHistory) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *PaymentHistory) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *PaymentHistory) SetStatus(v string) { + o.Status = v +} + +// GetPaymentDue returns the PaymentDue field value +func (o *PaymentHistory) GetPaymentDue() string { + if o == nil { + var ret string + return ret + } + + return o.PaymentDue +} + +// GetPaymentDueOk returns a tuple with the PaymentDue field value +// and a boolean to check if the value has been set. +func (o *PaymentHistory) GetPaymentDueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PaymentDue, true +} + +// SetPaymentDue sets field value +func (o *PaymentHistory) SetPaymentDue(v string) { + o.PaymentDue = v +} + +// GetCardBrand returns the CardBrand field value +// If the value is explicit nil, the zero value for string will be returned +func (o *PaymentHistory) GetCardBrand() string { + if o == nil || o.CardBrand.Get() == nil { + var ret string + return ret + } + + return *o.CardBrand.Get() +} + +// GetCardBrandOk returns a tuple with the CardBrand field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaymentHistory) GetCardBrandOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CardBrand.Get(), o.CardBrand.IsSet() +} + +// SetCardBrand sets field value +func (o *PaymentHistory) SetCardBrand(v string) { + o.CardBrand.Set(&v) +} + +// GetPaymentMethodDetails returns the PaymentMethodDetails field value +// If the value is explicit nil, the zero value for string will be returned +func (o *PaymentHistory) GetPaymentMethodDetails() string { + if o == nil || o.PaymentMethodDetails.Get() == nil { + var ret string + return ret + } + + return *o.PaymentMethodDetails.Get() +} + +// GetPaymentMethodDetailsOk returns a tuple with the PaymentMethodDetails field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *PaymentHistory) GetPaymentMethodDetailsOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PaymentMethodDetails.Get(), o.PaymentMethodDetails.IsSet() +} + +// SetPaymentMethodDetails sets field value +func (o *PaymentHistory) SetPaymentMethodDetails(v string) { + o.PaymentMethodDetails.Set(&v) +} + +func (o PaymentHistory) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentHistory) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["amount_with_currency"] = o.AmountWithCurrency + toSerialize["invoice_number"] = o.InvoiceNumber.Get() + toSerialize["invoice_url"] = o.InvoiceUrl.Get() + toSerialize["status"] = o.Status + toSerialize["payment_due"] = o.PaymentDue + toSerialize["card_brand"] = o.CardBrand.Get() + toSerialize["payment_method_details"] = o.PaymentMethodDetails.Get() + return toSerialize, nil +} + +func (o *PaymentHistory) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount_with_currency", + "invoice_number", + "invoice_url", + "status", + "payment_due", + "card_brand", + "payment_method_details", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentHistory := _PaymentHistory{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPaymentHistory) + + if err != nil { + return err + } + + *o = PaymentHistory(varPaymentHistory) + + return err +} + +type NullablePaymentHistory struct { + value *PaymentHistory + isSet bool +} + +func (v NullablePaymentHistory) Get() *PaymentHistory { + return v.value +} + +func (v *NullablePaymentHistory) Set(val *PaymentHistory) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentHistory) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentHistory) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentHistory(val *PaymentHistory) *NullablePaymentHistory { + return &NullablePaymentHistory{value: val, isSet: true} +} + +func (v NullablePaymentHistory) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentHistory) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_payment_method.go b/azion-api/model_payment_method.go new file mode 100644 index 0000000..7bc72eb --- /dev/null +++ b/azion-api/model_payment_method.go @@ -0,0 +1,491 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PaymentMethod type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentMethod{} + +// PaymentMethod struct for PaymentMethod +type PaymentMethod struct { + Id int64 `json:"id"` + CardHolder string `json:"card_holder"` + CardBrand string `json:"card_brand"` + CardExpirationMonth int64 `json:"card_expiration_month"` + CardExpirationYear int64 `json:"card_expiration_year"` + CardLast4Digits string `json:"card_last_4_digits"` + CardAddressZip string `json:"card_address_zip"` + CardCountry string `json:"card_country"` + CardAddressLine1 *string `json:"card_address_line1,omitempty"` + CardAddressLine2 *string `json:"card_address_line2,omitempty"` + CardId string `json:"card_id"` + IsDefault *bool `json:"is_default,omitempty"` +} + +type _PaymentMethod PaymentMethod + +// NewPaymentMethod instantiates a new PaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaymentMethod(id int64, cardHolder string, cardBrand string, cardExpirationMonth int64, cardExpirationYear int64, cardLast4Digits string, cardAddressZip string, cardCountry string, cardId string) *PaymentMethod { + this := PaymentMethod{} + this.Id = id + this.CardHolder = cardHolder + this.CardBrand = cardBrand + this.CardExpirationMonth = cardExpirationMonth + this.CardExpirationYear = cardExpirationYear + this.CardLast4Digits = cardLast4Digits + this.CardAddressZip = cardAddressZip + this.CardCountry = cardCountry + this.CardId = cardId + return &this +} + +// NewPaymentMethodWithDefaults instantiates a new PaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaymentMethodWithDefaults() *PaymentMethod { + this := PaymentMethod{} + return &this +} + +// GetId returns the Id field value +func (o *PaymentMethod) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *PaymentMethod) SetId(v int64) { + o.Id = v +} + +// GetCardHolder returns the CardHolder field value +func (o *PaymentMethod) GetCardHolder() string { + if o == nil { + var ret string + return ret + } + + return o.CardHolder +} + +// GetCardHolderOk returns a tuple with the CardHolder field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardHolderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardHolder, true +} + +// SetCardHolder sets field value +func (o *PaymentMethod) SetCardHolder(v string) { + o.CardHolder = v +} + +// GetCardBrand returns the CardBrand field value +func (o *PaymentMethod) GetCardBrand() string { + if o == nil { + var ret string + return ret + } + + return o.CardBrand +} + +// GetCardBrandOk returns a tuple with the CardBrand field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardBrandOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardBrand, true +} + +// SetCardBrand sets field value +func (o *PaymentMethod) SetCardBrand(v string) { + o.CardBrand = v +} + +// GetCardExpirationMonth returns the CardExpirationMonth field value +func (o *PaymentMethod) GetCardExpirationMonth() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.CardExpirationMonth +} + +// GetCardExpirationMonthOk returns a tuple with the CardExpirationMonth field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardExpirationMonthOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.CardExpirationMonth, true +} + +// SetCardExpirationMonth sets field value +func (o *PaymentMethod) SetCardExpirationMonth(v int64) { + o.CardExpirationMonth = v +} + +// GetCardExpirationYear returns the CardExpirationYear field value +func (o *PaymentMethod) GetCardExpirationYear() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.CardExpirationYear +} + +// GetCardExpirationYearOk returns a tuple with the CardExpirationYear field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardExpirationYearOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.CardExpirationYear, true +} + +// SetCardExpirationYear sets field value +func (o *PaymentMethod) SetCardExpirationYear(v int64) { + o.CardExpirationYear = v +} + +// GetCardLast4Digits returns the CardLast4Digits field value +func (o *PaymentMethod) GetCardLast4Digits() string { + if o == nil { + var ret string + return ret + } + + return o.CardLast4Digits +} + +// GetCardLast4DigitsOk returns a tuple with the CardLast4Digits field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardLast4DigitsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardLast4Digits, true +} + +// SetCardLast4Digits sets field value +func (o *PaymentMethod) SetCardLast4Digits(v string) { + o.CardLast4Digits = v +} + +// GetCardAddressZip returns the CardAddressZip field value +func (o *PaymentMethod) GetCardAddressZip() string { + if o == nil { + var ret string + return ret + } + + return o.CardAddressZip +} + +// GetCardAddressZipOk returns a tuple with the CardAddressZip field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardAddressZipOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardAddressZip, true +} + +// SetCardAddressZip sets field value +func (o *PaymentMethod) SetCardAddressZip(v string) { + o.CardAddressZip = v +} + +// GetCardCountry returns the CardCountry field value +func (o *PaymentMethod) GetCardCountry() string { + if o == nil { + var ret string + return ret + } + + return o.CardCountry +} + +// GetCardCountryOk returns a tuple with the CardCountry field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardCountry, true +} + +// SetCardCountry sets field value +func (o *PaymentMethod) SetCardCountry(v string) { + o.CardCountry = v +} + +// GetCardAddressLine1 returns the CardAddressLine1 field value if set, zero value otherwise. +func (o *PaymentMethod) GetCardAddressLine1() string { + if o == nil || IsNil(o.CardAddressLine1) { + var ret string + return ret + } + return *o.CardAddressLine1 +} + +// GetCardAddressLine1Ok returns a tuple with the CardAddressLine1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardAddressLine1Ok() (*string, bool) { + if o == nil || IsNil(o.CardAddressLine1) { + return nil, false + } + return o.CardAddressLine1, true +} + +// HasCardAddressLine1 returns a boolean if a field has been set. +func (o *PaymentMethod) HasCardAddressLine1() bool { + if o != nil && !IsNil(o.CardAddressLine1) { + return true + } + + return false +} + +// SetCardAddressLine1 gets a reference to the given string and assigns it to the CardAddressLine1 field. +func (o *PaymentMethod) SetCardAddressLine1(v string) { + o.CardAddressLine1 = &v +} + +// GetCardAddressLine2 returns the CardAddressLine2 field value if set, zero value otherwise. +func (o *PaymentMethod) GetCardAddressLine2() string { + if o == nil || IsNil(o.CardAddressLine2) { + var ret string + return ret + } + return *o.CardAddressLine2 +} + +// GetCardAddressLine2Ok returns a tuple with the CardAddressLine2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardAddressLine2Ok() (*string, bool) { + if o == nil || IsNil(o.CardAddressLine2) { + return nil, false + } + return o.CardAddressLine2, true +} + +// HasCardAddressLine2 returns a boolean if a field has been set. +func (o *PaymentMethod) HasCardAddressLine2() bool { + if o != nil && !IsNil(o.CardAddressLine2) { + return true + } + + return false +} + +// SetCardAddressLine2 gets a reference to the given string and assigns it to the CardAddressLine2 field. +func (o *PaymentMethod) SetCardAddressLine2(v string) { + o.CardAddressLine2 = &v +} + +// GetCardId returns the CardId field value +func (o *PaymentMethod) GetCardId() string { + if o == nil { + var ret string + return ret + } + + return o.CardId +} + +// GetCardIdOk returns a tuple with the CardId field value +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetCardIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardId, true +} + +// SetCardId sets field value +func (o *PaymentMethod) SetCardId(v string) { + o.CardId = v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *PaymentMethod) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethod) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *PaymentMethod) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *PaymentMethod) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o PaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["card_holder"] = o.CardHolder + toSerialize["card_brand"] = o.CardBrand + toSerialize["card_expiration_month"] = o.CardExpirationMonth + toSerialize["card_expiration_year"] = o.CardExpirationYear + toSerialize["card_last_4_digits"] = o.CardLast4Digits + toSerialize["card_address_zip"] = o.CardAddressZip + toSerialize["card_country"] = o.CardCountry + if !IsNil(o.CardAddressLine1) { + toSerialize["card_address_line1"] = o.CardAddressLine1 + } + if !IsNil(o.CardAddressLine2) { + toSerialize["card_address_line2"] = o.CardAddressLine2 + } + toSerialize["card_id"] = o.CardId + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +func (o *PaymentMethod) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "card_holder", + "card_brand", + "card_expiration_month", + "card_expiration_year", + "card_last_4_digits", + "card_address_zip", + "card_country", + "card_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethod := _PaymentMethod{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPaymentMethod) + + if err != nil { + return err + } + + *o = PaymentMethod(varPaymentMethod) + + return err +} + +type NullablePaymentMethod struct { + value *PaymentMethod + isSet bool +} + +func (v NullablePaymentMethod) Get() *PaymentMethod { + return v.value +} + +func (v *NullablePaymentMethod) Set(val *PaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentMethod(val *PaymentMethod) *NullablePaymentMethod { + return &NullablePaymentMethod{value: val, isSet: true} +} + +func (v NullablePaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_payment_method_request.go b/azion-api/model_payment_method_request.go new file mode 100644 index 0000000..122a4a9 --- /dev/null +++ b/azion-api/model_payment_method_request.go @@ -0,0 +1,491 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PaymentMethodRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PaymentMethodRequest{} + +// PaymentMethodRequest struct for PaymentMethodRequest +type PaymentMethodRequest struct { + CardHolder string `json:"card_holder"` + CardBrand string `json:"card_brand"` + CardExpirationMonth int64 `json:"card_expiration_month"` + CardExpirationYear int64 `json:"card_expiration_year"` + CardLast4Digits string `json:"card_last_4_digits"` + CardAddressZip string `json:"card_address_zip"` + CardCountry string `json:"card_country"` + CardAddressLine1 *string `json:"card_address_line1,omitempty"` + CardAddressLine2 *string `json:"card_address_line2,omitempty"` + StripeToken string `json:"stripe_token"` + CardId string `json:"card_id"` + IsDefault *bool `json:"is_default,omitempty"` +} + +type _PaymentMethodRequest PaymentMethodRequest + +// NewPaymentMethodRequest instantiates a new PaymentMethodRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPaymentMethodRequest(cardHolder string, cardBrand string, cardExpirationMonth int64, cardExpirationYear int64, cardLast4Digits string, cardAddressZip string, cardCountry string, stripeToken string, cardId string) *PaymentMethodRequest { + this := PaymentMethodRequest{} + this.CardHolder = cardHolder + this.CardBrand = cardBrand + this.CardExpirationMonth = cardExpirationMonth + this.CardExpirationYear = cardExpirationYear + this.CardLast4Digits = cardLast4Digits + this.CardAddressZip = cardAddressZip + this.CardCountry = cardCountry + this.StripeToken = stripeToken + this.CardId = cardId + return &this +} + +// NewPaymentMethodRequestWithDefaults instantiates a new PaymentMethodRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPaymentMethodRequestWithDefaults() *PaymentMethodRequest { + this := PaymentMethodRequest{} + return &this +} + +// GetCardHolder returns the CardHolder field value +func (o *PaymentMethodRequest) GetCardHolder() string { + if o == nil { + var ret string + return ret + } + + return o.CardHolder +} + +// GetCardHolderOk returns a tuple with the CardHolder field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardHolderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardHolder, true +} + +// SetCardHolder sets field value +func (o *PaymentMethodRequest) SetCardHolder(v string) { + o.CardHolder = v +} + +// GetCardBrand returns the CardBrand field value +func (o *PaymentMethodRequest) GetCardBrand() string { + if o == nil { + var ret string + return ret + } + + return o.CardBrand +} + +// GetCardBrandOk returns a tuple with the CardBrand field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardBrandOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardBrand, true +} + +// SetCardBrand sets field value +func (o *PaymentMethodRequest) SetCardBrand(v string) { + o.CardBrand = v +} + +// GetCardExpirationMonth returns the CardExpirationMonth field value +func (o *PaymentMethodRequest) GetCardExpirationMonth() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.CardExpirationMonth +} + +// GetCardExpirationMonthOk returns a tuple with the CardExpirationMonth field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardExpirationMonthOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.CardExpirationMonth, true +} + +// SetCardExpirationMonth sets field value +func (o *PaymentMethodRequest) SetCardExpirationMonth(v int64) { + o.CardExpirationMonth = v +} + +// GetCardExpirationYear returns the CardExpirationYear field value +func (o *PaymentMethodRequest) GetCardExpirationYear() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.CardExpirationYear +} + +// GetCardExpirationYearOk returns a tuple with the CardExpirationYear field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardExpirationYearOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.CardExpirationYear, true +} + +// SetCardExpirationYear sets field value +func (o *PaymentMethodRequest) SetCardExpirationYear(v int64) { + o.CardExpirationYear = v +} + +// GetCardLast4Digits returns the CardLast4Digits field value +func (o *PaymentMethodRequest) GetCardLast4Digits() string { + if o == nil { + var ret string + return ret + } + + return o.CardLast4Digits +} + +// GetCardLast4DigitsOk returns a tuple with the CardLast4Digits field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardLast4DigitsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardLast4Digits, true +} + +// SetCardLast4Digits sets field value +func (o *PaymentMethodRequest) SetCardLast4Digits(v string) { + o.CardLast4Digits = v +} + +// GetCardAddressZip returns the CardAddressZip field value +func (o *PaymentMethodRequest) GetCardAddressZip() string { + if o == nil { + var ret string + return ret + } + + return o.CardAddressZip +} + +// GetCardAddressZipOk returns a tuple with the CardAddressZip field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardAddressZipOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardAddressZip, true +} + +// SetCardAddressZip sets field value +func (o *PaymentMethodRequest) SetCardAddressZip(v string) { + o.CardAddressZip = v +} + +// GetCardCountry returns the CardCountry field value +func (o *PaymentMethodRequest) GetCardCountry() string { + if o == nil { + var ret string + return ret + } + + return o.CardCountry +} + +// GetCardCountryOk returns a tuple with the CardCountry field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardCountry, true +} + +// SetCardCountry sets field value +func (o *PaymentMethodRequest) SetCardCountry(v string) { + o.CardCountry = v +} + +// GetCardAddressLine1 returns the CardAddressLine1 field value if set, zero value otherwise. +func (o *PaymentMethodRequest) GetCardAddressLine1() string { + if o == nil || IsNil(o.CardAddressLine1) { + var ret string + return ret + } + return *o.CardAddressLine1 +} + +// GetCardAddressLine1Ok returns a tuple with the CardAddressLine1 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardAddressLine1Ok() (*string, bool) { + if o == nil || IsNil(o.CardAddressLine1) { + return nil, false + } + return o.CardAddressLine1, true +} + +// HasCardAddressLine1 returns a boolean if a field has been set. +func (o *PaymentMethodRequest) HasCardAddressLine1() bool { + if o != nil && !IsNil(o.CardAddressLine1) { + return true + } + + return false +} + +// SetCardAddressLine1 gets a reference to the given string and assigns it to the CardAddressLine1 field. +func (o *PaymentMethodRequest) SetCardAddressLine1(v string) { + o.CardAddressLine1 = &v +} + +// GetCardAddressLine2 returns the CardAddressLine2 field value if set, zero value otherwise. +func (o *PaymentMethodRequest) GetCardAddressLine2() string { + if o == nil || IsNil(o.CardAddressLine2) { + var ret string + return ret + } + return *o.CardAddressLine2 +} + +// GetCardAddressLine2Ok returns a tuple with the CardAddressLine2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardAddressLine2Ok() (*string, bool) { + if o == nil || IsNil(o.CardAddressLine2) { + return nil, false + } + return o.CardAddressLine2, true +} + +// HasCardAddressLine2 returns a boolean if a field has been set. +func (o *PaymentMethodRequest) HasCardAddressLine2() bool { + if o != nil && !IsNil(o.CardAddressLine2) { + return true + } + + return false +} + +// SetCardAddressLine2 gets a reference to the given string and assigns it to the CardAddressLine2 field. +func (o *PaymentMethodRequest) SetCardAddressLine2(v string) { + o.CardAddressLine2 = &v +} + +// GetStripeToken returns the StripeToken field value +func (o *PaymentMethodRequest) GetStripeToken() string { + if o == nil { + var ret string + return ret + } + + return o.StripeToken +} + +// GetStripeTokenOk returns a tuple with the StripeToken field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetStripeTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.StripeToken, true +} + +// SetStripeToken sets field value +func (o *PaymentMethodRequest) SetStripeToken(v string) { + o.StripeToken = v +} + +// GetCardId returns the CardId field value +func (o *PaymentMethodRequest) GetCardId() string { + if o == nil { + var ret string + return ret + } + + return o.CardId +} + +// GetCardIdOk returns a tuple with the CardId field value +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetCardIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CardId, true +} + +// SetCardId sets field value +func (o *PaymentMethodRequest) SetCardId(v string) { + o.CardId = v +} + +// GetIsDefault returns the IsDefault field value if set, zero value otherwise. +func (o *PaymentMethodRequest) GetIsDefault() bool { + if o == nil || IsNil(o.IsDefault) { + var ret bool + return ret + } + return *o.IsDefault +} + +// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PaymentMethodRequest) GetIsDefaultOk() (*bool, bool) { + if o == nil || IsNil(o.IsDefault) { + return nil, false + } + return o.IsDefault, true +} + +// HasIsDefault returns a boolean if a field has been set. +func (o *PaymentMethodRequest) HasIsDefault() bool { + if o != nil && !IsNil(o.IsDefault) { + return true + } + + return false +} + +// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field. +func (o *PaymentMethodRequest) SetIsDefault(v bool) { + o.IsDefault = &v +} + +func (o PaymentMethodRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PaymentMethodRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["card_holder"] = o.CardHolder + toSerialize["card_brand"] = o.CardBrand + toSerialize["card_expiration_month"] = o.CardExpirationMonth + toSerialize["card_expiration_year"] = o.CardExpirationYear + toSerialize["card_last_4_digits"] = o.CardLast4Digits + toSerialize["card_address_zip"] = o.CardAddressZip + toSerialize["card_country"] = o.CardCountry + if !IsNil(o.CardAddressLine1) { + toSerialize["card_address_line1"] = o.CardAddressLine1 + } + if !IsNil(o.CardAddressLine2) { + toSerialize["card_address_line2"] = o.CardAddressLine2 + } + toSerialize["stripe_token"] = o.StripeToken + toSerialize["card_id"] = o.CardId + if !IsNil(o.IsDefault) { + toSerialize["is_default"] = o.IsDefault + } + return toSerialize, nil +} + +func (o *PaymentMethodRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "card_holder", + "card_brand", + "card_expiration_month", + "card_expiration_year", + "card_last_4_digits", + "card_address_zip", + "card_country", + "stripe_token", + "card_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodRequest := _PaymentMethodRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPaymentMethodRequest) + + if err != nil { + return err + } + + *o = PaymentMethodRequest(varPaymentMethodRequest) + + return err +} + +type NullablePaymentMethodRequest struct { + value *PaymentMethodRequest + isSet bool +} + +func (v NullablePaymentMethodRequest) Get() *PaymentMethodRequest { + return v.value +} + +func (v *NullablePaymentMethodRequest) Set(val *PaymentMethodRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePaymentMethodRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePaymentMethodRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePaymentMethodRequest(val *PaymentMethodRequest) *NullablePaymentMethodRequest { + return &NullablePaymentMethodRequest{value: val, isSet: true} +} + +func (v NullablePaymentMethodRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePaymentMethodRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_platform.go b/azion-api/model_platform.go new file mode 100644 index 0000000..1c58967 --- /dev/null +++ b/azion-api/model_platform.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Platform type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Platform{} + +// Platform struct for Platform +type Platform struct { + Id string `json:"id"` + Name string `json:"name"` + InstallationUrl string `json:"installation_url"` + CallbackUrl string `json:"callback_url"` +} + +type _Platform Platform + +// NewPlatform instantiates a new Platform object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPlatform(id string, name string, installationUrl string, callbackUrl string) *Platform { + this := Platform{} + this.Id = id + this.Name = name + this.InstallationUrl = installationUrl + this.CallbackUrl = callbackUrl + return &this +} + +// NewPlatformWithDefaults instantiates a new Platform object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPlatformWithDefaults() *Platform { + this := Platform{} + return &this +} + +// GetId returns the Id field value +func (o *Platform) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Platform) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Platform) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Platform) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Platform) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Platform) SetName(v string) { + o.Name = v +} + +// GetInstallationUrl returns the InstallationUrl field value +func (o *Platform) GetInstallationUrl() string { + if o == nil { + var ret string + return ret + } + + return o.InstallationUrl +} + +// GetInstallationUrlOk returns a tuple with the InstallationUrl field value +// and a boolean to check if the value has been set. +func (o *Platform) GetInstallationUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstallationUrl, true +} + +// SetInstallationUrl sets field value +func (o *Platform) SetInstallationUrl(v string) { + o.InstallationUrl = v +} + +// GetCallbackUrl returns the CallbackUrl field value +func (o *Platform) GetCallbackUrl() string { + if o == nil { + var ret string + return ret + } + + return o.CallbackUrl +} + +// GetCallbackUrlOk returns a tuple with the CallbackUrl field value +// and a boolean to check if the value has been set. +func (o *Platform) GetCallbackUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CallbackUrl, true +} + +// SetCallbackUrl sets field value +func (o *Platform) SetCallbackUrl(v string) { + o.CallbackUrl = v +} + +func (o Platform) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Platform) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["installation_url"] = o.InstallationUrl + toSerialize["callback_url"] = o.CallbackUrl + return toSerialize, nil +} + +func (o *Platform) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "installation_url", + "callback_url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPlatform := _Platform{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPlatform) + + if err != nil { + return err + } + + *o = Platform(varPlatform) + + return err +} + +type NullablePlatform struct { + value *Platform + isSet bool +} + +func (v NullablePlatform) Get() *Platform { + return v.value +} + +func (v *NullablePlatform) Set(val *Platform) { + v.value = val + v.isSet = true +} + +func (v NullablePlatform) IsSet() bool { + return v.isSet +} + +func (v *NullablePlatform) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePlatform(val *Platform) *NullablePlatform { + return &NullablePlatform{value: val, isSet: true} +} + +func (v NullablePlatform) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePlatform) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy.go b/azion-api/model_policy.go new file mode 100644 index 0000000..0d85296 --- /dev/null +++ b/azion-api/model_policy.go @@ -0,0 +1,300 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Policy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Policy{} + +// Policy struct for Policy +type Policy struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active bool `json:"active"` + Rules []PolicyRule `json:"rules"` +} + +type _Policy Policy + +// NewPolicy instantiates a new Policy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicy(id int64, name string, lastEditor string, lastModified time.Time, active bool, rules []PolicyRule) *Policy { + this := Policy{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.Active = active + this.Rules = rules + return &this +} + +// NewPolicyWithDefaults instantiates a new Policy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyWithDefaults() *Policy { + this := Policy{} + return &this +} + +// GetId returns the Id field value +func (o *Policy) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Policy) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Policy) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Policy) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Policy) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Policy) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Policy) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Policy) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Policy) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Policy) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Policy) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Policy) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value +func (o *Policy) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Policy) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Policy) SetActive(v bool) { + o.Active = v +} + +// GetRules returns the Rules field value +func (o *Policy) GetRules() []PolicyRule { + if o == nil { + var ret []PolicyRule + return ret + } + + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value +// and a boolean to check if the value has been set. +func (o *Policy) GetRulesOk() ([]PolicyRule, bool) { + if o == nil { + return nil, false + } + return o.Rules, true +} + +// SetRules sets field value +func (o *Policy) SetRules(v []PolicyRule) { + o.Rules = v +} + +func (o Policy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Policy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["active"] = o.Active + toSerialize["rules"] = o.Rules + return toSerialize, nil +} + +func (o *Policy) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "active", + "rules", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicy := _Policy{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicy) + + if err != nil { + return err + } + + *o = Policy(varPolicy) + + return err +} + +type NullablePolicy struct { + value *Policy + isSet bool +} + +func (v NullablePolicy) Get() *Policy { + return v.value +} + +func (v *NullablePolicy) Set(val *Policy) { + v.value = val + v.isSet = true +} + +func (v NullablePolicy) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicy(val *Policy) *NullablePolicy { + return &NullablePolicy{value: val, isSet: true} +} + +func (v NullablePolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy_request.go b/azion-api/model_policy_request.go new file mode 100644 index 0000000..fdb6e5c --- /dev/null +++ b/azion-api/model_policy_request.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyRequest{} + +// PolicyRequest struct for PolicyRequest +type PolicyRequest struct { + Name string `json:"name"` + Active bool `json:"active"` + Rules []PolicyRuleRequest `json:"rules"` +} + +type _PolicyRequest PolicyRequest + +// NewPolicyRequest instantiates a new PolicyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicyRequest(name string, active bool, rules []PolicyRuleRequest) *PolicyRequest { + this := PolicyRequest{} + this.Name = name + this.Active = active + this.Rules = rules + return &this +} + +// NewPolicyRequestWithDefaults instantiates a new PolicyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyRequestWithDefaults() *PolicyRequest { + this := PolicyRequest{} + return &this +} + +// GetName returns the Name field value +func (o *PolicyRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PolicyRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PolicyRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *PolicyRequest) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *PolicyRequest) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *PolicyRequest) SetActive(v bool) { + o.Active = v +} + +// GetRules returns the Rules field value +func (o *PolicyRequest) GetRules() []PolicyRuleRequest { + if o == nil { + var ret []PolicyRuleRequest + return ret + } + + return o.Rules +} + +// GetRulesOk returns a tuple with the Rules field value +// and a boolean to check if the value has been set. +func (o *PolicyRequest) GetRulesOk() ([]PolicyRuleRequest, bool) { + if o == nil { + return nil, false + } + return o.Rules, true +} + +// SetRules sets field value +func (o *PolicyRequest) SetRules(v []PolicyRuleRequest) { + o.Rules = v +} + +func (o PolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + toSerialize["rules"] = o.Rules + return toSerialize, nil +} + +func (o *PolicyRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "active", + "rules", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicyRequest := _PolicyRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicyRequest) + + if err != nil { + return err + } + + *o = PolicyRequest(varPolicyRequest) + + return err +} + +type NullablePolicyRequest struct { + value *PolicyRequest + isSet bool +} + +func (v NullablePolicyRequest) Get() *PolicyRequest { + return v.value +} + +func (v *NullablePolicyRequest) Set(val *PolicyRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyRequest(val *PolicyRequest) *NullablePolicyRequest { + return &NullablePolicyRequest{value: val, isSet: true} +} + +func (v NullablePolicyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy_response.go b/azion-api/model_policy_response.go new file mode 100644 index 0000000..5547a5b --- /dev/null +++ b/azion-api/model_policy_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyResponse{} + +// PolicyResponse struct for PolicyResponse +type PolicyResponse struct { + State *string `json:"state,omitempty"` + Data Policy `json:"data"` +} + +type _PolicyResponse PolicyResponse + +// NewPolicyResponse instantiates a new PolicyResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicyResponse(data Policy) *PolicyResponse { + this := PolicyResponse{} + this.Data = data + return &this +} + +// NewPolicyResponseWithDefaults instantiates a new PolicyResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyResponseWithDefaults() *PolicyResponse { + this := PolicyResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *PolicyResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PolicyResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *PolicyResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *PolicyResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *PolicyResponse) GetData() Policy { + if o == nil { + var ret Policy + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *PolicyResponse) GetDataOk() (*Policy, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *PolicyResponse) SetData(v Policy) { + o.Data = v +} + +func (o PolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *PolicyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicyResponse := _PolicyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicyResponse) + + if err != nil { + return err + } + + *o = PolicyResponse(varPolicyResponse) + + return err +} + +type NullablePolicyResponse struct { + value *PolicyResponse + isSet bool +} + +func (v NullablePolicyResponse) Get() *PolicyResponse { + return v.value +} + +func (v *NullablePolicyResponse) Set(val *PolicyResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyResponse(val *PolicyResponse) *NullablePolicyResponse { + return &NullablePolicyResponse{value: val, isSet: true} +} + +func (v NullablePolicyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy_rule.go b/azion-api/model_policy_rule.go new file mode 100644 index 0000000..277b17e --- /dev/null +++ b/azion-api/model_policy_rule.go @@ -0,0 +1,273 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PolicyRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyRule{} + +// PolicyRule struct for PolicyRule +type PolicyRule struct { + Name string `json:"name"` + // * `allow` - allow * `deny` - deny + Effect string `json:"effect"` + // Resource pattern (regex supported) + Resource string `json:"resource"` + Actions []string `json:"actions"` + Condition PolicyRuleCondition `json:"condition"` +} + +type _PolicyRule PolicyRule + +// NewPolicyRule instantiates a new PolicyRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicyRule(name string, effect string, resource string, actions []string, condition PolicyRuleCondition) *PolicyRule { + this := PolicyRule{} + this.Name = name + this.Effect = effect + this.Resource = resource + this.Actions = actions + this.Condition = condition + return &this +} + +// NewPolicyRuleWithDefaults instantiates a new PolicyRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyRuleWithDefaults() *PolicyRule { + this := PolicyRule{} + return &this +} + +// GetName returns the Name field value +func (o *PolicyRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PolicyRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PolicyRule) SetName(v string) { + o.Name = v +} + +// GetEffect returns the Effect field value +func (o *PolicyRule) GetEffect() string { + if o == nil { + var ret string + return ret + } + + return o.Effect +} + +// GetEffectOk returns a tuple with the Effect field value +// and a boolean to check if the value has been set. +func (o *PolicyRule) GetEffectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Effect, true +} + +// SetEffect sets field value +func (o *PolicyRule) SetEffect(v string) { + o.Effect = v +} + +// GetResource returns the Resource field value +func (o *PolicyRule) GetResource() string { + if o == nil { + var ret string + return ret + } + + return o.Resource +} + +// GetResourceOk returns a tuple with the Resource field value +// and a boolean to check if the value has been set. +func (o *PolicyRule) GetResourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Resource, true +} + +// SetResource sets field value +func (o *PolicyRule) SetResource(v string) { + o.Resource = v +} + +// GetActions returns the Actions field value +func (o *PolicyRule) GetActions() []string { + if o == nil { + var ret []string + return ret + } + + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value +// and a boolean to check if the value has been set. +func (o *PolicyRule) GetActionsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Actions, true +} + +// SetActions sets field value +func (o *PolicyRule) SetActions(v []string) { + o.Actions = v +} + +// GetCondition returns the Condition field value +func (o *PolicyRule) GetCondition() PolicyRuleCondition { + if o == nil { + var ret PolicyRuleCondition + return ret + } + + return o.Condition +} + +// GetConditionOk returns a tuple with the Condition field value +// and a boolean to check if the value has been set. +func (o *PolicyRule) GetConditionOk() (*PolicyRuleCondition, bool) { + if o == nil { + return nil, false + } + return &o.Condition, true +} + +// SetCondition sets field value +func (o *PolicyRule) SetCondition(v PolicyRuleCondition) { + o.Condition = v +} + +func (o PolicyRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["effect"] = o.Effect + toSerialize["resource"] = o.Resource + toSerialize["actions"] = o.Actions + toSerialize["condition"] = o.Condition + return toSerialize, nil +} + +func (o *PolicyRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "effect", + "resource", + "actions", + "condition", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicyRule := _PolicyRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicyRule) + + if err != nil { + return err + } + + *o = PolicyRule(varPolicyRule) + + return err +} + +type NullablePolicyRule struct { + value *PolicyRule + isSet bool +} + +func (v NullablePolicyRule) Get() *PolicyRule { + return v.value +} + +func (v *NullablePolicyRule) Set(val *PolicyRule) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyRule) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyRule(val *PolicyRule) *NullablePolicyRule { + return &NullablePolicyRule{value: val, isSet: true} +} + +func (v NullablePolicyRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy_rule_condition.go b/azion-api/model_policy_rule_condition.go new file mode 100644 index 0000000..5c99f04 --- /dev/null +++ b/azion-api/model_policy_rule_condition.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PolicyRuleCondition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyRuleCondition{} + +// PolicyRuleCondition struct for PolicyRuleCondition +type PolicyRuleCondition struct { + IpAddress []string `json:"ip_address"` +} + +type _PolicyRuleCondition PolicyRuleCondition + +// NewPolicyRuleCondition instantiates a new PolicyRuleCondition object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicyRuleCondition(ipAddress []string) *PolicyRuleCondition { + this := PolicyRuleCondition{} + this.IpAddress = ipAddress + return &this +} + +// NewPolicyRuleConditionWithDefaults instantiates a new PolicyRuleCondition object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyRuleConditionWithDefaults() *PolicyRuleCondition { + this := PolicyRuleCondition{} + return &this +} + +// GetIpAddress returns the IpAddress field value +func (o *PolicyRuleCondition) GetIpAddress() []string { + if o == nil { + var ret []string + return ret + } + + return o.IpAddress +} + +// GetIpAddressOk returns a tuple with the IpAddress field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleCondition) GetIpAddressOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.IpAddress, true +} + +// SetIpAddress sets field value +func (o *PolicyRuleCondition) SetIpAddress(v []string) { + o.IpAddress = v +} + +func (o PolicyRuleCondition) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyRuleCondition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ip_address"] = o.IpAddress + return toSerialize, nil +} + +func (o *PolicyRuleCondition) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ip_address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicyRuleCondition := _PolicyRuleCondition{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicyRuleCondition) + + if err != nil { + return err + } + + *o = PolicyRuleCondition(varPolicyRuleCondition) + + return err +} + +type NullablePolicyRuleCondition struct { + value *PolicyRuleCondition + isSet bool +} + +func (v NullablePolicyRuleCondition) Get() *PolicyRuleCondition { + return v.value +} + +func (v *NullablePolicyRuleCondition) Set(val *PolicyRuleCondition) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyRuleCondition) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyRuleCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyRuleCondition(val *PolicyRuleCondition) *NullablePolicyRuleCondition { + return &NullablePolicyRuleCondition{value: val, isSet: true} +} + +func (v NullablePolicyRuleCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyRuleCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy_rule_condition_request.go b/azion-api/model_policy_rule_condition_request.go new file mode 100644 index 0000000..a4df516 --- /dev/null +++ b/azion-api/model_policy_rule_condition_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PolicyRuleConditionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyRuleConditionRequest{} + +// PolicyRuleConditionRequest struct for PolicyRuleConditionRequest +type PolicyRuleConditionRequest struct { + IpAddress []string `json:"ip_address"` +} + +type _PolicyRuleConditionRequest PolicyRuleConditionRequest + +// NewPolicyRuleConditionRequest instantiates a new PolicyRuleConditionRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicyRuleConditionRequest(ipAddress []string) *PolicyRuleConditionRequest { + this := PolicyRuleConditionRequest{} + this.IpAddress = ipAddress + return &this +} + +// NewPolicyRuleConditionRequestWithDefaults instantiates a new PolicyRuleConditionRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyRuleConditionRequestWithDefaults() *PolicyRuleConditionRequest { + this := PolicyRuleConditionRequest{} + return &this +} + +// GetIpAddress returns the IpAddress field value +func (o *PolicyRuleConditionRequest) GetIpAddress() []string { + if o == nil { + var ret []string + return ret + } + + return o.IpAddress +} + +// GetIpAddressOk returns a tuple with the IpAddress field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleConditionRequest) GetIpAddressOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.IpAddress, true +} + +// SetIpAddress sets field value +func (o *PolicyRuleConditionRequest) SetIpAddress(v []string) { + o.IpAddress = v +} + +func (o PolicyRuleConditionRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyRuleConditionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["ip_address"] = o.IpAddress + return toSerialize, nil +} + +func (o *PolicyRuleConditionRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "ip_address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicyRuleConditionRequest := _PolicyRuleConditionRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicyRuleConditionRequest) + + if err != nil { + return err + } + + *o = PolicyRuleConditionRequest(varPolicyRuleConditionRequest) + + return err +} + +type NullablePolicyRuleConditionRequest struct { + value *PolicyRuleConditionRequest + isSet bool +} + +func (v NullablePolicyRuleConditionRequest) Get() *PolicyRuleConditionRequest { + return v.value +} + +func (v *NullablePolicyRuleConditionRequest) Set(val *PolicyRuleConditionRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyRuleConditionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyRuleConditionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyRuleConditionRequest(val *PolicyRuleConditionRequest) *NullablePolicyRuleConditionRequest { + return &NullablePolicyRuleConditionRequest{value: val, isSet: true} +} + +func (v NullablePolicyRuleConditionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyRuleConditionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_policy_rule_request.go b/azion-api/model_policy_rule_request.go new file mode 100644 index 0000000..05e9a87 --- /dev/null +++ b/azion-api/model_policy_rule_request.go @@ -0,0 +1,273 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PolicyRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PolicyRuleRequest{} + +// PolicyRuleRequest struct for PolicyRuleRequest +type PolicyRuleRequest struct { + Name string `json:"name"` + // * `allow` - allow * `deny` - deny + Effect string `json:"effect"` + // Resource pattern (regex supported) + Resource string `json:"resource"` + Actions []string `json:"actions"` + Condition PolicyRuleConditionRequest `json:"condition"` +} + +type _PolicyRuleRequest PolicyRuleRequest + +// NewPolicyRuleRequest instantiates a new PolicyRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPolicyRuleRequest(name string, effect string, resource string, actions []string, condition PolicyRuleConditionRequest) *PolicyRuleRequest { + this := PolicyRuleRequest{} + this.Name = name + this.Effect = effect + this.Resource = resource + this.Actions = actions + this.Condition = condition + return &this +} + +// NewPolicyRuleRequestWithDefaults instantiates a new PolicyRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPolicyRuleRequestWithDefaults() *PolicyRuleRequest { + this := PolicyRuleRequest{} + return &this +} + +// GetName returns the Name field value +func (o *PolicyRuleRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *PolicyRuleRequest) SetName(v string) { + o.Name = v +} + +// GetEffect returns the Effect field value +func (o *PolicyRuleRequest) GetEffect() string { + if o == nil { + var ret string + return ret + } + + return o.Effect +} + +// GetEffectOk returns a tuple with the Effect field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleRequest) GetEffectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Effect, true +} + +// SetEffect sets field value +func (o *PolicyRuleRequest) SetEffect(v string) { + o.Effect = v +} + +// GetResource returns the Resource field value +func (o *PolicyRuleRequest) GetResource() string { + if o == nil { + var ret string + return ret + } + + return o.Resource +} + +// GetResourceOk returns a tuple with the Resource field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleRequest) GetResourceOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Resource, true +} + +// SetResource sets field value +func (o *PolicyRuleRequest) SetResource(v string) { + o.Resource = v +} + +// GetActions returns the Actions field value +func (o *PolicyRuleRequest) GetActions() []string { + if o == nil { + var ret []string + return ret + } + + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleRequest) GetActionsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Actions, true +} + +// SetActions sets field value +func (o *PolicyRuleRequest) SetActions(v []string) { + o.Actions = v +} + +// GetCondition returns the Condition field value +func (o *PolicyRuleRequest) GetCondition() PolicyRuleConditionRequest { + if o == nil { + var ret PolicyRuleConditionRequest + return ret + } + + return o.Condition +} + +// GetConditionOk returns a tuple with the Condition field value +// and a boolean to check if the value has been set. +func (o *PolicyRuleRequest) GetConditionOk() (*PolicyRuleConditionRequest, bool) { + if o == nil { + return nil, false + } + return &o.Condition, true +} + +// SetCondition sets field value +func (o *PolicyRuleRequest) SetCondition(v PolicyRuleConditionRequest) { + o.Condition = v +} + +func (o PolicyRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PolicyRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["effect"] = o.Effect + toSerialize["resource"] = o.Resource + toSerialize["actions"] = o.Actions + toSerialize["condition"] = o.Condition + return toSerialize, nil +} + +func (o *PolicyRuleRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "effect", + "resource", + "actions", + "condition", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPolicyRuleRequest := _PolicyRuleRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPolicyRuleRequest) + + if err != nil { + return err + } + + *o = PolicyRuleRequest(varPolicyRuleRequest) + + return err +} + +type NullablePolicyRuleRequest struct { + value *PolicyRuleRequest + isSet bool +} + +func (v NullablePolicyRuleRequest) Get() *PolicyRuleRequest { + return v.value +} + +func (v *NullablePolicyRuleRequest) Set(val *PolicyRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePolicyRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePolicyRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePolicyRuleRequest(val *PolicyRuleRequest) *NullablePolicyRuleRequest { + return &NullablePolicyRuleRequest{value: val, isSet: true} +} + +func (v NullablePolicyRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePolicyRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_protocols.go b/azion-api/model_protocols.go new file mode 100644 index 0000000..8ec4cd4 --- /dev/null +++ b/azion-api/model_protocols.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the Protocols type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Protocols{} + +// Protocols struct for Protocols +type Protocols struct { + Http *HttpProtocol `json:"http,omitempty"` +} + +// NewProtocols instantiates a new Protocols object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProtocols() *Protocols { + this := Protocols{} + return &this +} + +// NewProtocolsWithDefaults instantiates a new Protocols object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProtocolsWithDefaults() *Protocols { + this := Protocols{} + return &this +} + +// GetHttp returns the Http field value if set, zero value otherwise. +func (o *Protocols) GetHttp() HttpProtocol { + if o == nil || IsNil(o.Http) { + var ret HttpProtocol + return ret + } + return *o.Http +} + +// GetHttpOk returns a tuple with the Http field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Protocols) GetHttpOk() (*HttpProtocol, bool) { + if o == nil || IsNil(o.Http) { + return nil, false + } + return o.Http, true +} + +// HasHttp returns a boolean if a field has been set. +func (o *Protocols) HasHttp() bool { + if o != nil && !IsNil(o.Http) { + return true + } + + return false +} + +// SetHttp gets a reference to the given HttpProtocol and assigns it to the Http field. +func (o *Protocols) SetHttp(v HttpProtocol) { + o.Http = &v +} + +func (o Protocols) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Protocols) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Http) { + toSerialize["http"] = o.Http + } + return toSerialize, nil +} + +type NullableProtocols struct { + value *Protocols + isSet bool +} + +func (v NullableProtocols) Get() *Protocols { + return v.value +} + +func (v *NullableProtocols) Set(val *Protocols) { + v.value = val + v.isSet = true +} + +func (v NullableProtocols) IsSet() bool { + return v.isSet +} + +func (v *NullableProtocols) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProtocols(val *Protocols) *NullableProtocols { + return &NullableProtocols{value: val, isSet: true} +} + +func (v NullableProtocols) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProtocols) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_protocols_request.go b/azion-api/model_protocols_request.go new file mode 100644 index 0000000..4ad1b48 --- /dev/null +++ b/azion-api/model_protocols_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ProtocolsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ProtocolsRequest{} + +// ProtocolsRequest struct for ProtocolsRequest +type ProtocolsRequest struct { + Http *HttpProtocolRequest `json:"http,omitempty"` +} + +// NewProtocolsRequest instantiates a new ProtocolsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewProtocolsRequest() *ProtocolsRequest { + this := ProtocolsRequest{} + return &this +} + +// NewProtocolsRequestWithDefaults instantiates a new ProtocolsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewProtocolsRequestWithDefaults() *ProtocolsRequest { + this := ProtocolsRequest{} + return &this +} + +// GetHttp returns the Http field value if set, zero value otherwise. +func (o *ProtocolsRequest) GetHttp() HttpProtocolRequest { + if o == nil || IsNil(o.Http) { + var ret HttpProtocolRequest + return ret + } + return *o.Http +} + +// GetHttpOk returns a tuple with the Http field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProtocolsRequest) GetHttpOk() (*HttpProtocolRequest, bool) { + if o == nil || IsNil(o.Http) { + return nil, false + } + return o.Http, true +} + +// HasHttp returns a boolean if a field has been set. +func (o *ProtocolsRequest) HasHttp() bool { + if o != nil && !IsNil(o.Http) { + return true + } + + return false +} + +// SetHttp gets a reference to the given HttpProtocolRequest and assigns it to the Http field. +func (o *ProtocolsRequest) SetHttp(v HttpProtocolRequest) { + o.Http = &v +} + +func (o ProtocolsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ProtocolsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Http) { + toSerialize["http"] = o.Http + } + return toSerialize, nil +} + +type NullableProtocolsRequest struct { + value *ProtocolsRequest + isSet bool +} + +func (v NullableProtocolsRequest) Get() *ProtocolsRequest { + return v.value +} + +func (v *NullableProtocolsRequest) Set(val *ProtocolsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableProtocolsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableProtocolsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableProtocolsRequest(val *ProtocolsRequest) *NullableProtocolsRequest { + return &NullableProtocolsRequest{value: val, isSet: true} +} + +func (v NullableProtocolsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableProtocolsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_publisher.go b/azion-api/model_publisher.go new file mode 100644 index 0000000..c7e1181 --- /dev/null +++ b/azion-api/model_publisher.go @@ -0,0 +1,328 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Publisher type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Publisher{} + +// Publisher Serializer for Publisher model in the public API. Handles validation and serialization of Publisher instances for publishers to manage their own information. +type Publisher struct { + Id int64 `json:"id"` + Icon string `json:"icon"` + OrganizationId int64 `json:"organization_id"` + Created time.Time `json:"created"` + LastModified time.Time `json:"last_modified"` + LastEditor string `json:"last_editor"` + Vendor bool `json:"vendor"` +} + +type _Publisher Publisher + +// NewPublisher instantiates a new Publisher object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPublisher(id int64, icon string, organizationId int64, created time.Time, lastModified time.Time, lastEditor string, vendor bool) *Publisher { + this := Publisher{} + this.Id = id + this.Icon = icon + this.OrganizationId = organizationId + this.Created = created + this.LastModified = lastModified + this.LastEditor = lastEditor + this.Vendor = vendor + return &this +} + +// NewPublisherWithDefaults instantiates a new Publisher object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPublisherWithDefaults() *Publisher { + this := Publisher{} + return &this +} + +// GetId returns the Id field value +func (o *Publisher) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Publisher) SetId(v int64) { + o.Id = v +} + +// GetIcon returns the Icon field value +func (o *Publisher) GetIcon() string { + if o == nil { + var ret string + return ret + } + + return o.Icon +} + +// GetIconOk returns a tuple with the Icon field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetIconOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Icon, true +} + +// SetIcon sets field value +func (o *Publisher) SetIcon(v string) { + o.Icon = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *Publisher) GetOrganizationId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetOrganizationIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *Publisher) SetOrganizationId(v int64) { + o.OrganizationId = v +} + +// GetCreated returns the Created field value +func (o *Publisher) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Publisher) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastModified returns the LastModified field value +func (o *Publisher) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Publisher) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Publisher) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Publisher) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetVendor returns the Vendor field value +func (o *Publisher) GetVendor() bool { + if o == nil { + var ret bool + return ret + } + + return o.Vendor +} + +// GetVendorOk returns a tuple with the Vendor field value +// and a boolean to check if the value has been set. +func (o *Publisher) GetVendorOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Vendor, true +} + +// SetVendor sets field value +func (o *Publisher) SetVendor(v bool) { + o.Vendor = v +} + +func (o Publisher) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Publisher) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["icon"] = o.Icon + toSerialize["organization_id"] = o.OrganizationId + toSerialize["created"] = o.Created + toSerialize["last_modified"] = o.LastModified + toSerialize["last_editor"] = o.LastEditor + toSerialize["vendor"] = o.Vendor + return toSerialize, nil +} + +func (o *Publisher) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "icon", + "organization_id", + "created", + "last_modified", + "last_editor", + "vendor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPublisher := _Publisher{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPublisher) + + if err != nil { + return err + } + + *o = Publisher(varPublisher) + + return err +} + +type NullablePublisher struct { + value *Publisher + isSet bool +} + +func (v NullablePublisher) Get() *Publisher { + return v.value +} + +func (v *NullablePublisher) Set(val *Publisher) { + v.value = val + v.isSet = true +} + +func (v NullablePublisher) IsSet() bool { + return v.isSet +} + +func (v *NullablePublisher) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublisher(val *Publisher) *NullablePublisher { + return &NullablePublisher{value: val, isSet: true} +} + +func (v NullablePublisher) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublisher) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_publisher_request.go b/azion-api/model_publisher_request.go new file mode 100644 index 0000000..e6a0543 --- /dev/null +++ b/azion-api/model_publisher_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PublisherRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PublisherRequest{} + +// PublisherRequest Serializer for Publisher model in the public API. Handles validation and serialization of Publisher instances for publishers to manage their own information. +type PublisherRequest struct { + Icon string `json:"icon"` +} + +type _PublisherRequest PublisherRequest + +// NewPublisherRequest instantiates a new PublisherRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPublisherRequest(icon string) *PublisherRequest { + this := PublisherRequest{} + this.Icon = icon + return &this +} + +// NewPublisherRequestWithDefaults instantiates a new PublisherRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPublisherRequestWithDefaults() *PublisherRequest { + this := PublisherRequest{} + return &this +} + +// GetIcon returns the Icon field value +func (o *PublisherRequest) GetIcon() string { + if o == nil { + var ret string + return ret + } + + return o.Icon +} + +// GetIconOk returns a tuple with the Icon field value +// and a boolean to check if the value has been set. +func (o *PublisherRequest) GetIconOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Icon, true +} + +// SetIcon sets field value +func (o *PublisherRequest) SetIcon(v string) { + o.Icon = v +} + +func (o PublisherRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PublisherRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["icon"] = o.Icon + return toSerialize, nil +} + +func (o *PublisherRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "icon", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPublisherRequest := _PublisherRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPublisherRequest) + + if err != nil { + return err + } + + *o = PublisherRequest(varPublisherRequest) + + return err +} + +type NullablePublisherRequest struct { + value *PublisherRequest + isSet bool +} + +func (v NullablePublisherRequest) Get() *PublisherRequest { + return v.value +} + +func (v *NullablePublisherRequest) Set(val *PublisherRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePublisherRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePublisherRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePublisherRequest(val *PublisherRequest) *NullablePublisherRequest { + return &NullablePublisherRequest{value: val, isSet: true} +} + +func (v NullablePublisherRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePublisherRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_purge.go b/azion-api/model_purge.go new file mode 100644 index 0000000..e3dbeee --- /dev/null +++ b/azion-api/model_purge.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Purge type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Purge{} + +// Purge Serialize the incoming purge request. +type Purge struct { + Items []string `json:"items"` + // * `cache` - Cache * `tiered_cache` - Tiered Cache + Layer *string `json:"layer,omitempty"` +} + +type _Purge Purge + +// NewPurge instantiates a new Purge object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPurge(items []string) *Purge { + this := Purge{} + this.Items = items + return &this +} + +// NewPurgeWithDefaults instantiates a new Purge object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPurgeWithDefaults() *Purge { + this := Purge{} + return &this +} + +// GetItems returns the Items field value +func (o *Purge) GetItems() []string { + if o == nil { + var ret []string + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *Purge) GetItemsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *Purge) SetItems(v []string) { + o.Items = v +} + +// GetLayer returns the Layer field value if set, zero value otherwise. +func (o *Purge) GetLayer() string { + if o == nil || IsNil(o.Layer) { + var ret string + return ret + } + return *o.Layer +} + +// GetLayerOk returns a tuple with the Layer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Purge) GetLayerOk() (*string, bool) { + if o == nil || IsNil(o.Layer) { + return nil, false + } + return o.Layer, true +} + +// HasLayer returns a boolean if a field has been set. +func (o *Purge) HasLayer() bool { + if o != nil && !IsNil(o.Layer) { + return true + } + + return false +} + +// SetLayer gets a reference to the given string and assigns it to the Layer field. +func (o *Purge) SetLayer(v string) { + o.Layer = &v +} + +func (o Purge) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Purge) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + if !IsNil(o.Layer) { + toSerialize["layer"] = o.Layer + } + return toSerialize, nil +} + +func (o *Purge) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPurge := _Purge{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPurge) + + if err != nil { + return err + } + + *o = Purge(varPurge) + + return err +} + +type NullablePurge struct { + value *Purge + isSet bool +} + +func (v NullablePurge) Get() *Purge { + return v.value +} + +func (v *NullablePurge) Set(val *Purge) { + v.value = val + v.isSet = true +} + +func (v NullablePurge) IsSet() bool { + return v.isSet +} + +func (v *NullablePurge) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePurge(val *Purge) *NullablePurge { + return &NullablePurge{value: val, isSet: true} +} + +func (v NullablePurge) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePurge) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_purge_request.go b/azion-api/model_purge_request.go new file mode 100644 index 0000000..75b872e --- /dev/null +++ b/azion-api/model_purge_request.go @@ -0,0 +1,196 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PurgeRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PurgeRequest{} + +// PurgeRequest Serialize the incoming purge request. +type PurgeRequest struct { + Items []string `json:"items"` + // * `cache` - Cache * `tiered_cache` - Tiered Cache + Layer *string `json:"layer,omitempty"` +} + +type _PurgeRequest PurgeRequest + +// NewPurgeRequest instantiates a new PurgeRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPurgeRequest(items []string) *PurgeRequest { + this := PurgeRequest{} + this.Items = items + return &this +} + +// NewPurgeRequestWithDefaults instantiates a new PurgeRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPurgeRequestWithDefaults() *PurgeRequest { + this := PurgeRequest{} + return &this +} + +// GetItems returns the Items field value +func (o *PurgeRequest) GetItems() []string { + if o == nil { + var ret []string + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *PurgeRequest) GetItemsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *PurgeRequest) SetItems(v []string) { + o.Items = v +} + +// GetLayer returns the Layer field value if set, zero value otherwise. +func (o *PurgeRequest) GetLayer() string { + if o == nil || IsNil(o.Layer) { + var ret string + return ret + } + return *o.Layer +} + +// GetLayerOk returns a tuple with the Layer field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PurgeRequest) GetLayerOk() (*string, bool) { + if o == nil || IsNil(o.Layer) { + return nil, false + } + return o.Layer, true +} + +// HasLayer returns a boolean if a field has been set. +func (o *PurgeRequest) HasLayer() bool { + if o != nil && !IsNil(o.Layer) { + return true + } + + return false +} + +// SetLayer gets a reference to the given string and assigns it to the Layer field. +func (o *PurgeRequest) SetLayer(v string) { + o.Layer = &v +} + +func (o PurgeRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PurgeRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + if !IsNil(o.Layer) { + toSerialize["layer"] = o.Layer + } + return toSerialize, nil +} + +func (o *PurgeRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPurgeRequest := _PurgeRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPurgeRequest) + + if err != nil { + return err + } + + *o = PurgeRequest(varPurgeRequest) + + return err +} + +type NullablePurgeRequest struct { + value *PurgeRequest + isSet bool +} + +func (v NullablePurgeRequest) Get() *PurgeRequest { + return v.value +} + +func (v *NullablePurgeRequest) Set(val *PurgeRequest) { + v.value = val + v.isSet = true +} + +func (v NullablePurgeRequest) IsSet() bool { + return v.isSet +} + +func (v *NullablePurgeRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePurgeRequest(val *PurgeRequest) *NullablePurgeRequest { + return &NullablePurgeRequest{value: val, isSet: true} +} + +func (v NullablePurgeRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePurgeRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_purge_response.go b/azion-api/model_purge_response.go new file mode 100644 index 0000000..0f529ba --- /dev/null +++ b/azion-api/model_purge_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the PurgeResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PurgeResponse{} + +// PurgeResponse struct for PurgeResponse +type PurgeResponse struct { + State *string `json:"state,omitempty"` + Data Purge `json:"data"` +} + +type _PurgeResponse PurgeResponse + +// NewPurgeResponse instantiates a new PurgeResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewPurgeResponse(data Purge) *PurgeResponse { + this := PurgeResponse{} + this.Data = data + return &this +} + +// NewPurgeResponseWithDefaults instantiates a new PurgeResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewPurgeResponseWithDefaults() *PurgeResponse { + this := PurgeResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *PurgeResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PurgeResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *PurgeResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *PurgeResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *PurgeResponse) GetData() Purge { + if o == nil { + var ret Purge + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *PurgeResponse) GetDataOk() (*Purge, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *PurgeResponse) SetData(v Purge) { + o.Data = v +} + +func (o PurgeResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PurgeResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *PurgeResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPurgeResponse := _PurgeResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varPurgeResponse) + + if err != nil { + return err + } + + *o = PurgeResponse(varPurgeResponse) + + return err +} + +type NullablePurgeResponse struct { + value *PurgeResponse + isSet bool +} + +func (v NullablePurgeResponse) Get() *PurgeResponse { + return v.value +} + +func (v *NullablePurgeResponse) Set(val *PurgeResponse) { + v.value = val + v.isSet = true +} + +func (v NullablePurgeResponse) IsSet() bool { + return v.isSet +} + +func (v *NullablePurgeResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePurgeResponse(val *PurgeResponse) *NullablePurgeResponse { + return &NullablePurgeResponse{value: val, isSet: true} +} + +func (v NullablePurgeResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePurgeResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_q_radar_endpoint.go b/azion-api/model_q_radar_endpoint.go new file mode 100644 index 0000000..8c82e3b --- /dev/null +++ b/azion-api/model_q_radar_endpoint.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the QRadarEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QRadarEndpoint{} + +// QRadarEndpoint struct for QRadarEndpoint +type QRadarEndpoint struct { + Url string `json:"url"` + // Type identifier for this endpoint (qradar) + Type string `json:"type"` +} + +type _QRadarEndpoint QRadarEndpoint + +// NewQRadarEndpoint instantiates a new QRadarEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQRadarEndpoint(url string, type_ string) *QRadarEndpoint { + this := QRadarEndpoint{} + this.Url = url + this.Type = type_ + return &this +} + +// NewQRadarEndpointWithDefaults instantiates a new QRadarEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQRadarEndpointWithDefaults() *QRadarEndpoint { + this := QRadarEndpoint{} + return &this +} + +// GetUrl returns the Url field value +func (o *QRadarEndpoint) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *QRadarEndpoint) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *QRadarEndpoint) SetUrl(v string) { + o.Url = v +} + +// GetType returns the Type field value +func (o *QRadarEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *QRadarEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *QRadarEndpoint) SetType(v string) { + o.Type = v +} + +func (o QRadarEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QRadarEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *QRadarEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQRadarEndpoint := _QRadarEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQRadarEndpoint) + + if err != nil { + return err + } + + *o = QRadarEndpoint(varQRadarEndpoint) + + return err +} + +type NullableQRadarEndpoint struct { + value *QRadarEndpoint + isSet bool +} + +func (v NullableQRadarEndpoint) Get() *QRadarEndpoint { + return v.value +} + +func (v *NullableQRadarEndpoint) Set(val *QRadarEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableQRadarEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableQRadarEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQRadarEndpoint(val *QRadarEndpoint) *NullableQRadarEndpoint { + return &NullableQRadarEndpoint{value: val, isSet: true} +} + +func (v NullableQRadarEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQRadarEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_q_radar_endpoint_request.go b/azion-api/model_q_radar_endpoint_request.go new file mode 100644 index 0000000..aca37cb --- /dev/null +++ b/azion-api/model_q_radar_endpoint_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the QRadarEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &QRadarEndpointRequest{} + +// QRadarEndpointRequest struct for QRadarEndpointRequest +type QRadarEndpointRequest struct { + Url string `json:"url"` + // Type identifier for this endpoint (qradar) + Type string `json:"type"` +} + +type _QRadarEndpointRequest QRadarEndpointRequest + +// NewQRadarEndpointRequest instantiates a new QRadarEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewQRadarEndpointRequest(url string, type_ string) *QRadarEndpointRequest { + this := QRadarEndpointRequest{} + this.Url = url + this.Type = type_ + return &this +} + +// NewQRadarEndpointRequestWithDefaults instantiates a new QRadarEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewQRadarEndpointRequestWithDefaults() *QRadarEndpointRequest { + this := QRadarEndpointRequest{} + return &this +} + +// GetUrl returns the Url field value +func (o *QRadarEndpointRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *QRadarEndpointRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *QRadarEndpointRequest) SetUrl(v string) { + o.Url = v +} + +// GetType returns the Type field value +func (o *QRadarEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *QRadarEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *QRadarEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o QRadarEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o QRadarEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *QRadarEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varQRadarEndpointRequest := _QRadarEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varQRadarEndpointRequest) + + if err != nil { + return err + } + + *o = QRadarEndpointRequest(varQRadarEndpointRequest) + + return err +} + +type NullableQRadarEndpointRequest struct { + value *QRadarEndpointRequest + isSet bool +} + +func (v NullableQRadarEndpointRequest) Get() *QRadarEndpointRequest { + return v.value +} + +func (v *NullableQRadarEndpointRequest) Set(val *QRadarEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableQRadarEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableQRadarEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableQRadarEndpointRequest(val *QRadarEndpointRequest) *NullableQRadarEndpointRequest { + return &NullableQRadarEndpointRequest{value: val, isSet: true} +} + +func (v NullableQRadarEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableQRadarEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_recommendation_request.go b/azion-api/model_recommendation_request.go new file mode 100644 index 0000000..9281e5c --- /dev/null +++ b/azion-api/model_recommendation_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the RecommendationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecommendationRequest{} + +// RecommendationRequest struct for RecommendationRequest +type RecommendationRequest struct { + DashboardId int64 `json:"dashboard_id"` +} + +type _RecommendationRequest RecommendationRequest + +// NewRecommendationRequest instantiates a new RecommendationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecommendationRequest(dashboardId int64) *RecommendationRequest { + this := RecommendationRequest{} + this.DashboardId = dashboardId + return &this +} + +// NewRecommendationRequestWithDefaults instantiates a new RecommendationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecommendationRequestWithDefaults() *RecommendationRequest { + this := RecommendationRequest{} + return &this +} + +// GetDashboardId returns the DashboardId field value +func (o *RecommendationRequest) GetDashboardId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.DashboardId +} + +// GetDashboardIdOk returns a tuple with the DashboardId field value +// and a boolean to check if the value has been set. +func (o *RecommendationRequest) GetDashboardIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.DashboardId, true +} + +// SetDashboardId sets field value +func (o *RecommendationRequest) SetDashboardId(v int64) { + o.DashboardId = v +} + +func (o RecommendationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RecommendationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["dashboard_id"] = o.DashboardId + return toSerialize, nil +} + +func (o *RecommendationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "dashboard_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRecommendationRequest := _RecommendationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRecommendationRequest) + + if err != nil { + return err + } + + *o = RecommendationRequest(varRecommendationRequest) + + return err +} + +type NullableRecommendationRequest struct { + value *RecommendationRequest + isSet bool +} + +func (v NullableRecommendationRequest) Get() *RecommendationRequest { + return v.value +} + +func (v *NullableRecommendationRequest) Set(val *RecommendationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRecommendationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRecommendationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecommendationRequest(val *RecommendationRequest) *NullableRecommendationRequest { + return &NullableRecommendationRequest{value: val, isSet: true} +} + +func (v NullableRecommendationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecommendationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_record.go b/azion-api/model_record.go new file mode 100644 index 0000000..9d773e5 --- /dev/null +++ b/azion-api/model_record.go @@ -0,0 +1,389 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Record type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Record{} + +// Record struct for Record +type Record struct { + Id int64 `json:"id"` + Description *string `json:"description,omitempty"` + Name string `json:"name"` + Ttl *int64 `json:"ttl,omitempty"` + // * `A` - A * `AAAA` - AAAA * `ANAME` - ANAME * `CNAME` - CNAME * `MX` - MX * `NS` - NS * `PTR` - PTR * `SRV` - SRV * `TXT` - TXT * `CAA` - CAA * `DS` - DS + Type string `json:"type"` + Rdata []string `json:"rdata"` + // * `simple` - simple * `weighted` - weighted + Policy *string `json:"policy,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} + +type _Record Record + +// NewRecord instantiates a new Record object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecord(id int64, name string, type_ string, rdata []string) *Record { + this := Record{} + this.Id = id + this.Name = name + this.Type = type_ + this.Rdata = rdata + return &this +} + +// NewRecordWithDefaults instantiates a new Record object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordWithDefaults() *Record { + this := Record{} + return &this +} + +// GetId returns the Id field value +func (o *Record) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Record) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Record) SetId(v int64) { + o.Id = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Record) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Record) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Record) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Record) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value +func (o *Record) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Record) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Record) SetName(v string) { + o.Name = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *Record) GetTtl() int64 { + if o == nil || IsNil(o.Ttl) { + var ret int64 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Record) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *Record) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *Record) SetTtl(v int64) { + o.Ttl = &v +} + +// GetType returns the Type field value +func (o *Record) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Record) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Record) SetType(v string) { + o.Type = v +} + +// GetRdata returns the Rdata field value +func (o *Record) GetRdata() []string { + if o == nil { + var ret []string + return ret + } + + return o.Rdata +} + +// GetRdataOk returns a tuple with the Rdata field value +// and a boolean to check if the value has been set. +func (o *Record) GetRdataOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Rdata, true +} + +// SetRdata sets field value +func (o *Record) SetRdata(v []string) { + o.Rdata = v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *Record) GetPolicy() string { + if o == nil || IsNil(o.Policy) { + var ret string + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Record) GetPolicyOk() (*string, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *Record) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *Record) SetPolicy(v string) { + o.Policy = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *Record) GetWeight() int64 { + if o == nil || IsNil(o.Weight) { + var ret int64 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Record) GetWeightOk() (*int64, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *Record) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int64 and assigns it to the Weight field. +func (o *Record) SetWeight(v int64) { + o.Weight = &v +} + +func (o Record) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Record) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["name"] = o.Name + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + toSerialize["type"] = o.Type + toSerialize["rdata"] = o.Rdata + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +func (o *Record) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "type", + "rdata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRecord := _Record{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRecord) + + if err != nil { + return err + } + + *o = Record(varRecord) + + return err +} + +type NullableRecord struct { + value *Record + isSet bool +} + +func (v NullableRecord) Get() *Record { + return v.value +} + +func (v *NullableRecord) Set(val *Record) { + v.value = val + v.isSet = true +} + +func (v NullableRecord) IsSet() bool { + return v.isSet +} + +func (v *NullableRecord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecord(val *Record) *NullableRecord { + return &NullableRecord{value: val, isSet: true} +} + +func (v NullableRecord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_record_request.go b/azion-api/model_record_request.go new file mode 100644 index 0000000..f9e8246 --- /dev/null +++ b/azion-api/model_record_request.go @@ -0,0 +1,361 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the RecordRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecordRequest{} + +// RecordRequest struct for RecordRequest +type RecordRequest struct { + Description *string `json:"description,omitempty"` + Name string `json:"name"` + Ttl *int64 `json:"ttl,omitempty"` + // * `A` - A * `AAAA` - AAAA * `ANAME` - ANAME * `CNAME` - CNAME * `MX` - MX * `NS` - NS * `PTR` - PTR * `SRV` - SRV * `TXT` - TXT * `CAA` - CAA * `DS` - DS + Type string `json:"type"` + Rdata []string `json:"rdata"` + // * `simple` - simple * `weighted` - weighted + Policy *string `json:"policy,omitempty"` + Weight *int64 `json:"weight,omitempty"` +} + +type _RecordRequest RecordRequest + +// NewRecordRequest instantiates a new RecordRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecordRequest(name string, type_ string, rdata []string) *RecordRequest { + this := RecordRequest{} + this.Name = name + this.Type = type_ + this.Rdata = rdata + return &this +} + +// NewRecordRequestWithDefaults instantiates a new RecordRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordRequestWithDefaults() *RecordRequest { + this := RecordRequest{} + return &this +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RecordRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RecordRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RecordRequest) SetDescription(v string) { + o.Description = &v +} + +// GetName returns the Name field value +func (o *RecordRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RecordRequest) SetName(v string) { + o.Name = v +} + +// GetTtl returns the Ttl field value if set, zero value otherwise. +func (o *RecordRequest) GetTtl() int64 { + if o == nil || IsNil(o.Ttl) { + var ret int64 + return ret + } + return *o.Ttl +} + +// GetTtlOk returns a tuple with the Ttl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetTtlOk() (*int64, bool) { + if o == nil || IsNil(o.Ttl) { + return nil, false + } + return o.Ttl, true +} + +// HasTtl returns a boolean if a field has been set. +func (o *RecordRequest) HasTtl() bool { + if o != nil && !IsNil(o.Ttl) { + return true + } + + return false +} + +// SetTtl gets a reference to the given int64 and assigns it to the Ttl field. +func (o *RecordRequest) SetTtl(v int64) { + o.Ttl = &v +} + +// GetType returns the Type field value +func (o *RecordRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *RecordRequest) SetType(v string) { + o.Type = v +} + +// GetRdata returns the Rdata field value +func (o *RecordRequest) GetRdata() []string { + if o == nil { + var ret []string + return ret + } + + return o.Rdata +} + +// GetRdataOk returns a tuple with the Rdata field value +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetRdataOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Rdata, true +} + +// SetRdata sets field value +func (o *RecordRequest) SetRdata(v []string) { + o.Rdata = v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *RecordRequest) GetPolicy() string { + if o == nil || IsNil(o.Policy) { + var ret string + return ret + } + return *o.Policy +} + +// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetPolicyOk() (*string, bool) { + if o == nil || IsNil(o.Policy) { + return nil, false + } + return o.Policy, true +} + +// HasPolicy returns a boolean if a field has been set. +func (o *RecordRequest) HasPolicy() bool { + if o != nil && !IsNil(o.Policy) { + return true + } + + return false +} + +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *RecordRequest) SetPolicy(v string) { + o.Policy = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *RecordRequest) GetWeight() int64 { + if o == nil || IsNil(o.Weight) { + var ret int64 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordRequest) GetWeightOk() (*int64, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *RecordRequest) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given int64 and assigns it to the Weight field. +func (o *RecordRequest) SetWeight(v int64) { + o.Weight = &v +} + +func (o RecordRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RecordRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["name"] = o.Name + if !IsNil(o.Ttl) { + toSerialize["ttl"] = o.Ttl + } + toSerialize["type"] = o.Type + toSerialize["rdata"] = o.Rdata + if !IsNil(o.Policy) { + toSerialize["policy"] = o.Policy + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +func (o *RecordRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + "rdata", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRecordRequest := _RecordRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRecordRequest) + + if err != nil { + return err + } + + *o = RecordRequest(varRecordRequest) + + return err +} + +type NullableRecordRequest struct { + value *RecordRequest + isSet bool +} + +func (v NullableRecordRequest) Get() *RecordRequest { + return v.value +} + +func (v *NullableRecordRequest) Set(val *RecordRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRecordRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRecordRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecordRequest(val *RecordRequest) *NullableRecordRequest { + return &NullableRecordRequest{value: val, isSet: true} +} + +func (v NullableRecordRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecordRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_record_response.go b/azion-api/model_record_response.go new file mode 100644 index 0000000..05c34b0 --- /dev/null +++ b/azion-api/model_record_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the RecordResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RecordResponse{} + +// RecordResponse struct for RecordResponse +type RecordResponse struct { + State *string `json:"state,omitempty"` + Data Record `json:"data"` +} + +type _RecordResponse RecordResponse + +// NewRecordResponse instantiates a new RecordResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRecordResponse(data Record) *RecordResponse { + this := RecordResponse{} + this.Data = data + return &this +} + +// NewRecordResponseWithDefaults instantiates a new RecordResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRecordResponseWithDefaults() *RecordResponse { + this := RecordResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *RecordResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RecordResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *RecordResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *RecordResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *RecordResponse) GetData() Record { + if o == nil { + var ret Record + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *RecordResponse) GetDataOk() (*Record, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *RecordResponse) SetData(v Record) { + o.Data = v +} + +func (o RecordResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RecordResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *RecordResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRecordResponse := _RecordResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRecordResponse) + + if err != nil { + return err + } + + *o = RecordResponse(varRecordResponse) + + return err +} + +type NullableRecordResponse struct { + value *RecordResponse + isSet bool +} + +func (v NullableRecordResponse) Get() *RecordResponse { + return v.value +} + +func (v *NullableRecordResponse) Set(val *RecordResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRecordResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRecordResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRecordResponse(val *RecordResponse) *NullableRecordResponse { + return &NullableRecordResponse{value: val, isSet: true} +} + +func (v NullableRecordResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRecordResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_report.go b/azion-api/model_report.go new file mode 100644 index 0000000..3fac854 --- /dev/null +++ b/azion-api/model_report.go @@ -0,0 +1,549 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Report type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Report{} + +// Report struct for Report +type Report struct { + Id int64 `json:"id"` + Description string `json:"description"` + // * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. + Type string `json:"type"` + XAxis *string `json:"x_axis,omitempty"` + // * `avg` - Aggregation by average. * `sum` - Aggregation by sum. + AggregationType string `json:"aggregation_type"` + // * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. + DataUnit string `json:"data_unit"` + Queries []BaseQuery `json:"queries"` + Order string `json:"order"` + Name string `json:"name"` + Rotated *bool `json:"rotated,omitempty"` + // * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. + ComparisonType *string `json:"comparison_type,omitempty"` + HelpCenterPath NullableString `json:"help_center_path,omitempty"` + Library *bool `json:"library,omitempty"` +} + +type _Report Report + +// NewReport instantiates a new Report object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReport(id int64, description string, type_ string, aggregationType string, dataUnit string, queries []BaseQuery, order string, name string) *Report { + this := Report{} + this.Id = id + this.Description = description + this.Type = type_ + this.AggregationType = aggregationType + this.DataUnit = dataUnit + this.Queries = queries + this.Order = order + this.Name = name + return &this +} + +// NewReportWithDefaults instantiates a new Report object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReportWithDefaults() *Report { + this := Report{} + return &this +} + +// GetId returns the Id field value +func (o *Report) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Report) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Report) SetId(v int64) { + o.Id = v +} + +// GetDescription returns the Description field value +func (o *Report) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *Report) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *Report) SetDescription(v string) { + o.Description = v +} + +// GetType returns the Type field value +func (o *Report) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Report) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Report) SetType(v string) { + o.Type = v +} + +// GetXAxis returns the XAxis field value if set, zero value otherwise. +func (o *Report) GetXAxis() string { + if o == nil || IsNil(o.XAxis) { + var ret string + return ret + } + return *o.XAxis +} + +// GetXAxisOk returns a tuple with the XAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Report) GetXAxisOk() (*string, bool) { + if o == nil || IsNil(o.XAxis) { + return nil, false + } + return o.XAxis, true +} + +// HasXAxis returns a boolean if a field has been set. +func (o *Report) HasXAxis() bool { + if o != nil && !IsNil(o.XAxis) { + return true + } + + return false +} + +// SetXAxis gets a reference to the given string and assigns it to the XAxis field. +func (o *Report) SetXAxis(v string) { + o.XAxis = &v +} + +// GetAggregationType returns the AggregationType field value +func (o *Report) GetAggregationType() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationType +} + +// GetAggregationTypeOk returns a tuple with the AggregationType field value +// and a boolean to check if the value has been set. +func (o *Report) GetAggregationTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationType, true +} + +// SetAggregationType sets field value +func (o *Report) SetAggregationType(v string) { + o.AggregationType = v +} + +// GetDataUnit returns the DataUnit field value +func (o *Report) GetDataUnit() string { + if o == nil { + var ret string + return ret + } + + return o.DataUnit +} + +// GetDataUnitOk returns a tuple with the DataUnit field value +// and a boolean to check if the value has been set. +func (o *Report) GetDataUnitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataUnit, true +} + +// SetDataUnit sets field value +func (o *Report) SetDataUnit(v string) { + o.DataUnit = v +} + +// GetQueries returns the Queries field value +func (o *Report) GetQueries() []BaseQuery { + if o == nil { + var ret []BaseQuery + return ret + } + + return o.Queries +} + +// GetQueriesOk returns a tuple with the Queries field value +// and a boolean to check if the value has been set. +func (o *Report) GetQueriesOk() ([]BaseQuery, bool) { + if o == nil { + return nil, false + } + return o.Queries, true +} + +// SetQueries sets field value +func (o *Report) SetQueries(v []BaseQuery) { + o.Queries = v +} + +// GetOrder returns the Order field value +func (o *Report) GetOrder() string { + if o == nil { + var ret string + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *Report) GetOrderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *Report) SetOrder(v string) { + o.Order = v +} + +// GetName returns the Name field value +func (o *Report) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Report) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Report) SetName(v string) { + o.Name = v +} + +// GetRotated returns the Rotated field value if set, zero value otherwise. +func (o *Report) GetRotated() bool { + if o == nil || IsNil(o.Rotated) { + var ret bool + return ret + } + return *o.Rotated +} + +// GetRotatedOk returns a tuple with the Rotated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Report) GetRotatedOk() (*bool, bool) { + if o == nil || IsNil(o.Rotated) { + return nil, false + } + return o.Rotated, true +} + +// HasRotated returns a boolean if a field has been set. +func (o *Report) HasRotated() bool { + if o != nil && !IsNil(o.Rotated) { + return true + } + + return false +} + +// SetRotated gets a reference to the given bool and assigns it to the Rotated field. +func (o *Report) SetRotated(v bool) { + o.Rotated = &v +} + +// GetComparisonType returns the ComparisonType field value if set, zero value otherwise. +func (o *Report) GetComparisonType() string { + if o == nil || IsNil(o.ComparisonType) { + var ret string + return ret + } + return *o.ComparisonType +} + +// GetComparisonTypeOk returns a tuple with the ComparisonType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Report) GetComparisonTypeOk() (*string, bool) { + if o == nil || IsNil(o.ComparisonType) { + return nil, false + } + return o.ComparisonType, true +} + +// HasComparisonType returns a boolean if a field has been set. +func (o *Report) HasComparisonType() bool { + if o != nil && !IsNil(o.ComparisonType) { + return true + } + + return false +} + +// SetComparisonType gets a reference to the given string and assigns it to the ComparisonType field. +func (o *Report) SetComparisonType(v string) { + o.ComparisonType = &v +} + +// GetHelpCenterPath returns the HelpCenterPath field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *Report) GetHelpCenterPath() string { + if o == nil || IsNil(o.HelpCenterPath.Get()) { + var ret string + return ret + } + return *o.HelpCenterPath.Get() +} + +// GetHelpCenterPathOk returns a tuple with the HelpCenterPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Report) GetHelpCenterPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HelpCenterPath.Get(), o.HelpCenterPath.IsSet() +} + +// HasHelpCenterPath returns a boolean if a field has been set. +func (o *Report) HasHelpCenterPath() bool { + if o != nil && o.HelpCenterPath.IsSet() { + return true + } + + return false +} + +// SetHelpCenterPath gets a reference to the given NullableString and assigns it to the HelpCenterPath field. +func (o *Report) SetHelpCenterPath(v string) { + o.HelpCenterPath.Set(&v) +} +// SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil +func (o *Report) SetHelpCenterPathNil() { + o.HelpCenterPath.Set(nil) +} + +// UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +func (o *Report) UnsetHelpCenterPath() { + o.HelpCenterPath.Unset() +} + +// GetLibrary returns the Library field value if set, zero value otherwise. +func (o *Report) GetLibrary() bool { + if o == nil || IsNil(o.Library) { + var ret bool + return ret + } + return *o.Library +} + +// GetLibraryOk returns a tuple with the Library field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Report) GetLibraryOk() (*bool, bool) { + if o == nil || IsNil(o.Library) { + return nil, false + } + return o.Library, true +} + +// HasLibrary returns a boolean if a field has been set. +func (o *Report) HasLibrary() bool { + if o != nil && !IsNil(o.Library) { + return true + } + + return false +} + +// SetLibrary gets a reference to the given bool and assigns it to the Library field. +func (o *Report) SetLibrary(v bool) { + o.Library = &v +} + +func (o Report) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Report) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["description"] = o.Description + toSerialize["type"] = o.Type + if !IsNil(o.XAxis) { + toSerialize["x_axis"] = o.XAxis + } + toSerialize["aggregation_type"] = o.AggregationType + toSerialize["data_unit"] = o.DataUnit + toSerialize["queries"] = o.Queries + toSerialize["order"] = o.Order + toSerialize["name"] = o.Name + if !IsNil(o.Rotated) { + toSerialize["rotated"] = o.Rotated + } + if !IsNil(o.ComparisonType) { + toSerialize["comparison_type"] = o.ComparisonType + } + if o.HelpCenterPath.IsSet() { + toSerialize["help_center_path"] = o.HelpCenterPath.Get() + } + if !IsNil(o.Library) { + toSerialize["library"] = o.Library + } + return toSerialize, nil +} + +func (o *Report) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "description", + "type", + "aggregation_type", + "data_unit", + "queries", + "order", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varReport := _Report{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varReport) + + if err != nil { + return err + } + + *o = Report(varReport) + + return err +} + +type NullableReport struct { + value *Report + isSet bool +} + +func (v NullableReport) Get() *Report { + return v.value +} + +func (v *NullableReport) Set(val *Report) { + v.value = val + v.isSet = true +} + +func (v NullableReport) IsSet() bool { + return v.isSet +} + +func (v *NullableReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReport(val *Report) *NullableReport { + return &NullableReport{value: val, isSet: true} +} + +func (v NullableReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_report_request.go b/azion-api/model_report_request.go new file mode 100644 index 0000000..754110c --- /dev/null +++ b/azion-api/model_report_request.go @@ -0,0 +1,521 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ReportRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ReportRequest{} + +// ReportRequest struct for ReportRequest +type ReportRequest struct { + Description string `json:"description"` + // * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. + Type string `json:"type"` + XAxis *string `json:"x_axis,omitempty"` + // * `avg` - Aggregation by average. * `sum` - Aggregation by sum. + AggregationType string `json:"aggregation_type"` + // * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. + DataUnit string `json:"data_unit"` + Queries []BaseQueryRequest `json:"queries"` + Columns int64 `json:"columns"` + Name string `json:"name"` + Rotated *bool `json:"rotated,omitempty"` + // * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. + ComparisonType *string `json:"comparison_type,omitempty"` + HelpCenterPath NullableString `json:"help_center_path,omitempty"` + Library *bool `json:"library,omitempty"` +} + +type _ReportRequest ReportRequest + +// NewReportRequest instantiates a new ReportRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReportRequest(description string, type_ string, aggregationType string, dataUnit string, queries []BaseQueryRequest, columns int64, name string) *ReportRequest { + this := ReportRequest{} + this.Description = description + this.Type = type_ + this.AggregationType = aggregationType + this.DataUnit = dataUnit + this.Queries = queries + this.Columns = columns + this.Name = name + return &this +} + +// NewReportRequestWithDefaults instantiates a new ReportRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewReportRequestWithDefaults() *ReportRequest { + this := ReportRequest{} + return &this +} + +// GetDescription returns the Description field value +func (o *ReportRequest) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *ReportRequest) SetDescription(v string) { + o.Description = v +} + +// GetType returns the Type field value +func (o *ReportRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ReportRequest) SetType(v string) { + o.Type = v +} + +// GetXAxis returns the XAxis field value if set, zero value otherwise. +func (o *ReportRequest) GetXAxis() string { + if o == nil || IsNil(o.XAxis) { + var ret string + return ret + } + return *o.XAxis +} + +// GetXAxisOk returns a tuple with the XAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetXAxisOk() (*string, bool) { + if o == nil || IsNil(o.XAxis) { + return nil, false + } + return o.XAxis, true +} + +// HasXAxis returns a boolean if a field has been set. +func (o *ReportRequest) HasXAxis() bool { + if o != nil && !IsNil(o.XAxis) { + return true + } + + return false +} + +// SetXAxis gets a reference to the given string and assigns it to the XAxis field. +func (o *ReportRequest) SetXAxis(v string) { + o.XAxis = &v +} + +// GetAggregationType returns the AggregationType field value +func (o *ReportRequest) GetAggregationType() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationType +} + +// GetAggregationTypeOk returns a tuple with the AggregationType field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetAggregationTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationType, true +} + +// SetAggregationType sets field value +func (o *ReportRequest) SetAggregationType(v string) { + o.AggregationType = v +} + +// GetDataUnit returns the DataUnit field value +func (o *ReportRequest) GetDataUnit() string { + if o == nil { + var ret string + return ret + } + + return o.DataUnit +} + +// GetDataUnitOk returns a tuple with the DataUnit field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetDataUnitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataUnit, true +} + +// SetDataUnit sets field value +func (o *ReportRequest) SetDataUnit(v string) { + o.DataUnit = v +} + +// GetQueries returns the Queries field value +func (o *ReportRequest) GetQueries() []BaseQueryRequest { + if o == nil { + var ret []BaseQueryRequest + return ret + } + + return o.Queries +} + +// GetQueriesOk returns a tuple with the Queries field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetQueriesOk() ([]BaseQueryRequest, bool) { + if o == nil { + return nil, false + } + return o.Queries, true +} + +// SetQueries sets field value +func (o *ReportRequest) SetQueries(v []BaseQueryRequest) { + o.Queries = v +} + +// GetColumns returns the Columns field value +func (o *ReportRequest) GetColumns() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetColumnsOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Columns, true +} + +// SetColumns sets field value +func (o *ReportRequest) SetColumns(v int64) { + o.Columns = v +} + +// GetName returns the Name field value +func (o *ReportRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ReportRequest) SetName(v string) { + o.Name = v +} + +// GetRotated returns the Rotated field value if set, zero value otherwise. +func (o *ReportRequest) GetRotated() bool { + if o == nil || IsNil(o.Rotated) { + var ret bool + return ret + } + return *o.Rotated +} + +// GetRotatedOk returns a tuple with the Rotated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetRotatedOk() (*bool, bool) { + if o == nil || IsNil(o.Rotated) { + return nil, false + } + return o.Rotated, true +} + +// HasRotated returns a boolean if a field has been set. +func (o *ReportRequest) HasRotated() bool { + if o != nil && !IsNil(o.Rotated) { + return true + } + + return false +} + +// SetRotated gets a reference to the given bool and assigns it to the Rotated field. +func (o *ReportRequest) SetRotated(v bool) { + o.Rotated = &v +} + +// GetComparisonType returns the ComparisonType field value if set, zero value otherwise. +func (o *ReportRequest) GetComparisonType() string { + if o == nil || IsNil(o.ComparisonType) { + var ret string + return ret + } + return *o.ComparisonType +} + +// GetComparisonTypeOk returns a tuple with the ComparisonType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetComparisonTypeOk() (*string, bool) { + if o == nil || IsNil(o.ComparisonType) { + return nil, false + } + return o.ComparisonType, true +} + +// HasComparisonType returns a boolean if a field has been set. +func (o *ReportRequest) HasComparisonType() bool { + if o != nil && !IsNil(o.ComparisonType) { + return true + } + + return false +} + +// SetComparisonType gets a reference to the given string and assigns it to the ComparisonType field. +func (o *ReportRequest) SetComparisonType(v string) { + o.ComparisonType = &v +} + +// GetHelpCenterPath returns the HelpCenterPath field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ReportRequest) GetHelpCenterPath() string { + if o == nil || IsNil(o.HelpCenterPath.Get()) { + var ret string + return ret + } + return *o.HelpCenterPath.Get() +} + +// GetHelpCenterPathOk returns a tuple with the HelpCenterPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ReportRequest) GetHelpCenterPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HelpCenterPath.Get(), o.HelpCenterPath.IsSet() +} + +// HasHelpCenterPath returns a boolean if a field has been set. +func (o *ReportRequest) HasHelpCenterPath() bool { + if o != nil && o.HelpCenterPath.IsSet() { + return true + } + + return false +} + +// SetHelpCenterPath gets a reference to the given NullableString and assigns it to the HelpCenterPath field. +func (o *ReportRequest) SetHelpCenterPath(v string) { + o.HelpCenterPath.Set(&v) +} +// SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil +func (o *ReportRequest) SetHelpCenterPathNil() { + o.HelpCenterPath.Set(nil) +} + +// UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +func (o *ReportRequest) UnsetHelpCenterPath() { + o.HelpCenterPath.Unset() +} + +// GetLibrary returns the Library field value if set, zero value otherwise. +func (o *ReportRequest) GetLibrary() bool { + if o == nil || IsNil(o.Library) { + var ret bool + return ret + } + return *o.Library +} + +// GetLibraryOk returns a tuple with the Library field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ReportRequest) GetLibraryOk() (*bool, bool) { + if o == nil || IsNil(o.Library) { + return nil, false + } + return o.Library, true +} + +// HasLibrary returns a boolean if a field has been set. +func (o *ReportRequest) HasLibrary() bool { + if o != nil && !IsNil(o.Library) { + return true + } + + return false +} + +// SetLibrary gets a reference to the given bool and assigns it to the Library field. +func (o *ReportRequest) SetLibrary(v bool) { + o.Library = &v +} + +func (o ReportRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ReportRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["description"] = o.Description + toSerialize["type"] = o.Type + if !IsNil(o.XAxis) { + toSerialize["x_axis"] = o.XAxis + } + toSerialize["aggregation_type"] = o.AggregationType + toSerialize["data_unit"] = o.DataUnit + toSerialize["queries"] = o.Queries + toSerialize["columns"] = o.Columns + toSerialize["name"] = o.Name + if !IsNil(o.Rotated) { + toSerialize["rotated"] = o.Rotated + } + if !IsNil(o.ComparisonType) { + toSerialize["comparison_type"] = o.ComparisonType + } + if o.HelpCenterPath.IsSet() { + toSerialize["help_center_path"] = o.HelpCenterPath.Get() + } + if !IsNil(o.Library) { + toSerialize["library"] = o.Library + } + return toSerialize, nil +} + +func (o *ReportRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "description", + "type", + "aggregation_type", + "data_unit", + "queries", + "columns", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varReportRequest := _ReportRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varReportRequest) + + if err != nil { + return err + } + + *o = ReportRequest(varReportRequest) + + return err +} + +type NullableReportRequest struct { + value *ReportRequest + isSet bool +} + +func (v NullableReportRequest) Get() *ReportRequest { + return v.value +} + +func (v *NullableReportRequest) Set(val *ReportRequest) { + v.value = val + v.isSet = true +} + +func (v NullableReportRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableReportRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReportRequest(val *ReportRequest) *NullableReportRequest { + return &NullableReportRequest{value: val, isSet: true} +} + +func (v NullableReportRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReportRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_request_phase_behavior.go b/azion-api/model_request_phase_behavior.go new file mode 100644 index 0000000..1e0666f --- /dev/null +++ b/azion-api/model_request_phase_behavior.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// RequestPhaseBehavior - struct for RequestPhaseBehavior +type RequestPhaseBehavior struct { + BehaviorArgs *BehaviorArgs + BehaviorCapture *BehaviorCapture + BehaviorNoArgs *BehaviorNoArgs +} + +// BehaviorArgsAsRequestPhaseBehavior is a convenience function that returns BehaviorArgs wrapped in RequestPhaseBehavior +func BehaviorArgsAsRequestPhaseBehavior(v *BehaviorArgs) RequestPhaseBehavior { + return RequestPhaseBehavior{ + BehaviorArgs: v, + } +} + +// BehaviorCaptureAsRequestPhaseBehavior is a convenience function that returns BehaviorCapture wrapped in RequestPhaseBehavior +func BehaviorCaptureAsRequestPhaseBehavior(v *BehaviorCapture) RequestPhaseBehavior { + return RequestPhaseBehavior{ + BehaviorCapture: v, + } +} + +// BehaviorNoArgsAsRequestPhaseBehavior is a convenience function that returns BehaviorNoArgs wrapped in RequestPhaseBehavior +func BehaviorNoArgsAsRequestPhaseBehavior(v *BehaviorNoArgs) RequestPhaseBehavior { + return RequestPhaseBehavior{ + BehaviorNoArgs: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RequestPhaseBehavior) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BehaviorArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorArgs) + if err == nil { + jsonBehaviorArgs, _ := json.Marshal(dst.BehaviorArgs) + if string(jsonBehaviorArgs) == "{}" { // empty struct + dst.BehaviorArgs = nil + } else { + if err = validator.Validate(dst.BehaviorArgs); err != nil { + dst.BehaviorArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorArgs = nil + } + + // try to unmarshal data into BehaviorCapture + err = newStrictDecoder(data).Decode(&dst.BehaviorCapture) + if err == nil { + jsonBehaviorCapture, _ := json.Marshal(dst.BehaviorCapture) + if string(jsonBehaviorCapture) == "{}" { // empty struct + dst.BehaviorCapture = nil + } else { + if err = validator.Validate(dst.BehaviorCapture); err != nil { + dst.BehaviorCapture = nil + } else { + match++ + } + } + } else { + dst.BehaviorCapture = nil + } + + // try to unmarshal data into BehaviorNoArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorNoArgs) + if err == nil { + jsonBehaviorNoArgs, _ := json.Marshal(dst.BehaviorNoArgs) + if string(jsonBehaviorNoArgs) == "{}" { // empty struct + dst.BehaviorNoArgs = nil + } else { + if err = validator.Validate(dst.BehaviorNoArgs); err != nil { + dst.BehaviorNoArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorNoArgs = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BehaviorArgs = nil + dst.BehaviorCapture = nil + dst.BehaviorNoArgs = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RequestPhaseBehavior)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RequestPhaseBehavior)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RequestPhaseBehavior) MarshalJSON() ([]byte, error) { + if src.BehaviorArgs != nil { + return json.Marshal(&src.BehaviorArgs) + } + + if src.BehaviorCapture != nil { + return json.Marshal(&src.BehaviorCapture) + } + + if src.BehaviorNoArgs != nil { + return json.Marshal(&src.BehaviorNoArgs) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RequestPhaseBehavior) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.BehaviorArgs != nil { + return obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj RequestPhaseBehavior) GetActualInstanceValue() (interface{}) { + if obj.BehaviorArgs != nil { + return *obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return *obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return *obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +type NullableRequestPhaseBehavior struct { + value *RequestPhaseBehavior + isSet bool +} + +func (v NullableRequestPhaseBehavior) Get() *RequestPhaseBehavior { + return v.value +} + +func (v *NullableRequestPhaseBehavior) Set(val *RequestPhaseBehavior) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPhaseBehavior) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPhaseBehavior) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPhaseBehavior(val *RequestPhaseBehavior) *NullableRequestPhaseBehavior { + return &NullableRequestPhaseBehavior{value: val, isSet: true} +} + +func (v NullableRequestPhaseBehavior) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPhaseBehavior) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_request_phase_behavior2.go b/azion-api/model_request_phase_behavior2.go new file mode 100644 index 0000000..67d74dc --- /dev/null +++ b/azion-api/model_request_phase_behavior2.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// RequestPhaseBehavior2 - struct for RequestPhaseBehavior2 +type RequestPhaseBehavior2 struct { + BehaviorArgs *BehaviorArgs + BehaviorCapture *BehaviorCapture + BehaviorNoArgs *BehaviorNoArgs +} + +// BehaviorArgsAsRequestPhaseBehavior2 is a convenience function that returns BehaviorArgs wrapped in RequestPhaseBehavior2 +func BehaviorArgsAsRequestPhaseBehavior2(v *BehaviorArgs) RequestPhaseBehavior2 { + return RequestPhaseBehavior2{ + BehaviorArgs: v, + } +} + +// BehaviorCaptureAsRequestPhaseBehavior2 is a convenience function that returns BehaviorCapture wrapped in RequestPhaseBehavior2 +func BehaviorCaptureAsRequestPhaseBehavior2(v *BehaviorCapture) RequestPhaseBehavior2 { + return RequestPhaseBehavior2{ + BehaviorCapture: v, + } +} + +// BehaviorNoArgsAsRequestPhaseBehavior2 is a convenience function that returns BehaviorNoArgs wrapped in RequestPhaseBehavior2 +func BehaviorNoArgsAsRequestPhaseBehavior2(v *BehaviorNoArgs) RequestPhaseBehavior2 { + return RequestPhaseBehavior2{ + BehaviorNoArgs: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *RequestPhaseBehavior2) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BehaviorArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorArgs) + if err == nil { + jsonBehaviorArgs, _ := json.Marshal(dst.BehaviorArgs) + if string(jsonBehaviorArgs) == "{}" { // empty struct + dst.BehaviorArgs = nil + } else { + if err = validator.Validate(dst.BehaviorArgs); err != nil { + dst.BehaviorArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorArgs = nil + } + + // try to unmarshal data into BehaviorCapture + err = newStrictDecoder(data).Decode(&dst.BehaviorCapture) + if err == nil { + jsonBehaviorCapture, _ := json.Marshal(dst.BehaviorCapture) + if string(jsonBehaviorCapture) == "{}" { // empty struct + dst.BehaviorCapture = nil + } else { + if err = validator.Validate(dst.BehaviorCapture); err != nil { + dst.BehaviorCapture = nil + } else { + match++ + } + } + } else { + dst.BehaviorCapture = nil + } + + // try to unmarshal data into BehaviorNoArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorNoArgs) + if err == nil { + jsonBehaviorNoArgs, _ := json.Marshal(dst.BehaviorNoArgs) + if string(jsonBehaviorNoArgs) == "{}" { // empty struct + dst.BehaviorNoArgs = nil + } else { + if err = validator.Validate(dst.BehaviorNoArgs); err != nil { + dst.BehaviorNoArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorNoArgs = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BehaviorArgs = nil + dst.BehaviorCapture = nil + dst.BehaviorNoArgs = nil + + return fmt.Errorf("data matches more than one schema in oneOf(RequestPhaseBehavior2)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(RequestPhaseBehavior2)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src RequestPhaseBehavior2) MarshalJSON() ([]byte, error) { + if src.BehaviorArgs != nil { + return json.Marshal(&src.BehaviorArgs) + } + + if src.BehaviorCapture != nil { + return json.Marshal(&src.BehaviorCapture) + } + + if src.BehaviorNoArgs != nil { + return json.Marshal(&src.BehaviorNoArgs) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *RequestPhaseBehavior2) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.BehaviorArgs != nil { + return obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj RequestPhaseBehavior2) GetActualInstanceValue() (interface{}) { + if obj.BehaviorArgs != nil { + return *obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return *obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return *obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +type NullableRequestPhaseBehavior2 struct { + value *RequestPhaseBehavior2 + isSet bool +} + +func (v NullableRequestPhaseBehavior2) Get() *RequestPhaseBehavior2 { + return v.value +} + +func (v *NullableRequestPhaseBehavior2) Set(val *RequestPhaseBehavior2) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPhaseBehavior2) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPhaseBehavior2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPhaseBehavior2(val *RequestPhaseBehavior2) *NullableRequestPhaseBehavior2 { + return &NullableRequestPhaseBehavior2{value: val, isSet: true} +} + +func (v NullableRequestPhaseBehavior2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPhaseBehavior2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_request_phase_rule.go b/azion-api/model_request_phase_rule.go new file mode 100644 index 0000000..1b99c99 --- /dev/null +++ b/azion-api/model_request_phase_rule.go @@ -0,0 +1,404 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the RequestPhaseRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestPhaseRule{} + +// RequestPhaseRule struct for RequestPhaseRule +type RequestPhaseRule struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Criteria [][]ApplicationCriterionField `json:"criteria"` + Behaviors []RequestPhaseBehavior `json:"behaviors"` + Description *string `json:"description,omitempty"` + Order int64 `json:"order"` + LastEditor NullableString `json:"last_editor"` + LastModified NullableTime `json:"last_modified"` +} + +type _RequestPhaseRule RequestPhaseRule + +// NewRequestPhaseRule instantiates a new RequestPhaseRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRequestPhaseRule(id int64, name string, criteria [][]ApplicationCriterionField, behaviors []RequestPhaseBehavior, order int64, lastEditor NullableString, lastModified NullableTime) *RequestPhaseRule { + this := RequestPhaseRule{} + this.Id = id + this.Name = name + this.Criteria = criteria + this.Behaviors = behaviors + this.Order = order + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewRequestPhaseRuleWithDefaults instantiates a new RequestPhaseRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRequestPhaseRuleWithDefaults() *RequestPhaseRule { + this := RequestPhaseRule{} + return &this +} + +// GetId returns the Id field value +func (o *RequestPhaseRule) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *RequestPhaseRule) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *RequestPhaseRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RequestPhaseRule) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *RequestPhaseRule) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *RequestPhaseRule) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *RequestPhaseRule) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value +func (o *RequestPhaseRule) GetCriteria() [][]ApplicationCriterionField { + if o == nil { + var ret [][]ApplicationCriterionField + return ret + } + + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetCriteriaOk() ([][]ApplicationCriterionField, bool) { + if o == nil { + return nil, false + } + return o.Criteria, true +} + +// SetCriteria sets field value +func (o *RequestPhaseRule) SetCriteria(v [][]ApplicationCriterionField) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value +func (o *RequestPhaseRule) GetBehaviors() []RequestPhaseBehavior { + if o == nil { + var ret []RequestPhaseBehavior + return ret + } + + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetBehaviorsOk() ([]RequestPhaseBehavior, bool) { + if o == nil { + return nil, false + } + return o.Behaviors, true +} + +// SetBehaviors sets field value +func (o *RequestPhaseRule) SetBehaviors(v []RequestPhaseBehavior) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RequestPhaseRule) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RequestPhaseRule) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RequestPhaseRule) SetDescription(v string) { + o.Description = &v +} + +// GetOrder returns the Order field value +func (o *RequestPhaseRule) GetOrder() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule) GetOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *RequestPhaseRule) SetOrder(v int64) { + o.Order = v +} + +// GetLastEditor returns the LastEditor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *RequestPhaseRule) GetLastEditor() string { + if o == nil || o.LastEditor.Get() == nil { + var ret string + return ret + } + + return *o.LastEditor.Get() +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RequestPhaseRule) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastEditor.Get(), o.LastEditor.IsSet() +} + +// SetLastEditor sets field value +func (o *RequestPhaseRule) SetLastEditor(v string) { + o.LastEditor.Set(&v) +} + +// GetLastModified returns the LastModified field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *RequestPhaseRule) GetLastModified() time.Time { + if o == nil || o.LastModified.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastModified.Get() +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RequestPhaseRule) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastModified.Get(), o.LastModified.IsSet() +} + +// SetLastModified sets field value +func (o *RequestPhaseRule) SetLastModified(v time.Time) { + o.LastModified.Set(&v) +} + +func (o RequestPhaseRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RequestPhaseRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["criteria"] = o.Criteria + toSerialize["behaviors"] = o.Behaviors + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["order"] = o.Order + toSerialize["last_editor"] = o.LastEditor.Get() + toSerialize["last_modified"] = o.LastModified.Get() + return toSerialize, nil +} + +func (o *RequestPhaseRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "criteria", + "behaviors", + "order", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRequestPhaseRule := _RequestPhaseRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRequestPhaseRule) + + if err != nil { + return err + } + + *o = RequestPhaseRule(varRequestPhaseRule) + + return err +} + +type NullableRequestPhaseRule struct { + value *RequestPhaseRule + isSet bool +} + +func (v NullableRequestPhaseRule) Get() *RequestPhaseRule { + return v.value +} + +func (v *NullableRequestPhaseRule) Set(val *RequestPhaseRule) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPhaseRule) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPhaseRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPhaseRule(val *RequestPhaseRule) *NullableRequestPhaseRule { + return &NullableRequestPhaseRule{value: val, isSet: true} +} + +func (v NullableRequestPhaseRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPhaseRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_request_phase_rule2.go b/azion-api/model_request_phase_rule2.go new file mode 100644 index 0000000..4b29718 --- /dev/null +++ b/azion-api/model_request_phase_rule2.go @@ -0,0 +1,287 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the RequestPhaseRule2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestPhaseRule2{} + +// RequestPhaseRule2 struct for RequestPhaseRule2 +type RequestPhaseRule2 struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Criteria [][]ApplicationCriterionFieldRequest `json:"criteria"` + Behaviors []RequestPhaseBehavior2 `json:"behaviors"` + Description *string `json:"description,omitempty"` +} + +type _RequestPhaseRule2 RequestPhaseRule2 + +// NewRequestPhaseRule2 instantiates a new RequestPhaseRule2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRequestPhaseRule2(name string, criteria [][]ApplicationCriterionFieldRequest, behaviors []RequestPhaseBehavior2) *RequestPhaseRule2 { + this := RequestPhaseRule2{} + this.Name = name + this.Criteria = criteria + this.Behaviors = behaviors + return &this +} + +// NewRequestPhaseRule2WithDefaults instantiates a new RequestPhaseRule2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRequestPhaseRule2WithDefaults() *RequestPhaseRule2 { + this := RequestPhaseRule2{} + return &this +} + +// GetName returns the Name field value +func (o *RequestPhaseRule2) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule2) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *RequestPhaseRule2) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *RequestPhaseRule2) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule2) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *RequestPhaseRule2) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *RequestPhaseRule2) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value +func (o *RequestPhaseRule2) GetCriteria() [][]ApplicationCriterionFieldRequest { + if o == nil { + var ret [][]ApplicationCriterionFieldRequest + return ret + } + + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule2) GetCriteriaOk() ([][]ApplicationCriterionFieldRequest, bool) { + if o == nil { + return nil, false + } + return o.Criteria, true +} + +// SetCriteria sets field value +func (o *RequestPhaseRule2) SetCriteria(v [][]ApplicationCriterionFieldRequest) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value +func (o *RequestPhaseRule2) GetBehaviors() []RequestPhaseBehavior2 { + if o == nil { + var ret []RequestPhaseBehavior2 + return ret + } + + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule2) GetBehaviorsOk() ([]RequestPhaseBehavior2, bool) { + if o == nil { + return nil, false + } + return o.Behaviors, true +} + +// SetBehaviors sets field value +func (o *RequestPhaseRule2) SetBehaviors(v []RequestPhaseBehavior2) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *RequestPhaseRule2) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestPhaseRule2) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *RequestPhaseRule2) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *RequestPhaseRule2) SetDescription(v string) { + o.Description = &v +} + +func (o RequestPhaseRule2) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RequestPhaseRule2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["criteria"] = o.Criteria + toSerialize["behaviors"] = o.Behaviors + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *RequestPhaseRule2) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "criteria", + "behaviors", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRequestPhaseRule2 := _RequestPhaseRule2{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRequestPhaseRule2) + + if err != nil { + return err + } + + *o = RequestPhaseRule2(varRequestPhaseRule2) + + return err +} + +type NullableRequestPhaseRule2 struct { + value *RequestPhaseRule2 + isSet bool +} + +func (v NullableRequestPhaseRule2) Get() *RequestPhaseRule2 { + return v.value +} + +func (v *NullableRequestPhaseRule2) Set(val *RequestPhaseRule2) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPhaseRule2) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPhaseRule2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPhaseRule2(val *RequestPhaseRule2) *NullableRequestPhaseRule2 { + return &NullableRequestPhaseRule2{value: val, isSet: true} +} + +func (v NullableRequestPhaseRule2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPhaseRule2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_request_phase_rule_response.go b/azion-api/model_request_phase_rule_response.go new file mode 100644 index 0000000..aa1a1d6 --- /dev/null +++ b/azion-api/model_request_phase_rule_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the RequestPhaseRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RequestPhaseRuleResponse{} + +// RequestPhaseRuleResponse struct for RequestPhaseRuleResponse +type RequestPhaseRuleResponse struct { + State *string `json:"state,omitempty"` + Data RequestPhaseRule `json:"data"` +} + +type _RequestPhaseRuleResponse RequestPhaseRuleResponse + +// NewRequestPhaseRuleResponse instantiates a new RequestPhaseRuleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRequestPhaseRuleResponse(data RequestPhaseRule) *RequestPhaseRuleResponse { + this := RequestPhaseRuleResponse{} + this.Data = data + return &this +} + +// NewRequestPhaseRuleResponseWithDefaults instantiates a new RequestPhaseRuleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRequestPhaseRuleResponseWithDefaults() *RequestPhaseRuleResponse { + this := RequestPhaseRuleResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *RequestPhaseRuleResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RequestPhaseRuleResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *RequestPhaseRuleResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *RequestPhaseRuleResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *RequestPhaseRuleResponse) GetData() RequestPhaseRule { + if o == nil { + var ret RequestPhaseRule + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *RequestPhaseRuleResponse) GetDataOk() (*RequestPhaseRule, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *RequestPhaseRuleResponse) SetData(v RequestPhaseRule) { + o.Data = v +} + +func (o RequestPhaseRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RequestPhaseRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *RequestPhaseRuleResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRequestPhaseRuleResponse := _RequestPhaseRuleResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRequestPhaseRuleResponse) + + if err != nil { + return err + } + + *o = RequestPhaseRuleResponse(varRequestPhaseRuleResponse) + + return err +} + +type NullableRequestPhaseRuleResponse struct { + value *RequestPhaseRuleResponse + isSet bool +} + +func (v NullableRequestPhaseRuleResponse) Get() *RequestPhaseRuleResponse { + return v.value +} + +func (v *NullableRequestPhaseRuleResponse) Set(val *RequestPhaseRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRequestPhaseRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRequestPhaseRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRequestPhaseRuleResponse(val *RequestPhaseRuleResponse) *NullableRequestPhaseRuleResponse { + return &NullableRequestPhaseRuleResponse{value: val, isSet: true} +} + +func (v NullableRequestPhaseRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRequestPhaseRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_reseller.go b/azion-api/model_reseller.go new file mode 100644 index 0000000..ae82877 --- /dev/null +++ b/azion-api/model_reseller.go @@ -0,0 +1,450 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Reseller type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Reseller{} + +// Reseller struct for Reseller +type Reseller struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ParentId int64 `json:"parent_id"` + Created time.Time `json:"created"` + Info map[string]interface{} `json:"info"` + // * `USD` - USD * `BRL` - BRL + CurrencyIsoCode string `json:"currency_iso_code"` + TermsOfServiceUrl *string `json:"terms_of_service_url,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _Reseller Reseller + +// NewReseller instantiates a new Reseller object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewReseller(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, currencyIsoCode string, type_ string) *Reseller { + this := Reseller{} + this.Id = id + this.Name = name + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ParentId = parentId + this.Created = created + this.Info = info + this.CurrencyIsoCode = currencyIsoCode + this.Type = type_ + return &this +} + +// NewResellerWithDefaults instantiates a new Reseller object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResellerWithDefaults() *Reseller { + this := Reseller{} + return &this +} + +// GetId returns the Id field value +func (o *Reseller) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Reseller) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Reseller) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Reseller) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *Reseller) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Reseller) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Reseller) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Reseller) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Reseller) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Reseller) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetParentId returns the ParentId field value +func (o *Reseller) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *Reseller) SetParentId(v int64) { + o.ParentId = v +} + +// GetCreated returns the Created field value +func (o *Reseller) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Reseller) SetCreated(v time.Time) { + o.Created = v +} + +// GetInfo returns the Info field value +func (o *Reseller) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *Reseller) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetCurrencyIsoCode returns the CurrencyIsoCode field value +func (o *Reseller) GetCurrencyIsoCode() string { + if o == nil { + var ret string + return ret + } + + return o.CurrencyIsoCode +} + +// GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetCurrencyIsoCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurrencyIsoCode, true +} + +// SetCurrencyIsoCode sets field value +func (o *Reseller) SetCurrencyIsoCode(v string) { + o.CurrencyIsoCode = v +} + +// GetTermsOfServiceUrl returns the TermsOfServiceUrl field value if set, zero value otherwise. +func (o *Reseller) GetTermsOfServiceUrl() string { + if o == nil || IsNil(o.TermsOfServiceUrl) { + var ret string + return ret + } + return *o.TermsOfServiceUrl +} + +// GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Reseller) GetTermsOfServiceUrlOk() (*string, bool) { + if o == nil || IsNil(o.TermsOfServiceUrl) { + return nil, false + } + return o.TermsOfServiceUrl, true +} + +// HasTermsOfServiceUrl returns a boolean if a field has been set. +func (o *Reseller) HasTermsOfServiceUrl() bool { + if o != nil && !IsNil(o.TermsOfServiceUrl) { + return true + } + + return false +} + +// SetTermsOfServiceUrl gets a reference to the given string and assigns it to the TermsOfServiceUrl field. +func (o *Reseller) SetTermsOfServiceUrl(v string) { + o.TermsOfServiceUrl = &v +} + +// GetType returns the Type field value +func (o *Reseller) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Reseller) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Reseller) SetType(v string) { + o.Type = v +} + +func (o Reseller) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Reseller) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["parent_id"] = o.ParentId + toSerialize["created"] = o.Created + toSerialize["info"] = o.Info + toSerialize["currency_iso_code"] = o.CurrencyIsoCode + if !IsNil(o.TermsOfServiceUrl) { + toSerialize["terms_of_service_url"] = o.TermsOfServiceUrl + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Reseller) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "active", + "last_editor", + "last_modified", + "parent_id", + "created", + "info", + "currency_iso_code", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varReseller := _Reseller{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varReseller) + + if err != nil { + return err + } + + *o = Reseller(varReseller) + + return err +} + +type NullableReseller struct { + value *Reseller + isSet bool +} + +func (v NullableReseller) Get() *Reseller { + return v.value +} + +func (v *NullableReseller) Set(val *Reseller) { + v.value = val + v.isSet = true +} + +func (v NullableReseller) IsSet() bool { + return v.isSet +} + +func (v *NullableReseller) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableReseller(val *Reseller) *NullableReseller { + return &NullableReseller{value: val, isSet: true} +} + +func (v NullableReseller) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableReseller) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_reseller_request.go b/azion-api/model_reseller_request.go new file mode 100644 index 0000000..b74dd9e --- /dev/null +++ b/azion-api/model_reseller_request.go @@ -0,0 +1,253 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResellerRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResellerRequest{} + +// ResellerRequest struct for ResellerRequest +type ResellerRequest struct { + Name string `json:"name"` + // * `USD` - USD * `BRL` - BRL + CurrencyIsoCode string `json:"currency_iso_code"` + TermsOfServiceUrl *string `json:"terms_of_service_url,omitempty"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _ResellerRequest ResellerRequest + +// NewResellerRequest instantiates a new ResellerRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResellerRequest(name string, currencyIsoCode string, type_ string) *ResellerRequest { + this := ResellerRequest{} + this.Name = name + this.CurrencyIsoCode = currencyIsoCode + this.Type = type_ + return &this +} + +// NewResellerRequestWithDefaults instantiates a new ResellerRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResellerRequestWithDefaults() *ResellerRequest { + this := ResellerRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ResellerRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResellerRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResellerRequest) SetName(v string) { + o.Name = v +} + +// GetCurrencyIsoCode returns the CurrencyIsoCode field value +func (o *ResellerRequest) GetCurrencyIsoCode() string { + if o == nil { + var ret string + return ret + } + + return o.CurrencyIsoCode +} + +// GetCurrencyIsoCodeOk returns a tuple with the CurrencyIsoCode field value +// and a boolean to check if the value has been set. +func (o *ResellerRequest) GetCurrencyIsoCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CurrencyIsoCode, true +} + +// SetCurrencyIsoCode sets field value +func (o *ResellerRequest) SetCurrencyIsoCode(v string) { + o.CurrencyIsoCode = v +} + +// GetTermsOfServiceUrl returns the TermsOfServiceUrl field value if set, zero value otherwise. +func (o *ResellerRequest) GetTermsOfServiceUrl() string { + if o == nil || IsNil(o.TermsOfServiceUrl) { + var ret string + return ret + } + return *o.TermsOfServiceUrl +} + +// GetTermsOfServiceUrlOk returns a tuple with the TermsOfServiceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResellerRequest) GetTermsOfServiceUrlOk() (*string, bool) { + if o == nil || IsNil(o.TermsOfServiceUrl) { + return nil, false + } + return o.TermsOfServiceUrl, true +} + +// HasTermsOfServiceUrl returns a boolean if a field has been set. +func (o *ResellerRequest) HasTermsOfServiceUrl() bool { + if o != nil && !IsNil(o.TermsOfServiceUrl) { + return true + } + + return false +} + +// SetTermsOfServiceUrl gets a reference to the given string and assigns it to the TermsOfServiceUrl field. +func (o *ResellerRequest) SetTermsOfServiceUrl(v string) { + o.TermsOfServiceUrl = &v +} + +// GetType returns the Type field value +func (o *ResellerRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ResellerRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ResellerRequest) SetType(v string) { + o.Type = v +} + +func (o ResellerRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResellerRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["currency_iso_code"] = o.CurrencyIsoCode + if !IsNil(o.TermsOfServiceUrl) { + toSerialize["terms_of_service_url"] = o.TermsOfServiceUrl + } + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ResellerRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "currency_iso_code", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResellerRequest := _ResellerRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResellerRequest) + + if err != nil { + return err + } + + *o = ResellerRequest(varResellerRequest) + + return err +} + +type NullableResellerRequest struct { + value *ResellerRequest + isSet bool +} + +func (v NullableResellerRequest) Get() *ResellerRequest { + return v.value +} + +func (v *NullableResellerRequest) Set(val *ResellerRequest) { + v.value = val + v.isSet = true +} + +func (v NullableResellerRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableResellerRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResellerRequest(val *ResellerRequest) *NullableResellerRequest { + return &NullableResellerRequest{value: val, isSet: true} +} + +func (v NullableResellerRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResellerRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_account.go b/azion-api/model_response_account.go new file mode 100644 index 0000000..b0fef0c --- /dev/null +++ b/azion-api/model_response_account.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAccount type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAccount{} + +// ResponseAccount struct for ResponseAccount +type ResponseAccount struct { + State *string `json:"state,omitempty"` + Data Account `json:"data"` +} + +type _ResponseAccount ResponseAccount + +// NewResponseAccount instantiates a new ResponseAccount object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAccount(data Account) *ResponseAccount { + this := ResponseAccount{} + this.Data = data + return &this +} + +// NewResponseAccountWithDefaults instantiates a new ResponseAccount object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAccountWithDefaults() *ResponseAccount { + this := ResponseAccount{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAccount) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAccount) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAccount) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAccount) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAccount) GetData() Account { + if o == nil { + var ret Account + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAccount) GetDataOk() (*Account, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAccount) SetData(v Account) { + o.Data = v +} + +func (o ResponseAccount) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAccount) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAccount) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAccount := _ResponseAccount{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAccount) + + if err != nil { + return err + } + + *o = ResponseAccount(varResponseAccount) + + return err +} + +type NullableResponseAccount struct { + value *ResponseAccount + isSet bool +} + +func (v NullableResponseAccount) Get() *ResponseAccount { + return v.value +} + +func (v *NullableResponseAccount) Set(val *ResponseAccount) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAccount(val *ResponseAccount) *NullableResponseAccount { + return &NullableResponseAccount{value: val, isSet: true} +} + +func (v NullableResponseAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_account_info.go b/azion-api/model_response_account_info.go new file mode 100644 index 0000000..3616f05 --- /dev/null +++ b/azion-api/model_response_account_info.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAccountInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAccountInfo{} + +// ResponseAccountInfo struct for ResponseAccountInfo +type ResponseAccountInfo struct { + State *string `json:"state,omitempty"` + Data AccountInfo `json:"data"` +} + +type _ResponseAccountInfo ResponseAccountInfo + +// NewResponseAccountInfo instantiates a new ResponseAccountInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAccountInfo(data AccountInfo) *ResponseAccountInfo { + this := ResponseAccountInfo{} + this.Data = data + return &this +} + +// NewResponseAccountInfoWithDefaults instantiates a new ResponseAccountInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAccountInfoWithDefaults() *ResponseAccountInfo { + this := ResponseAccountInfo{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAccountInfo) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAccountInfo) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAccountInfo) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAccountInfo) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAccountInfo) GetData() AccountInfo { + if o == nil { + var ret AccountInfo + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAccountInfo) GetDataOk() (*AccountInfo, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAccountInfo) SetData(v AccountInfo) { + o.Data = v +} + +func (o ResponseAccountInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAccountInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAccountInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAccountInfo := _ResponseAccountInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAccountInfo) + + if err != nil { + return err + } + + *o = ResponseAccountInfo(varResponseAccountInfo) + + return err +} + +type NullableResponseAccountInfo struct { + value *ResponseAccountInfo + isSet bool +} + +func (v NullableResponseAccountInfo) Get() *ResponseAccountInfo { + return v.value +} + +func (v *NullableResponseAccountInfo) Set(val *ResponseAccountInfo) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAccountInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAccountInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAccountInfo(val *ResponseAccountInfo) *NullableResponseAccountInfo { + return &NullableResponseAccountInfo{value: val, isSet: true} +} + +func (v NullableResponseAccountInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAccountInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_account.go b/azion-api/model_response_async_account.go new file mode 100644 index 0000000..48d13ac --- /dev/null +++ b/azion-api/model_response_async_account.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncAccount type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncAccount{} + +// ResponseAsyncAccount struct for ResponseAsyncAccount +type ResponseAsyncAccount struct { + State *string `json:"state,omitempty"` + Data Account `json:"data"` +} + +type _ResponseAsyncAccount ResponseAsyncAccount + +// NewResponseAsyncAccount instantiates a new ResponseAsyncAccount object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncAccount(data Account) *ResponseAsyncAccount { + this := ResponseAsyncAccount{} + this.Data = data + return &this +} + +// NewResponseAsyncAccountWithDefaults instantiates a new ResponseAsyncAccount object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncAccountWithDefaults() *ResponseAsyncAccount { + this := ResponseAsyncAccount{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncAccount) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncAccount) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncAccount) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncAccount) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncAccount) GetData() Account { + if o == nil { + var ret Account + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncAccount) GetDataOk() (*Account, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncAccount) SetData(v Account) { + o.Data = v +} + +func (o ResponseAsyncAccount) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncAccount) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncAccount) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncAccount := _ResponseAsyncAccount{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncAccount) + + if err != nil { + return err + } + + *o = ResponseAsyncAccount(varResponseAsyncAccount) + + return err +} + +type NullableResponseAsyncAccount struct { + value *ResponseAsyncAccount + isSet bool +} + +func (v NullableResponseAsyncAccount) Get() *ResponseAsyncAccount { + return v.value +} + +func (v *NullableResponseAsyncAccount) Set(val *ResponseAsyncAccount) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncAccount(val *ResponseAsyncAccount) *NullableResponseAsyncAccount { + return &NullableResponseAsyncAccount{value: val, isSet: true} +} + +func (v NullableResponseAsyncAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_account_info.go b/azion-api/model_response_async_account_info.go new file mode 100644 index 0000000..a784f23 --- /dev/null +++ b/azion-api/model_response_async_account_info.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncAccountInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncAccountInfo{} + +// ResponseAsyncAccountInfo struct for ResponseAsyncAccountInfo +type ResponseAsyncAccountInfo struct { + State *string `json:"state,omitempty"` + Data AccountInfo `json:"data"` +} + +type _ResponseAsyncAccountInfo ResponseAsyncAccountInfo + +// NewResponseAsyncAccountInfo instantiates a new ResponseAsyncAccountInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncAccountInfo(data AccountInfo) *ResponseAsyncAccountInfo { + this := ResponseAsyncAccountInfo{} + this.Data = data + return &this +} + +// NewResponseAsyncAccountInfoWithDefaults instantiates a new ResponseAsyncAccountInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncAccountInfoWithDefaults() *ResponseAsyncAccountInfo { + this := ResponseAsyncAccountInfo{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncAccountInfo) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncAccountInfo) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncAccountInfo) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncAccountInfo) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncAccountInfo) GetData() AccountInfo { + if o == nil { + var ret AccountInfo + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncAccountInfo) GetDataOk() (*AccountInfo, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncAccountInfo) SetData(v AccountInfo) { + o.Data = v +} + +func (o ResponseAsyncAccountInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncAccountInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncAccountInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncAccountInfo := _ResponseAsyncAccountInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncAccountInfo) + + if err != nil { + return err + } + + *o = ResponseAsyncAccountInfo(varResponseAsyncAccountInfo) + + return err +} + +type NullableResponseAsyncAccountInfo struct { + value *ResponseAsyncAccountInfo + isSet bool +} + +func (v NullableResponseAsyncAccountInfo) Get() *ResponseAsyncAccountInfo { + return v.value +} + +func (v *NullableResponseAsyncAccountInfo) Set(val *ResponseAsyncAccountInfo) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncAccountInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncAccountInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncAccountInfo(val *ResponseAsyncAccountInfo) *NullableResponseAsyncAccountInfo { + return &NullableResponseAsyncAccountInfo{value: val, isSet: true} +} + +func (v NullableResponseAsyncAccountInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncAccountInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_chat_thread.go b/azion-api/model_response_async_chat_thread.go new file mode 100644 index 0000000..ac1843f --- /dev/null +++ b/azion-api/model_response_async_chat_thread.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncChatThread type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncChatThread{} + +// ResponseAsyncChatThread struct for ResponseAsyncChatThread +type ResponseAsyncChatThread struct { + State *string `json:"state,omitempty"` + Data ChatThread `json:"data"` +} + +type _ResponseAsyncChatThread ResponseAsyncChatThread + +// NewResponseAsyncChatThread instantiates a new ResponseAsyncChatThread object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncChatThread(data ChatThread) *ResponseAsyncChatThread { + this := ResponseAsyncChatThread{} + this.Data = data + return &this +} + +// NewResponseAsyncChatThreadWithDefaults instantiates a new ResponseAsyncChatThread object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncChatThreadWithDefaults() *ResponseAsyncChatThread { + this := ResponseAsyncChatThread{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncChatThread) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncChatThread) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncChatThread) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncChatThread) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncChatThread) GetData() ChatThread { + if o == nil { + var ret ChatThread + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncChatThread) GetDataOk() (*ChatThread, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncChatThread) SetData(v ChatThread) { + o.Data = v +} + +func (o ResponseAsyncChatThread) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncChatThread) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncChatThread) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncChatThread := _ResponseAsyncChatThread{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncChatThread) + + if err != nil { + return err + } + + *o = ResponseAsyncChatThread(varResponseAsyncChatThread) + + return err +} + +type NullableResponseAsyncChatThread struct { + value *ResponseAsyncChatThread + isSet bool +} + +func (v NullableResponseAsyncChatThread) Get() *ResponseAsyncChatThread { + return v.value +} + +func (v *NullableResponseAsyncChatThread) Set(val *ResponseAsyncChatThread) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncChatThread) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncChatThread) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncChatThread(val *ResponseAsyncChatThread) *NullableResponseAsyncChatThread { + return &NullableResponseAsyncChatThread{value: val, isSet: true} +} + +func (v NullableResponseAsyncChatThread) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncChatThread) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_continuous_deployment.go b/azion-api/model_response_async_continuous_deployment.go new file mode 100644 index 0000000..f3e92fa --- /dev/null +++ b/azion-api/model_response_async_continuous_deployment.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncContinuousDeployment{} + +// ResponseAsyncContinuousDeployment struct for ResponseAsyncContinuousDeployment +type ResponseAsyncContinuousDeployment struct { + State *string `json:"state,omitempty"` + Data ContinuousDeployment `json:"data"` +} + +type _ResponseAsyncContinuousDeployment ResponseAsyncContinuousDeployment + +// NewResponseAsyncContinuousDeployment instantiates a new ResponseAsyncContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncContinuousDeployment(data ContinuousDeployment) *ResponseAsyncContinuousDeployment { + this := ResponseAsyncContinuousDeployment{} + this.Data = data + return &this +} + +// NewResponseAsyncContinuousDeploymentWithDefaults instantiates a new ResponseAsyncContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncContinuousDeploymentWithDefaults() *ResponseAsyncContinuousDeployment { + this := ResponseAsyncContinuousDeployment{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncContinuousDeployment) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncContinuousDeployment) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncContinuousDeployment) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncContinuousDeployment) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncContinuousDeployment) GetData() ContinuousDeployment { + if o == nil { + var ret ContinuousDeployment + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncContinuousDeployment) GetDataOk() (*ContinuousDeployment, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncContinuousDeployment) SetData(v ContinuousDeployment) { + o.Data = v +} + +func (o ResponseAsyncContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncContinuousDeployment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncContinuousDeployment := _ResponseAsyncContinuousDeployment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncContinuousDeployment) + + if err != nil { + return err + } + + *o = ResponseAsyncContinuousDeployment(varResponseAsyncContinuousDeployment) + + return err +} + +type NullableResponseAsyncContinuousDeployment struct { + value *ResponseAsyncContinuousDeployment + isSet bool +} + +func (v NullableResponseAsyncContinuousDeployment) Get() *ResponseAsyncContinuousDeployment { + return v.value +} + +func (v *NullableResponseAsyncContinuousDeployment) Set(val *ResponseAsyncContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncContinuousDeployment(val *ResponseAsyncContinuousDeployment) *NullableResponseAsyncContinuousDeployment { + return &NullableResponseAsyncContinuousDeployment{value: val, isSet: true} +} + +func (v NullableResponseAsyncContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_credit.go b/azion-api/model_response_async_credit.go new file mode 100644 index 0000000..f4f8da6 --- /dev/null +++ b/azion-api/model_response_async_credit.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncCredit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncCredit{} + +// ResponseAsyncCredit struct for ResponseAsyncCredit +type ResponseAsyncCredit struct { + State *string `json:"state,omitempty"` + Data Credit `json:"data"` +} + +type _ResponseAsyncCredit ResponseAsyncCredit + +// NewResponseAsyncCredit instantiates a new ResponseAsyncCredit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncCredit(data Credit) *ResponseAsyncCredit { + this := ResponseAsyncCredit{} + this.Data = data + return &this +} + +// NewResponseAsyncCreditWithDefaults instantiates a new ResponseAsyncCredit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncCreditWithDefaults() *ResponseAsyncCredit { + this := ResponseAsyncCredit{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncCredit) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncCredit) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncCredit) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncCredit) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncCredit) GetData() Credit { + if o == nil { + var ret Credit + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncCredit) GetDataOk() (*Credit, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncCredit) SetData(v Credit) { + o.Data = v +} + +func (o ResponseAsyncCredit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncCredit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncCredit) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncCredit := _ResponseAsyncCredit{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncCredit) + + if err != nil { + return err + } + + *o = ResponseAsyncCredit(varResponseAsyncCredit) + + return err +} + +type NullableResponseAsyncCredit struct { + value *ResponseAsyncCredit + isSet bool +} + +func (v NullableResponseAsyncCredit) Get() *ResponseAsyncCredit { + return v.value +} + +func (v *NullableResponseAsyncCredit) Set(val *ResponseAsyncCredit) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncCredit) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncCredit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncCredit(val *ResponseAsyncCredit) *NullableResponseAsyncCredit { + return &NullableResponseAsyncCredit{value: val, isSet: true} +} + +func (v NullableResponseAsyncCredit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncCredit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_dashboard.go b/azion-api/model_response_async_dashboard.go new file mode 100644 index 0000000..c59a0e7 --- /dev/null +++ b/azion-api/model_response_async_dashboard.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncDashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDashboard{} + +// ResponseAsyncDashboard struct for ResponseAsyncDashboard +type ResponseAsyncDashboard struct { + State *string `json:"state,omitempty"` + Data Dashboard `json:"data"` +} + +type _ResponseAsyncDashboard ResponseAsyncDashboard + +// NewResponseAsyncDashboard instantiates a new ResponseAsyncDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDashboard(data Dashboard) *ResponseAsyncDashboard { + this := ResponseAsyncDashboard{} + this.Data = data + return &this +} + +// NewResponseAsyncDashboardWithDefaults instantiates a new ResponseAsyncDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDashboardWithDefaults() *ResponseAsyncDashboard { + this := ResponseAsyncDashboard{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDashboard) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDashboard) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDashboard) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDashboard) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncDashboard) GetData() Dashboard { + if o == nil { + var ret Dashboard + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDashboard) GetDataOk() (*Dashboard, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncDashboard) SetData(v Dashboard) { + o.Data = v +} + +func (o ResponseAsyncDashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncDashboard) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncDashboard := _ResponseAsyncDashboard{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncDashboard) + + if err != nil { + return err + } + + *o = ResponseAsyncDashboard(varResponseAsyncDashboard) + + return err +} + +type NullableResponseAsyncDashboard struct { + value *ResponseAsyncDashboard + isSet bool +} + +func (v NullableResponseAsyncDashboard) Get() *ResponseAsyncDashboard { + return v.value +} + +func (v *NullableResponseAsyncDashboard) Set(val *ResponseAsyncDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDashboard(val *ResponseAsyncDashboard) *NullableResponseAsyncDashboard { + return &NullableResponseAsyncDashboard{value: val, isSet: true} +} + +func (v NullableResponseAsyncDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_chat_thread.go b/azion-api/model_response_async_delete_chat_thread.go new file mode 100644 index 0000000..c34b701 --- /dev/null +++ b/azion-api/model_response_async_delete_chat_thread.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteChatThread type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteChatThread{} + +// ResponseAsyncDeleteChatThread struct for ResponseAsyncDeleteChatThread +type ResponseAsyncDeleteChatThread struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteChatThread instantiates a new ResponseAsyncDeleteChatThread object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteChatThread() *ResponseAsyncDeleteChatThread { + this := ResponseAsyncDeleteChatThread{} + return &this +} + +// NewResponseAsyncDeleteChatThreadWithDefaults instantiates a new ResponseAsyncDeleteChatThread object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteChatThreadWithDefaults() *ResponseAsyncDeleteChatThread { + this := ResponseAsyncDeleteChatThread{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteChatThread) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteChatThread) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteChatThread) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteChatThread) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteChatThread) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteChatThread) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteChatThread struct { + value *ResponseAsyncDeleteChatThread + isSet bool +} + +func (v NullableResponseAsyncDeleteChatThread) Get() *ResponseAsyncDeleteChatThread { + return v.value +} + +func (v *NullableResponseAsyncDeleteChatThread) Set(val *ResponseAsyncDeleteChatThread) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteChatThread) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteChatThread) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteChatThread(val *ResponseAsyncDeleteChatThread) *NullableResponseAsyncDeleteChatThread { + return &NullableResponseAsyncDeleteChatThread{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteChatThread) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteChatThread) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_continuous_deployment.go b/azion-api/model_response_async_delete_continuous_deployment.go new file mode 100644 index 0000000..fcf5922 --- /dev/null +++ b/azion-api/model_response_async_delete_continuous_deployment.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteContinuousDeployment{} + +// ResponseAsyncDeleteContinuousDeployment struct for ResponseAsyncDeleteContinuousDeployment +type ResponseAsyncDeleteContinuousDeployment struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteContinuousDeployment instantiates a new ResponseAsyncDeleteContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteContinuousDeployment() *ResponseAsyncDeleteContinuousDeployment { + this := ResponseAsyncDeleteContinuousDeployment{} + return &this +} + +// NewResponseAsyncDeleteContinuousDeploymentWithDefaults instantiates a new ResponseAsyncDeleteContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteContinuousDeploymentWithDefaults() *ResponseAsyncDeleteContinuousDeployment { + this := ResponseAsyncDeleteContinuousDeployment{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteContinuousDeployment) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteContinuousDeployment) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteContinuousDeployment) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteContinuousDeployment) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteContinuousDeployment struct { + value *ResponseAsyncDeleteContinuousDeployment + isSet bool +} + +func (v NullableResponseAsyncDeleteContinuousDeployment) Get() *ResponseAsyncDeleteContinuousDeployment { + return v.value +} + +func (v *NullableResponseAsyncDeleteContinuousDeployment) Set(val *ResponseAsyncDeleteContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteContinuousDeployment(val *ResponseAsyncDeleteContinuousDeployment) *NullableResponseAsyncDeleteContinuousDeployment { + return &NullableResponseAsyncDeleteContinuousDeployment{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_document.go b/azion-api/model_response_async_delete_document.go new file mode 100644 index 0000000..27ba778 --- /dev/null +++ b/azion-api/model_response_async_delete_document.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteDocument{} + +// ResponseAsyncDeleteDocument struct for ResponseAsyncDeleteDocument +type ResponseAsyncDeleteDocument struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteDocument instantiates a new ResponseAsyncDeleteDocument object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteDocument() *ResponseAsyncDeleteDocument { + this := ResponseAsyncDeleteDocument{} + return &this +} + +// NewResponseAsyncDeleteDocumentWithDefaults instantiates a new ResponseAsyncDeleteDocument object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteDocumentWithDefaults() *ResponseAsyncDeleteDocument { + this := ResponseAsyncDeleteDocument{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteDocument) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteDocument) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteDocument) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteDocument) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteDocument) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteDocument struct { + value *ResponseAsyncDeleteDocument + isSet bool +} + +func (v NullableResponseAsyncDeleteDocument) Get() *ResponseAsyncDeleteDocument { + return v.value +} + +func (v *NullableResponseAsyncDeleteDocument) Set(val *ResponseAsyncDeleteDocument) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteDocument) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteDocument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteDocument(val *ResponseAsyncDeleteDocument) *NullableResponseAsyncDeleteDocument { + return &NullableResponseAsyncDeleteDocument{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteDocument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteDocument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_integration.go b/azion-api/model_response_async_delete_integration.go new file mode 100644 index 0000000..715f1f3 --- /dev/null +++ b/azion-api/model_response_async_delete_integration.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteIntegration{} + +// ResponseAsyncDeleteIntegration struct for ResponseAsyncDeleteIntegration +type ResponseAsyncDeleteIntegration struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteIntegration instantiates a new ResponseAsyncDeleteIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteIntegration() *ResponseAsyncDeleteIntegration { + this := ResponseAsyncDeleteIntegration{} + return &this +} + +// NewResponseAsyncDeleteIntegrationWithDefaults instantiates a new ResponseAsyncDeleteIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteIntegrationWithDefaults() *ResponseAsyncDeleteIntegration { + this := ResponseAsyncDeleteIntegration{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteIntegration) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteIntegration) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteIntegration) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteIntegration) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteIntegration struct { + value *ResponseAsyncDeleteIntegration + isSet bool +} + +func (v NullableResponseAsyncDeleteIntegration) Get() *ResponseAsyncDeleteIntegration { + return v.value +} + +func (v *NullableResponseAsyncDeleteIntegration) Set(val *ResponseAsyncDeleteIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteIntegration(val *ResponseAsyncDeleteIntegration) *NullableResponseAsyncDeleteIntegration { + return &NullableResponseAsyncDeleteIntegration{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_knowledge_base.go b/azion-api/model_response_async_delete_knowledge_base.go new file mode 100644 index 0000000..910213f --- /dev/null +++ b/azion-api/model_response_async_delete_knowledge_base.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteKnowledgeBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteKnowledgeBase{} + +// ResponseAsyncDeleteKnowledgeBase struct for ResponseAsyncDeleteKnowledgeBase +type ResponseAsyncDeleteKnowledgeBase struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteKnowledgeBase instantiates a new ResponseAsyncDeleteKnowledgeBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteKnowledgeBase() *ResponseAsyncDeleteKnowledgeBase { + this := ResponseAsyncDeleteKnowledgeBase{} + return &this +} + +// NewResponseAsyncDeleteKnowledgeBaseWithDefaults instantiates a new ResponseAsyncDeleteKnowledgeBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteKnowledgeBaseWithDefaults() *ResponseAsyncDeleteKnowledgeBase { + this := ResponseAsyncDeleteKnowledgeBase{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteKnowledgeBase) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteKnowledgeBase) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteKnowledgeBase) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteKnowledgeBase) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteKnowledgeBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteKnowledgeBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteKnowledgeBase struct { + value *ResponseAsyncDeleteKnowledgeBase + isSet bool +} + +func (v NullableResponseAsyncDeleteKnowledgeBase) Get() *ResponseAsyncDeleteKnowledgeBase { + return v.value +} + +func (v *NullableResponseAsyncDeleteKnowledgeBase) Set(val *ResponseAsyncDeleteKnowledgeBase) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteKnowledgeBase) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteKnowledgeBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteKnowledgeBase(val *ResponseAsyncDeleteKnowledgeBase) *NullableResponseAsyncDeleteKnowledgeBase { + return &NullableResponseAsyncDeleteKnowledgeBase{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteKnowledgeBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteKnowledgeBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_message.go b/azion-api/model_response_async_delete_message.go new file mode 100644 index 0000000..577d825 --- /dev/null +++ b/azion-api/model_response_async_delete_message.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteMessage{} + +// ResponseAsyncDeleteMessage struct for ResponseAsyncDeleteMessage +type ResponseAsyncDeleteMessage struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteMessage instantiates a new ResponseAsyncDeleteMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteMessage() *ResponseAsyncDeleteMessage { + this := ResponseAsyncDeleteMessage{} + return &this +} + +// NewResponseAsyncDeleteMessageWithDefaults instantiates a new ResponseAsyncDeleteMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteMessageWithDefaults() *ResponseAsyncDeleteMessage { + this := ResponseAsyncDeleteMessage{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteMessage) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteMessage) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteMessage) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteMessage) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteMessage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteMessage struct { + value *ResponseAsyncDeleteMessage + isSet bool +} + +func (v NullableResponseAsyncDeleteMessage) Get() *ResponseAsyncDeleteMessage { + return v.value +} + +func (v *NullableResponseAsyncDeleteMessage) Set(val *ResponseAsyncDeleteMessage) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteMessage(val *ResponseAsyncDeleteMessage) *NullableResponseAsyncDeleteMessage { + return &NullableResponseAsyncDeleteMessage{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_node_service_bind.go b/azion-api/model_response_async_delete_node_service_bind.go new file mode 100644 index 0000000..5a4d80c --- /dev/null +++ b/azion-api/model_response_async_delete_node_service_bind.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteNodeServiceBind type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteNodeServiceBind{} + +// ResponseAsyncDeleteNodeServiceBind struct for ResponseAsyncDeleteNodeServiceBind +type ResponseAsyncDeleteNodeServiceBind struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteNodeServiceBind instantiates a new ResponseAsyncDeleteNodeServiceBind object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteNodeServiceBind() *ResponseAsyncDeleteNodeServiceBind { + this := ResponseAsyncDeleteNodeServiceBind{} + return &this +} + +// NewResponseAsyncDeleteNodeServiceBindWithDefaults instantiates a new ResponseAsyncDeleteNodeServiceBind object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteNodeServiceBindWithDefaults() *ResponseAsyncDeleteNodeServiceBind { + this := ResponseAsyncDeleteNodeServiceBind{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteNodeServiceBind) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteNodeServiceBind) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteNodeServiceBind) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteNodeServiceBind) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteNodeServiceBind) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteNodeServiceBind) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteNodeServiceBind struct { + value *ResponseAsyncDeleteNodeServiceBind + isSet bool +} + +func (v NullableResponseAsyncDeleteNodeServiceBind) Get() *ResponseAsyncDeleteNodeServiceBind { + return v.value +} + +func (v *NullableResponseAsyncDeleteNodeServiceBind) Set(val *ResponseAsyncDeleteNodeServiceBind) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteNodeServiceBind) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteNodeServiceBind) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteNodeServiceBind(val *ResponseAsyncDeleteNodeServiceBind) *NullableResponseAsyncDeleteNodeServiceBind { + return &NullableResponseAsyncDeleteNodeServiceBind{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteNodeServiceBind) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteNodeServiceBind) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_nodes.go b/azion-api/model_response_async_delete_nodes.go new file mode 100644 index 0000000..5fa8a3c --- /dev/null +++ b/azion-api/model_response_async_delete_nodes.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteNodes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteNodes{} + +// ResponseAsyncDeleteNodes struct for ResponseAsyncDeleteNodes +type ResponseAsyncDeleteNodes struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteNodes instantiates a new ResponseAsyncDeleteNodes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteNodes() *ResponseAsyncDeleteNodes { + this := ResponseAsyncDeleteNodes{} + return &this +} + +// NewResponseAsyncDeleteNodesWithDefaults instantiates a new ResponseAsyncDeleteNodes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteNodesWithDefaults() *ResponseAsyncDeleteNodes { + this := ResponseAsyncDeleteNodes{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteNodes) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteNodes) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteNodes) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteNodes) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteNodes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteNodes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteNodes struct { + value *ResponseAsyncDeleteNodes + isSet bool +} + +func (v NullableResponseAsyncDeleteNodes) Get() *ResponseAsyncDeleteNodes { + return v.value +} + +func (v *NullableResponseAsyncDeleteNodes) Set(val *ResponseAsyncDeleteNodes) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteNodes) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteNodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteNodes(val *ResponseAsyncDeleteNodes) *NullableResponseAsyncDeleteNodes { + return &NullableResponseAsyncDeleteNodes{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteNodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteNodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_payment_method.go b/azion-api/model_response_async_delete_payment_method.go new file mode 100644 index 0000000..5fff63e --- /dev/null +++ b/azion-api/model_response_async_delete_payment_method.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeletePaymentMethod type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeletePaymentMethod{} + +// ResponseAsyncDeletePaymentMethod struct for ResponseAsyncDeletePaymentMethod +type ResponseAsyncDeletePaymentMethod struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeletePaymentMethod instantiates a new ResponseAsyncDeletePaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeletePaymentMethod() *ResponseAsyncDeletePaymentMethod { + this := ResponseAsyncDeletePaymentMethod{} + return &this +} + +// NewResponseAsyncDeletePaymentMethodWithDefaults instantiates a new ResponseAsyncDeletePaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeletePaymentMethodWithDefaults() *ResponseAsyncDeletePaymentMethod { + this := ResponseAsyncDeletePaymentMethod{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeletePaymentMethod) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeletePaymentMethod) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeletePaymentMethod) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeletePaymentMethod) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeletePaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeletePaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeletePaymentMethod struct { + value *ResponseAsyncDeletePaymentMethod + isSet bool +} + +func (v NullableResponseAsyncDeletePaymentMethod) Get() *ResponseAsyncDeletePaymentMethod { + return v.value +} + +func (v *NullableResponseAsyncDeletePaymentMethod) Set(val *ResponseAsyncDeletePaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeletePaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeletePaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeletePaymentMethod(val *ResponseAsyncDeletePaymentMethod) *NullableResponseAsyncDeletePaymentMethod { + return &NullableResponseAsyncDeletePaymentMethod{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeletePaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeletePaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_services.go b/azion-api/model_response_async_delete_services.go new file mode 100644 index 0000000..b7729dd --- /dev/null +++ b/azion-api/model_response_async_delete_services.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteServices{} + +// ResponseAsyncDeleteServices struct for ResponseAsyncDeleteServices +type ResponseAsyncDeleteServices struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteServices instantiates a new ResponseAsyncDeleteServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteServices() *ResponseAsyncDeleteServices { + this := ResponseAsyncDeleteServices{} + return &this +} + +// NewResponseAsyncDeleteServicesWithDefaults instantiates a new ResponseAsyncDeleteServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteServicesWithDefaults() *ResponseAsyncDeleteServices { + this := ResponseAsyncDeleteServices{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteServices) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteServices) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteServices) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteServices) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteServices struct { + value *ResponseAsyncDeleteServices + isSet bool +} + +func (v NullableResponseAsyncDeleteServices) Get() *ResponseAsyncDeleteServices { + return v.value +} + +func (v *NullableResponseAsyncDeleteServices) Set(val *ResponseAsyncDeleteServices) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteServices) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteServices(val *ResponseAsyncDeleteServices) *NullableResponseAsyncDeleteServices { + return &NullableResponseAsyncDeleteServices{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_delete_tool.go b/azion-api/model_response_async_delete_tool.go new file mode 100644 index 0000000..46dc590 --- /dev/null +++ b/azion-api/model_response_async_delete_tool.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseAsyncDeleteTool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDeleteTool{} + +// ResponseAsyncDeleteTool struct for ResponseAsyncDeleteTool +type ResponseAsyncDeleteTool struct { + State *string `json:"state,omitempty"` +} + +// NewResponseAsyncDeleteTool instantiates a new ResponseAsyncDeleteTool object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDeleteTool() *ResponseAsyncDeleteTool { + this := ResponseAsyncDeleteTool{} + return &this +} + +// NewResponseAsyncDeleteToolWithDefaults instantiates a new ResponseAsyncDeleteTool object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDeleteToolWithDefaults() *ResponseAsyncDeleteTool { + this := ResponseAsyncDeleteTool{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDeleteTool) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDeleteTool) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDeleteTool) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDeleteTool) SetState(v string) { + o.State = &v +} + +func (o ResponseAsyncDeleteTool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDeleteTool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseAsyncDeleteTool struct { + value *ResponseAsyncDeleteTool + isSet bool +} + +func (v NullableResponseAsyncDeleteTool) Get() *ResponseAsyncDeleteTool { + return v.value +} + +func (v *NullableResponseAsyncDeleteTool) Set(val *ResponseAsyncDeleteTool) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDeleteTool) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDeleteTool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDeleteTool(val *ResponseAsyncDeleteTool) *NullableResponseAsyncDeleteTool { + return &NullableResponseAsyncDeleteTool{value: val, isSet: true} +} + +func (v NullableResponseAsyncDeleteTool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDeleteTool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_document.go b/azion-api/model_response_async_document.go new file mode 100644 index 0000000..702cc70 --- /dev/null +++ b/azion-api/model_response_async_document.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncDocument{} + +// ResponseAsyncDocument struct for ResponseAsyncDocument +type ResponseAsyncDocument struct { + State *string `json:"state,omitempty"` + Data Document `json:"data"` +} + +type _ResponseAsyncDocument ResponseAsyncDocument + +// NewResponseAsyncDocument instantiates a new ResponseAsyncDocument object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncDocument(data Document) *ResponseAsyncDocument { + this := ResponseAsyncDocument{} + this.Data = data + return &this +} + +// NewResponseAsyncDocumentWithDefaults instantiates a new ResponseAsyncDocument object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncDocumentWithDefaults() *ResponseAsyncDocument { + this := ResponseAsyncDocument{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncDocument) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDocument) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncDocument) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncDocument) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncDocument) GetData() Document { + if o == nil { + var ret Document + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncDocument) GetDataOk() (*Document, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncDocument) SetData(v Document) { + o.Data = v +} + +func (o ResponseAsyncDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncDocument) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncDocument) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncDocument := _ResponseAsyncDocument{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncDocument) + + if err != nil { + return err + } + + *o = ResponseAsyncDocument(varResponseAsyncDocument) + + return err +} + +type NullableResponseAsyncDocument struct { + value *ResponseAsyncDocument + isSet bool +} + +func (v NullableResponseAsyncDocument) Get() *ResponseAsyncDocument { + return v.value +} + +func (v *NullableResponseAsyncDocument) Set(val *ResponseAsyncDocument) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncDocument) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncDocument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncDocument(val *ResponseAsyncDocument) *NullableResponseAsyncDocument { + return &NullableResponseAsyncDocument{value: val, isSet: true} +} + +func (v NullableResponseAsyncDocument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncDocument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_execution.go b/azion-api/model_response_async_execution.go new file mode 100644 index 0000000..8fa8122 --- /dev/null +++ b/azion-api/model_response_async_execution.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncExecution{} + +// ResponseAsyncExecution struct for ResponseAsyncExecution +type ResponseAsyncExecution struct { + State *string `json:"state,omitempty"` + Data Execution `json:"data"` +} + +type _ResponseAsyncExecution ResponseAsyncExecution + +// NewResponseAsyncExecution instantiates a new ResponseAsyncExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncExecution(data Execution) *ResponseAsyncExecution { + this := ResponseAsyncExecution{} + this.Data = data + return &this +} + +// NewResponseAsyncExecutionWithDefaults instantiates a new ResponseAsyncExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncExecutionWithDefaults() *ResponseAsyncExecution { + this := ResponseAsyncExecution{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncExecution) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncExecution) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncExecution) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncExecution) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncExecution) GetData() Execution { + if o == nil { + var ret Execution + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncExecution) GetDataOk() (*Execution, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncExecution) SetData(v Execution) { + o.Data = v +} + +func (o ResponseAsyncExecution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncExecution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncExecution := _ResponseAsyncExecution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncExecution) + + if err != nil { + return err + } + + *o = ResponseAsyncExecution(varResponseAsyncExecution) + + return err +} + +type NullableResponseAsyncExecution struct { + value *ResponseAsyncExecution + isSet bool +} + +func (v NullableResponseAsyncExecution) Get() *ResponseAsyncExecution { + return v.value +} + +func (v *NullableResponseAsyncExecution) Set(val *ResponseAsyncExecution) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncExecution(val *ResponseAsyncExecution) *NullableResponseAsyncExecution { + return &NullableResponseAsyncExecution{value: val, isSet: true} +} + +func (v NullableResponseAsyncExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_executor.go b/azion-api/model_response_async_executor.go new file mode 100644 index 0000000..5b99860 --- /dev/null +++ b/azion-api/model_response_async_executor.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncExecutor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncExecutor{} + +// ResponseAsyncExecutor struct for ResponseAsyncExecutor +type ResponseAsyncExecutor struct { + State *string `json:"state,omitempty"` + Data Executor `json:"data"` +} + +type _ResponseAsyncExecutor ResponseAsyncExecutor + +// NewResponseAsyncExecutor instantiates a new ResponseAsyncExecutor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncExecutor(data Executor) *ResponseAsyncExecutor { + this := ResponseAsyncExecutor{} + this.Data = data + return &this +} + +// NewResponseAsyncExecutorWithDefaults instantiates a new ResponseAsyncExecutor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncExecutorWithDefaults() *ResponseAsyncExecutor { + this := ResponseAsyncExecutor{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncExecutor) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncExecutor) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncExecutor) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncExecutor) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncExecutor) GetData() Executor { + if o == nil { + var ret Executor + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncExecutor) GetDataOk() (*Executor, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncExecutor) SetData(v Executor) { + o.Data = v +} + +func (o ResponseAsyncExecutor) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncExecutor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncExecutor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncExecutor := _ResponseAsyncExecutor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncExecutor) + + if err != nil { + return err + } + + *o = ResponseAsyncExecutor(varResponseAsyncExecutor) + + return err +} + +type NullableResponseAsyncExecutor struct { + value *ResponseAsyncExecutor + isSet bool +} + +func (v NullableResponseAsyncExecutor) Get() *ResponseAsyncExecutor { + return v.value +} + +func (v *NullableResponseAsyncExecutor) Set(val *ResponseAsyncExecutor) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncExecutor) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncExecutor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncExecutor(val *ResponseAsyncExecutor) *NullableResponseAsyncExecutor { + return &NullableResponseAsyncExecutor{value: val, isSet: true} +} + +func (v NullableResponseAsyncExecutor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncExecutor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_folder.go b/azion-api/model_response_async_folder.go new file mode 100644 index 0000000..7c5cd10 --- /dev/null +++ b/azion-api/model_response_async_folder.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncFolder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncFolder{} + +// ResponseAsyncFolder struct for ResponseAsyncFolder +type ResponseAsyncFolder struct { + State *string `json:"state,omitempty"` + Data Folder `json:"data"` +} + +type _ResponseAsyncFolder ResponseAsyncFolder + +// NewResponseAsyncFolder instantiates a new ResponseAsyncFolder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncFolder(data Folder) *ResponseAsyncFolder { + this := ResponseAsyncFolder{} + this.Data = data + return &this +} + +// NewResponseAsyncFolderWithDefaults instantiates a new ResponseAsyncFolder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncFolderWithDefaults() *ResponseAsyncFolder { + this := ResponseAsyncFolder{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncFolder) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncFolder) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncFolder) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncFolder) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncFolder) GetData() Folder { + if o == nil { + var ret Folder + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncFolder) GetDataOk() (*Folder, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncFolder) SetData(v Folder) { + o.Data = v +} + +func (o ResponseAsyncFolder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncFolder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncFolder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncFolder := _ResponseAsyncFolder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncFolder) + + if err != nil { + return err + } + + *o = ResponseAsyncFolder(varResponseAsyncFolder) + + return err +} + +type NullableResponseAsyncFolder struct { + value *ResponseAsyncFolder + isSet bool +} + +func (v NullableResponseAsyncFolder) Get() *ResponseAsyncFolder { + return v.value +} + +func (v *NullableResponseAsyncFolder) Set(val *ResponseAsyncFolder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncFolder(val *ResponseAsyncFolder) *NullableResponseAsyncFolder { + return &NullableResponseAsyncFolder{value: val, isSet: true} +} + +func (v NullableResponseAsyncFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_knowledge_base.go b/azion-api/model_response_async_knowledge_base.go new file mode 100644 index 0000000..f6c9608 --- /dev/null +++ b/azion-api/model_response_async_knowledge_base.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncKnowledgeBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncKnowledgeBase{} + +// ResponseAsyncKnowledgeBase struct for ResponseAsyncKnowledgeBase +type ResponseAsyncKnowledgeBase struct { + State *string `json:"state,omitempty"` + Data KnowledgeBase `json:"data"` +} + +type _ResponseAsyncKnowledgeBase ResponseAsyncKnowledgeBase + +// NewResponseAsyncKnowledgeBase instantiates a new ResponseAsyncKnowledgeBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncKnowledgeBase(data KnowledgeBase) *ResponseAsyncKnowledgeBase { + this := ResponseAsyncKnowledgeBase{} + this.Data = data + return &this +} + +// NewResponseAsyncKnowledgeBaseWithDefaults instantiates a new ResponseAsyncKnowledgeBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncKnowledgeBaseWithDefaults() *ResponseAsyncKnowledgeBase { + this := ResponseAsyncKnowledgeBase{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncKnowledgeBase) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncKnowledgeBase) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncKnowledgeBase) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncKnowledgeBase) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncKnowledgeBase) GetData() KnowledgeBase { + if o == nil { + var ret KnowledgeBase + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncKnowledgeBase) GetDataOk() (*KnowledgeBase, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncKnowledgeBase) SetData(v KnowledgeBase) { + o.Data = v +} + +func (o ResponseAsyncKnowledgeBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncKnowledgeBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncKnowledgeBase) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncKnowledgeBase := _ResponseAsyncKnowledgeBase{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncKnowledgeBase) + + if err != nil { + return err + } + + *o = ResponseAsyncKnowledgeBase(varResponseAsyncKnowledgeBase) + + return err +} + +type NullableResponseAsyncKnowledgeBase struct { + value *ResponseAsyncKnowledgeBase + isSet bool +} + +func (v NullableResponseAsyncKnowledgeBase) Get() *ResponseAsyncKnowledgeBase { + return v.value +} + +func (v *NullableResponseAsyncKnowledgeBase) Set(val *ResponseAsyncKnowledgeBase) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncKnowledgeBase) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncKnowledgeBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncKnowledgeBase(val *ResponseAsyncKnowledgeBase) *NullableResponseAsyncKnowledgeBase { + return &NullableResponseAsyncKnowledgeBase{value: val, isSet: true} +} + +func (v NullableResponseAsyncKnowledgeBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncKnowledgeBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_message.go b/azion-api/model_response_async_message.go new file mode 100644 index 0000000..948f788 --- /dev/null +++ b/azion-api/model_response_async_message.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncMessage{} + +// ResponseAsyncMessage struct for ResponseAsyncMessage +type ResponseAsyncMessage struct { + State *string `json:"state,omitempty"` + Data Message `json:"data"` +} + +type _ResponseAsyncMessage ResponseAsyncMessage + +// NewResponseAsyncMessage instantiates a new ResponseAsyncMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncMessage(data Message) *ResponseAsyncMessage { + this := ResponseAsyncMessage{} + this.Data = data + return &this +} + +// NewResponseAsyncMessageWithDefaults instantiates a new ResponseAsyncMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncMessageWithDefaults() *ResponseAsyncMessage { + this := ResponseAsyncMessage{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncMessage) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncMessage) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncMessage) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncMessage) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncMessage) GetData() Message { + if o == nil { + var ret Message + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncMessage) GetDataOk() (*Message, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncMessage) SetData(v Message) { + o.Data = v +} + +func (o ResponseAsyncMessage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncMessage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncMessage := _ResponseAsyncMessage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncMessage) + + if err != nil { + return err + } + + *o = ResponseAsyncMessage(varResponseAsyncMessage) + + return err +} + +type NullableResponseAsyncMessage struct { + value *ResponseAsyncMessage + isSet bool +} + +func (v NullableResponseAsyncMessage) Get() *ResponseAsyncMessage { + return v.value +} + +func (v *NullableResponseAsyncMessage) Set(val *ResponseAsyncMessage) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncMessage(val *ResponseAsyncMessage) *NullableResponseAsyncMessage { + return &NullableResponseAsyncMessage{value: val, isSet: true} +} + +func (v NullableResponseAsyncMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_node_groups_by_id.go b/azion-api/model_response_async_node_groups_by_id.go new file mode 100644 index 0000000..10e8bd6 --- /dev/null +++ b/azion-api/model_response_async_node_groups_by_id.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncNodeGroupsById type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncNodeGroupsById{} + +// ResponseAsyncNodeGroupsById struct for ResponseAsyncNodeGroupsById +type ResponseAsyncNodeGroupsById struct { + State *string `json:"state,omitempty"` + Data NodeGroupsById `json:"data"` +} + +type _ResponseAsyncNodeGroupsById ResponseAsyncNodeGroupsById + +// NewResponseAsyncNodeGroupsById instantiates a new ResponseAsyncNodeGroupsById object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncNodeGroupsById(data NodeGroupsById) *ResponseAsyncNodeGroupsById { + this := ResponseAsyncNodeGroupsById{} + this.Data = data + return &this +} + +// NewResponseAsyncNodeGroupsByIdWithDefaults instantiates a new ResponseAsyncNodeGroupsById object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncNodeGroupsByIdWithDefaults() *ResponseAsyncNodeGroupsById { + this := ResponseAsyncNodeGroupsById{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncNodeGroupsById) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncNodeGroupsById) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncNodeGroupsById) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncNodeGroupsById) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncNodeGroupsById) GetData() NodeGroupsById { + if o == nil { + var ret NodeGroupsById + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncNodeGroupsById) GetDataOk() (*NodeGroupsById, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncNodeGroupsById) SetData(v NodeGroupsById) { + o.Data = v +} + +func (o ResponseAsyncNodeGroupsById) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncNodeGroupsById) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncNodeGroupsById) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncNodeGroupsById := _ResponseAsyncNodeGroupsById{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncNodeGroupsById) + + if err != nil { + return err + } + + *o = ResponseAsyncNodeGroupsById(varResponseAsyncNodeGroupsById) + + return err +} + +type NullableResponseAsyncNodeGroupsById struct { + value *ResponseAsyncNodeGroupsById + isSet bool +} + +func (v NullableResponseAsyncNodeGroupsById) Get() *ResponseAsyncNodeGroupsById { + return v.value +} + +func (v *NullableResponseAsyncNodeGroupsById) Set(val *ResponseAsyncNodeGroupsById) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncNodeGroupsById) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncNodeGroupsById) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncNodeGroupsById(val *ResponseAsyncNodeGroupsById) *NullableResponseAsyncNodeGroupsById { + return &NullableResponseAsyncNodeGroupsById{value: val, isSet: true} +} + +func (v NullableResponseAsyncNodeGroupsById) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncNodeGroupsById) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_node_services.go b/azion-api/model_response_async_node_services.go new file mode 100644 index 0000000..cc713d5 --- /dev/null +++ b/azion-api/model_response_async_node_services.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncNodeServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncNodeServices{} + +// ResponseAsyncNodeServices struct for ResponseAsyncNodeServices +type ResponseAsyncNodeServices struct { + State *string `json:"state,omitempty"` + Data NodeServices `json:"data"` +} + +type _ResponseAsyncNodeServices ResponseAsyncNodeServices + +// NewResponseAsyncNodeServices instantiates a new ResponseAsyncNodeServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncNodeServices(data NodeServices) *ResponseAsyncNodeServices { + this := ResponseAsyncNodeServices{} + this.Data = data + return &this +} + +// NewResponseAsyncNodeServicesWithDefaults instantiates a new ResponseAsyncNodeServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncNodeServicesWithDefaults() *ResponseAsyncNodeServices { + this := ResponseAsyncNodeServices{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncNodeServices) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncNodeServices) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncNodeServices) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncNodeServices) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncNodeServices) GetData() NodeServices { + if o == nil { + var ret NodeServices + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncNodeServices) GetDataOk() (*NodeServices, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncNodeServices) SetData(v NodeServices) { + o.Data = v +} + +func (o ResponseAsyncNodeServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncNodeServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncNodeServices) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncNodeServices := _ResponseAsyncNodeServices{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncNodeServices) + + if err != nil { + return err + } + + *o = ResponseAsyncNodeServices(varResponseAsyncNodeServices) + + return err +} + +type NullableResponseAsyncNodeServices struct { + value *ResponseAsyncNodeServices + isSet bool +} + +func (v NullableResponseAsyncNodeServices) Get() *ResponseAsyncNodeServices { + return v.value +} + +func (v *NullableResponseAsyncNodeServices) Set(val *ResponseAsyncNodeServices) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncNodeServices) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncNodeServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncNodeServices(val *ResponseAsyncNodeServices) *NullableResponseAsyncNodeServices { + return &NullableResponseAsyncNodeServices{value: val, isSet: true} +} + +func (v NullableResponseAsyncNodeServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncNodeServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_nodes.go b/azion-api/model_response_async_nodes.go new file mode 100644 index 0000000..de241db --- /dev/null +++ b/azion-api/model_response_async_nodes.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncNodes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncNodes{} + +// ResponseAsyncNodes struct for ResponseAsyncNodes +type ResponseAsyncNodes struct { + State *string `json:"state,omitempty"` + Data Nodes `json:"data"` +} + +type _ResponseAsyncNodes ResponseAsyncNodes + +// NewResponseAsyncNodes instantiates a new ResponseAsyncNodes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncNodes(data Nodes) *ResponseAsyncNodes { + this := ResponseAsyncNodes{} + this.Data = data + return &this +} + +// NewResponseAsyncNodesWithDefaults instantiates a new ResponseAsyncNodes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncNodesWithDefaults() *ResponseAsyncNodes { + this := ResponseAsyncNodes{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncNodes) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncNodes) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncNodes) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncNodes) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncNodes) GetData() Nodes { + if o == nil { + var ret Nodes + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncNodes) GetDataOk() (*Nodes, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncNodes) SetData(v Nodes) { + o.Data = v +} + +func (o ResponseAsyncNodes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncNodes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncNodes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncNodes := _ResponseAsyncNodes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncNodes) + + if err != nil { + return err + } + + *o = ResponseAsyncNodes(varResponseAsyncNodes) + + return err +} + +type NullableResponseAsyncNodes struct { + value *ResponseAsyncNodes + isSet bool +} + +func (v NullableResponseAsyncNodes) Get() *ResponseAsyncNodes { + return v.value +} + +func (v *NullableResponseAsyncNodes) Set(val *ResponseAsyncNodes) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncNodes) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncNodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncNodes(val *ResponseAsyncNodes) *NullableResponseAsyncNodes { + return &NullableResponseAsyncNodes{value: val, isSet: true} +} + +func (v NullableResponseAsyncNodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncNodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_order.go b/azion-api/model_response_async_order.go new file mode 100644 index 0000000..abefb0b --- /dev/null +++ b/azion-api/model_response_async_order.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncOrder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncOrder{} + +// ResponseAsyncOrder struct for ResponseAsyncOrder +type ResponseAsyncOrder struct { + State *string `json:"state,omitempty"` + Data Order `json:"data"` +} + +type _ResponseAsyncOrder ResponseAsyncOrder + +// NewResponseAsyncOrder instantiates a new ResponseAsyncOrder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncOrder(data Order) *ResponseAsyncOrder { + this := ResponseAsyncOrder{} + this.Data = data + return &this +} + +// NewResponseAsyncOrderWithDefaults instantiates a new ResponseAsyncOrder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncOrderWithDefaults() *ResponseAsyncOrder { + this := ResponseAsyncOrder{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncOrder) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncOrder) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncOrder) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncOrder) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncOrder) GetData() Order { + if o == nil { + var ret Order + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncOrder) GetDataOk() (*Order, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncOrder) SetData(v Order) { + o.Data = v +} + +func (o ResponseAsyncOrder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncOrder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncOrder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncOrder := _ResponseAsyncOrder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncOrder) + + if err != nil { + return err + } + + *o = ResponseAsyncOrder(varResponseAsyncOrder) + + return err +} + +type NullableResponseAsyncOrder struct { + value *ResponseAsyncOrder + isSet bool +} + +func (v NullableResponseAsyncOrder) Get() *ResponseAsyncOrder { + return v.value +} + +func (v *NullableResponseAsyncOrder) Set(val *ResponseAsyncOrder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncOrder(val *ResponseAsyncOrder) *NullableResponseAsyncOrder { + return &NullableResponseAsyncOrder{value: val, isSet: true} +} + +func (v NullableResponseAsyncOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_payment_method.go b/azion-api/model_response_async_payment_method.go new file mode 100644 index 0000000..42407c6 --- /dev/null +++ b/azion-api/model_response_async_payment_method.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncPaymentMethod type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncPaymentMethod{} + +// ResponseAsyncPaymentMethod struct for ResponseAsyncPaymentMethod +type ResponseAsyncPaymentMethod struct { + State *string `json:"state,omitempty"` + Data PaymentMethod `json:"data"` +} + +type _ResponseAsyncPaymentMethod ResponseAsyncPaymentMethod + +// NewResponseAsyncPaymentMethod instantiates a new ResponseAsyncPaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncPaymentMethod(data PaymentMethod) *ResponseAsyncPaymentMethod { + this := ResponseAsyncPaymentMethod{} + this.Data = data + return &this +} + +// NewResponseAsyncPaymentMethodWithDefaults instantiates a new ResponseAsyncPaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncPaymentMethodWithDefaults() *ResponseAsyncPaymentMethod { + this := ResponseAsyncPaymentMethod{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncPaymentMethod) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncPaymentMethod) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncPaymentMethod) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncPaymentMethod) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncPaymentMethod) GetData() PaymentMethod { + if o == nil { + var ret PaymentMethod + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncPaymentMethod) GetDataOk() (*PaymentMethod, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncPaymentMethod) SetData(v PaymentMethod) { + o.Data = v +} + +func (o ResponseAsyncPaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncPaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncPaymentMethod) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncPaymentMethod := _ResponseAsyncPaymentMethod{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncPaymentMethod) + + if err != nil { + return err + } + + *o = ResponseAsyncPaymentMethod(varResponseAsyncPaymentMethod) + + return err +} + +type NullableResponseAsyncPaymentMethod struct { + value *ResponseAsyncPaymentMethod + isSet bool +} + +func (v NullableResponseAsyncPaymentMethod) Get() *ResponseAsyncPaymentMethod { + return v.value +} + +func (v *NullableResponseAsyncPaymentMethod) Set(val *ResponseAsyncPaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncPaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncPaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncPaymentMethod(val *ResponseAsyncPaymentMethod) *NullableResponseAsyncPaymentMethod { + return &NullableResponseAsyncPaymentMethod{value: val, isSet: true} +} + +func (v NullableResponseAsyncPaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncPaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_report.go b/azion-api/model_response_async_report.go new file mode 100644 index 0000000..f3078ab --- /dev/null +++ b/azion-api/model_response_async_report.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncReport{} + +// ResponseAsyncReport struct for ResponseAsyncReport +type ResponseAsyncReport struct { + State *string `json:"state,omitempty"` + Data Report `json:"data"` +} + +type _ResponseAsyncReport ResponseAsyncReport + +// NewResponseAsyncReport instantiates a new ResponseAsyncReport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncReport(data Report) *ResponseAsyncReport { + this := ResponseAsyncReport{} + this.Data = data + return &this +} + +// NewResponseAsyncReportWithDefaults instantiates a new ResponseAsyncReport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncReportWithDefaults() *ResponseAsyncReport { + this := ResponseAsyncReport{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncReport) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncReport) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncReport) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncReport) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncReport) GetData() Report { + if o == nil { + var ret Report + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncReport) GetDataOk() (*Report, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncReport) SetData(v Report) { + o.Data = v +} + +func (o ResponseAsyncReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncReport) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncReport := _ResponseAsyncReport{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncReport) + + if err != nil { + return err + } + + *o = ResponseAsyncReport(varResponseAsyncReport) + + return err +} + +type NullableResponseAsyncReport struct { + value *ResponseAsyncReport + isSet bool +} + +func (v NullableResponseAsyncReport) Get() *ResponseAsyncReport { + return v.value +} + +func (v *NullableResponseAsyncReport) Set(val *ResponseAsyncReport) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncReport) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncReport(val *ResponseAsyncReport) *NullableResponseAsyncReport { + return &NullableResponseAsyncReport{value: val, isSet: true} +} + +func (v NullableResponseAsyncReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_row.go b/azion-api/model_response_async_row.go new file mode 100644 index 0000000..53c9990 --- /dev/null +++ b/azion-api/model_response_async_row.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncRow{} + +// ResponseAsyncRow struct for ResponseAsyncRow +type ResponseAsyncRow struct { + State *string `json:"state,omitempty"` + Data Row `json:"data"` +} + +type _ResponseAsyncRow ResponseAsyncRow + +// NewResponseAsyncRow instantiates a new ResponseAsyncRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncRow(data Row) *ResponseAsyncRow { + this := ResponseAsyncRow{} + this.Data = data + return &this +} + +// NewResponseAsyncRowWithDefaults instantiates a new ResponseAsyncRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncRowWithDefaults() *ResponseAsyncRow { + this := ResponseAsyncRow{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncRow) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncRow) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncRow) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncRow) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncRow) GetData() Row { + if o == nil { + var ret Row + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncRow) GetDataOk() (*Row, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncRow) SetData(v Row) { + o.Data = v +} + +func (o ResponseAsyncRow) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncRow := _ResponseAsyncRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncRow) + + if err != nil { + return err + } + + *o = ResponseAsyncRow(varResponseAsyncRow) + + return err +} + +type NullableResponseAsyncRow struct { + value *ResponseAsyncRow + isSet bool +} + +func (v NullableResponseAsyncRow) Get() *ResponseAsyncRow { + return v.value +} + +func (v *NullableResponseAsyncRow) Set(val *ResponseAsyncRow) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncRow) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncRow(val *ResponseAsyncRow) *NullableResponseAsyncRow { + return &NullableResponseAsyncRow{value: val, isSet: true} +} + +func (v NullableResponseAsyncRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_services.go b/azion-api/model_response_async_services.go new file mode 100644 index 0000000..8894ded --- /dev/null +++ b/azion-api/model_response_async_services.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncServices{} + +// ResponseAsyncServices struct for ResponseAsyncServices +type ResponseAsyncServices struct { + State *string `json:"state,omitempty"` + Data Services `json:"data"` +} + +type _ResponseAsyncServices ResponseAsyncServices + +// NewResponseAsyncServices instantiates a new ResponseAsyncServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncServices(data Services) *ResponseAsyncServices { + this := ResponseAsyncServices{} + this.Data = data + return &this +} + +// NewResponseAsyncServicesWithDefaults instantiates a new ResponseAsyncServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncServicesWithDefaults() *ResponseAsyncServices { + this := ResponseAsyncServices{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncServices) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncServices) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncServices) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncServices) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncServices) GetData() Services { + if o == nil { + var ret Services + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncServices) GetDataOk() (*Services, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncServices) SetData(v Services) { + o.Data = v +} + +func (o ResponseAsyncServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncServices) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncServices := _ResponseAsyncServices{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncServices) + + if err != nil { + return err + } + + *o = ResponseAsyncServices(varResponseAsyncServices) + + return err +} + +type NullableResponseAsyncServices struct { + value *ResponseAsyncServices + isSet bool +} + +func (v NullableResponseAsyncServices) Get() *ResponseAsyncServices { + return v.value +} + +func (v *NullableResponseAsyncServices) Set(val *ResponseAsyncServices) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncServices) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncServices(val *ResponseAsyncServices) *NullableResponseAsyncServices { + return &NullableResponseAsyncServices{value: val, isSet: true} +} + +func (v NullableResponseAsyncServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_async_tool.go b/azion-api/model_response_async_tool.go new file mode 100644 index 0000000..cdcc7b2 --- /dev/null +++ b/azion-api/model_response_async_tool.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseAsyncTool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseAsyncTool{} + +// ResponseAsyncTool struct for ResponseAsyncTool +type ResponseAsyncTool struct { + State *string `json:"state,omitempty"` + Data Tool `json:"data"` +} + +type _ResponseAsyncTool ResponseAsyncTool + +// NewResponseAsyncTool instantiates a new ResponseAsyncTool object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseAsyncTool(data Tool) *ResponseAsyncTool { + this := ResponseAsyncTool{} + this.Data = data + return &this +} + +// NewResponseAsyncToolWithDefaults instantiates a new ResponseAsyncTool object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseAsyncToolWithDefaults() *ResponseAsyncTool { + this := ResponseAsyncTool{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseAsyncTool) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseAsyncTool) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseAsyncTool) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseAsyncTool) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseAsyncTool) GetData() Tool { + if o == nil { + var ret Tool + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseAsyncTool) GetDataOk() (*Tool, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseAsyncTool) SetData(v Tool) { + o.Data = v +} + +func (o ResponseAsyncTool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseAsyncTool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseAsyncTool) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseAsyncTool := _ResponseAsyncTool{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseAsyncTool) + + if err != nil { + return err + } + + *o = ResponseAsyncTool(varResponseAsyncTool) + + return err +} + +type NullableResponseAsyncTool struct { + value *ResponseAsyncTool + isSet bool +} + +func (v NullableResponseAsyncTool) Get() *ResponseAsyncTool { + return v.value +} + +func (v *NullableResponseAsyncTool) Set(val *ResponseAsyncTool) { + v.value = val + v.isSet = true +} + +func (v NullableResponseAsyncTool) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseAsyncTool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseAsyncTool(val *ResponseAsyncTool) *NullableResponseAsyncTool { + return &NullableResponseAsyncTool{value: val, isSet: true} +} + +func (v NullableResponseAsyncTool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseAsyncTool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_bucket_object.go b/azion-api/model_response_bucket_object.go new file mode 100644 index 0000000..2752e28 --- /dev/null +++ b/azion-api/model_response_bucket_object.go @@ -0,0 +1,189 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseBucketObject type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseBucketObject{} + +// ResponseBucketObject struct for ResponseBucketObject +type ResponseBucketObject struct { + ContinuationToken NullableString `json:"continuation_token"` + Results []BucketObject `json:"results"` +} + +type _ResponseBucketObject ResponseBucketObject + +// NewResponseBucketObject instantiates a new ResponseBucketObject object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseBucketObject(continuationToken NullableString, results []BucketObject) *ResponseBucketObject { + this := ResponseBucketObject{} + this.ContinuationToken = continuationToken + this.Results = results + return &this +} + +// NewResponseBucketObjectWithDefaults instantiates a new ResponseBucketObject object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseBucketObjectWithDefaults() *ResponseBucketObject { + this := ResponseBucketObject{} + return &this +} + +// GetContinuationToken returns the ContinuationToken field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ResponseBucketObject) GetContinuationToken() string { + if o == nil || o.ContinuationToken.Get() == nil { + var ret string + return ret + } + + return *o.ContinuationToken.Get() +} + +// GetContinuationTokenOk returns a tuple with the ContinuationToken field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseBucketObject) GetContinuationTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContinuationToken.Get(), o.ContinuationToken.IsSet() +} + +// SetContinuationToken sets field value +func (o *ResponseBucketObject) SetContinuationToken(v string) { + o.ContinuationToken.Set(&v) +} + +// GetResults returns the Results field value +func (o *ResponseBucketObject) GetResults() []BucketObject { + if o == nil { + var ret []BucketObject + return ret + } + + return o.Results +} + +// GetResultsOk returns a tuple with the Results field value +// and a boolean to check if the value has been set. +func (o *ResponseBucketObject) GetResultsOk() ([]BucketObject, bool) { + if o == nil { + return nil, false + } + return o.Results, true +} + +// SetResults sets field value +func (o *ResponseBucketObject) SetResults(v []BucketObject) { + o.Results = v +} + +func (o ResponseBucketObject) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseBucketObject) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["continuation_token"] = o.ContinuationToken.Get() + toSerialize["results"] = o.Results + return toSerialize, nil +} + +func (o *ResponseBucketObject) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "continuation_token", + "results", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseBucketObject := _ResponseBucketObject{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseBucketObject) + + if err != nil { + return err + } + + *o = ResponseBucketObject(varResponseBucketObject) + + return err +} + +type NullableResponseBucketObject struct { + value *ResponseBucketObject + isSet bool +} + +func (v NullableResponseBucketObject) Get() *ResponseBucketObject { + return v.value +} + +func (v *NullableResponseBucketObject) Set(val *ResponseBucketObject) { + v.value = val + v.isSet = true +} + +func (v NullableResponseBucketObject) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseBucketObject) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseBucketObject(val *ResponseBucketObject) *NullableResponseBucketObject { + return &NullableResponseBucketObject{value: val, isSet: true} +} + +func (v NullableResponseBucketObject) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseBucketObject) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_chat_thread.go b/azion-api/model_response_chat_thread.go new file mode 100644 index 0000000..9cb12f7 --- /dev/null +++ b/azion-api/model_response_chat_thread.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseChatThread type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseChatThread{} + +// ResponseChatThread struct for ResponseChatThread +type ResponseChatThread struct { + State *string `json:"state,omitempty"` + Data ChatThread `json:"data"` +} + +type _ResponseChatThread ResponseChatThread + +// NewResponseChatThread instantiates a new ResponseChatThread object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseChatThread(data ChatThread) *ResponseChatThread { + this := ResponseChatThread{} + this.Data = data + return &this +} + +// NewResponseChatThreadWithDefaults instantiates a new ResponseChatThread object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseChatThreadWithDefaults() *ResponseChatThread { + this := ResponseChatThread{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseChatThread) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseChatThread) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseChatThread) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseChatThread) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseChatThread) GetData() ChatThread { + if o == nil { + var ret ChatThread + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseChatThread) GetDataOk() (*ChatThread, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseChatThread) SetData(v ChatThread) { + o.Data = v +} + +func (o ResponseChatThread) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseChatThread) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseChatThread) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseChatThread := _ResponseChatThread{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseChatThread) + + if err != nil { + return err + } + + *o = ResponseChatThread(varResponseChatThread) + + return err +} + +type NullableResponseChatThread struct { + value *ResponseChatThread + isSet bool +} + +func (v NullableResponseChatThread) Get() *ResponseChatThread { + return v.value +} + +func (v *NullableResponseChatThread) Set(val *ResponseChatThread) { + v.value = val + v.isSet = true +} + +func (v NullableResponseChatThread) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseChatThread) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseChatThread(val *ResponseChatThread) *NullableResponseChatThread { + return &NullableResponseChatThread{value: val, isSet: true} +} + +func (v NullableResponseChatThread) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseChatThread) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_continuous_deployment.go b/azion-api/model_response_continuous_deployment.go new file mode 100644 index 0000000..bdc02ca --- /dev/null +++ b/azion-api/model_response_continuous_deployment.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseContinuousDeployment{} + +// ResponseContinuousDeployment struct for ResponseContinuousDeployment +type ResponseContinuousDeployment struct { + State *string `json:"state,omitempty"` + Data ContinuousDeployment `json:"data"` +} + +type _ResponseContinuousDeployment ResponseContinuousDeployment + +// NewResponseContinuousDeployment instantiates a new ResponseContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseContinuousDeployment(data ContinuousDeployment) *ResponseContinuousDeployment { + this := ResponseContinuousDeployment{} + this.Data = data + return &this +} + +// NewResponseContinuousDeploymentWithDefaults instantiates a new ResponseContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseContinuousDeploymentWithDefaults() *ResponseContinuousDeployment { + this := ResponseContinuousDeployment{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseContinuousDeployment) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseContinuousDeployment) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseContinuousDeployment) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseContinuousDeployment) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseContinuousDeployment) GetData() ContinuousDeployment { + if o == nil { + var ret ContinuousDeployment + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseContinuousDeployment) GetDataOk() (*ContinuousDeployment, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseContinuousDeployment) SetData(v ContinuousDeployment) { + o.Data = v +} + +func (o ResponseContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseContinuousDeployment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseContinuousDeployment := _ResponseContinuousDeployment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseContinuousDeployment) + + if err != nil { + return err + } + + *o = ResponseContinuousDeployment(varResponseContinuousDeployment) + + return err +} + +type NullableResponseContinuousDeployment struct { + value *ResponseContinuousDeployment + isSet bool +} + +func (v NullableResponseContinuousDeployment) Get() *ResponseContinuousDeployment { + return v.value +} + +func (v *NullableResponseContinuousDeployment) Set(val *ResponseContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableResponseContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseContinuousDeployment(val *ResponseContinuousDeployment) *NullableResponseContinuousDeployment { + return &NullableResponseContinuousDeployment{value: val, isSet: true} +} + +func (v NullableResponseContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_credit.go b/azion-api/model_response_credit.go new file mode 100644 index 0000000..21dbd4b --- /dev/null +++ b/azion-api/model_response_credit.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseCredit type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseCredit{} + +// ResponseCredit struct for ResponseCredit +type ResponseCredit struct { + State *string `json:"state,omitempty"` + Data Credit `json:"data"` +} + +type _ResponseCredit ResponseCredit + +// NewResponseCredit instantiates a new ResponseCredit object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseCredit(data Credit) *ResponseCredit { + this := ResponseCredit{} + this.Data = data + return &this +} + +// NewResponseCreditWithDefaults instantiates a new ResponseCredit object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseCreditWithDefaults() *ResponseCredit { + this := ResponseCredit{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseCredit) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseCredit) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseCredit) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseCredit) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseCredit) GetData() Credit { + if o == nil { + var ret Credit + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseCredit) GetDataOk() (*Credit, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseCredit) SetData(v Credit) { + o.Data = v +} + +func (o ResponseCredit) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseCredit) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseCredit) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseCredit := _ResponseCredit{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseCredit) + + if err != nil { + return err + } + + *o = ResponseCredit(varResponseCredit) + + return err +} + +type NullableResponseCredit struct { + value *ResponseCredit + isSet bool +} + +func (v NullableResponseCredit) Get() *ResponseCredit { + return v.value +} + +func (v *NullableResponseCredit) Set(val *ResponseCredit) { + v.value = val + v.isSet = true +} + +func (v NullableResponseCredit) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseCredit) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseCredit(val *ResponseCredit) *NullableResponseCredit { + return &NullableResponseCredit{value: val, isSet: true} +} + +func (v NullableResponseCredit) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseCredit) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_dashboard.go b/azion-api/model_response_dashboard.go new file mode 100644 index 0000000..8584c54 --- /dev/null +++ b/azion-api/model_response_dashboard.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDashboard{} + +// ResponseDashboard struct for ResponseDashboard +type ResponseDashboard struct { + State *string `json:"state,omitempty"` + Data Dashboard `json:"data"` +} + +type _ResponseDashboard ResponseDashboard + +// NewResponseDashboard instantiates a new ResponseDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDashboard(data Dashboard) *ResponseDashboard { + this := ResponseDashboard{} + this.Data = data + return &this +} + +// NewResponseDashboardWithDefaults instantiates a new ResponseDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDashboardWithDefaults() *ResponseDashboard { + this := ResponseDashboard{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDashboard) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDashboard) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDashboard) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDashboard) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseDashboard) GetData() Dashboard { + if o == nil { + var ret Dashboard + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseDashboard) GetDataOk() (*Dashboard, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseDashboard) SetData(v Dashboard) { + o.Data = v +} + +func (o ResponseDashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseDashboard) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDashboard := _ResponseDashboard{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDashboard) + + if err != nil { + return err + } + + *o = ResponseDashboard(varResponseDashboard) + + return err +} + +type NullableResponseDashboard struct { + value *ResponseDashboard + isSet bool +} + +func (v NullableResponseDashboard) Get() *ResponseDashboard { + return v.value +} + +func (v *NullableResponseDashboard) Set(val *ResponseDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDashboard(val *ResponseDashboard) *NullableResponseDashboard { + return &NullableResponseDashboard{value: val, isSet: true} +} + +func (v NullableResponseDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_chat_thread.go b/azion-api/model_response_delete_chat_thread.go new file mode 100644 index 0000000..573fd30 --- /dev/null +++ b/azion-api/model_response_delete_chat_thread.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteChatThread type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteChatThread{} + +// ResponseDeleteChatThread struct for ResponseDeleteChatThread +type ResponseDeleteChatThread struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteChatThread instantiates a new ResponseDeleteChatThread object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteChatThread() *ResponseDeleteChatThread { + this := ResponseDeleteChatThread{} + return &this +} + +// NewResponseDeleteChatThreadWithDefaults instantiates a new ResponseDeleteChatThread object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteChatThreadWithDefaults() *ResponseDeleteChatThread { + this := ResponseDeleteChatThread{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteChatThread) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteChatThread) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteChatThread) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteChatThread) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteChatThread) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteChatThread) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteChatThread struct { + value *ResponseDeleteChatThread + isSet bool +} + +func (v NullableResponseDeleteChatThread) Get() *ResponseDeleteChatThread { + return v.value +} + +func (v *NullableResponseDeleteChatThread) Set(val *ResponseDeleteChatThread) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteChatThread) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteChatThread) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteChatThread(val *ResponseDeleteChatThread) *NullableResponseDeleteChatThread { + return &NullableResponseDeleteChatThread{value: val, isSet: true} +} + +func (v NullableResponseDeleteChatThread) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteChatThread) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_continuous_deployment.go b/azion-api/model_response_delete_continuous_deployment.go new file mode 100644 index 0000000..c32275b --- /dev/null +++ b/azion-api/model_response_delete_continuous_deployment.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteContinuousDeployment{} + +// ResponseDeleteContinuousDeployment struct for ResponseDeleteContinuousDeployment +type ResponseDeleteContinuousDeployment struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteContinuousDeployment instantiates a new ResponseDeleteContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteContinuousDeployment() *ResponseDeleteContinuousDeployment { + this := ResponseDeleteContinuousDeployment{} + return &this +} + +// NewResponseDeleteContinuousDeploymentWithDefaults instantiates a new ResponseDeleteContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteContinuousDeploymentWithDefaults() *ResponseDeleteContinuousDeployment { + this := ResponseDeleteContinuousDeployment{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteContinuousDeployment) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteContinuousDeployment) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteContinuousDeployment) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteContinuousDeployment) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteContinuousDeployment struct { + value *ResponseDeleteContinuousDeployment + isSet bool +} + +func (v NullableResponseDeleteContinuousDeployment) Get() *ResponseDeleteContinuousDeployment { + return v.value +} + +func (v *NullableResponseDeleteContinuousDeployment) Set(val *ResponseDeleteContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteContinuousDeployment(val *ResponseDeleteContinuousDeployment) *NullableResponseDeleteContinuousDeployment { + return &NullableResponseDeleteContinuousDeployment{value: val, isSet: true} +} + +func (v NullableResponseDeleteContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_dashboard.go b/azion-api/model_response_delete_dashboard.go new file mode 100644 index 0000000..cdc7f21 --- /dev/null +++ b/azion-api/model_response_delete_dashboard.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteDashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteDashboard{} + +// ResponseDeleteDashboard struct for ResponseDeleteDashboard +type ResponseDeleteDashboard struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteDashboard instantiates a new ResponseDeleteDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteDashboard() *ResponseDeleteDashboard { + this := ResponseDeleteDashboard{} + return &this +} + +// NewResponseDeleteDashboardWithDefaults instantiates a new ResponseDeleteDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteDashboardWithDefaults() *ResponseDeleteDashboard { + this := ResponseDeleteDashboard{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteDashboard) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteDashboard) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteDashboard) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteDashboard) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteDashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteDashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteDashboard struct { + value *ResponseDeleteDashboard + isSet bool +} + +func (v NullableResponseDeleteDashboard) Get() *ResponseDeleteDashboard { + return v.value +} + +func (v *NullableResponseDeleteDashboard) Set(val *ResponseDeleteDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteDashboard(val *ResponseDeleteDashboard) *NullableResponseDeleteDashboard { + return &NullableResponseDeleteDashboard{value: val, isSet: true} +} + +func (v NullableResponseDeleteDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_document.go b/azion-api/model_response_delete_document.go new file mode 100644 index 0000000..10fc871 --- /dev/null +++ b/azion-api/model_response_delete_document.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteDocument{} + +// ResponseDeleteDocument struct for ResponseDeleteDocument +type ResponseDeleteDocument struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteDocument instantiates a new ResponseDeleteDocument object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteDocument() *ResponseDeleteDocument { + this := ResponseDeleteDocument{} + return &this +} + +// NewResponseDeleteDocumentWithDefaults instantiates a new ResponseDeleteDocument object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteDocumentWithDefaults() *ResponseDeleteDocument { + this := ResponseDeleteDocument{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteDocument) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteDocument) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteDocument) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteDocument) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteDocument) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteDocument struct { + value *ResponseDeleteDocument + isSet bool +} + +func (v NullableResponseDeleteDocument) Get() *ResponseDeleteDocument { + return v.value +} + +func (v *NullableResponseDeleteDocument) Set(val *ResponseDeleteDocument) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteDocument) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteDocument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteDocument(val *ResponseDeleteDocument) *NullableResponseDeleteDocument { + return &NullableResponseDeleteDocument{value: val, isSet: true} +} + +func (v NullableResponseDeleteDocument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteDocument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_favorite.go b/azion-api/model_response_delete_favorite.go new file mode 100644 index 0000000..9375667 --- /dev/null +++ b/azion-api/model_response_delete_favorite.go @@ -0,0 +1,190 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDeleteFavorite type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteFavorite{} + +// ResponseDeleteFavorite struct for ResponseDeleteFavorite +type ResponseDeleteFavorite struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data NullableFavorite `json:"data"` +} + +type _ResponseDeleteFavorite ResponseDeleteFavorite + +// NewResponseDeleteFavorite instantiates a new ResponseDeleteFavorite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteFavorite(state string, data NullableFavorite) *ResponseDeleteFavorite { + this := ResponseDeleteFavorite{} + this.State = state + this.Data = data + return &this +} + +// NewResponseDeleteFavoriteWithDefaults instantiates a new ResponseDeleteFavorite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteFavoriteWithDefaults() *ResponseDeleteFavorite { + this := ResponseDeleteFavorite{} + return &this +} + +// GetState returns the State field value +func (o *ResponseDeleteFavorite) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseDeleteFavorite) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseDeleteFavorite) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +// If the value is explicit nil, the zero value for Favorite will be returned +func (o *ResponseDeleteFavorite) GetData() Favorite { + if o == nil || o.Data.Get() == nil { + var ret Favorite + return ret + } + + return *o.Data.Get() +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseDeleteFavorite) GetDataOk() (*Favorite, bool) { + if o == nil { + return nil, false + } + return o.Data.Get(), o.Data.IsSet() +} + +// SetData sets field value +func (o *ResponseDeleteFavorite) SetData(v Favorite) { + o.Data.Set(&v) +} + +func (o ResponseDeleteFavorite) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteFavorite) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data.Get() + return toSerialize, nil +} + +func (o *ResponseDeleteFavorite) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDeleteFavorite := _ResponseDeleteFavorite{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDeleteFavorite) + + if err != nil { + return err + } + + *o = ResponseDeleteFavorite(varResponseDeleteFavorite) + + return err +} + +type NullableResponseDeleteFavorite struct { + value *ResponseDeleteFavorite + isSet bool +} + +func (v NullableResponseDeleteFavorite) Get() *ResponseDeleteFavorite { + return v.value +} + +func (v *NullableResponseDeleteFavorite) Set(val *ResponseDeleteFavorite) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteFavorite) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteFavorite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteFavorite(val *ResponseDeleteFavorite) *NullableResponseDeleteFavorite { + return &NullableResponseDeleteFavorite{value: val, isSet: true} +} + +func (v NullableResponseDeleteFavorite) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteFavorite) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_folder.go b/azion-api/model_response_delete_folder.go new file mode 100644 index 0000000..1a947a9 --- /dev/null +++ b/azion-api/model_response_delete_folder.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteFolder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteFolder{} + +// ResponseDeleteFolder struct for ResponseDeleteFolder +type ResponseDeleteFolder struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteFolder instantiates a new ResponseDeleteFolder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteFolder() *ResponseDeleteFolder { + this := ResponseDeleteFolder{} + return &this +} + +// NewResponseDeleteFolderWithDefaults instantiates a new ResponseDeleteFolder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteFolderWithDefaults() *ResponseDeleteFolder { + this := ResponseDeleteFolder{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteFolder) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteFolder) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteFolder) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteFolder) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteFolder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteFolder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteFolder struct { + value *ResponseDeleteFolder + isSet bool +} + +func (v NullableResponseDeleteFolder) Get() *ResponseDeleteFolder { + return v.value +} + +func (v *NullableResponseDeleteFolder) Set(val *ResponseDeleteFolder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteFolder(val *ResponseDeleteFolder) *NullableResponseDeleteFolder { + return &NullableResponseDeleteFolder{value: val, isSet: true} +} + +func (v NullableResponseDeleteFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_grant.go b/azion-api/model_response_delete_grant.go new file mode 100644 index 0000000..6906986 --- /dev/null +++ b/azion-api/model_response_delete_grant.go @@ -0,0 +1,190 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDeleteGrant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteGrant{} + +// ResponseDeleteGrant struct for ResponseDeleteGrant +type ResponseDeleteGrant struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data NullableGrant `json:"data"` +} + +type _ResponseDeleteGrant ResponseDeleteGrant + +// NewResponseDeleteGrant instantiates a new ResponseDeleteGrant object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteGrant(state string, data NullableGrant) *ResponseDeleteGrant { + this := ResponseDeleteGrant{} + this.State = state + this.Data = data + return &this +} + +// NewResponseDeleteGrantWithDefaults instantiates a new ResponseDeleteGrant object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteGrantWithDefaults() *ResponseDeleteGrant { + this := ResponseDeleteGrant{} + return &this +} + +// GetState returns the State field value +func (o *ResponseDeleteGrant) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseDeleteGrant) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseDeleteGrant) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +// If the value is explicit nil, the zero value for Grant will be returned +func (o *ResponseDeleteGrant) GetData() Grant { + if o == nil || o.Data.Get() == nil { + var ret Grant + return ret + } + + return *o.Data.Get() +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseDeleteGrant) GetDataOk() (*Grant, bool) { + if o == nil { + return nil, false + } + return o.Data.Get(), o.Data.IsSet() +} + +// SetData sets field value +func (o *ResponseDeleteGrant) SetData(v Grant) { + o.Data.Set(&v) +} + +func (o ResponseDeleteGrant) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteGrant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data.Get() + return toSerialize, nil +} + +func (o *ResponseDeleteGrant) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDeleteGrant := _ResponseDeleteGrant{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDeleteGrant) + + if err != nil { + return err + } + + *o = ResponseDeleteGrant(varResponseDeleteGrant) + + return err +} + +type NullableResponseDeleteGrant struct { + value *ResponseDeleteGrant + isSet bool +} + +func (v NullableResponseDeleteGrant) Get() *ResponseDeleteGrant { + return v.value +} + +func (v *NullableResponseDeleteGrant) Set(val *ResponseDeleteGrant) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteGrant) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteGrant) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteGrant(val *ResponseDeleteGrant) *NullableResponseDeleteGrant { + return &NullableResponseDeleteGrant{value: val, isSet: true} +} + +func (v NullableResponseDeleteGrant) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteGrant) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_group.go b/azion-api/model_response_delete_group.go new file mode 100644 index 0000000..c5957c9 --- /dev/null +++ b/azion-api/model_response_delete_group.go @@ -0,0 +1,190 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDeleteGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteGroup{} + +// ResponseDeleteGroup struct for ResponseDeleteGroup +type ResponseDeleteGroup struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data NullableGroup `json:"data"` +} + +type _ResponseDeleteGroup ResponseDeleteGroup + +// NewResponseDeleteGroup instantiates a new ResponseDeleteGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteGroup(state string, data NullableGroup) *ResponseDeleteGroup { + this := ResponseDeleteGroup{} + this.State = state + this.Data = data + return &this +} + +// NewResponseDeleteGroupWithDefaults instantiates a new ResponseDeleteGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteGroupWithDefaults() *ResponseDeleteGroup { + this := ResponseDeleteGroup{} + return &this +} + +// GetState returns the State field value +func (o *ResponseDeleteGroup) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseDeleteGroup) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseDeleteGroup) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +// If the value is explicit nil, the zero value for Group will be returned +func (o *ResponseDeleteGroup) GetData() Group { + if o == nil || o.Data.Get() == nil { + var ret Group + return ret + } + + return *o.Data.Get() +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseDeleteGroup) GetDataOk() (*Group, bool) { + if o == nil { + return nil, false + } + return o.Data.Get(), o.Data.IsSet() +} + +// SetData sets field value +func (o *ResponseDeleteGroup) SetData(v Group) { + o.Data.Set(&v) +} + +func (o ResponseDeleteGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data.Get() + return toSerialize, nil +} + +func (o *ResponseDeleteGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDeleteGroup := _ResponseDeleteGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDeleteGroup) + + if err != nil { + return err + } + + *o = ResponseDeleteGroup(varResponseDeleteGroup) + + return err +} + +type NullableResponseDeleteGroup struct { + value *ResponseDeleteGroup + isSet bool +} + +func (v NullableResponseDeleteGroup) Get() *ResponseDeleteGroup { + return v.value +} + +func (v *NullableResponseDeleteGroup) Set(val *ResponseDeleteGroup) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteGroup(val *ResponseDeleteGroup) *NullableResponseDeleteGroup { + return &NullableResponseDeleteGroup{value: val, isSet: true} +} + +func (v NullableResponseDeleteGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_integration.go b/azion-api/model_response_delete_integration.go new file mode 100644 index 0000000..13199a7 --- /dev/null +++ b/azion-api/model_response_delete_integration.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteIntegration{} + +// ResponseDeleteIntegration struct for ResponseDeleteIntegration +type ResponseDeleteIntegration struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteIntegration instantiates a new ResponseDeleteIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteIntegration() *ResponseDeleteIntegration { + this := ResponseDeleteIntegration{} + return &this +} + +// NewResponseDeleteIntegrationWithDefaults instantiates a new ResponseDeleteIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteIntegrationWithDefaults() *ResponseDeleteIntegration { + this := ResponseDeleteIntegration{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteIntegration) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteIntegration) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteIntegration) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteIntegration) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteIntegration struct { + value *ResponseDeleteIntegration + isSet bool +} + +func (v NullableResponseDeleteIntegration) Get() *ResponseDeleteIntegration { + return v.value +} + +func (v *NullableResponseDeleteIntegration) Set(val *ResponseDeleteIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteIntegration(val *ResponseDeleteIntegration) *NullableResponseDeleteIntegration { + return &NullableResponseDeleteIntegration{value: val, isSet: true} +} + +func (v NullableResponseDeleteIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_knowledge_base.go b/azion-api/model_response_delete_knowledge_base.go new file mode 100644 index 0000000..1000e34 --- /dev/null +++ b/azion-api/model_response_delete_knowledge_base.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteKnowledgeBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteKnowledgeBase{} + +// ResponseDeleteKnowledgeBase struct for ResponseDeleteKnowledgeBase +type ResponseDeleteKnowledgeBase struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteKnowledgeBase instantiates a new ResponseDeleteKnowledgeBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteKnowledgeBase() *ResponseDeleteKnowledgeBase { + this := ResponseDeleteKnowledgeBase{} + return &this +} + +// NewResponseDeleteKnowledgeBaseWithDefaults instantiates a new ResponseDeleteKnowledgeBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteKnowledgeBaseWithDefaults() *ResponseDeleteKnowledgeBase { + this := ResponseDeleteKnowledgeBase{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteKnowledgeBase) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteKnowledgeBase) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteKnowledgeBase) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteKnowledgeBase) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteKnowledgeBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteKnowledgeBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteKnowledgeBase struct { + value *ResponseDeleteKnowledgeBase + isSet bool +} + +func (v NullableResponseDeleteKnowledgeBase) Get() *ResponseDeleteKnowledgeBase { + return v.value +} + +func (v *NullableResponseDeleteKnowledgeBase) Set(val *ResponseDeleteKnowledgeBase) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteKnowledgeBase) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteKnowledgeBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteKnowledgeBase(val *ResponseDeleteKnowledgeBase) *NullableResponseDeleteKnowledgeBase { + return &NullableResponseDeleteKnowledgeBase{value: val, isSet: true} +} + +func (v NullableResponseDeleteKnowledgeBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteKnowledgeBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_message.go b/azion-api/model_response_delete_message.go new file mode 100644 index 0000000..a6fdb36 --- /dev/null +++ b/azion-api/model_response_delete_message.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteMessage{} + +// ResponseDeleteMessage struct for ResponseDeleteMessage +type ResponseDeleteMessage struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteMessage instantiates a new ResponseDeleteMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteMessage() *ResponseDeleteMessage { + this := ResponseDeleteMessage{} + return &this +} + +// NewResponseDeleteMessageWithDefaults instantiates a new ResponseDeleteMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteMessageWithDefaults() *ResponseDeleteMessage { + this := ResponseDeleteMessage{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteMessage) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteMessage) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteMessage) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteMessage) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteMessage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteMessage struct { + value *ResponseDeleteMessage + isSet bool +} + +func (v NullableResponseDeleteMessage) Get() *ResponseDeleteMessage { + return v.value +} + +func (v *NullableResponseDeleteMessage) Set(val *ResponseDeleteMessage) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteMessage(val *ResponseDeleteMessage) *NullableResponseDeleteMessage { + return &NullableResponseDeleteMessage{value: val, isSet: true} +} + +func (v NullableResponseDeleteMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_payment_method.go b/azion-api/model_response_delete_payment_method.go new file mode 100644 index 0000000..e38b3cf --- /dev/null +++ b/azion-api/model_response_delete_payment_method.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeletePaymentMethod type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeletePaymentMethod{} + +// ResponseDeletePaymentMethod struct for ResponseDeletePaymentMethod +type ResponseDeletePaymentMethod struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeletePaymentMethod instantiates a new ResponseDeletePaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeletePaymentMethod() *ResponseDeletePaymentMethod { + this := ResponseDeletePaymentMethod{} + return &this +} + +// NewResponseDeletePaymentMethodWithDefaults instantiates a new ResponseDeletePaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeletePaymentMethodWithDefaults() *ResponseDeletePaymentMethod { + this := ResponseDeletePaymentMethod{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeletePaymentMethod) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeletePaymentMethod) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeletePaymentMethod) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeletePaymentMethod) SetState(v string) { + o.State = &v +} + +func (o ResponseDeletePaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeletePaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeletePaymentMethod struct { + value *ResponseDeletePaymentMethod + isSet bool +} + +func (v NullableResponseDeletePaymentMethod) Get() *ResponseDeletePaymentMethod { + return v.value +} + +func (v *NullableResponseDeletePaymentMethod) Set(val *ResponseDeletePaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeletePaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeletePaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeletePaymentMethod(val *ResponseDeletePaymentMethod) *NullableResponseDeletePaymentMethod { + return &NullableResponseDeletePaymentMethod{value: val, isSet: true} +} + +func (v NullableResponseDeletePaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeletePaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_recommendation.go b/azion-api/model_response_delete_recommendation.go new file mode 100644 index 0000000..9ae6016 --- /dev/null +++ b/azion-api/model_response_delete_recommendation.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteRecommendation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteRecommendation{} + +// ResponseDeleteRecommendation struct for ResponseDeleteRecommendation +type ResponseDeleteRecommendation struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteRecommendation instantiates a new ResponseDeleteRecommendation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteRecommendation() *ResponseDeleteRecommendation { + this := ResponseDeleteRecommendation{} + return &this +} + +// NewResponseDeleteRecommendationWithDefaults instantiates a new ResponseDeleteRecommendation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteRecommendationWithDefaults() *ResponseDeleteRecommendation { + this := ResponseDeleteRecommendation{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteRecommendation) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteRecommendation) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteRecommendation) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteRecommendation) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteRecommendation) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteRecommendation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteRecommendation struct { + value *ResponseDeleteRecommendation + isSet bool +} + +func (v NullableResponseDeleteRecommendation) Get() *ResponseDeleteRecommendation { + return v.value +} + +func (v *NullableResponseDeleteRecommendation) Set(val *ResponseDeleteRecommendation) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteRecommendation) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteRecommendation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteRecommendation(val *ResponseDeleteRecommendation) *NullableResponseDeleteRecommendation { + return &NullableResponseDeleteRecommendation{value: val, isSet: true} +} + +func (v NullableResponseDeleteRecommendation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteRecommendation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_report.go b/azion-api/model_response_delete_report.go new file mode 100644 index 0000000..cb90315 --- /dev/null +++ b/azion-api/model_response_delete_report.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteReport{} + +// ResponseDeleteReport struct for ResponseDeleteReport +type ResponseDeleteReport struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteReport instantiates a new ResponseDeleteReport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteReport() *ResponseDeleteReport { + this := ResponseDeleteReport{} + return &this +} + +// NewResponseDeleteReportWithDefaults instantiates a new ResponseDeleteReport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteReportWithDefaults() *ResponseDeleteReport { + this := ResponseDeleteReport{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteReport) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteReport) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteReport) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteReport) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteReport struct { + value *ResponseDeleteReport + isSet bool +} + +func (v NullableResponseDeleteReport) Get() *ResponseDeleteReport { + return v.value +} + +func (v *NullableResponseDeleteReport) Set(val *ResponseDeleteReport) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteReport) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteReport(val *ResponseDeleteReport) *NullableResponseDeleteReport { + return &NullableResponseDeleteReport{value: val, isSet: true} +} + +func (v NullableResponseDeleteReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_row.go b/azion-api/model_response_delete_row.go new file mode 100644 index 0000000..4eaa9a1 --- /dev/null +++ b/azion-api/model_response_delete_row.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteRow{} + +// ResponseDeleteRow struct for ResponseDeleteRow +type ResponseDeleteRow struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteRow instantiates a new ResponseDeleteRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteRow() *ResponseDeleteRow { + this := ResponseDeleteRow{} + return &this +} + +// NewResponseDeleteRowWithDefaults instantiates a new ResponseDeleteRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteRowWithDefaults() *ResponseDeleteRow { + this := ResponseDeleteRow{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteRow) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteRow) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteRow) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteRow) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteRow) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteRow struct { + value *ResponseDeleteRow + isSet bool +} + +func (v NullableResponseDeleteRow) Get() *ResponseDeleteRow { + return v.value +} + +func (v *NullableResponseDeleteRow) Set(val *ResponseDeleteRow) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteRow) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteRow(val *ResponseDeleteRow) *NullableResponseDeleteRow { + return &NullableResponseDeleteRow{value: val, isSet: true} +} + +func (v NullableResponseDeleteRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_service_token.go b/azion-api/model_response_delete_service_token.go new file mode 100644 index 0000000..b435b5e --- /dev/null +++ b/azion-api/model_response_delete_service_token.go @@ -0,0 +1,190 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDeleteServiceToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteServiceToken{} + +// ResponseDeleteServiceToken struct for ResponseDeleteServiceToken +type ResponseDeleteServiceToken struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data NullableServiceToken `json:"data"` +} + +type _ResponseDeleteServiceToken ResponseDeleteServiceToken + +// NewResponseDeleteServiceToken instantiates a new ResponseDeleteServiceToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteServiceToken(state string, data NullableServiceToken) *ResponseDeleteServiceToken { + this := ResponseDeleteServiceToken{} + this.State = state + this.Data = data + return &this +} + +// NewResponseDeleteServiceTokenWithDefaults instantiates a new ResponseDeleteServiceToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteServiceTokenWithDefaults() *ResponseDeleteServiceToken { + this := ResponseDeleteServiceToken{} + return &this +} + +// GetState returns the State field value +func (o *ResponseDeleteServiceToken) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseDeleteServiceToken) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseDeleteServiceToken) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +// If the value is explicit nil, the zero value for ServiceToken will be returned +func (o *ResponseDeleteServiceToken) GetData() ServiceToken { + if o == nil || o.Data.Get() == nil { + var ret ServiceToken + return ret + } + + return *o.Data.Get() +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseDeleteServiceToken) GetDataOk() (*ServiceToken, bool) { + if o == nil { + return nil, false + } + return o.Data.Get(), o.Data.IsSet() +} + +// SetData sets field value +func (o *ResponseDeleteServiceToken) SetData(v ServiceToken) { + o.Data.Set(&v) +} + +func (o ResponseDeleteServiceToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteServiceToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data.Get() + return toSerialize, nil +} + +func (o *ResponseDeleteServiceToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDeleteServiceToken := _ResponseDeleteServiceToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDeleteServiceToken) + + if err != nil { + return err + } + + *o = ResponseDeleteServiceToken(varResponseDeleteServiceToken) + + return err +} + +type NullableResponseDeleteServiceToken struct { + value *ResponseDeleteServiceToken + isSet bool +} + +func (v NullableResponseDeleteServiceToken) Get() *ResponseDeleteServiceToken { + return v.value +} + +func (v *NullableResponseDeleteServiceToken) Set(val *ResponseDeleteServiceToken) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteServiceToken) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteServiceToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteServiceToken(val *ResponseDeleteServiceToken) *NullableResponseDeleteServiceToken { + return &NullableResponseDeleteServiceToken{value: val, isSet: true} +} + +func (v NullableResponseDeleteServiceToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteServiceToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_tool.go b/azion-api/model_response_delete_tool.go new file mode 100644 index 0000000..cc24c46 --- /dev/null +++ b/azion-api/model_response_delete_tool.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ResponseDeleteTool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteTool{} + +// ResponseDeleteTool struct for ResponseDeleteTool +type ResponseDeleteTool struct { + State *string `json:"state,omitempty"` +} + +// NewResponseDeleteTool instantiates a new ResponseDeleteTool object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteTool() *ResponseDeleteTool { + this := ResponseDeleteTool{} + return &this +} + +// NewResponseDeleteToolWithDefaults instantiates a new ResponseDeleteTool object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteToolWithDefaults() *ResponseDeleteTool { + this := ResponseDeleteTool{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDeleteTool) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDeleteTool) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDeleteTool) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDeleteTool) SetState(v string) { + o.State = &v +} + +func (o ResponseDeleteTool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteTool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableResponseDeleteTool struct { + value *ResponseDeleteTool + isSet bool +} + +func (v NullableResponseDeleteTool) Get() *ResponseDeleteTool { + return v.value +} + +func (v *NullableResponseDeleteTool) Set(val *ResponseDeleteTool) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteTool) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteTool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteTool(val *ResponseDeleteTool) *NullableResponseDeleteTool { + return &NullableResponseDeleteTool{value: val, isSet: true} +} + +func (v NullableResponseDeleteTool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteTool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_delete_user.go b/azion-api/model_response_delete_user.go new file mode 100644 index 0000000..59e8475 --- /dev/null +++ b/azion-api/model_response_delete_user.go @@ -0,0 +1,190 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDeleteUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDeleteUser{} + +// ResponseDeleteUser struct for ResponseDeleteUser +type ResponseDeleteUser struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data NullableUser `json:"data"` +} + +type _ResponseDeleteUser ResponseDeleteUser + +// NewResponseDeleteUser instantiates a new ResponseDeleteUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDeleteUser(state string, data NullableUser) *ResponseDeleteUser { + this := ResponseDeleteUser{} + this.State = state + this.Data = data + return &this +} + +// NewResponseDeleteUserWithDefaults instantiates a new ResponseDeleteUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDeleteUserWithDefaults() *ResponseDeleteUser { + this := ResponseDeleteUser{} + return &this +} + +// GetState returns the State field value +func (o *ResponseDeleteUser) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseDeleteUser) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseDeleteUser) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +// If the value is explicit nil, the zero value for User will be returned +func (o *ResponseDeleteUser) GetData() User { + if o == nil || o.Data.Get() == nil { + var ret User + return ret + } + + return *o.Data.Get() +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseDeleteUser) GetDataOk() (*User, bool) { + if o == nil { + return nil, false + } + return o.Data.Get(), o.Data.IsSet() +} + +// SetData sets field value +func (o *ResponseDeleteUser) SetData(v User) { + o.Data.Set(&v) +} + +func (o ResponseDeleteUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDeleteUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data.Get() + return toSerialize, nil +} + +func (o *ResponseDeleteUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDeleteUser := _ResponseDeleteUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDeleteUser) + + if err != nil { + return err + } + + *o = ResponseDeleteUser(varResponseDeleteUser) + + return err +} + +type NullableResponseDeleteUser struct { + value *ResponseDeleteUser + isSet bool +} + +func (v NullableResponseDeleteUser) Get() *ResponseDeleteUser { + return v.value +} + +func (v *NullableResponseDeleteUser) Set(val *ResponseDeleteUser) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDeleteUser) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDeleteUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDeleteUser(val *ResponseDeleteUser) *NullableResponseDeleteUser { + return &NullableResponseDeleteUser{value: val, isSet: true} +} + +func (v NullableResponseDeleteUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDeleteUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_document.go b/azion-api/model_response_document.go new file mode 100644 index 0000000..df57928 --- /dev/null +++ b/azion-api/model_response_document.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseDocument{} + +// ResponseDocument struct for ResponseDocument +type ResponseDocument struct { + State *string `json:"state,omitempty"` + Data Document `json:"data"` +} + +type _ResponseDocument ResponseDocument + +// NewResponseDocument instantiates a new ResponseDocument object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseDocument(data Document) *ResponseDocument { + this := ResponseDocument{} + this.Data = data + return &this +} + +// NewResponseDocumentWithDefaults instantiates a new ResponseDocument object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseDocumentWithDefaults() *ResponseDocument { + this := ResponseDocument{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseDocument) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseDocument) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseDocument) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseDocument) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseDocument) GetData() Document { + if o == nil { + var ret Document + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseDocument) GetDataOk() (*Document, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseDocument) SetData(v Document) { + o.Data = v +} + +func (o ResponseDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseDocument) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseDocument) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseDocument := _ResponseDocument{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseDocument) + + if err != nil { + return err + } + + *o = ResponseDocument(varResponseDocument) + + return err +} + +type NullableResponseDocument struct { + value *ResponseDocument + isSet bool +} + +func (v NullableResponseDocument) Get() *ResponseDocument { + return v.value +} + +func (v *NullableResponseDocument) Set(val *ResponseDocument) { + v.value = val + v.isSet = true +} + +func (v NullableResponseDocument) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseDocument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseDocument(val *ResponseDocument) *NullableResponseDocument { + return &NullableResponseDocument{value: val, isSet: true} +} + +func (v NullableResponseDocument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseDocument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_execution.go b/azion-api/model_response_execution.go new file mode 100644 index 0000000..a3c1726 --- /dev/null +++ b/azion-api/model_response_execution.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseExecution{} + +// ResponseExecution struct for ResponseExecution +type ResponseExecution struct { + State *string `json:"state,omitempty"` + Data Execution `json:"data"` +} + +type _ResponseExecution ResponseExecution + +// NewResponseExecution instantiates a new ResponseExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseExecution(data Execution) *ResponseExecution { + this := ResponseExecution{} + this.Data = data + return &this +} + +// NewResponseExecutionWithDefaults instantiates a new ResponseExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseExecutionWithDefaults() *ResponseExecution { + this := ResponseExecution{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseExecution) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseExecution) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseExecution) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseExecution) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseExecution) GetData() Execution { + if o == nil { + var ret Execution + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseExecution) GetDataOk() (*Execution, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseExecution) SetData(v Execution) { + o.Data = v +} + +func (o ResponseExecution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseExecution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseExecution := _ResponseExecution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseExecution) + + if err != nil { + return err + } + + *o = ResponseExecution(varResponseExecution) + + return err +} + +type NullableResponseExecution struct { + value *ResponseExecution + isSet bool +} + +func (v NullableResponseExecution) Get() *ResponseExecution { + return v.value +} + +func (v *NullableResponseExecution) Set(val *ResponseExecution) { + v.value = val + v.isSet = true +} + +func (v NullableResponseExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseExecution(val *ResponseExecution) *NullableResponseExecution { + return &NullableResponseExecution{value: val, isSet: true} +} + +func (v NullableResponseExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_executor.go b/azion-api/model_response_executor.go new file mode 100644 index 0000000..48a47c9 --- /dev/null +++ b/azion-api/model_response_executor.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseExecutor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseExecutor{} + +// ResponseExecutor struct for ResponseExecutor +type ResponseExecutor struct { + State *string `json:"state,omitempty"` + Data Executor `json:"data"` +} + +type _ResponseExecutor ResponseExecutor + +// NewResponseExecutor instantiates a new ResponseExecutor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseExecutor(data Executor) *ResponseExecutor { + this := ResponseExecutor{} + this.Data = data + return &this +} + +// NewResponseExecutorWithDefaults instantiates a new ResponseExecutor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseExecutorWithDefaults() *ResponseExecutor { + this := ResponseExecutor{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseExecutor) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseExecutor) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseExecutor) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseExecutor) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseExecutor) GetData() Executor { + if o == nil { + var ret Executor + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseExecutor) GetDataOk() (*Executor, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseExecutor) SetData(v Executor) { + o.Data = v +} + +func (o ResponseExecutor) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseExecutor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseExecutor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseExecutor := _ResponseExecutor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseExecutor) + + if err != nil { + return err + } + + *o = ResponseExecutor(varResponseExecutor) + + return err +} + +type NullableResponseExecutor struct { + value *ResponseExecutor + isSet bool +} + +func (v NullableResponseExecutor) Get() *ResponseExecutor { + return v.value +} + +func (v *NullableResponseExecutor) Set(val *ResponseExecutor) { + v.value = val + v.isSet = true +} + +func (v NullableResponseExecutor) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseExecutor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseExecutor(val *ResponseExecutor) *NullableResponseExecutor { + return &NullableResponseExecutor{value: val, isSet: true} +} + +func (v NullableResponseExecutor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseExecutor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_favorite.go b/azion-api/model_response_favorite.go new file mode 100644 index 0000000..660ea67 --- /dev/null +++ b/azion-api/model_response_favorite.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseFavorite type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseFavorite{} + +// ResponseFavorite struct for ResponseFavorite +type ResponseFavorite struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data Favorite `json:"data"` +} + +type _ResponseFavorite ResponseFavorite + +// NewResponseFavorite instantiates a new ResponseFavorite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseFavorite(state string, data Favorite) *ResponseFavorite { + this := ResponseFavorite{} + this.State = state + this.Data = data + return &this +} + +// NewResponseFavoriteWithDefaults instantiates a new ResponseFavorite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseFavoriteWithDefaults() *ResponseFavorite { + this := ResponseFavorite{} + return &this +} + +// GetState returns the State field value +func (o *ResponseFavorite) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseFavorite) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseFavorite) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseFavorite) GetData() Favorite { + if o == nil { + var ret Favorite + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseFavorite) GetDataOk() (*Favorite, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseFavorite) SetData(v Favorite) { + o.Data = v +} + +func (o ResponseFavorite) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseFavorite) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseFavorite) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseFavorite := _ResponseFavorite{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseFavorite) + + if err != nil { + return err + } + + *o = ResponseFavorite(varResponseFavorite) + + return err +} + +type NullableResponseFavorite struct { + value *ResponseFavorite + isSet bool +} + +func (v NullableResponseFavorite) Get() *ResponseFavorite { + return v.value +} + +func (v *NullableResponseFavorite) Set(val *ResponseFavorite) { + v.value = val + v.isSet = true +} + +func (v NullableResponseFavorite) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseFavorite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseFavorite(val *ResponseFavorite) *NullableResponseFavorite { + return &NullableResponseFavorite{value: val, isSet: true} +} + +func (v NullableResponseFavorite) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseFavorite) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_folder.go b/azion-api/model_response_folder.go new file mode 100644 index 0000000..941a866 --- /dev/null +++ b/azion-api/model_response_folder.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseFolder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseFolder{} + +// ResponseFolder struct for ResponseFolder +type ResponseFolder struct { + State *string `json:"state,omitempty"` + Data Folder `json:"data"` +} + +type _ResponseFolder ResponseFolder + +// NewResponseFolder instantiates a new ResponseFolder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseFolder(data Folder) *ResponseFolder { + this := ResponseFolder{} + this.Data = data + return &this +} + +// NewResponseFolderWithDefaults instantiates a new ResponseFolder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseFolderWithDefaults() *ResponseFolder { + this := ResponseFolder{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseFolder) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseFolder) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseFolder) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseFolder) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseFolder) GetData() Folder { + if o == nil { + var ret Folder + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseFolder) GetDataOk() (*Folder, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseFolder) SetData(v Folder) { + o.Data = v +} + +func (o ResponseFolder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseFolder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseFolder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseFolder := _ResponseFolder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseFolder) + + if err != nil { + return err + } + + *o = ResponseFolder(varResponseFolder) + + return err +} + +type NullableResponseFolder struct { + value *ResponseFolder + isSet bool +} + +func (v NullableResponseFolder) Get() *ResponseFolder { + return v.value +} + +func (v *NullableResponseFolder) Set(val *ResponseFolder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseFolder(val *ResponseFolder) *NullableResponseFolder { + return &NullableResponseFolder{value: val, isSet: true} +} + +func (v NullableResponseFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_grant.go b/azion-api/model_response_grant.go new file mode 100644 index 0000000..9549053 --- /dev/null +++ b/azion-api/model_response_grant.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseGrant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseGrant{} + +// ResponseGrant struct for ResponseGrant +type ResponseGrant struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data Grant `json:"data"` +} + +type _ResponseGrant ResponseGrant + +// NewResponseGrant instantiates a new ResponseGrant object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseGrant(state string, data Grant) *ResponseGrant { + this := ResponseGrant{} + this.State = state + this.Data = data + return &this +} + +// NewResponseGrantWithDefaults instantiates a new ResponseGrant object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseGrantWithDefaults() *ResponseGrant { + this := ResponseGrant{} + return &this +} + +// GetState returns the State field value +func (o *ResponseGrant) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseGrant) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseGrant) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseGrant) GetData() Grant { + if o == nil { + var ret Grant + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseGrant) GetDataOk() (*Grant, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseGrant) SetData(v Grant) { + o.Data = v +} + +func (o ResponseGrant) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseGrant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseGrant) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseGrant := _ResponseGrant{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseGrant) + + if err != nil { + return err + } + + *o = ResponseGrant(varResponseGrant) + + return err +} + +type NullableResponseGrant struct { + value *ResponseGrant + isSet bool +} + +func (v NullableResponseGrant) Get() *ResponseGrant { + return v.value +} + +func (v *NullableResponseGrant) Set(val *ResponseGrant) { + v.value = val + v.isSet = true +} + +func (v NullableResponseGrant) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseGrant) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseGrant(val *ResponseGrant) *NullableResponseGrant { + return &NullableResponseGrant{value: val, isSet: true} +} + +func (v NullableResponseGrant) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseGrant) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_group.go b/azion-api/model_response_group.go new file mode 100644 index 0000000..87f8018 --- /dev/null +++ b/azion-api/model_response_group.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseGroup{} + +// ResponseGroup struct for ResponseGroup +type ResponseGroup struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data Group `json:"data"` +} + +type _ResponseGroup ResponseGroup + +// NewResponseGroup instantiates a new ResponseGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseGroup(state string, data Group) *ResponseGroup { + this := ResponseGroup{} + this.State = state + this.Data = data + return &this +} + +// NewResponseGroupWithDefaults instantiates a new ResponseGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseGroupWithDefaults() *ResponseGroup { + this := ResponseGroup{} + return &this +} + +// GetState returns the State field value +func (o *ResponseGroup) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseGroup) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseGroup) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseGroup) GetData() Group { + if o == nil { + var ret Group + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseGroup) GetDataOk() (*Group, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseGroup) SetData(v Group) { + o.Data = v +} + +func (o ResponseGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseGroup := _ResponseGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseGroup) + + if err != nil { + return err + } + + *o = ResponseGroup(varResponseGroup) + + return err +} + +type NullableResponseGroup struct { + value *ResponseGroup + isSet bool +} + +func (v NullableResponseGroup) Get() *ResponseGroup { + return v.value +} + +func (v *NullableResponseGroup) Set(val *ResponseGroup) { + v.value = val + v.isSet = true +} + +func (v NullableResponseGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseGroup(val *ResponseGroup) *NullableResponseGroup { + return &NullableResponseGroup{value: val, isSet: true} +} + +func (v NullableResponseGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_group_members.go b/azion-api/model_response_group_members.go new file mode 100644 index 0000000..83eecf0 --- /dev/null +++ b/azion-api/model_response_group_members.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseGroupMembers type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseGroupMembers{} + +// ResponseGroupMembers struct for ResponseGroupMembers +type ResponseGroupMembers struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data GroupMembers `json:"data"` +} + +type _ResponseGroupMembers ResponseGroupMembers + +// NewResponseGroupMembers instantiates a new ResponseGroupMembers object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseGroupMembers(state string, data GroupMembers) *ResponseGroupMembers { + this := ResponseGroupMembers{} + this.State = state + this.Data = data + return &this +} + +// NewResponseGroupMembersWithDefaults instantiates a new ResponseGroupMembers object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseGroupMembersWithDefaults() *ResponseGroupMembers { + this := ResponseGroupMembers{} + return &this +} + +// GetState returns the State field value +func (o *ResponseGroupMembers) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseGroupMembers) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseGroupMembers) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseGroupMembers) GetData() GroupMembers { + if o == nil { + var ret GroupMembers + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseGroupMembers) GetDataOk() (*GroupMembers, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseGroupMembers) SetData(v GroupMembers) { + o.Data = v +} + +func (o ResponseGroupMembers) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseGroupMembers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseGroupMembers) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseGroupMembers := _ResponseGroupMembers{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseGroupMembers) + + if err != nil { + return err + } + + *o = ResponseGroupMembers(varResponseGroupMembers) + + return err +} + +type NullableResponseGroupMembers struct { + value *ResponseGroupMembers + isSet bool +} + +func (v NullableResponseGroupMembers) Get() *ResponseGroupMembers { + return v.value +} + +func (v *NullableResponseGroupMembers) Set(val *ResponseGroupMembers) { + v.value = val + v.isSet = true +} + +func (v NullableResponseGroupMembers) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseGroupMembers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseGroupMembers(val *ResponseGroupMembers) *NullableResponseGroupMembers { + return &NullableResponseGroupMembers{value: val, isSet: true} +} + +func (v NullableResponseGroupMembers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseGroupMembers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_knowledge_base.go b/azion-api/model_response_knowledge_base.go new file mode 100644 index 0000000..b7e2541 --- /dev/null +++ b/azion-api/model_response_knowledge_base.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseKnowledgeBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseKnowledgeBase{} + +// ResponseKnowledgeBase struct for ResponseKnowledgeBase +type ResponseKnowledgeBase struct { + State *string `json:"state,omitempty"` + Data KnowledgeBase `json:"data"` +} + +type _ResponseKnowledgeBase ResponseKnowledgeBase + +// NewResponseKnowledgeBase instantiates a new ResponseKnowledgeBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseKnowledgeBase(data KnowledgeBase) *ResponseKnowledgeBase { + this := ResponseKnowledgeBase{} + this.Data = data + return &this +} + +// NewResponseKnowledgeBaseWithDefaults instantiates a new ResponseKnowledgeBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseKnowledgeBaseWithDefaults() *ResponseKnowledgeBase { + this := ResponseKnowledgeBase{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseKnowledgeBase) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseKnowledgeBase) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseKnowledgeBase) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseKnowledgeBase) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseKnowledgeBase) GetData() KnowledgeBase { + if o == nil { + var ret KnowledgeBase + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseKnowledgeBase) GetDataOk() (*KnowledgeBase, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseKnowledgeBase) SetData(v KnowledgeBase) { + o.Data = v +} + +func (o ResponseKnowledgeBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseKnowledgeBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseKnowledgeBase) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseKnowledgeBase := _ResponseKnowledgeBase{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseKnowledgeBase) + + if err != nil { + return err + } + + *o = ResponseKnowledgeBase(varResponseKnowledgeBase) + + return err +} + +type NullableResponseKnowledgeBase struct { + value *ResponseKnowledgeBase + isSet bool +} + +func (v NullableResponseKnowledgeBase) Get() *ResponseKnowledgeBase { + return v.value +} + +func (v *NullableResponseKnowledgeBase) Set(val *ResponseKnowledgeBase) { + v.value = val + v.isSet = true +} + +func (v NullableResponseKnowledgeBase) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseKnowledgeBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseKnowledgeBase(val *ResponseKnowledgeBase) *NullableResponseKnowledgeBase { + return &NullableResponseKnowledgeBase{value: val, isSet: true} +} + +func (v NullableResponseKnowledgeBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseKnowledgeBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_account.go b/azion-api/model_response_list_account.go new file mode 100644 index 0000000..c348b2b --- /dev/null +++ b/azion-api/model_response_list_account.go @@ -0,0 +1,248 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ResponseListAccount - struct for ResponseListAccount +type ResponseListAccount struct { + Brand *Brand + Organization *Organization + Reseller *Reseller + Workspace *Workspace +} + +// BrandAsResponseListAccount is a convenience function that returns Brand wrapped in ResponseListAccount +func BrandAsResponseListAccount(v *Brand) ResponseListAccount { + return ResponseListAccount{ + Brand: v, + } +} + +// OrganizationAsResponseListAccount is a convenience function that returns Organization wrapped in ResponseListAccount +func OrganizationAsResponseListAccount(v *Organization) ResponseListAccount { + return ResponseListAccount{ + Organization: v, + } +} + +// ResellerAsResponseListAccount is a convenience function that returns Reseller wrapped in ResponseListAccount +func ResellerAsResponseListAccount(v *Reseller) ResponseListAccount { + return ResponseListAccount{ + Reseller: v, + } +} + +// WorkspaceAsResponseListAccount is a convenience function that returns Workspace wrapped in ResponseListAccount +func WorkspaceAsResponseListAccount(v *Workspace) ResponseListAccount { + return ResponseListAccount{ + Workspace: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ResponseListAccount) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into Brand + err = newStrictDecoder(data).Decode(&dst.Brand) + if err == nil { + jsonBrand, _ := json.Marshal(dst.Brand) + if string(jsonBrand) == "{}" { // empty struct + dst.Brand = nil + } else { + if err = validator.Validate(dst.Brand); err != nil { + dst.Brand = nil + } else { + match++ + } + } + } else { + dst.Brand = nil + } + + // try to unmarshal data into Organization + err = newStrictDecoder(data).Decode(&dst.Organization) + if err == nil { + jsonOrganization, _ := json.Marshal(dst.Organization) + if string(jsonOrganization) == "{}" { // empty struct + dst.Organization = nil + } else { + if err = validator.Validate(dst.Organization); err != nil { + dst.Organization = nil + } else { + match++ + } + } + } else { + dst.Organization = nil + } + + // try to unmarshal data into Reseller + err = newStrictDecoder(data).Decode(&dst.Reseller) + if err == nil { + jsonReseller, _ := json.Marshal(dst.Reseller) + if string(jsonReseller) == "{}" { // empty struct + dst.Reseller = nil + } else { + if err = validator.Validate(dst.Reseller); err != nil { + dst.Reseller = nil + } else { + match++ + } + } + } else { + dst.Reseller = nil + } + + // try to unmarshal data into Workspace + err = newStrictDecoder(data).Decode(&dst.Workspace) + if err == nil { + jsonWorkspace, _ := json.Marshal(dst.Workspace) + if string(jsonWorkspace) == "{}" { // empty struct + dst.Workspace = nil + } else { + if err = validator.Validate(dst.Workspace); err != nil { + dst.Workspace = nil + } else { + match++ + } + } + } else { + dst.Workspace = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.Brand = nil + dst.Organization = nil + dst.Reseller = nil + dst.Workspace = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ResponseListAccount)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ResponseListAccount)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponseListAccount) MarshalJSON() ([]byte, error) { + if src.Brand != nil { + return json.Marshal(&src.Brand) + } + + if src.Organization != nil { + return json.Marshal(&src.Organization) + } + + if src.Reseller != nil { + return json.Marshal(&src.Reseller) + } + + if src.Workspace != nil { + return json.Marshal(&src.Workspace) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ResponseListAccount) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.Brand != nil { + return obj.Brand + } + + if obj.Organization != nil { + return obj.Organization + } + + if obj.Reseller != nil { + return obj.Reseller + } + + if obj.Workspace != nil { + return obj.Workspace + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ResponseListAccount) GetActualInstanceValue() (interface{}) { + if obj.Brand != nil { + return *obj.Brand + } + + if obj.Organization != nil { + return *obj.Organization + } + + if obj.Reseller != nil { + return *obj.Reseller + } + + if obj.Workspace != nil { + return *obj.Workspace + } + + // all schemas are nil + return nil +} + +type NullableResponseListAccount struct { + value *ResponseListAccount + isSet bool +} + +func (v NullableResponseListAccount) Get() *ResponseListAccount { + return v.value +} + +func (v *NullableResponseListAccount) Set(val *ResponseListAccount) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListAccount(val *ResponseListAccount) *NullableResponseListAccount { + return &NullableResponseListAccount{value: val, isSet: true} +} + +func (v NullableResponseListAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_continuous_deployment.go b/azion-api/model_response_list_continuous_deployment.go new file mode 100644 index 0000000..02b6f06 --- /dev/null +++ b/azion-api/model_response_list_continuous_deployment.go @@ -0,0 +1,457 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponseListContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListContinuousDeployment{} + +// ResponseListContinuousDeployment struct for ResponseListContinuousDeployment +type ResponseListContinuousDeployment struct { + Id int64 `json:"id"` + Name string `json:"name"` + Repository string `json:"repository"` + Branch string `json:"branch"` + BuildContext []BuildContextField `json:"build_context"` + DeployContext map[string]interface{} `json:"deploy_context,omitempty"` + Integration Integration `json:"integration"` + ExecutionScript ExecutionScript `json:"execution_script"` + // Created date of the continuous deployment. + Created NullableTime `json:"created"` + // Last editor of the continuous deployment. + LastEditor NullableString `json:"last_editor"` + // Last modified date of the continuous deployment. + LastModified NullableTime `json:"last_modified"` +} + +type _ResponseListContinuousDeployment ResponseListContinuousDeployment + +// NewResponseListContinuousDeployment instantiates a new ResponseListContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListContinuousDeployment(id int64, name string, repository string, branch string, buildContext []BuildContextField, integration Integration, executionScript ExecutionScript, created NullableTime, lastEditor NullableString, lastModified NullableTime) *ResponseListContinuousDeployment { + this := ResponseListContinuousDeployment{} + this.Id = id + this.Name = name + this.Repository = repository + this.Branch = branch + this.BuildContext = buildContext + this.Integration = integration + this.ExecutionScript = executionScript + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewResponseListContinuousDeploymentWithDefaults instantiates a new ResponseListContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListContinuousDeploymentWithDefaults() *ResponseListContinuousDeployment { + this := ResponseListContinuousDeployment{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListContinuousDeployment) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListContinuousDeployment) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListContinuousDeployment) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListContinuousDeployment) SetName(v string) { + o.Name = v +} + +// GetRepository returns the Repository field value +func (o *ResponseListContinuousDeployment) GetRepository() string { + if o == nil { + var ret string + return ret + } + + return o.Repository +} + +// GetRepositoryOk returns a tuple with the Repository field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetRepositoryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Repository, true +} + +// SetRepository sets field value +func (o *ResponseListContinuousDeployment) SetRepository(v string) { + o.Repository = v +} + +// GetBranch returns the Branch field value +func (o *ResponseListContinuousDeployment) GetBranch() string { + if o == nil { + var ret string + return ret + } + + return o.Branch +} + +// GetBranchOk returns a tuple with the Branch field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetBranchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Branch, true +} + +// SetBranch sets field value +func (o *ResponseListContinuousDeployment) SetBranch(v string) { + o.Branch = v +} + +// GetBuildContext returns the BuildContext field value +func (o *ResponseListContinuousDeployment) GetBuildContext() []BuildContextField { + if o == nil { + var ret []BuildContextField + return ret + } + + return o.BuildContext +} + +// GetBuildContextOk returns a tuple with the BuildContext field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetBuildContextOk() ([]BuildContextField, bool) { + if o == nil { + return nil, false + } + return o.BuildContext, true +} + +// SetBuildContext sets field value +func (o *ResponseListContinuousDeployment) SetBuildContext(v []BuildContextField) { + o.BuildContext = v +} + +// GetDeployContext returns the DeployContext field value if set, zero value otherwise. +func (o *ResponseListContinuousDeployment) GetDeployContext() map[string]interface{} { + if o == nil || IsNil(o.DeployContext) { + var ret map[string]interface{} + return ret + } + return o.DeployContext +} + +// GetDeployContextOk returns a tuple with the DeployContext field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetDeployContextOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.DeployContext) { + return map[string]interface{}{}, false + } + return o.DeployContext, true +} + +// HasDeployContext returns a boolean if a field has been set. +func (o *ResponseListContinuousDeployment) HasDeployContext() bool { + if o != nil && !IsNil(o.DeployContext) { + return true + } + + return false +} + +// SetDeployContext gets a reference to the given map[string]interface{} and assigns it to the DeployContext field. +func (o *ResponseListContinuousDeployment) SetDeployContext(v map[string]interface{}) { + o.DeployContext = v +} + +// GetIntegration returns the Integration field value +func (o *ResponseListContinuousDeployment) GetIntegration() Integration { + if o == nil { + var ret Integration + return ret + } + + return o.Integration +} + +// GetIntegrationOk returns a tuple with the Integration field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetIntegrationOk() (*Integration, bool) { + if o == nil { + return nil, false + } + return &o.Integration, true +} + +// SetIntegration sets field value +func (o *ResponseListContinuousDeployment) SetIntegration(v Integration) { + o.Integration = v +} + +// GetExecutionScript returns the ExecutionScript field value +func (o *ResponseListContinuousDeployment) GetExecutionScript() ExecutionScript { + if o == nil { + var ret ExecutionScript + return ret + } + + return o.ExecutionScript +} + +// GetExecutionScriptOk returns a tuple with the ExecutionScript field value +// and a boolean to check if the value has been set. +func (o *ResponseListContinuousDeployment) GetExecutionScriptOk() (*ExecutionScript, bool) { + if o == nil { + return nil, false + } + return &o.ExecutionScript, true +} + +// SetExecutionScript sets field value +func (o *ResponseListContinuousDeployment) SetExecutionScript(v ExecutionScript) { + o.ExecutionScript = v +} + +// GetCreated returns the Created field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ResponseListContinuousDeployment) GetCreated() time.Time { + if o == nil || o.Created.Get() == nil { + var ret time.Time + return ret + } + + return *o.Created.Get() +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseListContinuousDeployment) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.Created.Get(), o.Created.IsSet() +} + +// SetCreated sets field value +func (o *ResponseListContinuousDeployment) SetCreated(v time.Time) { + o.Created.Set(&v) +} + +// GetLastEditor returns the LastEditor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ResponseListContinuousDeployment) GetLastEditor() string { + if o == nil || o.LastEditor.Get() == nil { + var ret string + return ret + } + + return *o.LastEditor.Get() +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseListContinuousDeployment) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastEditor.Get(), o.LastEditor.IsSet() +} + +// SetLastEditor sets field value +func (o *ResponseListContinuousDeployment) SetLastEditor(v string) { + o.LastEditor.Set(&v) +} + +// GetLastModified returns the LastModified field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ResponseListContinuousDeployment) GetLastModified() time.Time { + if o == nil || o.LastModified.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastModified.Get() +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseListContinuousDeployment) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastModified.Get(), o.LastModified.IsSet() +} + +// SetLastModified sets field value +func (o *ResponseListContinuousDeployment) SetLastModified(v time.Time) { + o.LastModified.Set(&v) +} + +func (o ResponseListContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["repository"] = o.Repository + toSerialize["branch"] = o.Branch + toSerialize["build_context"] = o.BuildContext + if !IsNil(o.DeployContext) { + toSerialize["deploy_context"] = o.DeployContext + } + toSerialize["integration"] = o.Integration + toSerialize["execution_script"] = o.ExecutionScript + toSerialize["created"] = o.Created.Get() + toSerialize["last_editor"] = o.LastEditor.Get() + toSerialize["last_modified"] = o.LastModified.Get() + return toSerialize, nil +} + +func (o *ResponseListContinuousDeployment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "repository", + "branch", + "build_context", + "integration", + "execution_script", + "created", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListContinuousDeployment := _ResponseListContinuousDeployment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListContinuousDeployment) + + if err != nil { + return err + } + + *o = ResponseListContinuousDeployment(varResponseListContinuousDeployment) + + return err +} + +type NullableResponseListContinuousDeployment struct { + value *ResponseListContinuousDeployment + isSet bool +} + +func (v NullableResponseListContinuousDeployment) Get() *ResponseListContinuousDeployment { + return v.value +} + +func (v *NullableResponseListContinuousDeployment) Set(val *ResponseListContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListContinuousDeployment(val *ResponseListContinuousDeployment) *NullableResponseListContinuousDeployment { + return &NullableResponseListContinuousDeployment{value: val, isSet: true} +} + +func (v NullableResponseListContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_dashboard.go b/azion-api/model_response_list_dashboard.go new file mode 100644 index 0000000..65a9648 --- /dev/null +++ b/azion-api/model_response_list_dashboard.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListDashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListDashboard{} + +// ResponseListDashboard struct for ResponseListDashboard +type ResponseListDashboard struct { + Id int64 `json:"id"` + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` + FolderId int64 `json:"folder_id"` +} + +type _ResponseListDashboard ResponseListDashboard + +// NewResponseListDashboard instantiates a new ResponseListDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListDashboard(id int64, name string, scope string, folderId int64) *ResponseListDashboard { + this := ResponseListDashboard{} + this.Id = id + this.Name = name + this.Scope = scope + this.FolderId = folderId + return &this +} + +// NewResponseListDashboardWithDefaults instantiates a new ResponseListDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListDashboardWithDefaults() *ResponseListDashboard { + this := ResponseListDashboard{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListDashboard) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListDashboard) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListDashboard) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListDashboard) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListDashboard) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListDashboard) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *ResponseListDashboard) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *ResponseListDashboard) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *ResponseListDashboard) SetScope(v string) { + o.Scope = v +} + +// GetFolderId returns the FolderId field value +func (o *ResponseListDashboard) GetFolderId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.FolderId +} + +// GetFolderIdOk returns a tuple with the FolderId field value +// and a boolean to check if the value has been set. +func (o *ResponseListDashboard) GetFolderIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.FolderId, true +} + +// SetFolderId sets field value +func (o *ResponseListDashboard) SetFolderId(v int64) { + o.FolderId = v +} + +func (o ResponseListDashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListDashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + toSerialize["folder_id"] = o.FolderId + return toSerialize, nil +} + +func (o *ResponseListDashboard) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "scope", + "folder_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListDashboard := _ResponseListDashboard{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListDashboard) + + if err != nil { + return err + } + + *o = ResponseListDashboard(varResponseListDashboard) + + return err +} + +type NullableResponseListDashboard struct { + value *ResponseListDashboard + isSet bool +} + +func (v NullableResponseListDashboard) Get() *ResponseListDashboard { + return v.value +} + +func (v *NullableResponseListDashboard) Set(val *ResponseListDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListDashboard(val *ResponseListDashboard) *NullableResponseListDashboard { + return &NullableResponseListDashboard{value: val, isSet: true} +} + +func (v NullableResponseListDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_execution.go b/azion-api/model_response_list_execution.go new file mode 100644 index 0000000..bb92365 --- /dev/null +++ b/azion-api/model_response_list_execution.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponseListExecution type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListExecution{} + +// ResponseListExecution struct for ResponseListExecution +type ResponseListExecution struct { + Id int64 `json:"id"` + Status string `json:"status"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` +} + +type _ResponseListExecution ResponseListExecution + +// NewResponseListExecution instantiates a new ResponseListExecution object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListExecution(id int64, status string, createdAt time.Time, updatedAt time.Time) *ResponseListExecution { + this := ResponseListExecution{} + this.Id = id + this.Status = status + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + return &this +} + +// NewResponseListExecutionWithDefaults instantiates a new ResponseListExecution object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListExecutionWithDefaults() *ResponseListExecution { + this := ResponseListExecution{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListExecution) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecution) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListExecution) SetId(v int64) { + o.Id = v +} + +// GetStatus returns the Status field value +func (o *ResponseListExecution) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecution) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ResponseListExecution) SetStatus(v string) { + o.Status = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ResponseListExecution) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecution) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ResponseListExecution) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *ResponseListExecution) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecution) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *ResponseListExecution) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +func (o ResponseListExecution) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListExecution) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["status"] = o.Status + toSerialize["created_at"] = o.CreatedAt + toSerialize["updated_at"] = o.UpdatedAt + return toSerialize, nil +} + +func (o *ResponseListExecution) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "status", + "created_at", + "updated_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListExecution := _ResponseListExecution{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListExecution) + + if err != nil { + return err + } + + *o = ResponseListExecution(varResponseListExecution) + + return err +} + +type NullableResponseListExecution struct { + value *ResponseListExecution + isSet bool +} + +func (v NullableResponseListExecution) Get() *ResponseListExecution { + return v.value +} + +func (v *NullableResponseListExecution) Set(val *ResponseListExecution) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListExecution) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListExecution) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListExecution(val *ResponseListExecution) *NullableResponseListExecution { + return &NullableResponseListExecution{value: val, isSet: true} +} + +func (v NullableResponseListExecution) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListExecution) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_execution_script.go b/azion-api/model_response_list_execution_script.go new file mode 100644 index 0000000..ad0d167 --- /dev/null +++ b/azion-api/model_response_list_execution_script.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListExecutionScript type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListExecutionScript{} + +// ResponseListExecutionScript struct for ResponseListExecutionScript +type ResponseListExecutionScript struct { + Id int64 `json:"id"` + Name string `json:"name"` + TemplateUuid string `json:"template_uuid"` +} + +type _ResponseListExecutionScript ResponseListExecutionScript + +// NewResponseListExecutionScript instantiates a new ResponseListExecutionScript object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListExecutionScript(id int64, name string, templateUuid string) *ResponseListExecutionScript { + this := ResponseListExecutionScript{} + this.Id = id + this.Name = name + this.TemplateUuid = templateUuid + return &this +} + +// NewResponseListExecutionScriptWithDefaults instantiates a new ResponseListExecutionScript object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListExecutionScriptWithDefaults() *ResponseListExecutionScript { + this := ResponseListExecutionScript{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListExecutionScript) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecutionScript) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListExecutionScript) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListExecutionScript) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecutionScript) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListExecutionScript) SetName(v string) { + o.Name = v +} + +// GetTemplateUuid returns the TemplateUuid field value +func (o *ResponseListExecutionScript) GetTemplateUuid() string { + if o == nil { + var ret string + return ret + } + + return o.TemplateUuid +} + +// GetTemplateUuidOk returns a tuple with the TemplateUuid field value +// and a boolean to check if the value has been set. +func (o *ResponseListExecutionScript) GetTemplateUuidOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TemplateUuid, true +} + +// SetTemplateUuid sets field value +func (o *ResponseListExecutionScript) SetTemplateUuid(v string) { + o.TemplateUuid = v +} + +func (o ResponseListExecutionScript) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListExecutionScript) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["template_uuid"] = o.TemplateUuid + return toSerialize, nil +} + +func (o *ResponseListExecutionScript) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "template_uuid", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListExecutionScript := _ResponseListExecutionScript{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListExecutionScript) + + if err != nil { + return err + } + + *o = ResponseListExecutionScript(varResponseListExecutionScript) + + return err +} + +type NullableResponseListExecutionScript struct { + value *ResponseListExecutionScript + isSet bool +} + +func (v NullableResponseListExecutionScript) Get() *ResponseListExecutionScript { + return v.value +} + +func (v *NullableResponseListExecutionScript) Set(val *ResponseListExecutionScript) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListExecutionScript) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListExecutionScript) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListExecutionScript(val *ResponseListExecutionScript) *NullableResponseListExecutionScript { + return &NullableResponseListExecutionScript{value: val, isSet: true} +} + +func (v NullableResponseListExecutionScript) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListExecutionScript) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_favorite.go b/azion-api/model_response_list_favorite.go new file mode 100644 index 0000000..45c079e --- /dev/null +++ b/azion-api/model_response_list_favorite.go @@ -0,0 +1,244 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListFavorite type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListFavorite{} + +// ResponseListFavorite struct for ResponseListFavorite +type ResponseListFavorite struct { + Id int64 `json:"id"` + Uri string `json:"uri"` + // Favorite type + Type string `json:"type"` + Name string `json:"name"` +} + +type _ResponseListFavorite ResponseListFavorite + +// NewResponseListFavorite instantiates a new ResponseListFavorite object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListFavorite(id int64, uri string, type_ string, name string) *ResponseListFavorite { + this := ResponseListFavorite{} + this.Id = id + this.Uri = uri + this.Type = type_ + this.Name = name + return &this +} + +// NewResponseListFavoriteWithDefaults instantiates a new ResponseListFavorite object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListFavoriteWithDefaults() *ResponseListFavorite { + this := ResponseListFavorite{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListFavorite) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListFavorite) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListFavorite) SetId(v int64) { + o.Id = v +} + +// GetUri returns the Uri field value +func (o *ResponseListFavorite) GetUri() string { + if o == nil { + var ret string + return ret + } + + return o.Uri +} + +// GetUriOk returns a tuple with the Uri field value +// and a boolean to check if the value has been set. +func (o *ResponseListFavorite) GetUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Uri, true +} + +// SetUri sets field value +func (o *ResponseListFavorite) SetUri(v string) { + o.Uri = v +} + +// GetType returns the Type field value +func (o *ResponseListFavorite) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ResponseListFavorite) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ResponseListFavorite) SetType(v string) { + o.Type = v +} + +// GetName returns the Name field value +func (o *ResponseListFavorite) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListFavorite) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListFavorite) SetName(v string) { + o.Name = v +} + +func (o ResponseListFavorite) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListFavorite) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["uri"] = o.Uri + toSerialize["type"] = o.Type + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *ResponseListFavorite) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "uri", + "type", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListFavorite := _ResponseListFavorite{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListFavorite) + + if err != nil { + return err + } + + *o = ResponseListFavorite(varResponseListFavorite) + + return err +} + +type NullableResponseListFavorite struct { + value *ResponseListFavorite + isSet bool +} + +func (v NullableResponseListFavorite) Get() *ResponseListFavorite { + return v.value +} + +func (v *NullableResponseListFavorite) Set(val *ResponseListFavorite) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListFavorite) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListFavorite) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListFavorite(val *ResponseListFavorite) *NullableResponseListFavorite { + return &NullableResponseListFavorite{value: val, isSet: true} +} + +func (v NullableResponseListFavorite) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListFavorite) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_folder.go b/azion-api/model_response_list_folder.go new file mode 100644 index 0000000..d69a397 --- /dev/null +++ b/azion-api/model_response_list_folder.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListFolder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListFolder{} + +// ResponseListFolder struct for ResponseListFolder +type ResponseListFolder struct { + Id int64 `json:"id"` + Name string `json:"name"` + // * `azion` - Items that have Azion scope can be shared to any account that has access permission. * `account` - Items that have Account scope can only be shared with account users. * `user` - Items that have User scope will only be available to the account user. + Scope string `json:"scope"` +} + +type _ResponseListFolder ResponseListFolder + +// NewResponseListFolder instantiates a new ResponseListFolder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListFolder(id int64, name string, scope string) *ResponseListFolder { + this := ResponseListFolder{} + this.Id = id + this.Name = name + this.Scope = scope + return &this +} + +// NewResponseListFolderWithDefaults instantiates a new ResponseListFolder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListFolderWithDefaults() *ResponseListFolder { + this := ResponseListFolder{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListFolder) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListFolder) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListFolder) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListFolder) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListFolder) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListFolder) SetName(v string) { + o.Name = v +} + +// GetScope returns the Scope field value +func (o *ResponseListFolder) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *ResponseListFolder) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *ResponseListFolder) SetScope(v string) { + o.Scope = v +} + +func (o ResponseListFolder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListFolder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["scope"] = o.Scope + return toSerialize, nil +} + +func (o *ResponseListFolder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "scope", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListFolder := _ResponseListFolder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListFolder) + + if err != nil { + return err + } + + *o = ResponseListFolder(varResponseListFolder) + + return err +} + +type NullableResponseListFolder struct { + value *ResponseListFolder + isSet bool +} + +func (v NullableResponseListFolder) Get() *ResponseListFolder { + return v.value +} + +func (v *NullableResponseListFolder) Set(val *ResponseListFolder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListFolder(val *ResponseListFolder) *NullableResponseListFolder { + return &NullableResponseListFolder{value: val, isSet: true} +} + +func (v NullableResponseListFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_grant.go b/azion-api/model_response_list_grant.go new file mode 100644 index 0000000..a8f9020 --- /dev/null +++ b/azion-api/model_response_list_grant.go @@ -0,0 +1,370 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponseListGrant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListGrant{} + +// ResponseListGrant struct for ResponseListGrant +type ResponseListGrant struct { + Id int64 `json:"id"` + Identity NullableInt64 `json:"identity,omitempty"` + Roles []int64 `json:"roles,omitempty"` + Policies []int64 `json:"policies,omitempty"` + Expires *time.Time `json:"expires,omitempty"` + Owner bool `json:"owner"` + AccountId int64 `json:"account_id"` +} + +type _ResponseListGrant ResponseListGrant + +// NewResponseListGrant instantiates a new ResponseListGrant object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListGrant(id int64, owner bool, accountId int64) *ResponseListGrant { + this := ResponseListGrant{} + this.Id = id + this.Owner = owner + this.AccountId = accountId + return &this +} + +// NewResponseListGrantWithDefaults instantiates a new ResponseListGrant object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListGrantWithDefaults() *ResponseListGrant { + this := ResponseListGrant{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListGrant) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListGrant) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListGrant) SetId(v int64) { + o.Id = v +} + +// GetIdentity returns the Identity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResponseListGrant) GetIdentity() int64 { + if o == nil || IsNil(o.Identity.Get()) { + var ret int64 + return ret + } + return *o.Identity.Get() +} + +// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseListGrant) GetIdentityOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Identity.Get(), o.Identity.IsSet() +} + +// HasIdentity returns a boolean if a field has been set. +func (o *ResponseListGrant) HasIdentity() bool { + if o != nil && o.Identity.IsSet() { + return true + } + + return false +} + +// SetIdentity gets a reference to the given NullableInt64 and assigns it to the Identity field. +func (o *ResponseListGrant) SetIdentity(v int64) { + o.Identity.Set(&v) +} +// SetIdentityNil sets the value for Identity to be an explicit nil +func (o *ResponseListGrant) SetIdentityNil() { + o.Identity.Set(nil) +} + +// UnsetIdentity ensures that no value is present for Identity, not even an explicit nil +func (o *ResponseListGrant) UnsetIdentity() { + o.Identity.Unset() +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *ResponseListGrant) GetRoles() []int64 { + if o == nil || IsNil(o.Roles) { + var ret []int64 + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListGrant) GetRolesOk() ([]int64, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *ResponseListGrant) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []int64 and assigns it to the Roles field. +func (o *ResponseListGrant) SetRoles(v []int64) { + o.Roles = v +} + +// GetPolicies returns the Policies field value if set, zero value otherwise. +func (o *ResponseListGrant) GetPolicies() []int64 { + if o == nil || IsNil(o.Policies) { + var ret []int64 + return ret + } + return o.Policies +} + +// GetPoliciesOk returns a tuple with the Policies field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListGrant) GetPoliciesOk() ([]int64, bool) { + if o == nil || IsNil(o.Policies) { + return nil, false + } + return o.Policies, true +} + +// HasPolicies returns a boolean if a field has been set. +func (o *ResponseListGrant) HasPolicies() bool { + if o != nil && !IsNil(o.Policies) { + return true + } + + return false +} + +// SetPolicies gets a reference to the given []int64 and assigns it to the Policies field. +func (o *ResponseListGrant) SetPolicies(v []int64) { + o.Policies = v +} + +// GetExpires returns the Expires field value if set, zero value otherwise. +func (o *ResponseListGrant) GetExpires() time.Time { + if o == nil || IsNil(o.Expires) { + var ret time.Time + return ret + } + return *o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListGrant) GetExpiresOk() (*time.Time, bool) { + if o == nil || IsNil(o.Expires) { + return nil, false + } + return o.Expires, true +} + +// HasExpires returns a boolean if a field has been set. +func (o *ResponseListGrant) HasExpires() bool { + if o != nil && !IsNil(o.Expires) { + return true + } + + return false +} + +// SetExpires gets a reference to the given time.Time and assigns it to the Expires field. +func (o *ResponseListGrant) SetExpires(v time.Time) { + o.Expires = &v +} + +// GetOwner returns the Owner field value +func (o *ResponseListGrant) GetOwner() bool { + if o == nil { + var ret bool + return ret + } + + return o.Owner +} + +// GetOwnerOk returns a tuple with the Owner field value +// and a boolean to check if the value has been set. +func (o *ResponseListGrant) GetOwnerOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Owner, true +} + +// SetOwner sets field value +func (o *ResponseListGrant) SetOwner(v bool) { + o.Owner = v +} + +// GetAccountId returns the AccountId field value +func (o *ResponseListGrant) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ResponseListGrant) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ResponseListGrant) SetAccountId(v int64) { + o.AccountId = v +} + +func (o ResponseListGrant) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListGrant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if o.Identity.IsSet() { + toSerialize["identity"] = o.Identity.Get() + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Policies) { + toSerialize["policies"] = o.Policies + } + if !IsNil(o.Expires) { + toSerialize["expires"] = o.Expires + } + toSerialize["owner"] = o.Owner + toSerialize["account_id"] = o.AccountId + return toSerialize, nil +} + +func (o *ResponseListGrant) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "owner", + "account_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListGrant := _ResponseListGrant{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListGrant) + + if err != nil { + return err + } + + *o = ResponseListGrant(varResponseListGrant) + + return err +} + +type NullableResponseListGrant struct { + value *ResponseListGrant + isSet bool +} + +func (v NullableResponseListGrant) Get() *ResponseListGrant { + return v.value +} + +func (v *NullableResponseListGrant) Set(val *ResponseListGrant) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListGrant) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListGrant) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListGrant(val *ResponseListGrant) *NullableResponseListGrant { + return &NullableResponseListGrant{value: val, isSet: true} +} + +func (v NullableResponseListGrant) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListGrant) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_group.go b/azion-api/model_response_list_group.go new file mode 100644 index 0000000..83a2859 --- /dev/null +++ b/azion-api/model_response_list_group.go @@ -0,0 +1,364 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponseListGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListGroup{} + +// ResponseListGroup struct for ResponseListGroup +type ResponseListGroup struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` +} + +type _ResponseListGroup ResponseListGroup + +// NewResponseListGroup instantiates a new ResponseListGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListGroup(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64) *ResponseListGroup { + this := ResponseListGroup{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + return &this +} + +// NewResponseListGroupWithDefaults instantiates a new ResponseListGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListGroupWithDefaults() *ResponseListGroup { + this := ResponseListGroup{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListGroup) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListGroup) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListGroup) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListGroup) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *ResponseListGroup) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ResponseListGroup) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *ResponseListGroup) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ResponseListGroup) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ResponseListGroup) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ResponseListGroup) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ResponseListGroup) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ResponseListGroup) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponseListGroup) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponseListGroup) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponseListGroup) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *ResponseListGroup) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ResponseListGroup) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ResponseListGroup) SetAccountId(v int64) { + o.AccountId = v +} + +func (o ResponseListGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + return toSerialize, nil +} + +func (o *ResponseListGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListGroup := _ResponseListGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListGroup) + + if err != nil { + return err + } + + *o = ResponseListGroup(varResponseListGroup) + + return err +} + +type NullableResponseListGroup struct { + value *ResponseListGroup + isSet bool +} + +func (v NullableResponseListGroup) Get() *ResponseListGroup { + return v.value +} + +func (v *NullableResponseListGroup) Set(val *ResponseListGroup) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListGroup(val *ResponseListGroup) *NullableResponseListGroup { + return &NullableResponseListGroup{value: val, isSet: true} +} + +func (v NullableResponseListGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_integration.go b/azion-api/model_response_list_integration.go new file mode 100644 index 0000000..5aac103 --- /dev/null +++ b/azion-api/model_response_list_integration.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListIntegration{} + +// ResponseListIntegration struct for ResponseListIntegration +type ResponseListIntegration struct { + Id int64 `json:"id"` + Scope string `json:"scope"` + ScopeType string `json:"scope_type"` + Provider Platform `json:"provider"` +} + +type _ResponseListIntegration ResponseListIntegration + +// NewResponseListIntegration instantiates a new ResponseListIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListIntegration(id int64, scope string, scopeType string, provider Platform) *ResponseListIntegration { + this := ResponseListIntegration{} + this.Id = id + this.Scope = scope + this.ScopeType = scopeType + this.Provider = provider + return &this +} + +// NewResponseListIntegrationWithDefaults instantiates a new ResponseListIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListIntegrationWithDefaults() *ResponseListIntegration { + this := ResponseListIntegration{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListIntegration) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListIntegration) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListIntegration) SetId(v int64) { + o.Id = v +} + +// GetScope returns the Scope field value +func (o *ResponseListIntegration) GetScope() string { + if o == nil { + var ret string + return ret + } + + return o.Scope +} + +// GetScopeOk returns a tuple with the Scope field value +// and a boolean to check if the value has been set. +func (o *ResponseListIntegration) GetScopeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Scope, true +} + +// SetScope sets field value +func (o *ResponseListIntegration) SetScope(v string) { + o.Scope = v +} + +// GetScopeType returns the ScopeType field value +func (o *ResponseListIntegration) GetScopeType() string { + if o == nil { + var ret string + return ret + } + + return o.ScopeType +} + +// GetScopeTypeOk returns a tuple with the ScopeType field value +// and a boolean to check if the value has been set. +func (o *ResponseListIntegration) GetScopeTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ScopeType, true +} + +// SetScopeType sets field value +func (o *ResponseListIntegration) SetScopeType(v string) { + o.ScopeType = v +} + +// GetProvider returns the Provider field value +func (o *ResponseListIntegration) GetProvider() Platform { + if o == nil { + var ret Platform + return ret + } + + return o.Provider +} + +// GetProviderOk returns a tuple with the Provider field value +// and a boolean to check if the value has been set. +func (o *ResponseListIntegration) GetProviderOk() (*Platform, bool) { + if o == nil { + return nil, false + } + return &o.Provider, true +} + +// SetProvider sets field value +func (o *ResponseListIntegration) SetProvider(v Platform) { + o.Provider = v +} + +func (o ResponseListIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["scope"] = o.Scope + toSerialize["scope_type"] = o.ScopeType + toSerialize["provider"] = o.Provider + return toSerialize, nil +} + +func (o *ResponseListIntegration) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "scope", + "scope_type", + "provider", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListIntegration := _ResponseListIntegration{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListIntegration) + + if err != nil { + return err + } + + *o = ResponseListIntegration(varResponseListIntegration) + + return err +} + +type NullableResponseListIntegration struct { + value *ResponseListIntegration + isSet bool +} + +func (v NullableResponseListIntegration) Get() *ResponseListIntegration { + return v.value +} + +func (v *NullableResponseListIntegration) Set(val *ResponseListIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListIntegration(val *ResponseListIntegration) *NullableResponseListIntegration { + return &NullableResponseListIntegration{value: val, isSet: true} +} + +func (v NullableResponseListIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_node_groups_by_id.go b/azion-api/model_response_list_node_groups_by_id.go new file mode 100644 index 0000000..6986190 --- /dev/null +++ b/azion-api/model_response_list_node_groups_by_id.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListNodeGroupsById type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListNodeGroupsById{} + +// ResponseListNodeGroupsById struct for ResponseListNodeGroupsById +type ResponseListNodeGroupsById struct { + Id int64 `json:"id"` + Name *string `json:"name,omitempty"` +} + +type _ResponseListNodeGroupsById ResponseListNodeGroupsById + +// NewResponseListNodeGroupsById instantiates a new ResponseListNodeGroupsById object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListNodeGroupsById(id int64) *ResponseListNodeGroupsById { + this := ResponseListNodeGroupsById{} + this.Id = id + return &this +} + +// NewResponseListNodeGroupsByIdWithDefaults instantiates a new ResponseListNodeGroupsById object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListNodeGroupsByIdWithDefaults() *ResponseListNodeGroupsById { + this := ResponseListNodeGroupsById{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListNodeGroupsById) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodeGroupsById) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListNodeGroupsById) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ResponseListNodeGroupsById) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListNodeGroupsById) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ResponseListNodeGroupsById) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ResponseListNodeGroupsById) SetName(v string) { + o.Name = &v +} + +func (o ResponseListNodeGroupsById) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListNodeGroupsById) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + return toSerialize, nil +} + +func (o *ResponseListNodeGroupsById) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListNodeGroupsById := _ResponseListNodeGroupsById{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListNodeGroupsById) + + if err != nil { + return err + } + + *o = ResponseListNodeGroupsById(varResponseListNodeGroupsById) + + return err +} + +type NullableResponseListNodeGroupsById struct { + value *ResponseListNodeGroupsById + isSet bool +} + +func (v NullableResponseListNodeGroupsById) Get() *ResponseListNodeGroupsById { + return v.value +} + +func (v *NullableResponseListNodeGroupsById) Set(val *ResponseListNodeGroupsById) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListNodeGroupsById) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListNodeGroupsById) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListNodeGroupsById(val *ResponseListNodeGroupsById) *NullableResponseListNodeGroupsById { + return &NullableResponseListNodeGroupsById{value: val, isSet: true} +} + +func (v NullableResponseListNodeGroupsById) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListNodeGroupsById) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_node_services.go b/azion-api/model_response_list_node_services.go new file mode 100644 index 0000000..49ad874 --- /dev/null +++ b/azion-api/model_response_list_node_services.go @@ -0,0 +1,323 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListNodeServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListNodeServices{} + +// ResponseListNodeServices struct for ResponseListNodeServices +type ResponseListNodeServices struct { + Id *int64 `json:"id,omitempty"` + ServiceName *string `json:"service_name,omitempty"` + ServiceId int64 `json:"service_id"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` +} + +type _ResponseListNodeServices ResponseListNodeServices + +// NewResponseListNodeServices instantiates a new ResponseListNodeServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListNodeServices(serviceId int64, lastEditor string, lastModified string) *ResponseListNodeServices { + this := ResponseListNodeServices{} + this.ServiceId = serviceId + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewResponseListNodeServicesWithDefaults instantiates a new ResponseListNodeServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListNodeServicesWithDefaults() *ResponseListNodeServices { + this := ResponseListNodeServices{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ResponseListNodeServices) GetId() int64 { + if o == nil || IsNil(o.Id) { + var ret int64 + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListNodeServices) GetIdOk() (*int64, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ResponseListNodeServices) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given int64 and assigns it to the Id field. +func (o *ResponseListNodeServices) SetId(v int64) { + o.Id = &v +} + +// GetServiceName returns the ServiceName field value if set, zero value otherwise. +func (o *ResponseListNodeServices) GetServiceName() string { + if o == nil || IsNil(o.ServiceName) { + var ret string + return ret + } + return *o.ServiceName +} + +// GetServiceNameOk returns a tuple with the ServiceName field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListNodeServices) GetServiceNameOk() (*string, bool) { + if o == nil || IsNil(o.ServiceName) { + return nil, false + } + return o.ServiceName, true +} + +// HasServiceName returns a boolean if a field has been set. +func (o *ResponseListNodeServices) HasServiceName() bool { + if o != nil && !IsNil(o.ServiceName) { + return true + } + + return false +} + +// SetServiceName gets a reference to the given string and assigns it to the ServiceName field. +func (o *ResponseListNodeServices) SetServiceName(v string) { + o.ServiceName = &v +} + +// GetServiceId returns the ServiceId field value +func (o *ResponseListNodeServices) GetServiceId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ServiceId +} + +// GetServiceIdOk returns a tuple with the ServiceId field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodeServices) GetServiceIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ServiceId, true +} + +// SetServiceId sets field value +func (o *ResponseListNodeServices) SetServiceId(v int64) { + o.ServiceId = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponseListNodeServices) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListNodeServices) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponseListNodeServices) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponseListNodeServices) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *ResponseListNodeServices) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodeServices) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ResponseListNodeServices) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ResponseListNodeServices) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodeServices) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ResponseListNodeServices) SetLastModified(v string) { + o.LastModified = v +} + +func (o ResponseListNodeServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListNodeServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.ServiceName) { + toSerialize["service_name"] = o.ServiceName + } + toSerialize["service_id"] = o.ServiceId + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *ResponseListNodeServices) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "service_id", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListNodeServices := _ResponseListNodeServices{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListNodeServices) + + if err != nil { + return err + } + + *o = ResponseListNodeServices(varResponseListNodeServices) + + return err +} + +type NullableResponseListNodeServices struct { + value *ResponseListNodeServices + isSet bool +} + +func (v NullableResponseListNodeServices) Get() *ResponseListNodeServices { + return v.value +} + +func (v *NullableResponseListNodeServices) Set(val *ResponseListNodeServices) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListNodeServices) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListNodeServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListNodeServices(val *ResponseListNodeServices) *NullableResponseListNodeServices { + return &NullableResponseListNodeServices{value: val, isSet: true} +} + +func (v NullableResponseListNodeServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListNodeServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_nodes.go b/azion-api/model_response_list_nodes.go new file mode 100644 index 0000000..2f3a27f --- /dev/null +++ b/azion-api/model_response_list_nodes.go @@ -0,0 +1,393 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListNodes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListNodes{} + +// ResponseListNodes struct for ResponseListNodes +type ResponseListNodes struct { + Id int64 `json:"id"` + HashId string `json:"hash_id"` + Name string `json:"name"` + // * `waiting_authorization` - waiting_authorization * `authorized` - authorized + Status string `json:"status"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` + Modules interface{} `json:"modules,omitempty"` + ProductVersion string `json:"product_version"` +} + +type _ResponseListNodes ResponseListNodes + +// NewResponseListNodes instantiates a new ResponseListNodes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListNodes(id int64, hashId string, name string, status string, active bool, lastEditor string, lastModified string, productVersion string) *ResponseListNodes { + this := ResponseListNodes{} + this.Id = id + this.HashId = hashId + this.Name = name + this.Status = status + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ProductVersion = productVersion + return &this +} + +// NewResponseListNodesWithDefaults instantiates a new ResponseListNodes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListNodesWithDefaults() *ResponseListNodes { + this := ResponseListNodes{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListNodes) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListNodes) SetId(v int64) { + o.Id = v +} + +// GetHashId returns the HashId field value +func (o *ResponseListNodes) GetHashId() string { + if o == nil { + var ret string + return ret + } + + return o.HashId +} + +// GetHashIdOk returns a tuple with the HashId field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetHashIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HashId, true +} + +// SetHashId sets field value +func (o *ResponseListNodes) SetHashId(v string) { + o.HashId = v +} + +// GetName returns the Name field value +func (o *ResponseListNodes) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListNodes) SetName(v string) { + o.Name = v +} + +// GetStatus returns the Status field value +func (o *ResponseListNodes) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetStatusOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Status, true +} + +// SetStatus sets field value +func (o *ResponseListNodes) SetStatus(v string) { + o.Status = v +} + +// GetActive returns the Active field value +func (o *ResponseListNodes) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *ResponseListNodes) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ResponseListNodes) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ResponseListNodes) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ResponseListNodes) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ResponseListNodes) SetLastModified(v string) { + o.LastModified = v +} + +// GetModules returns the Modules field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResponseListNodes) GetModules() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Modules +} + +// GetModulesOk returns a tuple with the Modules field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseListNodes) GetModulesOk() (*interface{}, bool) { + if o == nil || IsNil(o.Modules) { + return nil, false + } + return &o.Modules, true +} + +// HasModules returns a boolean if a field has been set. +func (o *ResponseListNodes) HasModules() bool { + if o != nil && !IsNil(o.Modules) { + return true + } + + return false +} + +// SetModules gets a reference to the given interface{} and assigns it to the Modules field. +func (o *ResponseListNodes) SetModules(v interface{}) { + o.Modules = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *ResponseListNodes) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *ResponseListNodes) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *ResponseListNodes) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o ResponseListNodes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListNodes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["hash_id"] = o.HashId + toSerialize["name"] = o.Name + toSerialize["status"] = o.Status + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if o.Modules != nil { + toSerialize["modules"] = o.Modules + } + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *ResponseListNodes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "hash_id", + "name", + "status", + "active", + "last_editor", + "last_modified", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListNodes := _ResponseListNodes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListNodes) + + if err != nil { + return err + } + + *o = ResponseListNodes(varResponseListNodes) + + return err +} + +type NullableResponseListNodes struct { + value *ResponseListNodes + isSet bool +} + +func (v NullableResponseListNodes) Get() *ResponseListNodes { + return v.value +} + +func (v *NullableResponseListNodes) Set(val *ResponseListNodes) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListNodes) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListNodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListNodes(val *ResponseListNodes) *NullableResponseListNodes { + return &NullableResponseListNodes{value: val, isSet: true} +} + +func (v NullableResponseListNodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListNodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_platform.go b/azion-api/model_response_list_platform.go new file mode 100644 index 0000000..140500c --- /dev/null +++ b/azion-api/model_response_list_platform.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListPlatform type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListPlatform{} + +// ResponseListPlatform struct for ResponseListPlatform +type ResponseListPlatform struct { + Id string `json:"id"` + Name string `json:"name"` + InstallationUrl string `json:"installation_url"` + CallbackUrl string `json:"callback_url"` +} + +type _ResponseListPlatform ResponseListPlatform + +// NewResponseListPlatform instantiates a new ResponseListPlatform object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListPlatform(id string, name string, installationUrl string, callbackUrl string) *ResponseListPlatform { + this := ResponseListPlatform{} + this.Id = id + this.Name = name + this.InstallationUrl = installationUrl + this.CallbackUrl = callbackUrl + return &this +} + +// NewResponseListPlatformWithDefaults instantiates a new ResponseListPlatform object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListPlatformWithDefaults() *ResponseListPlatform { + this := ResponseListPlatform{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListPlatform) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListPlatform) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListPlatform) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListPlatform) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListPlatform) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListPlatform) SetName(v string) { + o.Name = v +} + +// GetInstallationUrl returns the InstallationUrl field value +func (o *ResponseListPlatform) GetInstallationUrl() string { + if o == nil { + var ret string + return ret + } + + return o.InstallationUrl +} + +// GetInstallationUrlOk returns a tuple with the InstallationUrl field value +// and a boolean to check if the value has been set. +func (o *ResponseListPlatform) GetInstallationUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstallationUrl, true +} + +// SetInstallationUrl sets field value +func (o *ResponseListPlatform) SetInstallationUrl(v string) { + o.InstallationUrl = v +} + +// GetCallbackUrl returns the CallbackUrl field value +func (o *ResponseListPlatform) GetCallbackUrl() string { + if o == nil { + var ret string + return ret + } + + return o.CallbackUrl +} + +// GetCallbackUrlOk returns a tuple with the CallbackUrl field value +// and a boolean to check if the value has been set. +func (o *ResponseListPlatform) GetCallbackUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.CallbackUrl, true +} + +// SetCallbackUrl sets field value +func (o *ResponseListPlatform) SetCallbackUrl(v string) { + o.CallbackUrl = v +} + +func (o ResponseListPlatform) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListPlatform) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["installation_url"] = o.InstallationUrl + toSerialize["callback_url"] = o.CallbackUrl + return toSerialize, nil +} + +func (o *ResponseListPlatform) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "installation_url", + "callback_url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListPlatform := _ResponseListPlatform{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListPlatform) + + if err != nil { + return err + } + + *o = ResponseListPlatform(varResponseListPlatform) + + return err +} + +type NullableResponseListPlatform struct { + value *ResponseListPlatform + isSet bool +} + +func (v NullableResponseListPlatform) Get() *ResponseListPlatform { + return v.value +} + +func (v *NullableResponseListPlatform) Set(val *ResponseListPlatform) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListPlatform) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListPlatform) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListPlatform(val *ResponseListPlatform) *NullableResponseListPlatform { + return &NullableResponseListPlatform{value: val, isSet: true} +} + +func (v NullableResponseListPlatform) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListPlatform) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_report.go b/azion-api/model_response_list_report.go new file mode 100644 index 0000000..f30d72c --- /dev/null +++ b/azion-api/model_response_list_report.go @@ -0,0 +1,549 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListReport{} + +// ResponseListReport struct for ResponseListReport +type ResponseListReport struct { + Id int64 `json:"id"` + Description string `json:"description"` + // * `big-numbers` - Big numbers report type, used for key performance indicators (KPIs). Ideal for highlighting a single numeric value in a visually striking way. * `line` - Line report type, used for time series analysis, ideal for showing trends, growth or decrease. * `map` - Map report type, used for geographic analysis, visualization of demographic data, monitoring of events in different locations. * `ordered-bar` - Ordered bar report type, used for category ranking, performance comparison, frequency distribution analysis, ideal for highlighting highest or lowest values. * `pie` - Pie chart report type, used for composition analysis, comparing parts of a whole, visualizing percentages. Ideal for showing the distribution of a data set into parts. + Type string `json:"type"` + XAxis *string `json:"x_axis,omitempty"` + // * `avg` - Aggregation by average. * `sum` - Aggregation by sum. + AggregationType string `json:"aggregation_type"` + // * `bits-per-second` - Sets the data unit to bits per second. * `bytes` - Sets the data unit to bytes. * `count` - Sets the data unit to counter. * `per-second` - Sets the data unit to per second. * `percentage` - Sets the data unit to percentage. + DataUnit string `json:"data_unit"` + Queries []BaseQuery `json:"queries"` + Order string `json:"order"` + Name string `json:"name"` + Rotated *bool `json:"rotated,omitempty"` + // * `inverse` - The lower the value, the better the result or performance. * `neutral` - There is no general rule to say whether a value is good or bad, as it depends on the context. * `regular` - The higher the value, the better the result or performance. + ComparisonType *string `json:"comparison_type,omitempty"` + HelpCenterPath NullableString `json:"help_center_path,omitempty"` + Library *bool `json:"library,omitempty"` +} + +type _ResponseListReport ResponseListReport + +// NewResponseListReport instantiates a new ResponseListReport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListReport(id int64, description string, type_ string, aggregationType string, dataUnit string, queries []BaseQuery, order string, name string) *ResponseListReport { + this := ResponseListReport{} + this.Id = id + this.Description = description + this.Type = type_ + this.AggregationType = aggregationType + this.DataUnit = dataUnit + this.Queries = queries + this.Order = order + this.Name = name + return &this +} + +// NewResponseListReportWithDefaults instantiates a new ResponseListReport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListReportWithDefaults() *ResponseListReport { + this := ResponseListReport{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListReport) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListReport) SetId(v int64) { + o.Id = v +} + +// GetDescription returns the Description field value +func (o *ResponseListReport) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *ResponseListReport) SetDescription(v string) { + o.Description = v +} + +// GetType returns the Type field value +func (o *ResponseListReport) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ResponseListReport) SetType(v string) { + o.Type = v +} + +// GetXAxis returns the XAxis field value if set, zero value otherwise. +func (o *ResponseListReport) GetXAxis() string { + if o == nil || IsNil(o.XAxis) { + var ret string + return ret + } + return *o.XAxis +} + +// GetXAxisOk returns a tuple with the XAxis field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetXAxisOk() (*string, bool) { + if o == nil || IsNil(o.XAxis) { + return nil, false + } + return o.XAxis, true +} + +// HasXAxis returns a boolean if a field has been set. +func (o *ResponseListReport) HasXAxis() bool { + if o != nil && !IsNil(o.XAxis) { + return true + } + + return false +} + +// SetXAxis gets a reference to the given string and assigns it to the XAxis field. +func (o *ResponseListReport) SetXAxis(v string) { + o.XAxis = &v +} + +// GetAggregationType returns the AggregationType field value +func (o *ResponseListReport) GetAggregationType() string { + if o == nil { + var ret string + return ret + } + + return o.AggregationType +} + +// GetAggregationTypeOk returns a tuple with the AggregationType field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetAggregationTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AggregationType, true +} + +// SetAggregationType sets field value +func (o *ResponseListReport) SetAggregationType(v string) { + o.AggregationType = v +} + +// GetDataUnit returns the DataUnit field value +func (o *ResponseListReport) GetDataUnit() string { + if o == nil { + var ret string + return ret + } + + return o.DataUnit +} + +// GetDataUnitOk returns a tuple with the DataUnit field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetDataUnitOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataUnit, true +} + +// SetDataUnit sets field value +func (o *ResponseListReport) SetDataUnit(v string) { + o.DataUnit = v +} + +// GetQueries returns the Queries field value +func (o *ResponseListReport) GetQueries() []BaseQuery { + if o == nil { + var ret []BaseQuery + return ret + } + + return o.Queries +} + +// GetQueriesOk returns a tuple with the Queries field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetQueriesOk() ([]BaseQuery, bool) { + if o == nil { + return nil, false + } + return o.Queries, true +} + +// SetQueries sets field value +func (o *ResponseListReport) SetQueries(v []BaseQuery) { + o.Queries = v +} + +// GetOrder returns the Order field value +func (o *ResponseListReport) GetOrder() string { + if o == nil { + var ret string + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetOrderOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *ResponseListReport) SetOrder(v string) { + o.Order = v +} + +// GetName returns the Name field value +func (o *ResponseListReport) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListReport) SetName(v string) { + o.Name = v +} + +// GetRotated returns the Rotated field value if set, zero value otherwise. +func (o *ResponseListReport) GetRotated() bool { + if o == nil || IsNil(o.Rotated) { + var ret bool + return ret + } + return *o.Rotated +} + +// GetRotatedOk returns a tuple with the Rotated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetRotatedOk() (*bool, bool) { + if o == nil || IsNil(o.Rotated) { + return nil, false + } + return o.Rotated, true +} + +// HasRotated returns a boolean if a field has been set. +func (o *ResponseListReport) HasRotated() bool { + if o != nil && !IsNil(o.Rotated) { + return true + } + + return false +} + +// SetRotated gets a reference to the given bool and assigns it to the Rotated field. +func (o *ResponseListReport) SetRotated(v bool) { + o.Rotated = &v +} + +// GetComparisonType returns the ComparisonType field value if set, zero value otherwise. +func (o *ResponseListReport) GetComparisonType() string { + if o == nil || IsNil(o.ComparisonType) { + var ret string + return ret + } + return *o.ComparisonType +} + +// GetComparisonTypeOk returns a tuple with the ComparisonType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetComparisonTypeOk() (*string, bool) { + if o == nil || IsNil(o.ComparisonType) { + return nil, false + } + return o.ComparisonType, true +} + +// HasComparisonType returns a boolean if a field has been set. +func (o *ResponseListReport) HasComparisonType() bool { + if o != nil && !IsNil(o.ComparisonType) { + return true + } + + return false +} + +// SetComparisonType gets a reference to the given string and assigns it to the ComparisonType field. +func (o *ResponseListReport) SetComparisonType(v string) { + o.ComparisonType = &v +} + +// GetHelpCenterPath returns the HelpCenterPath field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ResponseListReport) GetHelpCenterPath() string { + if o == nil || IsNil(o.HelpCenterPath.Get()) { + var ret string + return ret + } + return *o.HelpCenterPath.Get() +} + +// GetHelpCenterPathOk returns a tuple with the HelpCenterPath field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponseListReport) GetHelpCenterPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.HelpCenterPath.Get(), o.HelpCenterPath.IsSet() +} + +// HasHelpCenterPath returns a boolean if a field has been set. +func (o *ResponseListReport) HasHelpCenterPath() bool { + if o != nil && o.HelpCenterPath.IsSet() { + return true + } + + return false +} + +// SetHelpCenterPath gets a reference to the given NullableString and assigns it to the HelpCenterPath field. +func (o *ResponseListReport) SetHelpCenterPath(v string) { + o.HelpCenterPath.Set(&v) +} +// SetHelpCenterPathNil sets the value for HelpCenterPath to be an explicit nil +func (o *ResponseListReport) SetHelpCenterPathNil() { + o.HelpCenterPath.Set(nil) +} + +// UnsetHelpCenterPath ensures that no value is present for HelpCenterPath, not even an explicit nil +func (o *ResponseListReport) UnsetHelpCenterPath() { + o.HelpCenterPath.Unset() +} + +// GetLibrary returns the Library field value if set, zero value otherwise. +func (o *ResponseListReport) GetLibrary() bool { + if o == nil || IsNil(o.Library) { + var ret bool + return ret + } + return *o.Library +} + +// GetLibraryOk returns a tuple with the Library field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListReport) GetLibraryOk() (*bool, bool) { + if o == nil || IsNil(o.Library) { + return nil, false + } + return o.Library, true +} + +// HasLibrary returns a boolean if a field has been set. +func (o *ResponseListReport) HasLibrary() bool { + if o != nil && !IsNil(o.Library) { + return true + } + + return false +} + +// SetLibrary gets a reference to the given bool and assigns it to the Library field. +func (o *ResponseListReport) SetLibrary(v bool) { + o.Library = &v +} + +func (o ResponseListReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["description"] = o.Description + toSerialize["type"] = o.Type + if !IsNil(o.XAxis) { + toSerialize["x_axis"] = o.XAxis + } + toSerialize["aggregation_type"] = o.AggregationType + toSerialize["data_unit"] = o.DataUnit + toSerialize["queries"] = o.Queries + toSerialize["order"] = o.Order + toSerialize["name"] = o.Name + if !IsNil(o.Rotated) { + toSerialize["rotated"] = o.Rotated + } + if !IsNil(o.ComparisonType) { + toSerialize["comparison_type"] = o.ComparisonType + } + if o.HelpCenterPath.IsSet() { + toSerialize["help_center_path"] = o.HelpCenterPath.Get() + } + if !IsNil(o.Library) { + toSerialize["library"] = o.Library + } + return toSerialize, nil +} + +func (o *ResponseListReport) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "description", + "type", + "aggregation_type", + "data_unit", + "queries", + "order", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListReport := _ResponseListReport{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListReport) + + if err != nil { + return err + } + + *o = ResponseListReport(varResponseListReport) + + return err +} + +type NullableResponseListReport struct { + value *ResponseListReport + isSet bool +} + +func (v NullableResponseListReport) Get() *ResponseListReport { + return v.value +} + +func (v *NullableResponseListReport) Set(val *ResponseListReport) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListReport) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListReport(val *ResponseListReport) *NullableResponseListReport { + return &NullableResponseListReport{value: val, isSet: true} +} + +func (v NullableResponseListReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_repository.go b/azion-api/model_response_list_repository.go new file mode 100644 index 0000000..f38b59c --- /dev/null +++ b/azion-api/model_response_list_repository.go @@ -0,0 +1,243 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListRepository type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListRepository{} + +// ResponseListRepository struct for ResponseListRepository +type ResponseListRepository struct { + Id string `json:"id"` + Name string `json:"name"` + Visibility string `json:"visibility"` + Url string `json:"url"` +} + +type _ResponseListRepository ResponseListRepository + +// NewResponseListRepository instantiates a new ResponseListRepository object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListRepository(id string, name string, visibility string, url string) *ResponseListRepository { + this := ResponseListRepository{} + this.Id = id + this.Name = name + this.Visibility = visibility + this.Url = url + return &this +} + +// NewResponseListRepositoryWithDefaults instantiates a new ResponseListRepository object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListRepositoryWithDefaults() *ResponseListRepository { + this := ResponseListRepository{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListRepository) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListRepository) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListRepository) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListRepository) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListRepository) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListRepository) SetName(v string) { + o.Name = v +} + +// GetVisibility returns the Visibility field value +func (o *ResponseListRepository) GetVisibility() string { + if o == nil { + var ret string + return ret + } + + return o.Visibility +} + +// GetVisibilityOk returns a tuple with the Visibility field value +// and a boolean to check if the value has been set. +func (o *ResponseListRepository) GetVisibilityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Visibility, true +} + +// SetVisibility sets field value +func (o *ResponseListRepository) SetVisibility(v string) { + o.Visibility = v +} + +// GetUrl returns the Url field value +func (o *ResponseListRepository) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *ResponseListRepository) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *ResponseListRepository) SetUrl(v string) { + o.Url = v +} + +func (o ResponseListRepository) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListRepository) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["visibility"] = o.Visibility + toSerialize["url"] = o.Url + return toSerialize, nil +} + +func (o *ResponseListRepository) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "visibility", + "url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListRepository := _ResponseListRepository{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListRepository) + + if err != nil { + return err + } + + *o = ResponseListRepository(varResponseListRepository) + + return err +} + +type NullableResponseListRepository struct { + value *ResponseListRepository + isSet bool +} + +func (v NullableResponseListRepository) Get() *ResponseListRepository { + return v.value +} + +func (v *NullableResponseListRepository) Set(val *ResponseListRepository) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListRepository) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListRepository) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListRepository(val *ResponseListRepository) *NullableResponseListRepository { + return &NullableResponseListRepository{value: val, isSet: true} +} + +func (v NullableResponseListRepository) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListRepository) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_row.go b/azion-api/model_response_list_row.go new file mode 100644 index 0000000..7570246 --- /dev/null +++ b/azion-api/model_response_list_row.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListRow{} + +// ResponseListRow struct for ResponseListRow +type ResponseListRow struct { + Id int64 `json:"id"` + Title string `json:"title"` + Order int64 `json:"order"` +} + +type _ResponseListRow ResponseListRow + +// NewResponseListRow instantiates a new ResponseListRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListRow(id int64, title string, order int64) *ResponseListRow { + this := ResponseListRow{} + this.Id = id + this.Title = title + this.Order = order + return &this +} + +// NewResponseListRowWithDefaults instantiates a new ResponseListRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListRowWithDefaults() *ResponseListRow { + this := ResponseListRow{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListRow) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListRow) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListRow) SetId(v int64) { + o.Id = v +} + +// GetTitle returns the Title field value +func (o *ResponseListRow) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *ResponseListRow) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *ResponseListRow) SetTitle(v string) { + o.Title = v +} + +// GetOrder returns the Order field value +func (o *ResponseListRow) GetOrder() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *ResponseListRow) GetOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *ResponseListRow) SetOrder(v int64) { + o.Order = v +} + +func (o ResponseListRow) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["title"] = o.Title + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *ResponseListRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "title", + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListRow := _ResponseListRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListRow) + + if err != nil { + return err + } + + *o = ResponseListRow(varResponseListRow) + + return err +} + +type NullableResponseListRow struct { + value *ResponseListRow + isSet bool +} + +func (v NullableResponseListRow) Get() *ResponseListRow { + return v.value +} + +func (v *NullableResponseListRow) Set(val *ResponseListRow) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListRow) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListRow(val *ResponseListRow) *NullableResponseListRow { + return &NullableResponseListRow{value: val, isSet: true} +} + +func (v NullableResponseListRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_service_token.go b/azion-api/model_response_list_service_token.go new file mode 100644 index 0000000..11475f3 --- /dev/null +++ b/azion-api/model_response_list_service_token.go @@ -0,0 +1,456 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponseListServiceToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListServiceToken{} + +// ResponseListServiceToken struct for ResponseListServiceToken +type ResponseListServiceToken struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` + Description *string `json:"description,omitempty"` + Expires time.Time `json:"expires"` + LastUsed time.Time `json:"last_used"` +} + +type _ResponseListServiceToken ResponseListServiceToken + +// NewResponseListServiceToken instantiates a new ResponseListServiceToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListServiceToken(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, expires time.Time, lastUsed time.Time) *ResponseListServiceToken { + this := ResponseListServiceToken{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + this.Expires = expires + this.LastUsed = lastUsed + return &this +} + +// NewResponseListServiceTokenWithDefaults instantiates a new ResponseListServiceToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListServiceTokenWithDefaults() *ResponseListServiceToken { + this := ResponseListServiceToken{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListServiceToken) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListServiceToken) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListServiceToken) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListServiceToken) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *ResponseListServiceToken) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ResponseListServiceToken) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *ResponseListServiceToken) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ResponseListServiceToken) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ResponseListServiceToken) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ResponseListServiceToken) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ResponseListServiceToken) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ResponseListServiceToken) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponseListServiceToken) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponseListServiceToken) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponseListServiceToken) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *ResponseListServiceToken) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ResponseListServiceToken) SetAccountId(v int64) { + o.AccountId = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ResponseListServiceToken) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ResponseListServiceToken) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ResponseListServiceToken) SetDescription(v string) { + o.Description = &v +} + +// GetExpires returns the Expires field value +func (o *ResponseListServiceToken) GetExpires() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Expires, true +} + +// SetExpires sets field value +func (o *ResponseListServiceToken) SetExpires(v time.Time) { + o.Expires = v +} + +// GetLastUsed returns the LastUsed field value +func (o *ResponseListServiceToken) GetLastUsed() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastUsed +} + +// GetLastUsedOk returns a tuple with the LastUsed field value +// and a boolean to check if the value has been set. +func (o *ResponseListServiceToken) GetLastUsedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastUsed, true +} + +// SetLastUsed sets field value +func (o *ResponseListServiceToken) SetLastUsed(v time.Time) { + o.LastUsed = v +} + +func (o ResponseListServiceToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListServiceToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["expires"] = o.Expires + toSerialize["last_used"] = o.LastUsed + return toSerialize, nil +} + +func (o *ResponseListServiceToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + "expires", + "last_used", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListServiceToken := _ResponseListServiceToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListServiceToken) + + if err != nil { + return err + } + + *o = ResponseListServiceToken(varResponseListServiceToken) + + return err +} + +type NullableResponseListServiceToken struct { + value *ResponseListServiceToken + isSet bool +} + +func (v NullableResponseListServiceToken) Get() *ResponseListServiceToken { + return v.value +} + +func (v *NullableResponseListServiceToken) Set(val *ResponseListServiceToken) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListServiceToken) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListServiceToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListServiceToken(val *ResponseListServiceToken) *NullableResponseListServiceToken { + return &NullableResponseListServiceToken{value: val, isSet: true} +} + +func (v NullableResponseListServiceToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListServiceToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_services.go b/azion-api/model_response_list_services.go new file mode 100644 index 0000000..1dd41f6 --- /dev/null +++ b/azion-api/model_response_list_services.go @@ -0,0 +1,415 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseListServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListServices{} + +// ResponseListServices struct for ResponseListServices +type ResponseListServices struct { + Id int64 `json:"id"` + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + MinVersion *string `json:"min_version,omitempty"` + Permissions *int64 `json:"permissions,omitempty"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` + RefCount int64 `json:"ref_count"` + ProductVersion string `json:"product_version"` +} + +type _ResponseListServices ResponseListServices + +// NewResponseListServices instantiates a new ResponseListServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListServices(id int64, lastEditor string, lastModified string, refCount int64, productVersion string) *ResponseListServices { + this := ResponseListServices{} + this.Id = id + this.LastEditor = lastEditor + this.LastModified = lastModified + this.RefCount = refCount + this.ProductVersion = productVersion + return &this +} + +// NewResponseListServicesWithDefaults instantiates a new ResponseListServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListServicesWithDefaults() *ResponseListServices { + this := ResponseListServices{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListServices) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListServices) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ResponseListServices) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ResponseListServices) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ResponseListServices) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponseListServices) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponseListServices) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponseListServices) SetActive(v bool) { + o.Active = &v +} + +// GetMinVersion returns the MinVersion field value if set, zero value otherwise. +func (o *ResponseListServices) GetMinVersion() string { + if o == nil || IsNil(o.MinVersion) { + var ret string + return ret + } + return *o.MinVersion +} + +// GetMinVersionOk returns a tuple with the MinVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetMinVersionOk() (*string, bool) { + if o == nil || IsNil(o.MinVersion) { + return nil, false + } + return o.MinVersion, true +} + +// HasMinVersion returns a boolean if a field has been set. +func (o *ResponseListServices) HasMinVersion() bool { + if o != nil && !IsNil(o.MinVersion) { + return true + } + + return false +} + +// SetMinVersion gets a reference to the given string and assigns it to the MinVersion field. +func (o *ResponseListServices) SetMinVersion(v string) { + o.MinVersion = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *ResponseListServices) GetPermissions() int64 { + if o == nil || IsNil(o.Permissions) { + var ret int64 + return ret + } + return *o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetPermissionsOk() (*int64, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *ResponseListServices) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given int64 and assigns it to the Permissions field. +func (o *ResponseListServices) SetPermissions(v int64) { + o.Permissions = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *ResponseListServices) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ResponseListServices) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ResponseListServices) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ResponseListServices) SetLastModified(v string) { + o.LastModified = v +} + +// GetRefCount returns the RefCount field value +func (o *ResponseListServices) GetRefCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.RefCount +} + +// GetRefCountOk returns a tuple with the RefCount field value +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetRefCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.RefCount, true +} + +// SetRefCount sets field value +func (o *ResponseListServices) SetRefCount(v int64) { + o.RefCount = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *ResponseListServices) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *ResponseListServices) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *ResponseListServices) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o ResponseListServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.MinVersion) { + toSerialize["min_version"] = o.MinVersion + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["ref_count"] = o.RefCount + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *ResponseListServices) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "last_editor", + "last_modified", + "ref_count", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListServices := _ResponseListServices{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListServices) + + if err != nil { + return err + } + + *o = ResponseListServices(varResponseListServices) + + return err +} + +type NullableResponseListServices struct { + value *ResponseListServices + isSet bool +} + +func (v NullableResponseListServices) Get() *ResponseListServices { + return v.value +} + +func (v *NullableResponseListServices) Set(val *ResponseListServices) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListServices) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListServices(val *ResponseListServices) *NullableResponseListServices { + return &NullableResponseListServices{value: val, isSet: true} +} + +func (v NullableResponseListServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_list_user.go b/azion-api/model_response_list_user.go new file mode 100644 index 0000000..7ae79ee --- /dev/null +++ b/azion-api/model_response_list_user.go @@ -0,0 +1,557 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponseListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseListUser{} + +// ResponseListUser struct for ResponseListUser +type ResponseListUser struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` + LastLogin time.Time `json:"last_login"` + TwoFactorEnabled *bool `json:"two_factor_enabled,omitempty"` + // User-specific preferences in JSON format. + Preferences map[string]interface{} `json:"preferences,omitempty"` + Phone *string `json:"phone,omitempty"` + Info map[string]interface{} `json:"info"` + Lockout string `json:"lockout"` +} + +type _ResponseListUser ResponseListUser + +// NewResponseListUser instantiates a new ResponseListUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseListUser(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, lastLogin time.Time, info map[string]interface{}, lockout string) *ResponseListUser { + this := ResponseListUser{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + this.LastLogin = lastLogin + this.Info = info + this.Lockout = lockout + return &this +} + +// NewResponseListUserWithDefaults instantiates a new ResponseListUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseListUserWithDefaults() *ResponseListUser { + this := ResponseListUser{} + return &this +} + +// GetId returns the Id field value +func (o *ResponseListUser) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponseListUser) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponseListUser) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponseListUser) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *ResponseListUser) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ResponseListUser) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *ResponseListUser) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ResponseListUser) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ResponseListUser) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ResponseListUser) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ResponseListUser) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ResponseListUser) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponseListUser) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponseListUser) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponseListUser) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *ResponseListUser) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ResponseListUser) SetAccountId(v int64) { + o.AccountId = v +} + +// GetLastLogin returns the LastLogin field value +func (o *ResponseListUser) GetLastLogin() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastLogin +} + +// GetLastLoginOk returns a tuple with the LastLogin field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetLastLoginOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastLogin, true +} + +// SetLastLogin sets field value +func (o *ResponseListUser) SetLastLogin(v time.Time) { + o.LastLogin = v +} + +// GetTwoFactorEnabled returns the TwoFactorEnabled field value if set, zero value otherwise. +func (o *ResponseListUser) GetTwoFactorEnabled() bool { + if o == nil || IsNil(o.TwoFactorEnabled) { + var ret bool + return ret + } + return *o.TwoFactorEnabled +} + +// GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetTwoFactorEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.TwoFactorEnabled) { + return nil, false + } + return o.TwoFactorEnabled, true +} + +// HasTwoFactorEnabled returns a boolean if a field has been set. +func (o *ResponseListUser) HasTwoFactorEnabled() bool { + if o != nil && !IsNil(o.TwoFactorEnabled) { + return true + } + + return false +} + +// SetTwoFactorEnabled gets a reference to the given bool and assigns it to the TwoFactorEnabled field. +func (o *ResponseListUser) SetTwoFactorEnabled(v bool) { + o.TwoFactorEnabled = &v +} + +// GetPreferences returns the Preferences field value if set, zero value otherwise. +func (o *ResponseListUser) GetPreferences() map[string]interface{} { + if o == nil || IsNil(o.Preferences) { + var ret map[string]interface{} + return ret + } + return o.Preferences +} + +// GetPreferencesOk returns a tuple with the Preferences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetPreferencesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Preferences) { + return map[string]interface{}{}, false + } + return o.Preferences, true +} + +// HasPreferences returns a boolean if a field has been set. +func (o *ResponseListUser) HasPreferences() bool { + if o != nil && !IsNil(o.Preferences) { + return true + } + + return false +} + +// SetPreferences gets a reference to the given map[string]interface{} and assigns it to the Preferences field. +func (o *ResponseListUser) SetPreferences(v map[string]interface{}) { + o.Preferences = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *ResponseListUser) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *ResponseListUser) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *ResponseListUser) SetPhone(v string) { + o.Phone = &v +} + +// GetInfo returns the Info field value +func (o *ResponseListUser) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *ResponseListUser) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetLockout returns the Lockout field value +func (o *ResponseListUser) GetLockout() string { + if o == nil { + var ret string + return ret + } + + return o.Lockout +} + +// GetLockoutOk returns a tuple with the Lockout field value +// and a boolean to check if the value has been set. +func (o *ResponseListUser) GetLockoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Lockout, true +} + +// SetLockout sets field value +func (o *ResponseListUser) SetLockout(v string) { + o.Lockout = v +} + +func (o ResponseListUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseListUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + toSerialize["last_login"] = o.LastLogin + if !IsNil(o.TwoFactorEnabled) { + toSerialize["two_factor_enabled"] = o.TwoFactorEnabled + } + if !IsNil(o.Preferences) { + toSerialize["preferences"] = o.Preferences + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + toSerialize["info"] = o.Info + toSerialize["lockout"] = o.Lockout + return toSerialize, nil +} + +func (o *ResponseListUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + "last_login", + "info", + "lockout", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseListUser := _ResponseListUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseListUser) + + if err != nil { + return err + } + + *o = ResponseListUser(varResponseListUser) + + return err +} + +type NullableResponseListUser struct { + value *ResponseListUser + isSet bool +} + +func (v NullableResponseListUser) Get() *ResponseListUser { + return v.value +} + +func (v *NullableResponseListUser) Set(val *ResponseListUser) { + v.value = val + v.isSet = true +} + +func (v NullableResponseListUser) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseListUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseListUser(val *ResponseListUser) *NullableResponseListUser { + return &NullableResponseListUser{value: val, isSet: true} +} + +func (v NullableResponseListUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseListUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_login.go b/azion-api/model_response_login.go new file mode 100644 index 0000000..94ef413 --- /dev/null +++ b/azion-api/model_response_login.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseLogin type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseLogin{} + +// ResponseLogin struct for ResponseLogin +type ResponseLogin struct { + Data LoginResponse `json:"data"` + State *string `json:"state,omitempty"` +} + +type _ResponseLogin ResponseLogin + +// NewResponseLogin instantiates a new ResponseLogin object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseLogin(data LoginResponse) *ResponseLogin { + this := ResponseLogin{} + this.Data = data + return &this +} + +// NewResponseLoginWithDefaults instantiates a new ResponseLogin object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseLoginWithDefaults() *ResponseLogin { + this := ResponseLogin{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseLogin) GetData() LoginResponse { + if o == nil { + var ret LoginResponse + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseLogin) GetDataOk() (*LoginResponse, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseLogin) SetData(v LoginResponse) { + o.Data = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseLogin) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseLogin) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseLogin) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseLogin) SetState(v string) { + o.State = &v +} + +func (o ResponseLogin) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseLogin) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +func (o *ResponseLogin) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseLogin := _ResponseLogin{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseLogin) + + if err != nil { + return err + } + + *o = ResponseLogin(varResponseLogin) + + return err +} + +type NullableResponseLogin struct { + value *ResponseLogin + isSet bool +} + +func (v NullableResponseLogin) Get() *ResponseLogin { + return v.value +} + +func (v *NullableResponseLogin) Set(val *ResponseLogin) { + v.value = val + v.isSet = true +} + +func (v NullableResponseLogin) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseLogin) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseLogin(val *ResponseLogin) *NullableResponseLogin { + return &NullableResponseLogin{value: val, isSet: true} +} + +func (v NullableResponseLogin) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseLogin) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_message.go b/azion-api/model_response_message.go new file mode 100644 index 0000000..c90f5bc --- /dev/null +++ b/azion-api/model_response_message.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseMessage{} + +// ResponseMessage struct for ResponseMessage +type ResponseMessage struct { + State *string `json:"state,omitempty"` + Data Message `json:"data"` +} + +type _ResponseMessage ResponseMessage + +// NewResponseMessage instantiates a new ResponseMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseMessage(data Message) *ResponseMessage { + this := ResponseMessage{} + this.Data = data + return &this +} + +// NewResponseMessageWithDefaults instantiates a new ResponseMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseMessageWithDefaults() *ResponseMessage { + this := ResponseMessage{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseMessage) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseMessage) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseMessage) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseMessage) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseMessage) GetData() Message { + if o == nil { + var ret Message + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseMessage) GetDataOk() (*Message, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseMessage) SetData(v Message) { + o.Data = v +} + +func (o ResponseMessage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseMessage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseMessage := _ResponseMessage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseMessage) + + if err != nil { + return err + } + + *o = ResponseMessage(varResponseMessage) + + return err +} + +type NullableResponseMessage struct { + value *ResponseMessage + isSet bool +} + +func (v NullableResponseMessage) Get() *ResponseMessage { + return v.value +} + +func (v *NullableResponseMessage) Set(val *ResponseMessage) { + v.value = val + v.isSet = true +} + +func (v NullableResponseMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseMessage(val *ResponseMessage) *NullableResponseMessage { + return &NullableResponseMessage{value: val, isSet: true} +} + +func (v NullableResponseMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_order.go b/azion-api/model_response_order.go new file mode 100644 index 0000000..11c2986 --- /dev/null +++ b/azion-api/model_response_order.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseOrder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseOrder{} + +// ResponseOrder struct for ResponseOrder +type ResponseOrder struct { + State *string `json:"state,omitempty"` + Data Order `json:"data"` +} + +type _ResponseOrder ResponseOrder + +// NewResponseOrder instantiates a new ResponseOrder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseOrder(data Order) *ResponseOrder { + this := ResponseOrder{} + this.Data = data + return &this +} + +// NewResponseOrderWithDefaults instantiates a new ResponseOrder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseOrderWithDefaults() *ResponseOrder { + this := ResponseOrder{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseOrder) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseOrder) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseOrder) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseOrder) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseOrder) GetData() Order { + if o == nil { + var ret Order + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseOrder) GetDataOk() (*Order, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseOrder) SetData(v Order) { + o.Data = v +} + +func (o ResponseOrder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseOrder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseOrder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseOrder := _ResponseOrder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseOrder) + + if err != nil { + return err + } + + *o = ResponseOrder(varResponseOrder) + + return err +} + +type NullableResponseOrder struct { + value *ResponseOrder + isSet bool +} + +func (v NullableResponseOrder) Get() *ResponseOrder { + return v.value +} + +func (v *NullableResponseOrder) Set(val *ResponseOrder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseOrder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseOrder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseOrder(val *ResponseOrder) *NullableResponseOrder { + return &NullableResponseOrder{value: val, isSet: true} +} + +func (v NullableResponseOrder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseOrder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_payment_method.go b/azion-api/model_response_payment_method.go new file mode 100644 index 0000000..ea4a9ec --- /dev/null +++ b/azion-api/model_response_payment_method.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponsePaymentMethod type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsePaymentMethod{} + +// ResponsePaymentMethod struct for ResponsePaymentMethod +type ResponsePaymentMethod struct { + State *string `json:"state,omitempty"` + Data PaymentMethod `json:"data"` +} + +type _ResponsePaymentMethod ResponsePaymentMethod + +// NewResponsePaymentMethod instantiates a new ResponsePaymentMethod object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponsePaymentMethod(data PaymentMethod) *ResponsePaymentMethod { + this := ResponsePaymentMethod{} + this.Data = data + return &this +} + +// NewResponsePaymentMethodWithDefaults instantiates a new ResponsePaymentMethod object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponsePaymentMethodWithDefaults() *ResponsePaymentMethod { + this := ResponsePaymentMethod{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponsePaymentMethod) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsePaymentMethod) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponsePaymentMethod) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponsePaymentMethod) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponsePaymentMethod) GetData() PaymentMethod { + if o == nil { + var ret PaymentMethod + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponsePaymentMethod) GetDataOk() (*PaymentMethod, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponsePaymentMethod) SetData(v PaymentMethod) { + o.Data = v +} + +func (o ResponsePaymentMethod) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsePaymentMethod) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponsePaymentMethod) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponsePaymentMethod := _ResponsePaymentMethod{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponsePaymentMethod) + + if err != nil { + return err + } + + *o = ResponsePaymentMethod(varResponsePaymentMethod) + + return err +} + +type NullableResponsePaymentMethod struct { + value *ResponsePaymentMethod + isSet bool +} + +func (v NullableResponsePaymentMethod) Get() *ResponsePaymentMethod { + return v.value +} + +func (v *NullableResponsePaymentMethod) Set(val *ResponsePaymentMethod) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePaymentMethod) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePaymentMethod) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePaymentMethod(val *ResponsePaymentMethod) *NullableResponsePaymentMethod { + return &NullableResponsePaymentMethod{value: val, isSet: true} +} + +func (v NullableResponsePaymentMethod) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePaymentMethod) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_phase_behavior.go b/azion-api/model_response_phase_behavior.go new file mode 100644 index 0000000..98cb6ca --- /dev/null +++ b/azion-api/model_response_phase_behavior.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ResponsePhaseBehavior - struct for ResponsePhaseBehavior +type ResponsePhaseBehavior struct { + BehaviorArgs *BehaviorArgs + BehaviorCapture *BehaviorCapture + BehaviorNoArgs *BehaviorNoArgs +} + +// BehaviorArgsAsResponsePhaseBehavior is a convenience function that returns BehaviorArgs wrapped in ResponsePhaseBehavior +func BehaviorArgsAsResponsePhaseBehavior(v *BehaviorArgs) ResponsePhaseBehavior { + return ResponsePhaseBehavior{ + BehaviorArgs: v, + } +} + +// BehaviorCaptureAsResponsePhaseBehavior is a convenience function that returns BehaviorCapture wrapped in ResponsePhaseBehavior +func BehaviorCaptureAsResponsePhaseBehavior(v *BehaviorCapture) ResponsePhaseBehavior { + return ResponsePhaseBehavior{ + BehaviorCapture: v, + } +} + +// BehaviorNoArgsAsResponsePhaseBehavior is a convenience function that returns BehaviorNoArgs wrapped in ResponsePhaseBehavior +func BehaviorNoArgsAsResponsePhaseBehavior(v *BehaviorNoArgs) ResponsePhaseBehavior { + return ResponsePhaseBehavior{ + BehaviorNoArgs: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ResponsePhaseBehavior) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BehaviorArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorArgs) + if err == nil { + jsonBehaviorArgs, _ := json.Marshal(dst.BehaviorArgs) + if string(jsonBehaviorArgs) == "{}" { // empty struct + dst.BehaviorArgs = nil + } else { + if err = validator.Validate(dst.BehaviorArgs); err != nil { + dst.BehaviorArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorArgs = nil + } + + // try to unmarshal data into BehaviorCapture + err = newStrictDecoder(data).Decode(&dst.BehaviorCapture) + if err == nil { + jsonBehaviorCapture, _ := json.Marshal(dst.BehaviorCapture) + if string(jsonBehaviorCapture) == "{}" { // empty struct + dst.BehaviorCapture = nil + } else { + if err = validator.Validate(dst.BehaviorCapture); err != nil { + dst.BehaviorCapture = nil + } else { + match++ + } + } + } else { + dst.BehaviorCapture = nil + } + + // try to unmarshal data into BehaviorNoArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorNoArgs) + if err == nil { + jsonBehaviorNoArgs, _ := json.Marshal(dst.BehaviorNoArgs) + if string(jsonBehaviorNoArgs) == "{}" { // empty struct + dst.BehaviorNoArgs = nil + } else { + if err = validator.Validate(dst.BehaviorNoArgs); err != nil { + dst.BehaviorNoArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorNoArgs = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BehaviorArgs = nil + dst.BehaviorCapture = nil + dst.BehaviorNoArgs = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ResponsePhaseBehavior)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ResponsePhaseBehavior)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponsePhaseBehavior) MarshalJSON() ([]byte, error) { + if src.BehaviorArgs != nil { + return json.Marshal(&src.BehaviorArgs) + } + + if src.BehaviorCapture != nil { + return json.Marshal(&src.BehaviorCapture) + } + + if src.BehaviorNoArgs != nil { + return json.Marshal(&src.BehaviorNoArgs) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ResponsePhaseBehavior) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.BehaviorArgs != nil { + return obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ResponsePhaseBehavior) GetActualInstanceValue() (interface{}) { + if obj.BehaviorArgs != nil { + return *obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return *obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return *obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +type NullableResponsePhaseBehavior struct { + value *ResponsePhaseBehavior + isSet bool +} + +func (v NullableResponsePhaseBehavior) Get() *ResponsePhaseBehavior { + return v.value +} + +func (v *NullableResponsePhaseBehavior) Set(val *ResponsePhaseBehavior) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePhaseBehavior) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePhaseBehavior) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePhaseBehavior(val *ResponsePhaseBehavior) *NullableResponsePhaseBehavior { + return &NullableResponsePhaseBehavior{value: val, isSet: true} +} + +func (v NullableResponsePhaseBehavior) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePhaseBehavior) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_phase_behavior_request.go b/azion-api/model_response_phase_behavior_request.go new file mode 100644 index 0000000..e556541 --- /dev/null +++ b/azion-api/model_response_phase_behavior_request.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ResponsePhaseBehaviorRequest - struct for ResponsePhaseBehaviorRequest +type ResponsePhaseBehaviorRequest struct { + BehaviorArgs *BehaviorArgs + BehaviorCapture *BehaviorCapture + BehaviorNoArgs *BehaviorNoArgs +} + +// BehaviorArgsAsResponsePhaseBehaviorRequest is a convenience function that returns BehaviorArgs wrapped in ResponsePhaseBehaviorRequest +func BehaviorArgsAsResponsePhaseBehaviorRequest(v *BehaviorArgs) ResponsePhaseBehaviorRequest { + return ResponsePhaseBehaviorRequest{ + BehaviorArgs: v, + } +} + +// BehaviorCaptureAsResponsePhaseBehaviorRequest is a convenience function that returns BehaviorCapture wrapped in ResponsePhaseBehaviorRequest +func BehaviorCaptureAsResponsePhaseBehaviorRequest(v *BehaviorCapture) ResponsePhaseBehaviorRequest { + return ResponsePhaseBehaviorRequest{ + BehaviorCapture: v, + } +} + +// BehaviorNoArgsAsResponsePhaseBehaviorRequest is a convenience function that returns BehaviorNoArgs wrapped in ResponsePhaseBehaviorRequest +func BehaviorNoArgsAsResponsePhaseBehaviorRequest(v *BehaviorNoArgs) ResponsePhaseBehaviorRequest { + return ResponsePhaseBehaviorRequest{ + BehaviorNoArgs: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ResponsePhaseBehaviorRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into BehaviorArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorArgs) + if err == nil { + jsonBehaviorArgs, _ := json.Marshal(dst.BehaviorArgs) + if string(jsonBehaviorArgs) == "{}" { // empty struct + dst.BehaviorArgs = nil + } else { + if err = validator.Validate(dst.BehaviorArgs); err != nil { + dst.BehaviorArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorArgs = nil + } + + // try to unmarshal data into BehaviorCapture + err = newStrictDecoder(data).Decode(&dst.BehaviorCapture) + if err == nil { + jsonBehaviorCapture, _ := json.Marshal(dst.BehaviorCapture) + if string(jsonBehaviorCapture) == "{}" { // empty struct + dst.BehaviorCapture = nil + } else { + if err = validator.Validate(dst.BehaviorCapture); err != nil { + dst.BehaviorCapture = nil + } else { + match++ + } + } + } else { + dst.BehaviorCapture = nil + } + + // try to unmarshal data into BehaviorNoArgs + err = newStrictDecoder(data).Decode(&dst.BehaviorNoArgs) + if err == nil { + jsonBehaviorNoArgs, _ := json.Marshal(dst.BehaviorNoArgs) + if string(jsonBehaviorNoArgs) == "{}" { // empty struct + dst.BehaviorNoArgs = nil + } else { + if err = validator.Validate(dst.BehaviorNoArgs); err != nil { + dst.BehaviorNoArgs = nil + } else { + match++ + } + } + } else { + dst.BehaviorNoArgs = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.BehaviorArgs = nil + dst.BehaviorCapture = nil + dst.BehaviorNoArgs = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ResponsePhaseBehaviorRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ResponsePhaseBehaviorRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ResponsePhaseBehaviorRequest) MarshalJSON() ([]byte, error) { + if src.BehaviorArgs != nil { + return json.Marshal(&src.BehaviorArgs) + } + + if src.BehaviorCapture != nil { + return json.Marshal(&src.BehaviorCapture) + } + + if src.BehaviorNoArgs != nil { + return json.Marshal(&src.BehaviorNoArgs) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ResponsePhaseBehaviorRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.BehaviorArgs != nil { + return obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ResponsePhaseBehaviorRequest) GetActualInstanceValue() (interface{}) { + if obj.BehaviorArgs != nil { + return *obj.BehaviorArgs + } + + if obj.BehaviorCapture != nil { + return *obj.BehaviorCapture + } + + if obj.BehaviorNoArgs != nil { + return *obj.BehaviorNoArgs + } + + // all schemas are nil + return nil +} + +type NullableResponsePhaseBehaviorRequest struct { + value *ResponsePhaseBehaviorRequest + isSet bool +} + +func (v NullableResponsePhaseBehaviorRequest) Get() *ResponsePhaseBehaviorRequest { + return v.value +} + +func (v *NullableResponsePhaseBehaviorRequest) Set(val *ResponsePhaseBehaviorRequest) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePhaseBehaviorRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePhaseBehaviorRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePhaseBehaviorRequest(val *ResponsePhaseBehaviorRequest) *NullableResponsePhaseBehaviorRequest { + return &NullableResponsePhaseBehaviorRequest{value: val, isSet: true} +} + +func (v NullableResponsePhaseBehaviorRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePhaseBehaviorRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_phase_rule.go b/azion-api/model_response_phase_rule.go new file mode 100644 index 0000000..d186e3e --- /dev/null +++ b/azion-api/model_response_phase_rule.go @@ -0,0 +1,404 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ResponsePhaseRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsePhaseRule{} + +// ResponsePhaseRule struct for ResponsePhaseRule +type ResponsePhaseRule struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Criteria [][]ApplicationCriterionField `json:"criteria"` + Behaviors []ResponsePhaseBehavior `json:"behaviors"` + Description *string `json:"description,omitempty"` + Order int64 `json:"order"` + LastEditor NullableString `json:"last_editor"` + LastModified NullableTime `json:"last_modified"` +} + +type _ResponsePhaseRule ResponsePhaseRule + +// NewResponsePhaseRule instantiates a new ResponsePhaseRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponsePhaseRule(id int64, name string, criteria [][]ApplicationCriterionField, behaviors []ResponsePhaseBehavior, order int64, lastEditor NullableString, lastModified NullableTime) *ResponsePhaseRule { + this := ResponsePhaseRule{} + this.Id = id + this.Name = name + this.Criteria = criteria + this.Behaviors = behaviors + this.Order = order + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewResponsePhaseRuleWithDefaults instantiates a new ResponsePhaseRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponsePhaseRuleWithDefaults() *ResponsePhaseRule { + this := ResponsePhaseRule{} + return &this +} + +// GetId returns the Id field value +func (o *ResponsePhaseRule) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ResponsePhaseRule) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ResponsePhaseRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponsePhaseRule) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponsePhaseRule) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponsePhaseRule) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponsePhaseRule) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value +func (o *ResponsePhaseRule) GetCriteria() [][]ApplicationCriterionField { + if o == nil { + var ret [][]ApplicationCriterionField + return ret + } + + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetCriteriaOk() ([][]ApplicationCriterionField, bool) { + if o == nil { + return nil, false + } + return o.Criteria, true +} + +// SetCriteria sets field value +func (o *ResponsePhaseRule) SetCriteria(v [][]ApplicationCriterionField) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value +func (o *ResponsePhaseRule) GetBehaviors() []ResponsePhaseBehavior { + if o == nil { + var ret []ResponsePhaseBehavior + return ret + } + + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetBehaviorsOk() ([]ResponsePhaseBehavior, bool) { + if o == nil { + return nil, false + } + return o.Behaviors, true +} + +// SetBehaviors sets field value +func (o *ResponsePhaseRule) SetBehaviors(v []ResponsePhaseBehavior) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ResponsePhaseRule) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ResponsePhaseRule) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ResponsePhaseRule) SetDescription(v string) { + o.Description = &v +} + +// GetOrder returns the Order field value +func (o *ResponsePhaseRule) GetOrder() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRule) GetOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *ResponsePhaseRule) SetOrder(v int64) { + o.Order = v +} + +// GetLastEditor returns the LastEditor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ResponsePhaseRule) GetLastEditor() string { + if o == nil || o.LastEditor.Get() == nil { + var ret string + return ret + } + + return *o.LastEditor.Get() +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponsePhaseRule) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.LastEditor.Get(), o.LastEditor.IsSet() +} + +// SetLastEditor sets field value +func (o *ResponsePhaseRule) SetLastEditor(v string) { + o.LastEditor.Set(&v) +} + +// GetLastModified returns the LastModified field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ResponsePhaseRule) GetLastModified() time.Time { + if o == nil || o.LastModified.Get() == nil { + var ret time.Time + return ret + } + + return *o.LastModified.Get() +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ResponsePhaseRule) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.LastModified.Get(), o.LastModified.IsSet() +} + +// SetLastModified sets field value +func (o *ResponsePhaseRule) SetLastModified(v time.Time) { + o.LastModified.Set(&v) +} + +func (o ResponsePhaseRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsePhaseRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["criteria"] = o.Criteria + toSerialize["behaviors"] = o.Behaviors + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["order"] = o.Order + toSerialize["last_editor"] = o.LastEditor.Get() + toSerialize["last_modified"] = o.LastModified.Get() + return toSerialize, nil +} + +func (o *ResponsePhaseRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "criteria", + "behaviors", + "order", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponsePhaseRule := _ResponsePhaseRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponsePhaseRule) + + if err != nil { + return err + } + + *o = ResponsePhaseRule(varResponsePhaseRule) + + return err +} + +type NullableResponsePhaseRule struct { + value *ResponsePhaseRule + isSet bool +} + +func (v NullableResponsePhaseRule) Get() *ResponsePhaseRule { + return v.value +} + +func (v *NullableResponsePhaseRule) Set(val *ResponsePhaseRule) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePhaseRule) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePhaseRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePhaseRule(val *ResponsePhaseRule) *NullableResponsePhaseRule { + return &NullableResponsePhaseRule{value: val, isSet: true} +} + +func (v NullableResponsePhaseRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePhaseRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_phase_rule_request.go b/azion-api/model_response_phase_rule_request.go new file mode 100644 index 0000000..6ae9b19 --- /dev/null +++ b/azion-api/model_response_phase_rule_request.go @@ -0,0 +1,287 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponsePhaseRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsePhaseRuleRequest{} + +// ResponsePhaseRuleRequest struct for ResponsePhaseRuleRequest +type ResponsePhaseRuleRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Criteria [][]ApplicationCriterionFieldRequest `json:"criteria"` + Behaviors []ResponsePhaseBehaviorRequest `json:"behaviors"` + Description *string `json:"description,omitempty"` +} + +type _ResponsePhaseRuleRequest ResponsePhaseRuleRequest + +// NewResponsePhaseRuleRequest instantiates a new ResponsePhaseRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponsePhaseRuleRequest(name string, criteria [][]ApplicationCriterionFieldRequest, behaviors []ResponsePhaseBehaviorRequest) *ResponsePhaseRuleRequest { + this := ResponsePhaseRuleRequest{} + this.Name = name + this.Criteria = criteria + this.Behaviors = behaviors + return &this +} + +// NewResponsePhaseRuleRequestWithDefaults instantiates a new ResponsePhaseRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponsePhaseRuleRequestWithDefaults() *ResponsePhaseRuleRequest { + this := ResponsePhaseRuleRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ResponsePhaseRuleRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ResponsePhaseRuleRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ResponsePhaseRuleRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ResponsePhaseRuleRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ResponsePhaseRuleRequest) SetActive(v bool) { + o.Active = &v +} + +// GetCriteria returns the Criteria field value +func (o *ResponsePhaseRuleRequest) GetCriteria() [][]ApplicationCriterionFieldRequest { + if o == nil { + var ret [][]ApplicationCriterionFieldRequest + return ret + } + + return o.Criteria +} + +// GetCriteriaOk returns a tuple with the Criteria field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleRequest) GetCriteriaOk() ([][]ApplicationCriterionFieldRequest, bool) { + if o == nil { + return nil, false + } + return o.Criteria, true +} + +// SetCriteria sets field value +func (o *ResponsePhaseRuleRequest) SetCriteria(v [][]ApplicationCriterionFieldRequest) { + o.Criteria = v +} + +// GetBehaviors returns the Behaviors field value +func (o *ResponsePhaseRuleRequest) GetBehaviors() []ResponsePhaseBehaviorRequest { + if o == nil { + var ret []ResponsePhaseBehaviorRequest + return ret + } + + return o.Behaviors +} + +// GetBehaviorsOk returns a tuple with the Behaviors field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleRequest) GetBehaviorsOk() ([]ResponsePhaseBehaviorRequest, bool) { + if o == nil { + return nil, false + } + return o.Behaviors, true +} + +// SetBehaviors sets field value +func (o *ResponsePhaseRuleRequest) SetBehaviors(v []ResponsePhaseBehaviorRequest) { + o.Behaviors = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ResponsePhaseRuleRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ResponsePhaseRuleRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ResponsePhaseRuleRequest) SetDescription(v string) { + o.Description = &v +} + +func (o ResponsePhaseRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsePhaseRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["criteria"] = o.Criteria + toSerialize["behaviors"] = o.Behaviors + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *ResponsePhaseRuleRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "criteria", + "behaviors", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponsePhaseRuleRequest := _ResponsePhaseRuleRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponsePhaseRuleRequest) + + if err != nil { + return err + } + + *o = ResponsePhaseRuleRequest(varResponsePhaseRuleRequest) + + return err +} + +type NullableResponsePhaseRuleRequest struct { + value *ResponsePhaseRuleRequest + isSet bool +} + +func (v NullableResponsePhaseRuleRequest) Get() *ResponsePhaseRuleRequest { + return v.value +} + +func (v *NullableResponsePhaseRuleRequest) Set(val *ResponsePhaseRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePhaseRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePhaseRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePhaseRuleRequest(val *ResponsePhaseRuleRequest) *NullableResponsePhaseRuleRequest { + return &NullableResponsePhaseRuleRequest{value: val, isSet: true} +} + +func (v NullableResponsePhaseRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePhaseRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_phase_rule_response.go b/azion-api/model_response_phase_rule_response.go new file mode 100644 index 0000000..d2ea1b8 --- /dev/null +++ b/azion-api/model_response_phase_rule_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponsePhaseRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsePhaseRuleResponse{} + +// ResponsePhaseRuleResponse struct for ResponsePhaseRuleResponse +type ResponsePhaseRuleResponse struct { + State *string `json:"state,omitempty"` + Data ResponsePhaseRule `json:"data"` +} + +type _ResponsePhaseRuleResponse ResponsePhaseRuleResponse + +// NewResponsePhaseRuleResponse instantiates a new ResponsePhaseRuleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponsePhaseRuleResponse(data ResponsePhaseRule) *ResponsePhaseRuleResponse { + this := ResponsePhaseRuleResponse{} + this.Data = data + return &this +} + +// NewResponsePhaseRuleResponseWithDefaults instantiates a new ResponsePhaseRuleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponsePhaseRuleResponseWithDefaults() *ResponsePhaseRuleResponse { + this := ResponsePhaseRuleResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponsePhaseRuleResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponsePhaseRuleResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponsePhaseRuleResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponsePhaseRuleResponse) GetData() ResponsePhaseRule { + if o == nil { + var ret ResponsePhaseRule + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponsePhaseRuleResponse) GetDataOk() (*ResponsePhaseRule, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponsePhaseRuleResponse) SetData(v ResponsePhaseRule) { + o.Data = v +} + +func (o ResponsePhaseRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsePhaseRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponsePhaseRuleResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponsePhaseRuleResponse := _ResponsePhaseRuleResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponsePhaseRuleResponse) + + if err != nil { + return err + } + + *o = ResponsePhaseRuleResponse(varResponsePhaseRuleResponse) + + return err +} + +type NullableResponsePhaseRuleResponse struct { + value *ResponsePhaseRuleResponse + isSet bool +} + +func (v NullableResponsePhaseRuleResponse) Get() *ResponsePhaseRuleResponse { + return v.value +} + +func (v *NullableResponsePhaseRuleResponse) Set(val *ResponsePhaseRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePhaseRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePhaseRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePhaseRuleResponse(val *ResponsePhaseRuleResponse) *NullableResponsePhaseRuleResponse { + return &NullableResponsePhaseRuleResponse{value: val, isSet: true} +} + +func (v NullableResponsePhaseRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePhaseRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_publisher.go b/azion-api/model_response_publisher.go new file mode 100644 index 0000000..a274721 --- /dev/null +++ b/azion-api/model_response_publisher.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponsePublisher type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponsePublisher{} + +// ResponsePublisher struct for ResponsePublisher +type ResponsePublisher struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data Publisher `json:"data"` +} + +type _ResponsePublisher ResponsePublisher + +// NewResponsePublisher instantiates a new ResponsePublisher object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponsePublisher(state string, data Publisher) *ResponsePublisher { + this := ResponsePublisher{} + this.State = state + this.Data = data + return &this +} + +// NewResponsePublisherWithDefaults instantiates a new ResponsePublisher object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponsePublisherWithDefaults() *ResponsePublisher { + this := ResponsePublisher{} + return &this +} + +// GetState returns the State field value +func (o *ResponsePublisher) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponsePublisher) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponsePublisher) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponsePublisher) GetData() Publisher { + if o == nil { + var ret Publisher + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponsePublisher) GetDataOk() (*Publisher, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponsePublisher) SetData(v Publisher) { + o.Data = v +} + +func (o ResponsePublisher) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponsePublisher) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponsePublisher) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponsePublisher := _ResponsePublisher{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponsePublisher) + + if err != nil { + return err + } + + *o = ResponsePublisher(varResponsePublisher) + + return err +} + +type NullableResponsePublisher struct { + value *ResponsePublisher + isSet bool +} + +func (v NullableResponsePublisher) Get() *ResponsePublisher { + return v.value +} + +func (v *NullableResponsePublisher) Set(val *ResponsePublisher) { + v.value = val + v.isSet = true +} + +func (v NullableResponsePublisher) IsSet() bool { + return v.isSet +} + +func (v *NullableResponsePublisher) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponsePublisher(val *ResponsePublisher) *NullableResponsePublisher { + return &NullableResponsePublisher{value: val, isSet: true} +} + +func (v NullableResponsePublisher) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponsePublisher) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_report.go b/azion-api/model_response_report.go new file mode 100644 index 0000000..baa9477 --- /dev/null +++ b/azion-api/model_response_report.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseReport{} + +// ResponseReport struct for ResponseReport +type ResponseReport struct { + State *string `json:"state,omitempty"` + Data Report `json:"data"` +} + +type _ResponseReport ResponseReport + +// NewResponseReport instantiates a new ResponseReport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseReport(data Report) *ResponseReport { + this := ResponseReport{} + this.Data = data + return &this +} + +// NewResponseReportWithDefaults instantiates a new ResponseReport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseReportWithDefaults() *ResponseReport { + this := ResponseReport{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseReport) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseReport) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseReport) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseReport) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseReport) GetData() Report { + if o == nil { + var ret Report + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseReport) GetDataOk() (*Report, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseReport) SetData(v Report) { + o.Data = v +} + +func (o ResponseReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseReport) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseReport := _ResponseReport{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseReport) + + if err != nil { + return err + } + + *o = ResponseReport(varResponseReport) + + return err +} + +type NullableResponseReport struct { + value *ResponseReport + isSet bool +} + +func (v NullableResponseReport) Get() *ResponseReport { + return v.value +} + +func (v *NullableResponseReport) Set(val *ResponseReport) { + v.value = val + v.isSet = true +} + +func (v NullableResponseReport) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseReport(val *ResponseReport) *NullableResponseReport { + return &NullableResponseReport{value: val, isSet: true} +} + +func (v NullableResponseReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_account.go b/azion-api/model_response_retrieve_account.go new file mode 100644 index 0000000..f77c38d --- /dev/null +++ b/azion-api/model_response_retrieve_account.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveAccount type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveAccount{} + +// ResponseRetrieveAccount struct for ResponseRetrieveAccount +type ResponseRetrieveAccount struct { + Data Account `json:"data"` +} + +type _ResponseRetrieveAccount ResponseRetrieveAccount + +// NewResponseRetrieveAccount instantiates a new ResponseRetrieveAccount object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveAccount(data Account) *ResponseRetrieveAccount { + this := ResponseRetrieveAccount{} + this.Data = data + return &this +} + +// NewResponseRetrieveAccountWithDefaults instantiates a new ResponseRetrieveAccount object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveAccountWithDefaults() *ResponseRetrieveAccount { + this := ResponseRetrieveAccount{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveAccount) GetData() Account { + if o == nil { + var ret Account + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveAccount) GetDataOk() (*Account, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveAccount) SetData(v Account) { + o.Data = v +} + +func (o ResponseRetrieveAccount) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveAccount) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveAccount) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveAccount := _ResponseRetrieveAccount{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveAccount) + + if err != nil { + return err + } + + *o = ResponseRetrieveAccount(varResponseRetrieveAccount) + + return err +} + +type NullableResponseRetrieveAccount struct { + value *ResponseRetrieveAccount + isSet bool +} + +func (v NullableResponseRetrieveAccount) Get() *ResponseRetrieveAccount { + return v.value +} + +func (v *NullableResponseRetrieveAccount) Set(val *ResponseRetrieveAccount) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveAccount) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveAccount) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveAccount(val *ResponseRetrieveAccount) *NullableResponseRetrieveAccount { + return &NullableResponseRetrieveAccount{value: val, isSet: true} +} + +func (v NullableResponseRetrieveAccount) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveAccount) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_account_info.go b/azion-api/model_response_retrieve_account_info.go new file mode 100644 index 0000000..9305b74 --- /dev/null +++ b/azion-api/model_response_retrieve_account_info.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveAccountInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveAccountInfo{} + +// ResponseRetrieveAccountInfo struct for ResponseRetrieveAccountInfo +type ResponseRetrieveAccountInfo struct { + Data AccountInfo `json:"data"` +} + +type _ResponseRetrieveAccountInfo ResponseRetrieveAccountInfo + +// NewResponseRetrieveAccountInfo instantiates a new ResponseRetrieveAccountInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveAccountInfo(data AccountInfo) *ResponseRetrieveAccountInfo { + this := ResponseRetrieveAccountInfo{} + this.Data = data + return &this +} + +// NewResponseRetrieveAccountInfoWithDefaults instantiates a new ResponseRetrieveAccountInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveAccountInfoWithDefaults() *ResponseRetrieveAccountInfo { + this := ResponseRetrieveAccountInfo{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveAccountInfo) GetData() AccountInfo { + if o == nil { + var ret AccountInfo + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveAccountInfo) GetDataOk() (*AccountInfo, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveAccountInfo) SetData(v AccountInfo) { + o.Data = v +} + +func (o ResponseRetrieveAccountInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveAccountInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveAccountInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveAccountInfo := _ResponseRetrieveAccountInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveAccountInfo) + + if err != nil { + return err + } + + *o = ResponseRetrieveAccountInfo(varResponseRetrieveAccountInfo) + + return err +} + +type NullableResponseRetrieveAccountInfo struct { + value *ResponseRetrieveAccountInfo + isSet bool +} + +func (v NullableResponseRetrieveAccountInfo) Get() *ResponseRetrieveAccountInfo { + return v.value +} + +func (v *NullableResponseRetrieveAccountInfo) Set(val *ResponseRetrieveAccountInfo) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveAccountInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveAccountInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveAccountInfo(val *ResponseRetrieveAccountInfo) *NullableResponseRetrieveAccountInfo { + return &NullableResponseRetrieveAccountInfo{value: val, isSet: true} +} + +func (v NullableResponseRetrieveAccountInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveAccountInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_chat_thread.go b/azion-api/model_response_retrieve_chat_thread.go new file mode 100644 index 0000000..ed954f4 --- /dev/null +++ b/azion-api/model_response_retrieve_chat_thread.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveChatThread type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveChatThread{} + +// ResponseRetrieveChatThread struct for ResponseRetrieveChatThread +type ResponseRetrieveChatThread struct { + Data ChatThread `json:"data"` +} + +type _ResponseRetrieveChatThread ResponseRetrieveChatThread + +// NewResponseRetrieveChatThread instantiates a new ResponseRetrieveChatThread object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveChatThread(data ChatThread) *ResponseRetrieveChatThread { + this := ResponseRetrieveChatThread{} + this.Data = data + return &this +} + +// NewResponseRetrieveChatThreadWithDefaults instantiates a new ResponseRetrieveChatThread object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveChatThreadWithDefaults() *ResponseRetrieveChatThread { + this := ResponseRetrieveChatThread{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveChatThread) GetData() ChatThread { + if o == nil { + var ret ChatThread + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveChatThread) GetDataOk() (*ChatThread, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveChatThread) SetData(v ChatThread) { + o.Data = v +} + +func (o ResponseRetrieveChatThread) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveChatThread) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveChatThread) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveChatThread := _ResponseRetrieveChatThread{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveChatThread) + + if err != nil { + return err + } + + *o = ResponseRetrieveChatThread(varResponseRetrieveChatThread) + + return err +} + +type NullableResponseRetrieveChatThread struct { + value *ResponseRetrieveChatThread + isSet bool +} + +func (v NullableResponseRetrieveChatThread) Get() *ResponseRetrieveChatThread { + return v.value +} + +func (v *NullableResponseRetrieveChatThread) Set(val *ResponseRetrieveChatThread) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveChatThread) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveChatThread) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveChatThread(val *ResponseRetrieveChatThread) *NullableResponseRetrieveChatThread { + return &NullableResponseRetrieveChatThread{value: val, isSet: true} +} + +func (v NullableResponseRetrieveChatThread) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveChatThread) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_continuous_deployment.go b/azion-api/model_response_retrieve_continuous_deployment.go new file mode 100644 index 0000000..926fd7c --- /dev/null +++ b/azion-api/model_response_retrieve_continuous_deployment.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveContinuousDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveContinuousDeployment{} + +// ResponseRetrieveContinuousDeployment struct for ResponseRetrieveContinuousDeployment +type ResponseRetrieveContinuousDeployment struct { + Data ContinuousDeployment `json:"data"` +} + +type _ResponseRetrieveContinuousDeployment ResponseRetrieveContinuousDeployment + +// NewResponseRetrieveContinuousDeployment instantiates a new ResponseRetrieveContinuousDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveContinuousDeployment(data ContinuousDeployment) *ResponseRetrieveContinuousDeployment { + this := ResponseRetrieveContinuousDeployment{} + this.Data = data + return &this +} + +// NewResponseRetrieveContinuousDeploymentWithDefaults instantiates a new ResponseRetrieveContinuousDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveContinuousDeploymentWithDefaults() *ResponseRetrieveContinuousDeployment { + this := ResponseRetrieveContinuousDeployment{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveContinuousDeployment) GetData() ContinuousDeployment { + if o == nil { + var ret ContinuousDeployment + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveContinuousDeployment) GetDataOk() (*ContinuousDeployment, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveContinuousDeployment) SetData(v ContinuousDeployment) { + o.Data = v +} + +func (o ResponseRetrieveContinuousDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveContinuousDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveContinuousDeployment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveContinuousDeployment := _ResponseRetrieveContinuousDeployment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveContinuousDeployment) + + if err != nil { + return err + } + + *o = ResponseRetrieveContinuousDeployment(varResponseRetrieveContinuousDeployment) + + return err +} + +type NullableResponseRetrieveContinuousDeployment struct { + value *ResponseRetrieveContinuousDeployment + isSet bool +} + +func (v NullableResponseRetrieveContinuousDeployment) Get() *ResponseRetrieveContinuousDeployment { + return v.value +} + +func (v *NullableResponseRetrieveContinuousDeployment) Set(val *ResponseRetrieveContinuousDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveContinuousDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveContinuousDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveContinuousDeployment(val *ResponseRetrieveContinuousDeployment) *NullableResponseRetrieveContinuousDeployment { + return &NullableResponseRetrieveContinuousDeployment{value: val, isSet: true} +} + +func (v NullableResponseRetrieveContinuousDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveContinuousDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_dashboard.go b/azion-api/model_response_retrieve_dashboard.go new file mode 100644 index 0000000..dfa4876 --- /dev/null +++ b/azion-api/model_response_retrieve_dashboard.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveDashboard type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveDashboard{} + +// ResponseRetrieveDashboard struct for ResponseRetrieveDashboard +type ResponseRetrieveDashboard struct { + Data Dashboard `json:"data"` +} + +type _ResponseRetrieveDashboard ResponseRetrieveDashboard + +// NewResponseRetrieveDashboard instantiates a new ResponseRetrieveDashboard object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveDashboard(data Dashboard) *ResponseRetrieveDashboard { + this := ResponseRetrieveDashboard{} + this.Data = data + return &this +} + +// NewResponseRetrieveDashboardWithDefaults instantiates a new ResponseRetrieveDashboard object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveDashboardWithDefaults() *ResponseRetrieveDashboard { + this := ResponseRetrieveDashboard{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveDashboard) GetData() Dashboard { + if o == nil { + var ret Dashboard + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveDashboard) GetDataOk() (*Dashboard, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveDashboard) SetData(v Dashboard) { + o.Data = v +} + +func (o ResponseRetrieveDashboard) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveDashboard) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveDashboard) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveDashboard := _ResponseRetrieveDashboard{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveDashboard) + + if err != nil { + return err + } + + *o = ResponseRetrieveDashboard(varResponseRetrieveDashboard) + + return err +} + +type NullableResponseRetrieveDashboard struct { + value *ResponseRetrieveDashboard + isSet bool +} + +func (v NullableResponseRetrieveDashboard) Get() *ResponseRetrieveDashboard { + return v.value +} + +func (v *NullableResponseRetrieveDashboard) Set(val *ResponseRetrieveDashboard) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveDashboard) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveDashboard) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveDashboard(val *ResponseRetrieveDashboard) *NullableResponseRetrieveDashboard { + return &NullableResponseRetrieveDashboard{value: val, isSet: true} +} + +func (v NullableResponseRetrieveDashboard) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveDashboard) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_document.go b/azion-api/model_response_retrieve_document.go new file mode 100644 index 0000000..d77f30c --- /dev/null +++ b/azion-api/model_response_retrieve_document.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveDocument type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveDocument{} + +// ResponseRetrieveDocument struct for ResponseRetrieveDocument +type ResponseRetrieveDocument struct { + Data Document `json:"data"` +} + +type _ResponseRetrieveDocument ResponseRetrieveDocument + +// NewResponseRetrieveDocument instantiates a new ResponseRetrieveDocument object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveDocument(data Document) *ResponseRetrieveDocument { + this := ResponseRetrieveDocument{} + this.Data = data + return &this +} + +// NewResponseRetrieveDocumentWithDefaults instantiates a new ResponseRetrieveDocument object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveDocumentWithDefaults() *ResponseRetrieveDocument { + this := ResponseRetrieveDocument{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveDocument) GetData() Document { + if o == nil { + var ret Document + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveDocument) GetDataOk() (*Document, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveDocument) SetData(v Document) { + o.Data = v +} + +func (o ResponseRetrieveDocument) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveDocument) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveDocument) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveDocument := _ResponseRetrieveDocument{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveDocument) + + if err != nil { + return err + } + + *o = ResponseRetrieveDocument(varResponseRetrieveDocument) + + return err +} + +type NullableResponseRetrieveDocument struct { + value *ResponseRetrieveDocument + isSet bool +} + +func (v NullableResponseRetrieveDocument) Get() *ResponseRetrieveDocument { + return v.value +} + +func (v *NullableResponseRetrieveDocument) Set(val *ResponseRetrieveDocument) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveDocument) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveDocument) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveDocument(val *ResponseRetrieveDocument) *NullableResponseRetrieveDocument { + return &NullableResponseRetrieveDocument{value: val, isSet: true} +} + +func (v NullableResponseRetrieveDocument) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveDocument) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_execution_script.go b/azion-api/model_response_retrieve_execution_script.go new file mode 100644 index 0000000..de7c8a2 --- /dev/null +++ b/azion-api/model_response_retrieve_execution_script.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveExecutionScript type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveExecutionScript{} + +// ResponseRetrieveExecutionScript struct for ResponseRetrieveExecutionScript +type ResponseRetrieveExecutionScript struct { + Data ExecutionScript `json:"data"` +} + +type _ResponseRetrieveExecutionScript ResponseRetrieveExecutionScript + +// NewResponseRetrieveExecutionScript instantiates a new ResponseRetrieveExecutionScript object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveExecutionScript(data ExecutionScript) *ResponseRetrieveExecutionScript { + this := ResponseRetrieveExecutionScript{} + this.Data = data + return &this +} + +// NewResponseRetrieveExecutionScriptWithDefaults instantiates a new ResponseRetrieveExecutionScript object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveExecutionScriptWithDefaults() *ResponseRetrieveExecutionScript { + this := ResponseRetrieveExecutionScript{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveExecutionScript) GetData() ExecutionScript { + if o == nil { + var ret ExecutionScript + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveExecutionScript) GetDataOk() (*ExecutionScript, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveExecutionScript) SetData(v ExecutionScript) { + o.Data = v +} + +func (o ResponseRetrieveExecutionScript) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveExecutionScript) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveExecutionScript) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveExecutionScript := _ResponseRetrieveExecutionScript{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveExecutionScript) + + if err != nil { + return err + } + + *o = ResponseRetrieveExecutionScript(varResponseRetrieveExecutionScript) + + return err +} + +type NullableResponseRetrieveExecutionScript struct { + value *ResponseRetrieveExecutionScript + isSet bool +} + +func (v NullableResponseRetrieveExecutionScript) Get() *ResponseRetrieveExecutionScript { + return v.value +} + +func (v *NullableResponseRetrieveExecutionScript) Set(val *ResponseRetrieveExecutionScript) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveExecutionScript) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveExecutionScript) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveExecutionScript(val *ResponseRetrieveExecutionScript) *NullableResponseRetrieveExecutionScript { + return &NullableResponseRetrieveExecutionScript{value: val, isSet: true} +} + +func (v NullableResponseRetrieveExecutionScript) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveExecutionScript) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_executor.go b/azion-api/model_response_retrieve_executor.go new file mode 100644 index 0000000..55ca1d0 --- /dev/null +++ b/azion-api/model_response_retrieve_executor.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveExecutor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveExecutor{} + +// ResponseRetrieveExecutor struct for ResponseRetrieveExecutor +type ResponseRetrieveExecutor struct { + Data Executor `json:"data"` +} + +type _ResponseRetrieveExecutor ResponseRetrieveExecutor + +// NewResponseRetrieveExecutor instantiates a new ResponseRetrieveExecutor object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveExecutor(data Executor) *ResponseRetrieveExecutor { + this := ResponseRetrieveExecutor{} + this.Data = data + return &this +} + +// NewResponseRetrieveExecutorWithDefaults instantiates a new ResponseRetrieveExecutor object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveExecutorWithDefaults() *ResponseRetrieveExecutor { + this := ResponseRetrieveExecutor{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveExecutor) GetData() Executor { + if o == nil { + var ret Executor + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveExecutor) GetDataOk() (*Executor, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveExecutor) SetData(v Executor) { + o.Data = v +} + +func (o ResponseRetrieveExecutor) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveExecutor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveExecutor) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveExecutor := _ResponseRetrieveExecutor{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveExecutor) + + if err != nil { + return err + } + + *o = ResponseRetrieveExecutor(varResponseRetrieveExecutor) + + return err +} + +type NullableResponseRetrieveExecutor struct { + value *ResponseRetrieveExecutor + isSet bool +} + +func (v NullableResponseRetrieveExecutor) Get() *ResponseRetrieveExecutor { + return v.value +} + +func (v *NullableResponseRetrieveExecutor) Set(val *ResponseRetrieveExecutor) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveExecutor) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveExecutor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveExecutor(val *ResponseRetrieveExecutor) *NullableResponseRetrieveExecutor { + return &NullableResponseRetrieveExecutor{value: val, isSet: true} +} + +func (v NullableResponseRetrieveExecutor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveExecutor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_folder.go b/azion-api/model_response_retrieve_folder.go new file mode 100644 index 0000000..bbeace4 --- /dev/null +++ b/azion-api/model_response_retrieve_folder.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveFolder type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveFolder{} + +// ResponseRetrieveFolder struct for ResponseRetrieveFolder +type ResponseRetrieveFolder struct { + Data Folder `json:"data"` +} + +type _ResponseRetrieveFolder ResponseRetrieveFolder + +// NewResponseRetrieveFolder instantiates a new ResponseRetrieveFolder object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveFolder(data Folder) *ResponseRetrieveFolder { + this := ResponseRetrieveFolder{} + this.Data = data + return &this +} + +// NewResponseRetrieveFolderWithDefaults instantiates a new ResponseRetrieveFolder object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveFolderWithDefaults() *ResponseRetrieveFolder { + this := ResponseRetrieveFolder{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveFolder) GetData() Folder { + if o == nil { + var ret Folder + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveFolder) GetDataOk() (*Folder, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveFolder) SetData(v Folder) { + o.Data = v +} + +func (o ResponseRetrieveFolder) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveFolder) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveFolder) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveFolder := _ResponseRetrieveFolder{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveFolder) + + if err != nil { + return err + } + + *o = ResponseRetrieveFolder(varResponseRetrieveFolder) + + return err +} + +type NullableResponseRetrieveFolder struct { + value *ResponseRetrieveFolder + isSet bool +} + +func (v NullableResponseRetrieveFolder) Get() *ResponseRetrieveFolder { + return v.value +} + +func (v *NullableResponseRetrieveFolder) Set(val *ResponseRetrieveFolder) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveFolder) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveFolder) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveFolder(val *ResponseRetrieveFolder) *NullableResponseRetrieveFolder { + return &NullableResponseRetrieveFolder{value: val, isSet: true} +} + +func (v NullableResponseRetrieveFolder) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveFolder) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_grant.go b/azion-api/model_response_retrieve_grant.go new file mode 100644 index 0000000..54e49cf --- /dev/null +++ b/azion-api/model_response_retrieve_grant.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveGrant type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveGrant{} + +// ResponseRetrieveGrant struct for ResponseRetrieveGrant +type ResponseRetrieveGrant struct { + Data Grant `json:"data"` +} + +type _ResponseRetrieveGrant ResponseRetrieveGrant + +// NewResponseRetrieveGrant instantiates a new ResponseRetrieveGrant object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveGrant(data Grant) *ResponseRetrieveGrant { + this := ResponseRetrieveGrant{} + this.Data = data + return &this +} + +// NewResponseRetrieveGrantWithDefaults instantiates a new ResponseRetrieveGrant object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveGrantWithDefaults() *ResponseRetrieveGrant { + this := ResponseRetrieveGrant{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveGrant) GetData() Grant { + if o == nil { + var ret Grant + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveGrant) GetDataOk() (*Grant, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveGrant) SetData(v Grant) { + o.Data = v +} + +func (o ResponseRetrieveGrant) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveGrant) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveGrant) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveGrant := _ResponseRetrieveGrant{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveGrant) + + if err != nil { + return err + } + + *o = ResponseRetrieveGrant(varResponseRetrieveGrant) + + return err +} + +type NullableResponseRetrieveGrant struct { + value *ResponseRetrieveGrant + isSet bool +} + +func (v NullableResponseRetrieveGrant) Get() *ResponseRetrieveGrant { + return v.value +} + +func (v *NullableResponseRetrieveGrant) Set(val *ResponseRetrieveGrant) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveGrant) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveGrant) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveGrant(val *ResponseRetrieveGrant) *NullableResponseRetrieveGrant { + return &NullableResponseRetrieveGrant{value: val, isSet: true} +} + +func (v NullableResponseRetrieveGrant) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveGrant) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_group.go b/azion-api/model_response_retrieve_group.go new file mode 100644 index 0000000..d820689 --- /dev/null +++ b/azion-api/model_response_retrieve_group.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveGroup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveGroup{} + +// ResponseRetrieveGroup struct for ResponseRetrieveGroup +type ResponseRetrieveGroup struct { + Data Group `json:"data"` +} + +type _ResponseRetrieveGroup ResponseRetrieveGroup + +// NewResponseRetrieveGroup instantiates a new ResponseRetrieveGroup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveGroup(data Group) *ResponseRetrieveGroup { + this := ResponseRetrieveGroup{} + this.Data = data + return &this +} + +// NewResponseRetrieveGroupWithDefaults instantiates a new ResponseRetrieveGroup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveGroupWithDefaults() *ResponseRetrieveGroup { + this := ResponseRetrieveGroup{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveGroup) GetData() Group { + if o == nil { + var ret Group + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveGroup) GetDataOk() (*Group, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveGroup) SetData(v Group) { + o.Data = v +} + +func (o ResponseRetrieveGroup) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveGroup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveGroup) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveGroup := _ResponseRetrieveGroup{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveGroup) + + if err != nil { + return err + } + + *o = ResponseRetrieveGroup(varResponseRetrieveGroup) + + return err +} + +type NullableResponseRetrieveGroup struct { + value *ResponseRetrieveGroup + isSet bool +} + +func (v NullableResponseRetrieveGroup) Get() *ResponseRetrieveGroup { + return v.value +} + +func (v *NullableResponseRetrieveGroup) Set(val *ResponseRetrieveGroup) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveGroup) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveGroup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveGroup(val *ResponseRetrieveGroup) *NullableResponseRetrieveGroup { + return &NullableResponseRetrieveGroup{value: val, isSet: true} +} + +func (v NullableResponseRetrieveGroup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveGroup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_group_members.go b/azion-api/model_response_retrieve_group_members.go new file mode 100644 index 0000000..77b2199 --- /dev/null +++ b/azion-api/model_response_retrieve_group_members.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveGroupMembers type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveGroupMembers{} + +// ResponseRetrieveGroupMembers struct for ResponseRetrieveGroupMembers +type ResponseRetrieveGroupMembers struct { + Data GroupMembers `json:"data"` +} + +type _ResponseRetrieveGroupMembers ResponseRetrieveGroupMembers + +// NewResponseRetrieveGroupMembers instantiates a new ResponseRetrieveGroupMembers object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveGroupMembers(data GroupMembers) *ResponseRetrieveGroupMembers { + this := ResponseRetrieveGroupMembers{} + this.Data = data + return &this +} + +// NewResponseRetrieveGroupMembersWithDefaults instantiates a new ResponseRetrieveGroupMembers object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveGroupMembersWithDefaults() *ResponseRetrieveGroupMembers { + this := ResponseRetrieveGroupMembers{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveGroupMembers) GetData() GroupMembers { + if o == nil { + var ret GroupMembers + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveGroupMembers) GetDataOk() (*GroupMembers, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveGroupMembers) SetData(v GroupMembers) { + o.Data = v +} + +func (o ResponseRetrieveGroupMembers) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveGroupMembers) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveGroupMembers) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveGroupMembers := _ResponseRetrieveGroupMembers{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveGroupMembers) + + if err != nil { + return err + } + + *o = ResponseRetrieveGroupMembers(varResponseRetrieveGroupMembers) + + return err +} + +type NullableResponseRetrieveGroupMembers struct { + value *ResponseRetrieveGroupMembers + isSet bool +} + +func (v NullableResponseRetrieveGroupMembers) Get() *ResponseRetrieveGroupMembers { + return v.value +} + +func (v *NullableResponseRetrieveGroupMembers) Set(val *ResponseRetrieveGroupMembers) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveGroupMembers) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveGroupMembers) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveGroupMembers(val *ResponseRetrieveGroupMembers) *NullableResponseRetrieveGroupMembers { + return &NullableResponseRetrieveGroupMembers{value: val, isSet: true} +} + +func (v NullableResponseRetrieveGroupMembers) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveGroupMembers) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_integration.go b/azion-api/model_response_retrieve_integration.go new file mode 100644 index 0000000..423dd94 --- /dev/null +++ b/azion-api/model_response_retrieve_integration.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveIntegration{} + +// ResponseRetrieveIntegration struct for ResponseRetrieveIntegration +type ResponseRetrieveIntegration struct { + Data Integration `json:"data"` +} + +type _ResponseRetrieveIntegration ResponseRetrieveIntegration + +// NewResponseRetrieveIntegration instantiates a new ResponseRetrieveIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveIntegration(data Integration) *ResponseRetrieveIntegration { + this := ResponseRetrieveIntegration{} + this.Data = data + return &this +} + +// NewResponseRetrieveIntegrationWithDefaults instantiates a new ResponseRetrieveIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveIntegrationWithDefaults() *ResponseRetrieveIntegration { + this := ResponseRetrieveIntegration{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveIntegration) GetData() Integration { + if o == nil { + var ret Integration + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveIntegration) GetDataOk() (*Integration, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveIntegration) SetData(v Integration) { + o.Data = v +} + +func (o ResponseRetrieveIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveIntegration) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveIntegration := _ResponseRetrieveIntegration{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveIntegration) + + if err != nil { + return err + } + + *o = ResponseRetrieveIntegration(varResponseRetrieveIntegration) + + return err +} + +type NullableResponseRetrieveIntegration struct { + value *ResponseRetrieveIntegration + isSet bool +} + +func (v NullableResponseRetrieveIntegration) Get() *ResponseRetrieveIntegration { + return v.value +} + +func (v *NullableResponseRetrieveIntegration) Set(val *ResponseRetrieveIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveIntegration(val *ResponseRetrieveIntegration) *NullableResponseRetrieveIntegration { + return &NullableResponseRetrieveIntegration{value: val, isSet: true} +} + +func (v NullableResponseRetrieveIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_knowledge_base.go b/azion-api/model_response_retrieve_knowledge_base.go new file mode 100644 index 0000000..c77cef3 --- /dev/null +++ b/azion-api/model_response_retrieve_knowledge_base.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveKnowledgeBase type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveKnowledgeBase{} + +// ResponseRetrieveKnowledgeBase struct for ResponseRetrieveKnowledgeBase +type ResponseRetrieveKnowledgeBase struct { + Data KnowledgeBase `json:"data"` +} + +type _ResponseRetrieveKnowledgeBase ResponseRetrieveKnowledgeBase + +// NewResponseRetrieveKnowledgeBase instantiates a new ResponseRetrieveKnowledgeBase object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveKnowledgeBase(data KnowledgeBase) *ResponseRetrieveKnowledgeBase { + this := ResponseRetrieveKnowledgeBase{} + this.Data = data + return &this +} + +// NewResponseRetrieveKnowledgeBaseWithDefaults instantiates a new ResponseRetrieveKnowledgeBase object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveKnowledgeBaseWithDefaults() *ResponseRetrieveKnowledgeBase { + this := ResponseRetrieveKnowledgeBase{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveKnowledgeBase) GetData() KnowledgeBase { + if o == nil { + var ret KnowledgeBase + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveKnowledgeBase) GetDataOk() (*KnowledgeBase, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveKnowledgeBase) SetData(v KnowledgeBase) { + o.Data = v +} + +func (o ResponseRetrieveKnowledgeBase) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveKnowledgeBase) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveKnowledgeBase) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveKnowledgeBase := _ResponseRetrieveKnowledgeBase{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveKnowledgeBase) + + if err != nil { + return err + } + + *o = ResponseRetrieveKnowledgeBase(varResponseRetrieveKnowledgeBase) + + return err +} + +type NullableResponseRetrieveKnowledgeBase struct { + value *ResponseRetrieveKnowledgeBase + isSet bool +} + +func (v NullableResponseRetrieveKnowledgeBase) Get() *ResponseRetrieveKnowledgeBase { + return v.value +} + +func (v *NullableResponseRetrieveKnowledgeBase) Set(val *ResponseRetrieveKnowledgeBase) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveKnowledgeBase) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveKnowledgeBase) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveKnowledgeBase(val *ResponseRetrieveKnowledgeBase) *NullableResponseRetrieveKnowledgeBase { + return &NullableResponseRetrieveKnowledgeBase{value: val, isSet: true} +} + +func (v NullableResponseRetrieveKnowledgeBase) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveKnowledgeBase) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_message.go b/azion-api/model_response_retrieve_message.go new file mode 100644 index 0000000..a5412f2 --- /dev/null +++ b/azion-api/model_response_retrieve_message.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveMessage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveMessage{} + +// ResponseRetrieveMessage struct for ResponseRetrieveMessage +type ResponseRetrieveMessage struct { + Data Message `json:"data"` +} + +type _ResponseRetrieveMessage ResponseRetrieveMessage + +// NewResponseRetrieveMessage instantiates a new ResponseRetrieveMessage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveMessage(data Message) *ResponseRetrieveMessage { + this := ResponseRetrieveMessage{} + this.Data = data + return &this +} + +// NewResponseRetrieveMessageWithDefaults instantiates a new ResponseRetrieveMessage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveMessageWithDefaults() *ResponseRetrieveMessage { + this := ResponseRetrieveMessage{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveMessage) GetData() Message { + if o == nil { + var ret Message + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveMessage) GetDataOk() (*Message, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveMessage) SetData(v Message) { + o.Data = v +} + +func (o ResponseRetrieveMessage) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveMessage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveMessage) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveMessage := _ResponseRetrieveMessage{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveMessage) + + if err != nil { + return err + } + + *o = ResponseRetrieveMessage(varResponseRetrieveMessage) + + return err +} + +type NullableResponseRetrieveMessage struct { + value *ResponseRetrieveMessage + isSet bool +} + +func (v NullableResponseRetrieveMessage) Get() *ResponseRetrieveMessage { + return v.value +} + +func (v *NullableResponseRetrieveMessage) Set(val *ResponseRetrieveMessage) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveMessage) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveMessage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveMessage(val *ResponseRetrieveMessage) *NullableResponseRetrieveMessage { + return &NullableResponseRetrieveMessage{value: val, isSet: true} +} + +func (v NullableResponseRetrieveMessage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveMessage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_node_service_bind.go b/azion-api/model_response_retrieve_node_service_bind.go new file mode 100644 index 0000000..f23608a --- /dev/null +++ b/azion-api/model_response_retrieve_node_service_bind.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveNodeServiceBind type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveNodeServiceBind{} + +// ResponseRetrieveNodeServiceBind struct for ResponseRetrieveNodeServiceBind +type ResponseRetrieveNodeServiceBind struct { + Data NodeServiceBind `json:"data"` +} + +type _ResponseRetrieveNodeServiceBind ResponseRetrieveNodeServiceBind + +// NewResponseRetrieveNodeServiceBind instantiates a new ResponseRetrieveNodeServiceBind object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveNodeServiceBind(data NodeServiceBind) *ResponseRetrieveNodeServiceBind { + this := ResponseRetrieveNodeServiceBind{} + this.Data = data + return &this +} + +// NewResponseRetrieveNodeServiceBindWithDefaults instantiates a new ResponseRetrieveNodeServiceBind object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveNodeServiceBindWithDefaults() *ResponseRetrieveNodeServiceBind { + this := ResponseRetrieveNodeServiceBind{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveNodeServiceBind) GetData() NodeServiceBind { + if o == nil { + var ret NodeServiceBind + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveNodeServiceBind) GetDataOk() (*NodeServiceBind, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveNodeServiceBind) SetData(v NodeServiceBind) { + o.Data = v +} + +func (o ResponseRetrieveNodeServiceBind) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveNodeServiceBind) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveNodeServiceBind) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveNodeServiceBind := _ResponseRetrieveNodeServiceBind{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveNodeServiceBind) + + if err != nil { + return err + } + + *o = ResponseRetrieveNodeServiceBind(varResponseRetrieveNodeServiceBind) + + return err +} + +type NullableResponseRetrieveNodeServiceBind struct { + value *ResponseRetrieveNodeServiceBind + isSet bool +} + +func (v NullableResponseRetrieveNodeServiceBind) Get() *ResponseRetrieveNodeServiceBind { + return v.value +} + +func (v *NullableResponseRetrieveNodeServiceBind) Set(val *ResponseRetrieveNodeServiceBind) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveNodeServiceBind) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveNodeServiceBind) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveNodeServiceBind(val *ResponseRetrieveNodeServiceBind) *NullableResponseRetrieveNodeServiceBind { + return &NullableResponseRetrieveNodeServiceBind{value: val, isSet: true} +} + +func (v NullableResponseRetrieveNodeServiceBind) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveNodeServiceBind) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_nodes.go b/azion-api/model_response_retrieve_nodes.go new file mode 100644 index 0000000..6173ea4 --- /dev/null +++ b/azion-api/model_response_retrieve_nodes.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveNodes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveNodes{} + +// ResponseRetrieveNodes struct for ResponseRetrieveNodes +type ResponseRetrieveNodes struct { + Data Nodes `json:"data"` +} + +type _ResponseRetrieveNodes ResponseRetrieveNodes + +// NewResponseRetrieveNodes instantiates a new ResponseRetrieveNodes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveNodes(data Nodes) *ResponseRetrieveNodes { + this := ResponseRetrieveNodes{} + this.Data = data + return &this +} + +// NewResponseRetrieveNodesWithDefaults instantiates a new ResponseRetrieveNodes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveNodesWithDefaults() *ResponseRetrieveNodes { + this := ResponseRetrieveNodes{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveNodes) GetData() Nodes { + if o == nil { + var ret Nodes + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveNodes) GetDataOk() (*Nodes, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveNodes) SetData(v Nodes) { + o.Data = v +} + +func (o ResponseRetrieveNodes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveNodes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveNodes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveNodes := _ResponseRetrieveNodes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveNodes) + + if err != nil { + return err + } + + *o = ResponseRetrieveNodes(varResponseRetrieveNodes) + + return err +} + +type NullableResponseRetrieveNodes struct { + value *ResponseRetrieveNodes + isSet bool +} + +func (v NullableResponseRetrieveNodes) Get() *ResponseRetrieveNodes { + return v.value +} + +func (v *NullableResponseRetrieveNodes) Set(val *ResponseRetrieveNodes) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveNodes) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveNodes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveNodes(val *ResponseRetrieveNodes) *NullableResponseRetrieveNodes { + return &NullableResponseRetrieveNodes{value: val, isSet: true} +} + +func (v NullableResponseRetrieveNodes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveNodes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_publisher.go b/azion-api/model_response_retrieve_publisher.go new file mode 100644 index 0000000..d49badc --- /dev/null +++ b/azion-api/model_response_retrieve_publisher.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrievePublisher type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrievePublisher{} + +// ResponseRetrievePublisher struct for ResponseRetrievePublisher +type ResponseRetrievePublisher struct { + Data Publisher `json:"data"` +} + +type _ResponseRetrievePublisher ResponseRetrievePublisher + +// NewResponseRetrievePublisher instantiates a new ResponseRetrievePublisher object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrievePublisher(data Publisher) *ResponseRetrievePublisher { + this := ResponseRetrievePublisher{} + this.Data = data + return &this +} + +// NewResponseRetrievePublisherWithDefaults instantiates a new ResponseRetrievePublisher object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrievePublisherWithDefaults() *ResponseRetrievePublisher { + this := ResponseRetrievePublisher{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrievePublisher) GetData() Publisher { + if o == nil { + var ret Publisher + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrievePublisher) GetDataOk() (*Publisher, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrievePublisher) SetData(v Publisher) { + o.Data = v +} + +func (o ResponseRetrievePublisher) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrievePublisher) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrievePublisher) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrievePublisher := _ResponseRetrievePublisher{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrievePublisher) + + if err != nil { + return err + } + + *o = ResponseRetrievePublisher(varResponseRetrievePublisher) + + return err +} + +type NullableResponseRetrievePublisher struct { + value *ResponseRetrievePublisher + isSet bool +} + +func (v NullableResponseRetrievePublisher) Get() *ResponseRetrievePublisher { + return v.value +} + +func (v *NullableResponseRetrievePublisher) Set(val *ResponseRetrievePublisher) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrievePublisher) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrievePublisher) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrievePublisher(val *ResponseRetrievePublisher) *NullableResponseRetrievePublisher { + return &NullableResponseRetrievePublisher{value: val, isSet: true} +} + +func (v NullableResponseRetrievePublisher) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrievePublisher) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_report.go b/azion-api/model_response_retrieve_report.go new file mode 100644 index 0000000..df02f47 --- /dev/null +++ b/azion-api/model_response_retrieve_report.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveReport type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveReport{} + +// ResponseRetrieveReport struct for ResponseRetrieveReport +type ResponseRetrieveReport struct { + Data Report `json:"data"` +} + +type _ResponseRetrieveReport ResponseRetrieveReport + +// NewResponseRetrieveReport instantiates a new ResponseRetrieveReport object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveReport(data Report) *ResponseRetrieveReport { + this := ResponseRetrieveReport{} + this.Data = data + return &this +} + +// NewResponseRetrieveReportWithDefaults instantiates a new ResponseRetrieveReport object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveReportWithDefaults() *ResponseRetrieveReport { + this := ResponseRetrieveReport{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveReport) GetData() Report { + if o == nil { + var ret Report + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveReport) GetDataOk() (*Report, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveReport) SetData(v Report) { + o.Data = v +} + +func (o ResponseRetrieveReport) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveReport) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveReport) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveReport := _ResponseRetrieveReport{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveReport) + + if err != nil { + return err + } + + *o = ResponseRetrieveReport(varResponseRetrieveReport) + + return err +} + +type NullableResponseRetrieveReport struct { + value *ResponseRetrieveReport + isSet bool +} + +func (v NullableResponseRetrieveReport) Get() *ResponseRetrieveReport { + return v.value +} + +func (v *NullableResponseRetrieveReport) Set(val *ResponseRetrieveReport) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveReport) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveReport) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveReport(val *ResponseRetrieveReport) *NullableResponseRetrieveReport { + return &NullableResponseRetrieveReport{value: val, isSet: true} +} + +func (v NullableResponseRetrieveReport) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveReport) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_row.go b/azion-api/model_response_retrieve_row.go new file mode 100644 index 0000000..ac1f155 --- /dev/null +++ b/azion-api/model_response_retrieve_row.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveRow{} + +// ResponseRetrieveRow struct for ResponseRetrieveRow +type ResponseRetrieveRow struct { + Data Row `json:"data"` +} + +type _ResponseRetrieveRow ResponseRetrieveRow + +// NewResponseRetrieveRow instantiates a new ResponseRetrieveRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveRow(data Row) *ResponseRetrieveRow { + this := ResponseRetrieveRow{} + this.Data = data + return &this +} + +// NewResponseRetrieveRowWithDefaults instantiates a new ResponseRetrieveRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveRowWithDefaults() *ResponseRetrieveRow { + this := ResponseRetrieveRow{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveRow) GetData() Row { + if o == nil { + var ret Row + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveRow) GetDataOk() (*Row, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveRow) SetData(v Row) { + o.Data = v +} + +func (o ResponseRetrieveRow) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveRow := _ResponseRetrieveRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveRow) + + if err != nil { + return err + } + + *o = ResponseRetrieveRow(varResponseRetrieveRow) + + return err +} + +type NullableResponseRetrieveRow struct { + value *ResponseRetrieveRow + isSet bool +} + +func (v NullableResponseRetrieveRow) Get() *ResponseRetrieveRow { + return v.value +} + +func (v *NullableResponseRetrieveRow) Set(val *ResponseRetrieveRow) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveRow) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveRow(val *ResponseRetrieveRow) *NullableResponseRetrieveRow { + return &NullableResponseRetrieveRow{value: val, isSet: true} +} + +func (v NullableResponseRetrieveRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_service_token.go b/azion-api/model_response_retrieve_service_token.go new file mode 100644 index 0000000..9fec978 --- /dev/null +++ b/azion-api/model_response_retrieve_service_token.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveServiceToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveServiceToken{} + +// ResponseRetrieveServiceToken struct for ResponseRetrieveServiceToken +type ResponseRetrieveServiceToken struct { + Data ServiceToken `json:"data"` +} + +type _ResponseRetrieveServiceToken ResponseRetrieveServiceToken + +// NewResponseRetrieveServiceToken instantiates a new ResponseRetrieveServiceToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveServiceToken(data ServiceToken) *ResponseRetrieveServiceToken { + this := ResponseRetrieveServiceToken{} + this.Data = data + return &this +} + +// NewResponseRetrieveServiceTokenWithDefaults instantiates a new ResponseRetrieveServiceToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveServiceTokenWithDefaults() *ResponseRetrieveServiceToken { + this := ResponseRetrieveServiceToken{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveServiceToken) GetData() ServiceToken { + if o == nil { + var ret ServiceToken + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveServiceToken) GetDataOk() (*ServiceToken, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveServiceToken) SetData(v ServiceToken) { + o.Data = v +} + +func (o ResponseRetrieveServiceToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveServiceToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveServiceToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveServiceToken := _ResponseRetrieveServiceToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveServiceToken) + + if err != nil { + return err + } + + *o = ResponseRetrieveServiceToken(varResponseRetrieveServiceToken) + + return err +} + +type NullableResponseRetrieveServiceToken struct { + value *ResponseRetrieveServiceToken + isSet bool +} + +func (v NullableResponseRetrieveServiceToken) Get() *ResponseRetrieveServiceToken { + return v.value +} + +func (v *NullableResponseRetrieveServiceToken) Set(val *ResponseRetrieveServiceToken) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveServiceToken) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveServiceToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveServiceToken(val *ResponseRetrieveServiceToken) *NullableResponseRetrieveServiceToken { + return &NullableResponseRetrieveServiceToken{value: val, isSet: true} +} + +func (v NullableResponseRetrieveServiceToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveServiceToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_services.go b/azion-api/model_response_retrieve_services.go new file mode 100644 index 0000000..08d0f98 --- /dev/null +++ b/azion-api/model_response_retrieve_services.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveServices type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveServices{} + +// ResponseRetrieveServices struct for ResponseRetrieveServices +type ResponseRetrieveServices struct { + Data Services `json:"data"` +} + +type _ResponseRetrieveServices ResponseRetrieveServices + +// NewResponseRetrieveServices instantiates a new ResponseRetrieveServices object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveServices(data Services) *ResponseRetrieveServices { + this := ResponseRetrieveServices{} + this.Data = data + return &this +} + +// NewResponseRetrieveServicesWithDefaults instantiates a new ResponseRetrieveServices object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveServicesWithDefaults() *ResponseRetrieveServices { + this := ResponseRetrieveServices{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveServices) GetData() Services { + if o == nil { + var ret Services + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveServices) GetDataOk() (*Services, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveServices) SetData(v Services) { + o.Data = v +} + +func (o ResponseRetrieveServices) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveServices) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveServices) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveServices := _ResponseRetrieveServices{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveServices) + + if err != nil { + return err + } + + *o = ResponseRetrieveServices(varResponseRetrieveServices) + + return err +} + +type NullableResponseRetrieveServices struct { + value *ResponseRetrieveServices + isSet bool +} + +func (v NullableResponseRetrieveServices) Get() *ResponseRetrieveServices { + return v.value +} + +func (v *NullableResponseRetrieveServices) Set(val *ResponseRetrieveServices) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveServices) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveServices(val *ResponseRetrieveServices) *NullableResponseRetrieveServices { + return &NullableResponseRetrieveServices{value: val, isSet: true} +} + +func (v NullableResponseRetrieveServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_tool.go b/azion-api/model_response_retrieve_tool.go new file mode 100644 index 0000000..7a31e68 --- /dev/null +++ b/azion-api/model_response_retrieve_tool.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveTool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveTool{} + +// ResponseRetrieveTool struct for ResponseRetrieveTool +type ResponseRetrieveTool struct { + Data Tool `json:"data"` +} + +type _ResponseRetrieveTool ResponseRetrieveTool + +// NewResponseRetrieveTool instantiates a new ResponseRetrieveTool object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveTool(data Tool) *ResponseRetrieveTool { + this := ResponseRetrieveTool{} + this.Data = data + return &this +} + +// NewResponseRetrieveToolWithDefaults instantiates a new ResponseRetrieveTool object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveToolWithDefaults() *ResponseRetrieveTool { + this := ResponseRetrieveTool{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveTool) GetData() Tool { + if o == nil { + var ret Tool + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveTool) GetDataOk() (*Tool, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveTool) SetData(v Tool) { + o.Data = v +} + +func (o ResponseRetrieveTool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveTool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveTool) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveTool := _ResponseRetrieveTool{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveTool) + + if err != nil { + return err + } + + *o = ResponseRetrieveTool(varResponseRetrieveTool) + + return err +} + +type NullableResponseRetrieveTool struct { + value *ResponseRetrieveTool + isSet bool +} + +func (v NullableResponseRetrieveTool) Get() *ResponseRetrieveTool { + return v.value +} + +func (v *NullableResponseRetrieveTool) Set(val *ResponseRetrieveTool) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveTool) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveTool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveTool(val *ResponseRetrieveTool) *NullableResponseRetrieveTool { + return &NullableResponseRetrieveTool{value: val, isSet: true} +} + +func (v NullableResponseRetrieveTool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveTool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_user.go b/azion-api/model_response_retrieve_user.go new file mode 100644 index 0000000..87de5b1 --- /dev/null +++ b/azion-api/model_response_retrieve_user.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveUser{} + +// ResponseRetrieveUser struct for ResponseRetrieveUser +type ResponseRetrieveUser struct { + Data User `json:"data"` +} + +type _ResponseRetrieveUser ResponseRetrieveUser + +// NewResponseRetrieveUser instantiates a new ResponseRetrieveUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveUser(data User) *ResponseRetrieveUser { + this := ResponseRetrieveUser{} + this.Data = data + return &this +} + +// NewResponseRetrieveUserWithDefaults instantiates a new ResponseRetrieveUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveUserWithDefaults() *ResponseRetrieveUser { + this := ResponseRetrieveUser{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveUser) GetData() User { + if o == nil { + var ret User + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveUser) GetDataOk() (*User, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveUser) SetData(v User) { + o.Data = v +} + +func (o ResponseRetrieveUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveUser := _ResponseRetrieveUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveUser) + + if err != nil { + return err + } + + *o = ResponseRetrieveUser(varResponseRetrieveUser) + + return err +} + +type NullableResponseRetrieveUser struct { + value *ResponseRetrieveUser + isSet bool +} + +func (v NullableResponseRetrieveUser) Get() *ResponseRetrieveUser { + return v.value +} + +func (v *NullableResponseRetrieveUser) Set(val *ResponseRetrieveUser) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveUser) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveUser(val *ResponseRetrieveUser) *NullableResponseRetrieveUser { + return &NullableResponseRetrieveUser{value: val, isSet: true} +} + +func (v NullableResponseRetrieveUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_retrieve_user_info.go b/azion-api/model_response_retrieve_user_info.go new file mode 100644 index 0000000..a07efe2 --- /dev/null +++ b/azion-api/model_response_retrieve_user_info.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRetrieveUserInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRetrieveUserInfo{} + +// ResponseRetrieveUserInfo struct for ResponseRetrieveUserInfo +type ResponseRetrieveUserInfo struct { + Data UserInfo `json:"data"` +} + +type _ResponseRetrieveUserInfo ResponseRetrieveUserInfo + +// NewResponseRetrieveUserInfo instantiates a new ResponseRetrieveUserInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRetrieveUserInfo(data UserInfo) *ResponseRetrieveUserInfo { + this := ResponseRetrieveUserInfo{} + this.Data = data + return &this +} + +// NewResponseRetrieveUserInfoWithDefaults instantiates a new ResponseRetrieveUserInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRetrieveUserInfoWithDefaults() *ResponseRetrieveUserInfo { + this := ResponseRetrieveUserInfo{} + return &this +} + +// GetData returns the Data field value +func (o *ResponseRetrieveUserInfo) GetData() UserInfo { + if o == nil { + var ret UserInfo + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRetrieveUserInfo) GetDataOk() (*UserInfo, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRetrieveUserInfo) SetData(v UserInfo) { + o.Data = v +} + +func (o ResponseRetrieveUserInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRetrieveUserInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRetrieveUserInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRetrieveUserInfo := _ResponseRetrieveUserInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRetrieveUserInfo) + + if err != nil { + return err + } + + *o = ResponseRetrieveUserInfo(varResponseRetrieveUserInfo) + + return err +} + +type NullableResponseRetrieveUserInfo struct { + value *ResponseRetrieveUserInfo + isSet bool +} + +func (v NullableResponseRetrieveUserInfo) Get() *ResponseRetrieveUserInfo { + return v.value +} + +func (v *NullableResponseRetrieveUserInfo) Set(val *ResponseRetrieveUserInfo) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRetrieveUserInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRetrieveUserInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRetrieveUserInfo(val *ResponseRetrieveUserInfo) *NullableResponseRetrieveUserInfo { + return &NullableResponseRetrieveUserInfo{value: val, isSet: true} +} + +func (v NullableResponseRetrieveUserInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRetrieveUserInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_row.go b/azion-api/model_response_row.go new file mode 100644 index 0000000..48d8b79 --- /dev/null +++ b/azion-api/model_response_row.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseRow type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseRow{} + +// ResponseRow struct for ResponseRow +type ResponseRow struct { + State *string `json:"state,omitempty"` + Data Row `json:"data"` +} + +type _ResponseRow ResponseRow + +// NewResponseRow instantiates a new ResponseRow object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseRow(data Row) *ResponseRow { + this := ResponseRow{} + this.Data = data + return &this +} + +// NewResponseRowWithDefaults instantiates a new ResponseRow object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseRowWithDefaults() *ResponseRow { + this := ResponseRow{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseRow) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseRow) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseRow) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseRow) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseRow) GetData() Row { + if o == nil { + var ret Row + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseRow) GetDataOk() (*Row, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseRow) SetData(v Row) { + o.Data = v +} + +func (o ResponseRow) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseRow) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseRow) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseRow := _ResponseRow{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseRow) + + if err != nil { + return err + } + + *o = ResponseRow(varResponseRow) + + return err +} + +type NullableResponseRow struct { + value *ResponseRow + isSet bool +} + +func (v NullableResponseRow) Get() *ResponseRow { + return v.value +} + +func (v *NullableResponseRow) Set(val *ResponseRow) { + v.value = val + v.isSet = true +} + +func (v NullableResponseRow) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseRow(val *ResponseRow) *NullableResponseRow { + return &NullableResponseRow{value: val, isSet: true} +} + +func (v NullableResponseRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_service_token.go b/azion-api/model_response_service_token.go new file mode 100644 index 0000000..fd6d114 --- /dev/null +++ b/azion-api/model_response_service_token.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseServiceToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseServiceToken{} + +// ResponseServiceToken struct for ResponseServiceToken +type ResponseServiceToken struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data ServiceToken `json:"data"` +} + +type _ResponseServiceToken ResponseServiceToken + +// NewResponseServiceToken instantiates a new ResponseServiceToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseServiceToken(state string, data ServiceToken) *ResponseServiceToken { + this := ResponseServiceToken{} + this.State = state + this.Data = data + return &this +} + +// NewResponseServiceTokenWithDefaults instantiates a new ResponseServiceToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseServiceTokenWithDefaults() *ResponseServiceToken { + this := ResponseServiceToken{} + return &this +} + +// GetState returns the State field value +func (o *ResponseServiceToken) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseServiceToken) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseServiceToken) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseServiceToken) GetData() ServiceToken { + if o == nil { + var ret ServiceToken + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseServiceToken) GetDataOk() (*ServiceToken, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseServiceToken) SetData(v ServiceToken) { + o.Data = v +} + +func (o ResponseServiceToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseServiceToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseServiceToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseServiceToken := _ResponseServiceToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseServiceToken) + + if err != nil { + return err + } + + *o = ResponseServiceToken(varResponseServiceToken) + + return err +} + +type NullableResponseServiceToken struct { + value *ResponseServiceToken + isSet bool +} + +func (v NullableResponseServiceToken) Get() *ResponseServiceToken { + return v.value +} + +func (v *NullableResponseServiceToken) Set(val *ResponseServiceToken) { + v.value = val + v.isSet = true +} + +func (v NullableResponseServiceToken) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseServiceToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseServiceToken(val *ResponseServiceToken) *NullableResponseServiceToken { + return &NullableResponseServiceToken{value: val, isSet: true} +} + +func (v NullableResponseServiceToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseServiceToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_service_token_create.go b/azion-api/model_response_service_token_create.go new file mode 100644 index 0000000..ee09a4f --- /dev/null +++ b/azion-api/model_response_service_token_create.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseServiceTokenCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseServiceTokenCreate{} + +// ResponseServiceTokenCreate struct for ResponseServiceTokenCreate +type ResponseServiceTokenCreate struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data ServiceTokenCreate `json:"data"` +} + +type _ResponseServiceTokenCreate ResponseServiceTokenCreate + +// NewResponseServiceTokenCreate instantiates a new ResponseServiceTokenCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseServiceTokenCreate(state string, data ServiceTokenCreate) *ResponseServiceTokenCreate { + this := ResponseServiceTokenCreate{} + this.State = state + this.Data = data + return &this +} + +// NewResponseServiceTokenCreateWithDefaults instantiates a new ResponseServiceTokenCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseServiceTokenCreateWithDefaults() *ResponseServiceTokenCreate { + this := ResponseServiceTokenCreate{} + return &this +} + +// GetState returns the State field value +func (o *ResponseServiceTokenCreate) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseServiceTokenCreate) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseServiceTokenCreate) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseServiceTokenCreate) GetData() ServiceTokenCreate { + if o == nil { + var ret ServiceTokenCreate + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseServiceTokenCreate) GetDataOk() (*ServiceTokenCreate, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseServiceTokenCreate) SetData(v ServiceTokenCreate) { + o.Data = v +} + +func (o ResponseServiceTokenCreate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseServiceTokenCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseServiceTokenCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseServiceTokenCreate := _ResponseServiceTokenCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseServiceTokenCreate) + + if err != nil { + return err + } + + *o = ResponseServiceTokenCreate(varResponseServiceTokenCreate) + + return err +} + +type NullableResponseServiceTokenCreate struct { + value *ResponseServiceTokenCreate + isSet bool +} + +func (v NullableResponseServiceTokenCreate) Get() *ResponseServiceTokenCreate { + return v.value +} + +func (v *NullableResponseServiceTokenCreate) Set(val *ResponseServiceTokenCreate) { + v.value = val + v.isSet = true +} + +func (v NullableResponseServiceTokenCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseServiceTokenCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseServiceTokenCreate(val *ResponseServiceTokenCreate) *NullableResponseServiceTokenCreate { + return &NullableResponseServiceTokenCreate{value: val, isSet: true} +} + +func (v NullableResponseServiceTokenCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseServiceTokenCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_service_token_renew.go b/azion-api/model_response_service_token_renew.go new file mode 100644 index 0000000..1d0ae4c --- /dev/null +++ b/azion-api/model_response_service_token_renew.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseServiceTokenRenew type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseServiceTokenRenew{} + +// ResponseServiceTokenRenew struct for ResponseServiceTokenRenew +type ResponseServiceTokenRenew struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data ServiceTokenRenew `json:"data"` +} + +type _ResponseServiceTokenRenew ResponseServiceTokenRenew + +// NewResponseServiceTokenRenew instantiates a new ResponseServiceTokenRenew object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseServiceTokenRenew(state string, data ServiceTokenRenew) *ResponseServiceTokenRenew { + this := ResponseServiceTokenRenew{} + this.State = state + this.Data = data + return &this +} + +// NewResponseServiceTokenRenewWithDefaults instantiates a new ResponseServiceTokenRenew object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseServiceTokenRenewWithDefaults() *ResponseServiceTokenRenew { + this := ResponseServiceTokenRenew{} + return &this +} + +// GetState returns the State field value +func (o *ResponseServiceTokenRenew) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseServiceTokenRenew) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseServiceTokenRenew) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseServiceTokenRenew) GetData() ServiceTokenRenew { + if o == nil { + var ret ServiceTokenRenew + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseServiceTokenRenew) GetDataOk() (*ServiceTokenRenew, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseServiceTokenRenew) SetData(v ServiceTokenRenew) { + o.Data = v +} + +func (o ResponseServiceTokenRenew) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseServiceTokenRenew) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseServiceTokenRenew) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseServiceTokenRenew := _ResponseServiceTokenRenew{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseServiceTokenRenew) + + if err != nil { + return err + } + + *o = ResponseServiceTokenRenew(varResponseServiceTokenRenew) + + return err +} + +type NullableResponseServiceTokenRenew struct { + value *ResponseServiceTokenRenew + isSet bool +} + +func (v NullableResponseServiceTokenRenew) Get() *ResponseServiceTokenRenew { + return v.value +} + +func (v *NullableResponseServiceTokenRenew) Set(val *ResponseServiceTokenRenew) { + v.value = val + v.isSet = true +} + +func (v NullableResponseServiceTokenRenew) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseServiceTokenRenew) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseServiceTokenRenew(val *ResponseServiceTokenRenew) *NullableResponseServiceTokenRenew { + return &NullableResponseServiceTokenRenew{value: val, isSet: true} +} + +func (v NullableResponseServiceTokenRenew) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseServiceTokenRenew) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_tool.go b/azion-api/model_response_tool.go new file mode 100644 index 0000000..2bb140f --- /dev/null +++ b/azion-api/model_response_tool.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseTool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseTool{} + +// ResponseTool struct for ResponseTool +type ResponseTool struct { + State *string `json:"state,omitempty"` + Data Tool `json:"data"` +} + +type _ResponseTool ResponseTool + +// NewResponseTool instantiates a new ResponseTool object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseTool(data Tool) *ResponseTool { + this := ResponseTool{} + this.Data = data + return &this +} + +// NewResponseToolWithDefaults instantiates a new ResponseTool object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseToolWithDefaults() *ResponseTool { + this := ResponseTool{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResponseTool) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ResponseTool) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResponseTool) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResponseTool) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ResponseTool) GetData() Tool { + if o == nil { + var ret Tool + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseTool) GetDataOk() (*Tool, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseTool) SetData(v Tool) { + o.Data = v +} + +func (o ResponseTool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseTool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseTool) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseTool := _ResponseTool{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseTool) + + if err != nil { + return err + } + + *o = ResponseTool(varResponseTool) + + return err +} + +type NullableResponseTool struct { + value *ResponseTool + isSet bool +} + +func (v NullableResponseTool) Get() *ResponseTool { + return v.value +} + +func (v *NullableResponseTool) Set(val *ResponseTool) { + v.value = val + v.isSet = true +} + +func (v NullableResponseTool) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseTool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseTool(val *ResponseTool) *NullableResponseTool { + return &NullableResponseTool{value: val, isSet: true} +} + +func (v NullableResponseTool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseTool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_user.go b/azion-api/model_response_user.go new file mode 100644 index 0000000..dc4bef9 --- /dev/null +++ b/azion-api/model_response_user.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseUser{} + +// ResponseUser struct for ResponseUser +type ResponseUser struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data User `json:"data"` +} + +type _ResponseUser ResponseUser + +// NewResponseUser instantiates a new ResponseUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseUser(state string, data User) *ResponseUser { + this := ResponseUser{} + this.State = state + this.Data = data + return &this +} + +// NewResponseUserWithDefaults instantiates a new ResponseUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseUserWithDefaults() *ResponseUser { + this := ResponseUser{} + return &this +} + +// GetState returns the State field value +func (o *ResponseUser) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseUser) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseUser) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseUser) GetData() User { + if o == nil { + var ret User + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseUser) GetDataOk() (*User, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseUser) SetData(v User) { + o.Data = v +} + +func (o ResponseUser) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseUser) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseUser := _ResponseUser{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseUser) + + if err != nil { + return err + } + + *o = ResponseUser(varResponseUser) + + return err +} + +type NullableResponseUser struct { + value *ResponseUser + isSet bool +} + +func (v NullableResponseUser) Get() *ResponseUser { + return v.value +} + +func (v *NullableResponseUser) Set(val *ResponseUser) { + v.value = val + v.isSet = true +} + +func (v NullableResponseUser) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseUser(val *ResponseUser) *NullableResponseUser { + return &NullableResponseUser{value: val, isSet: true} +} + +func (v NullableResponseUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_response_user_info.go b/azion-api/model_response_user_info.go new file mode 100644 index 0000000..e5d093a --- /dev/null +++ b/azion-api/model_response_user_info.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ResponseUserInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResponseUserInfo{} + +// ResponseUserInfo struct for ResponseUserInfo +type ResponseUserInfo struct { + // * `pending` - pending * `executed` - executed + State string `json:"state"` + Data UserInfo `json:"data"` +} + +type _ResponseUserInfo ResponseUserInfo + +// NewResponseUserInfo instantiates a new ResponseUserInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewResponseUserInfo(state string, data UserInfo) *ResponseUserInfo { + this := ResponseUserInfo{} + this.State = state + this.Data = data + return &this +} + +// NewResponseUserInfoWithDefaults instantiates a new ResponseUserInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewResponseUserInfoWithDefaults() *ResponseUserInfo { + this := ResponseUserInfo{} + return &this +} + +// GetState returns the State field value +func (o *ResponseUserInfo) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ResponseUserInfo) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ResponseUserInfo) SetState(v string) { + o.State = v +} + +// GetData returns the Data field value +func (o *ResponseUserInfo) GetData() UserInfo { + if o == nil { + var ret UserInfo + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ResponseUserInfo) GetDataOk() (*UserInfo, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ResponseUserInfo) SetData(v UserInfo) { + o.Data = v +} + +func (o ResponseUserInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResponseUserInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["state"] = o.State + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ResponseUserInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "state", + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varResponseUserInfo := _ResponseUserInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varResponseUserInfo) + + if err != nil { + return err + } + + *o = ResponseUserInfo(varResponseUserInfo) + + return err +} + +type NullableResponseUserInfo struct { + value *ResponseUserInfo + isSet bool +} + +func (v NullableResponseUserInfo) Get() *ResponseUserInfo { + return v.value +} + +func (v *NullableResponseUserInfo) Set(val *ResponseUserInfo) { + v.value = val + v.isSet = true +} + +func (v NullableResponseUserInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableResponseUserInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableResponseUserInfo(val *ResponseUserInfo) *NullableResponseUserInfo { + return &NullableResponseUserInfo{value: val, isSet: true} +} + +func (v NullableResponseUserInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableResponseUserInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_row.go b/azion-api/model_row.go new file mode 100644 index 0000000..9845628 --- /dev/null +++ b/azion-api/model_row.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Row type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Row{} + +// Row struct for Row +type Row struct { + Id int64 `json:"id"` + Title string `json:"title"` + Order int64 `json:"order"` +} + +type _Row Row + +// NewRow instantiates a new Row object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRow(id int64, title string, order int64) *Row { + this := Row{} + this.Id = id + this.Title = title + this.Order = order + return &this +} + +// NewRowWithDefaults instantiates a new Row object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRowWithDefaults() *Row { + this := Row{} + return &this +} + +// GetId returns the Id field value +func (o *Row) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Row) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Row) SetId(v int64) { + o.Id = v +} + +// GetTitle returns the Title field value +func (o *Row) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *Row) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *Row) SetTitle(v string) { + o.Title = v +} + +// GetOrder returns the Order field value +func (o *Row) GetOrder() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Order +} + +// GetOrderOk returns a tuple with the Order field value +// and a boolean to check if the value has been set. +func (o *Row) GetOrderOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Order, true +} + +// SetOrder sets field value +func (o *Row) SetOrder(v int64) { + o.Order = v +} + +func (o Row) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Row) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["title"] = o.Title + toSerialize["order"] = o.Order + return toSerialize, nil +} + +func (o *Row) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "title", + "order", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRow := _Row{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRow) + + if err != nil { + return err + } + + *o = Row(varRow) + + return err +} + +type NullableRow struct { + value *Row + isSet bool +} + +func (v NullableRow) Get() *Row { + return v.value +} + +func (v *NullableRow) Set(val *Row) { + v.value = val + v.isSet = true +} + +func (v NullableRow) IsSet() bool { + return v.isSet +} + +func (v *NullableRow) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRow(val *Row) *NullableRow { + return &NullableRow{value: val, isSet: true} +} + +func (v NullableRow) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRow) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_row_request.go b/azion-api/model_row_request.go new file mode 100644 index 0000000..9064651 --- /dev/null +++ b/azion-api/model_row_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the RowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RowRequest{} + +// RowRequest struct for RowRequest +type RowRequest struct { + Title string `json:"title"` +} + +type _RowRequest RowRequest + +// NewRowRequest instantiates a new RowRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRowRequest(title string) *RowRequest { + this := RowRequest{} + this.Title = title + return &this +} + +// NewRowRequestWithDefaults instantiates a new RowRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRowRequestWithDefaults() *RowRequest { + this := RowRequest{} + return &this +} + +// GetTitle returns the Title field value +func (o *RowRequest) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *RowRequest) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *RowRequest) SetTitle(v string) { + o.Title = v +} + +func (o RowRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["title"] = o.Title + return toSerialize, nil +} + +func (o *RowRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "title", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRowRequest := _RowRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRowRequest) + + if err != nil { + return err + } + + *o = RowRequest(varRowRequest) + + return err +} + +type NullableRowRequest struct { + value *RowRequest + isSet bool +} + +func (v NullableRowRequest) Get() *RowRequest { + return v.value +} + +func (v *NullableRowRequest) Set(val *RowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableRowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableRowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRowRequest(val *RowRequest) *NullableRowRequest { + return &NullableRowRequest{value: val, isSet: true} +} + +func (v NullableRowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_s3_endpoint.go b/azion-api/model_s3_endpoint.go new file mode 100644 index 0000000..ab97123 --- /dev/null +++ b/azion-api/model_s3_endpoint.go @@ -0,0 +1,375 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the S3Endpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &S3Endpoint{} + +// S3Endpoint struct for S3Endpoint +type S3Endpoint struct { + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` + Region string `json:"region"` + ObjectKeyPrefix NullableString `json:"object_key_prefix,omitempty"` + BucketName string `json:"bucket_name"` + // * `plain/text` - plain/text * `application/gzip` - application/gzip + ContentType string `json:"content_type"` + HostUrl string `json:"host_url"` + // Type identifier for this endpoint (s3) + Type string `json:"type"` +} + +type _S3Endpoint S3Endpoint + +// NewS3Endpoint instantiates a new S3Endpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewS3Endpoint(accessKey string, secretKey string, region string, bucketName string, contentType string, hostUrl string, type_ string) *S3Endpoint { + this := S3Endpoint{} + this.AccessKey = accessKey + this.SecretKey = secretKey + this.Region = region + this.BucketName = bucketName + this.ContentType = contentType + this.HostUrl = hostUrl + this.Type = type_ + return &this +} + +// NewS3EndpointWithDefaults instantiates a new S3Endpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewS3EndpointWithDefaults() *S3Endpoint { + this := S3Endpoint{} + return &this +} + +// GetAccessKey returns the AccessKey field value +func (o *S3Endpoint) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *S3Endpoint) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *S3Endpoint) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *S3Endpoint) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetRegion returns the Region field value +func (o *S3Endpoint) GetRegion() string { + if o == nil { + var ret string + return ret + } + + return o.Region +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetRegionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Region, true +} + +// SetRegion sets field value +func (o *S3Endpoint) SetRegion(v string) { + o.Region = v +} + +// GetObjectKeyPrefix returns the ObjectKeyPrefix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *S3Endpoint) GetObjectKeyPrefix() string { + if o == nil || IsNil(o.ObjectKeyPrefix.Get()) { + var ret string + return ret + } + return *o.ObjectKeyPrefix.Get() +} + +// GetObjectKeyPrefixOk returns a tuple with the ObjectKeyPrefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *S3Endpoint) GetObjectKeyPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObjectKeyPrefix.Get(), o.ObjectKeyPrefix.IsSet() +} + +// HasObjectKeyPrefix returns a boolean if a field has been set. +func (o *S3Endpoint) HasObjectKeyPrefix() bool { + if o != nil && o.ObjectKeyPrefix.IsSet() { + return true + } + + return false +} + +// SetObjectKeyPrefix gets a reference to the given NullableString and assigns it to the ObjectKeyPrefix field. +func (o *S3Endpoint) SetObjectKeyPrefix(v string) { + o.ObjectKeyPrefix.Set(&v) +} +// SetObjectKeyPrefixNil sets the value for ObjectKeyPrefix to be an explicit nil +func (o *S3Endpoint) SetObjectKeyPrefixNil() { + o.ObjectKeyPrefix.Set(nil) +} + +// UnsetObjectKeyPrefix ensures that no value is present for ObjectKeyPrefix, not even an explicit nil +func (o *S3Endpoint) UnsetObjectKeyPrefix() { + o.ObjectKeyPrefix.Unset() +} + +// GetBucketName returns the BucketName field value +func (o *S3Endpoint) GetBucketName() string { + if o == nil { + var ret string + return ret + } + + return o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetBucketNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BucketName, true +} + +// SetBucketName sets field value +func (o *S3Endpoint) SetBucketName(v string) { + o.BucketName = v +} + +// GetContentType returns the ContentType field value +func (o *S3Endpoint) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *S3Endpoint) SetContentType(v string) { + o.ContentType = v +} + +// GetHostUrl returns the HostUrl field value +func (o *S3Endpoint) GetHostUrl() string { + if o == nil { + var ret string + return ret + } + + return o.HostUrl +} + +// GetHostUrlOk returns a tuple with the HostUrl field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetHostUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HostUrl, true +} + +// SetHostUrl sets field value +func (o *S3Endpoint) SetHostUrl(v string) { + o.HostUrl = v +} + +// GetType returns the Type field value +func (o *S3Endpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *S3Endpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *S3Endpoint) SetType(v string) { + o.Type = v +} + +func (o S3Endpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o S3Endpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + toSerialize["region"] = o.Region + if o.ObjectKeyPrefix.IsSet() { + toSerialize["object_key_prefix"] = o.ObjectKeyPrefix.Get() + } + toSerialize["bucket_name"] = o.BucketName + toSerialize["content_type"] = o.ContentType + toSerialize["host_url"] = o.HostUrl + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *S3Endpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_key", + "secret_key", + "region", + "bucket_name", + "content_type", + "host_url", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varS3Endpoint := _S3Endpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varS3Endpoint) + + if err != nil { + return err + } + + *o = S3Endpoint(varS3Endpoint) + + return err +} + +type NullableS3Endpoint struct { + value *S3Endpoint + isSet bool +} + +func (v NullableS3Endpoint) Get() *S3Endpoint { + return v.value +} + +func (v *NullableS3Endpoint) Set(val *S3Endpoint) { + v.value = val + v.isSet = true +} + +func (v NullableS3Endpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableS3Endpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableS3Endpoint(val *S3Endpoint) *NullableS3Endpoint { + return &NullableS3Endpoint{value: val, isSet: true} +} + +func (v NullableS3Endpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableS3Endpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_s3_endpoint_request.go b/azion-api/model_s3_endpoint_request.go new file mode 100644 index 0000000..1218bcc --- /dev/null +++ b/azion-api/model_s3_endpoint_request.go @@ -0,0 +1,375 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the S3EndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &S3EndpointRequest{} + +// S3EndpointRequest struct for S3EndpointRequest +type S3EndpointRequest struct { + AccessKey string `json:"access_key"` + SecretKey string `json:"secret_key"` + Region string `json:"region"` + ObjectKeyPrefix NullableString `json:"object_key_prefix,omitempty"` + BucketName string `json:"bucket_name"` + // * `plain/text` - plain/text * `application/gzip` - application/gzip + ContentType string `json:"content_type"` + HostUrl string `json:"host_url"` + // Type identifier for this endpoint (s3) + Type string `json:"type"` +} + +type _S3EndpointRequest S3EndpointRequest + +// NewS3EndpointRequest instantiates a new S3EndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewS3EndpointRequest(accessKey string, secretKey string, region string, bucketName string, contentType string, hostUrl string, type_ string) *S3EndpointRequest { + this := S3EndpointRequest{} + this.AccessKey = accessKey + this.SecretKey = secretKey + this.Region = region + this.BucketName = bucketName + this.ContentType = contentType + this.HostUrl = hostUrl + this.Type = type_ + return &this +} + +// NewS3EndpointRequestWithDefaults instantiates a new S3EndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewS3EndpointRequestWithDefaults() *S3EndpointRequest { + this := S3EndpointRequest{} + return &this +} + +// GetAccessKey returns the AccessKey field value +func (o *S3EndpointRequest) GetAccessKey() string { + if o == nil { + var ret string + return ret + } + + return o.AccessKey +} + +// GetAccessKeyOk returns a tuple with the AccessKey field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetAccessKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessKey, true +} + +// SetAccessKey sets field value +func (o *S3EndpointRequest) SetAccessKey(v string) { + o.AccessKey = v +} + +// GetSecretKey returns the SecretKey field value +func (o *S3EndpointRequest) GetSecretKey() string { + if o == nil { + var ret string + return ret + } + + return o.SecretKey +} + +// GetSecretKeyOk returns a tuple with the SecretKey field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetSecretKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.SecretKey, true +} + +// SetSecretKey sets field value +func (o *S3EndpointRequest) SetSecretKey(v string) { + o.SecretKey = v +} + +// GetRegion returns the Region field value +func (o *S3EndpointRequest) GetRegion() string { + if o == nil { + var ret string + return ret + } + + return o.Region +} + +// GetRegionOk returns a tuple with the Region field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetRegionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Region, true +} + +// SetRegion sets field value +func (o *S3EndpointRequest) SetRegion(v string) { + o.Region = v +} + +// GetObjectKeyPrefix returns the ObjectKeyPrefix field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *S3EndpointRequest) GetObjectKeyPrefix() string { + if o == nil || IsNil(o.ObjectKeyPrefix.Get()) { + var ret string + return ret + } + return *o.ObjectKeyPrefix.Get() +} + +// GetObjectKeyPrefixOk returns a tuple with the ObjectKeyPrefix field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *S3EndpointRequest) GetObjectKeyPrefixOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ObjectKeyPrefix.Get(), o.ObjectKeyPrefix.IsSet() +} + +// HasObjectKeyPrefix returns a boolean if a field has been set. +func (o *S3EndpointRequest) HasObjectKeyPrefix() bool { + if o != nil && o.ObjectKeyPrefix.IsSet() { + return true + } + + return false +} + +// SetObjectKeyPrefix gets a reference to the given NullableString and assigns it to the ObjectKeyPrefix field. +func (o *S3EndpointRequest) SetObjectKeyPrefix(v string) { + o.ObjectKeyPrefix.Set(&v) +} +// SetObjectKeyPrefixNil sets the value for ObjectKeyPrefix to be an explicit nil +func (o *S3EndpointRequest) SetObjectKeyPrefixNil() { + o.ObjectKeyPrefix.Set(nil) +} + +// UnsetObjectKeyPrefix ensures that no value is present for ObjectKeyPrefix, not even an explicit nil +func (o *S3EndpointRequest) UnsetObjectKeyPrefix() { + o.ObjectKeyPrefix.Unset() +} + +// GetBucketName returns the BucketName field value +func (o *S3EndpointRequest) GetBucketName() string { + if o == nil { + var ret string + return ret + } + + return o.BucketName +} + +// GetBucketNameOk returns a tuple with the BucketName field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetBucketNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BucketName, true +} + +// SetBucketName sets field value +func (o *S3EndpointRequest) SetBucketName(v string) { + o.BucketName = v +} + +// GetContentType returns the ContentType field value +func (o *S3EndpointRequest) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *S3EndpointRequest) SetContentType(v string) { + o.ContentType = v +} + +// GetHostUrl returns the HostUrl field value +func (o *S3EndpointRequest) GetHostUrl() string { + if o == nil { + var ret string + return ret + } + + return o.HostUrl +} + +// GetHostUrlOk returns a tuple with the HostUrl field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetHostUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.HostUrl, true +} + +// SetHostUrl sets field value +func (o *S3EndpointRequest) SetHostUrl(v string) { + o.HostUrl = v +} + +// GetType returns the Type field value +func (o *S3EndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *S3EndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *S3EndpointRequest) SetType(v string) { + o.Type = v +} + +func (o S3EndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o S3EndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_key"] = o.AccessKey + toSerialize["secret_key"] = o.SecretKey + toSerialize["region"] = o.Region + if o.ObjectKeyPrefix.IsSet() { + toSerialize["object_key_prefix"] = o.ObjectKeyPrefix.Get() + } + toSerialize["bucket_name"] = o.BucketName + toSerialize["content_type"] = o.ContentType + toSerialize["host_url"] = o.HostUrl + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *S3EndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_key", + "secret_key", + "region", + "bucket_name", + "content_type", + "host_url", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varS3EndpointRequest := _S3EndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varS3EndpointRequest) + + if err != nil { + return err + } + + *o = S3EndpointRequest(varS3EndpointRequest) + + return err +} + +type NullableS3EndpointRequest struct { + value *S3EndpointRequest + isSet bool +} + +func (v NullableS3EndpointRequest) Get() *S3EndpointRequest { + return v.value +} + +func (v *NullableS3EndpointRequest) Set(val *S3EndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableS3EndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableS3EndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableS3EndpointRequest(val *S3EndpointRequest) *NullableS3EndpointRequest { + return &NullableS3EndpointRequest{value: val, isSet: true} +} + +func (v NullableS3EndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableS3EndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_resource.go b/azion-api/model_service_resource.go new file mode 100644 index 0000000..035e46f --- /dev/null +++ b/azion-api/model_service_resource.go @@ -0,0 +1,467 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ServiceResource type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceResource{} + +// ServiceResource struct for ServiceResource +type ServiceResource struct { + Id int64 `json:"id"` + Name string `json:"name"` + ContentHash string `json:"content_hash"` + ContentType string `json:"content_type"` + FileGroup string `json:"file_group"` + FileMode string `json:"file_mode"` + FileOwner string `json:"file_owner"` + IsTemplate bool `json:"is_template"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` + RefCount int64 `json:"ref_count"` +} + +type _ServiceResource ServiceResource + +// NewServiceResource instantiates a new ServiceResource object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceResource(id int64, name string, contentHash string, contentType string, fileGroup string, fileMode string, fileOwner string, isTemplate bool, active bool, lastEditor string, lastModified string, refCount int64) *ServiceResource { + this := ServiceResource{} + this.Id = id + this.Name = name + this.ContentHash = contentHash + this.ContentType = contentType + this.FileGroup = fileGroup + this.FileMode = fileMode + this.FileOwner = fileOwner + this.IsTemplate = isTemplate + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.RefCount = refCount + return &this +} + +// NewServiceResourceWithDefaults instantiates a new ServiceResource object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceResourceWithDefaults() *ServiceResource { + this := ServiceResource{} + return &this +} + +// GetId returns the Id field value +func (o *ServiceResource) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceResource) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ServiceResource) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceResource) SetName(v string) { + o.Name = v +} + +// GetContentHash returns the ContentHash field value +func (o *ServiceResource) GetContentHash() string { + if o == nil { + var ret string + return ret + } + + return o.ContentHash +} + +// GetContentHashOk returns a tuple with the ContentHash field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetContentHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentHash, true +} + +// SetContentHash sets field value +func (o *ServiceResource) SetContentHash(v string) { + o.ContentHash = v +} + +// GetContentType returns the ContentType field value +func (o *ServiceResource) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *ServiceResource) SetContentType(v string) { + o.ContentType = v +} + +// GetFileGroup returns the FileGroup field value +func (o *ServiceResource) GetFileGroup() string { + if o == nil { + var ret string + return ret + } + + return o.FileGroup +} + +// GetFileGroupOk returns a tuple with the FileGroup field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetFileGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileGroup, true +} + +// SetFileGroup sets field value +func (o *ServiceResource) SetFileGroup(v string) { + o.FileGroup = v +} + +// GetFileMode returns the FileMode field value +func (o *ServiceResource) GetFileMode() string { + if o == nil { + var ret string + return ret + } + + return o.FileMode +} + +// GetFileModeOk returns a tuple with the FileMode field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetFileModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileMode, true +} + +// SetFileMode sets field value +func (o *ServiceResource) SetFileMode(v string) { + o.FileMode = v +} + +// GetFileOwner returns the FileOwner field value +func (o *ServiceResource) GetFileOwner() string { + if o == nil { + var ret string + return ret + } + + return o.FileOwner +} + +// GetFileOwnerOk returns a tuple with the FileOwner field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetFileOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileOwner, true +} + +// SetFileOwner sets field value +func (o *ServiceResource) SetFileOwner(v string) { + o.FileOwner = v +} + +// GetIsTemplate returns the IsTemplate field value +func (o *ServiceResource) GetIsTemplate() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsTemplate +} + +// GetIsTemplateOk returns a tuple with the IsTemplate field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetIsTemplateOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsTemplate, true +} + +// SetIsTemplate sets field value +func (o *ServiceResource) SetIsTemplate(v bool) { + o.IsTemplate = v +} + +// GetActive returns the Active field value +func (o *ServiceResource) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *ServiceResource) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ServiceResource) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ServiceResource) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ServiceResource) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ServiceResource) SetLastModified(v string) { + o.LastModified = v +} + +// GetRefCount returns the RefCount field value +func (o *ServiceResource) GetRefCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.RefCount +} + +// GetRefCountOk returns a tuple with the RefCount field value +// and a boolean to check if the value has been set. +func (o *ServiceResource) GetRefCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.RefCount, true +} + +// SetRefCount sets field value +func (o *ServiceResource) SetRefCount(v int64) { + o.RefCount = v +} + +func (o ServiceResource) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceResource) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["content_hash"] = o.ContentHash + toSerialize["content_type"] = o.ContentType + toSerialize["file_group"] = o.FileGroup + toSerialize["file_mode"] = o.FileMode + toSerialize["file_owner"] = o.FileOwner + toSerialize["is_template"] = o.IsTemplate + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["ref_count"] = o.RefCount + return toSerialize, nil +} + +func (o *ServiceResource) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "content_hash", + "content_type", + "file_group", + "file_mode", + "file_owner", + "is_template", + "active", + "last_editor", + "last_modified", + "ref_count", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceResource := _ServiceResource{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceResource) + + if err != nil { + return err + } + + *o = ServiceResource(varServiceResource) + + return err +} + +type NullableServiceResource struct { + value *ServiceResource + isSet bool +} + +func (v NullableServiceResource) Get() *ServiceResource { + return v.value +} + +func (v *NullableServiceResource) Set(val *ServiceResource) { + v.value = val + v.isSet = true +} + +func (v NullableServiceResource) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceResource) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceResource(val *ServiceResource) *NullableServiceResource { + return &NullableServiceResource{value: val, isSet: true} +} + +func (v NullableServiceResource) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceResource) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_resource_id.go b/azion-api/model_service_resource_id.go new file mode 100644 index 0000000..91bb25d --- /dev/null +++ b/azion-api/model_service_resource_id.go @@ -0,0 +1,519 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ServiceResourceId type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceResourceId{} + +// ServiceResourceId struct for ServiceResourceId +type ServiceResourceId struct { + Id int64 `json:"id"` + Name string `json:"name"` + ContentHash string `json:"content_hash"` + ContentType *string `json:"content_type,omitempty"` + Trigger *ServiceResourceIdTrigger `json:"trigger,omitempty"` + Content *string `json:"content,omitempty"` + IsTemplate bool `json:"is_template"` + Active bool `json:"active"` + FileGroup string `json:"file_group"` + FileMode string `json:"file_mode"` + FileOwner string `json:"file_owner"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` +} + +type _ServiceResourceId ServiceResourceId + +// NewServiceResourceId instantiates a new ServiceResourceId object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceResourceId(id int64, name string, contentHash string, isTemplate bool, active bool, fileGroup string, fileMode string, fileOwner string, lastEditor string, lastModified string) *ServiceResourceId { + this := ServiceResourceId{} + this.Id = id + this.Name = name + this.ContentHash = contentHash + this.IsTemplate = isTemplate + this.Active = active + this.FileGroup = fileGroup + this.FileMode = fileMode + this.FileOwner = fileOwner + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewServiceResourceIdWithDefaults instantiates a new ServiceResourceId object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceResourceIdWithDefaults() *ServiceResourceId { + this := ServiceResourceId{} + return &this +} + +// GetId returns the Id field value +func (o *ServiceResourceId) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceResourceId) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ServiceResourceId) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceResourceId) SetName(v string) { + o.Name = v +} + +// GetContentHash returns the ContentHash field value +func (o *ServiceResourceId) GetContentHash() string { + if o == nil { + var ret string + return ret + } + + return o.ContentHash +} + +// GetContentHashOk returns a tuple with the ContentHash field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetContentHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentHash, true +} + +// SetContentHash sets field value +func (o *ServiceResourceId) SetContentHash(v string) { + o.ContentHash = v +} + +// GetContentType returns the ContentType field value if set, zero value otherwise. +func (o *ServiceResourceId) GetContentType() string { + if o == nil || IsNil(o.ContentType) { + var ret string + return ret + } + return *o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetContentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ContentType) { + return nil, false + } + return o.ContentType, true +} + +// HasContentType returns a boolean if a field has been set. +func (o *ServiceResourceId) HasContentType() bool { + if o != nil && !IsNil(o.ContentType) { + return true + } + + return false +} + +// SetContentType gets a reference to the given string and assigns it to the ContentType field. +func (o *ServiceResourceId) SetContentType(v string) { + o.ContentType = &v +} + +// GetTrigger returns the Trigger field value if set, zero value otherwise. +func (o *ServiceResourceId) GetTrigger() ServiceResourceIdTrigger { + if o == nil || IsNil(o.Trigger) { + var ret ServiceResourceIdTrigger + return ret + } + return *o.Trigger +} + +// GetTriggerOk returns a tuple with the Trigger field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetTriggerOk() (*ServiceResourceIdTrigger, bool) { + if o == nil || IsNil(o.Trigger) { + return nil, false + } + return o.Trigger, true +} + +// HasTrigger returns a boolean if a field has been set. +func (o *ServiceResourceId) HasTrigger() bool { + if o != nil && !IsNil(o.Trigger) { + return true + } + + return false +} + +// SetTrigger gets a reference to the given ServiceResourceIdTrigger and assigns it to the Trigger field. +func (o *ServiceResourceId) SetTrigger(v ServiceResourceIdTrigger) { + o.Trigger = &v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *ServiceResourceId) GetContent() string { + if o == nil || IsNil(o.Content) { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetContentOk() (*string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *ServiceResourceId) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *ServiceResourceId) SetContent(v string) { + o.Content = &v +} + +// GetIsTemplate returns the IsTemplate field value +func (o *ServiceResourceId) GetIsTemplate() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsTemplate +} + +// GetIsTemplateOk returns a tuple with the IsTemplate field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetIsTemplateOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.IsTemplate, true +} + +// SetIsTemplate sets field value +func (o *ServiceResourceId) SetIsTemplate(v bool) { + o.IsTemplate = v +} + +// GetActive returns the Active field value +func (o *ServiceResourceId) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *ServiceResourceId) SetActive(v bool) { + o.Active = v +} + +// GetFileGroup returns the FileGroup field value +func (o *ServiceResourceId) GetFileGroup() string { + if o == nil { + var ret string + return ret + } + + return o.FileGroup +} + +// GetFileGroupOk returns a tuple with the FileGroup field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetFileGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileGroup, true +} + +// SetFileGroup sets field value +func (o *ServiceResourceId) SetFileGroup(v string) { + o.FileGroup = v +} + +// GetFileMode returns the FileMode field value +func (o *ServiceResourceId) GetFileMode() string { + if o == nil { + var ret string + return ret + } + + return o.FileMode +} + +// GetFileModeOk returns a tuple with the FileMode field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetFileModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileMode, true +} + +// SetFileMode sets field value +func (o *ServiceResourceId) SetFileMode(v string) { + o.FileMode = v +} + +// GetFileOwner returns the FileOwner field value +func (o *ServiceResourceId) GetFileOwner() string { + if o == nil { + var ret string + return ret + } + + return o.FileOwner +} + +// GetFileOwnerOk returns a tuple with the FileOwner field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetFileOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileOwner, true +} + +// SetFileOwner sets field value +func (o *ServiceResourceId) SetFileOwner(v string) { + o.FileOwner = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ServiceResourceId) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ServiceResourceId) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ServiceResourceId) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceId) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ServiceResourceId) SetLastModified(v string) { + o.LastModified = v +} + +func (o ServiceResourceId) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceResourceId) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["content_hash"] = o.ContentHash + if !IsNil(o.ContentType) { + toSerialize["content_type"] = o.ContentType + } + if !IsNil(o.Trigger) { + toSerialize["trigger"] = o.Trigger + } + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + toSerialize["is_template"] = o.IsTemplate + toSerialize["active"] = o.Active + toSerialize["file_group"] = o.FileGroup + toSerialize["file_mode"] = o.FileMode + toSerialize["file_owner"] = o.FileOwner + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *ServiceResourceId) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "content_hash", + "is_template", + "active", + "file_group", + "file_mode", + "file_owner", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceResourceId := _ServiceResourceId{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceResourceId) + + if err != nil { + return err + } + + *o = ServiceResourceId(varServiceResourceId) + + return err +} + +type NullableServiceResourceId struct { + value *ServiceResourceId + isSet bool +} + +func (v NullableServiceResourceId) Get() *ServiceResourceId { + return v.value +} + +func (v *NullableServiceResourceId) Set(val *ServiceResourceId) { + v.value = val + v.isSet = true +} + +func (v NullableServiceResourceId) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceResourceId) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceResourceId(val *ServiceResourceId) *NullableServiceResourceId { + return &NullableServiceResourceId{value: val, isSet: true} +} + +func (v NullableServiceResourceId) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceResourceId) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_resource_id_request.go b/azion-api/model_service_resource_id_request.go new file mode 100644 index 0000000..cbd821c --- /dev/null +++ b/azion-api/model_service_resource_id_request.go @@ -0,0 +1,351 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ServiceResourceIdRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceResourceIdRequest{} + +// ServiceResourceIdRequest struct for ServiceResourceIdRequest +type ServiceResourceIdRequest struct { + Name string `json:"name"` + ContentType *string `json:"content_type,omitempty"` + Trigger *ServiceResourceIdTrigger `json:"trigger,omitempty"` + Content *string `json:"content,omitempty"` + FileGroup string `json:"file_group"` + FileMode string `json:"file_mode"` + FileOwner string `json:"file_owner"` +} + +type _ServiceResourceIdRequest ServiceResourceIdRequest + +// NewServiceResourceIdRequest instantiates a new ServiceResourceIdRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceResourceIdRequest(name string, fileGroup string, fileMode string, fileOwner string) *ServiceResourceIdRequest { + this := ServiceResourceIdRequest{} + this.Name = name + this.FileGroup = fileGroup + this.FileMode = fileMode + this.FileOwner = fileOwner + return &this +} + +// NewServiceResourceIdRequestWithDefaults instantiates a new ServiceResourceIdRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceResourceIdRequestWithDefaults() *ServiceResourceIdRequest { + this := ServiceResourceIdRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ServiceResourceIdRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceResourceIdRequest) SetName(v string) { + o.Name = v +} + +// GetContentType returns the ContentType field value if set, zero value otherwise. +func (o *ServiceResourceIdRequest) GetContentType() string { + if o == nil || IsNil(o.ContentType) { + var ret string + return ret + } + return *o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetContentTypeOk() (*string, bool) { + if o == nil || IsNil(o.ContentType) { + return nil, false + } + return o.ContentType, true +} + +// HasContentType returns a boolean if a field has been set. +func (o *ServiceResourceIdRequest) HasContentType() bool { + if o != nil && !IsNil(o.ContentType) { + return true + } + + return false +} + +// SetContentType gets a reference to the given string and assigns it to the ContentType field. +func (o *ServiceResourceIdRequest) SetContentType(v string) { + o.ContentType = &v +} + +// GetTrigger returns the Trigger field value if set, zero value otherwise. +func (o *ServiceResourceIdRequest) GetTrigger() ServiceResourceIdTrigger { + if o == nil || IsNil(o.Trigger) { + var ret ServiceResourceIdTrigger + return ret + } + return *o.Trigger +} + +// GetTriggerOk returns a tuple with the Trigger field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetTriggerOk() (*ServiceResourceIdTrigger, bool) { + if o == nil || IsNil(o.Trigger) { + return nil, false + } + return o.Trigger, true +} + +// HasTrigger returns a boolean if a field has been set. +func (o *ServiceResourceIdRequest) HasTrigger() bool { + if o != nil && !IsNil(o.Trigger) { + return true + } + + return false +} + +// SetTrigger gets a reference to the given ServiceResourceIdTrigger and assigns it to the Trigger field. +func (o *ServiceResourceIdRequest) SetTrigger(v ServiceResourceIdTrigger) { + o.Trigger = &v +} + +// GetContent returns the Content field value if set, zero value otherwise. +func (o *ServiceResourceIdRequest) GetContent() string { + if o == nil || IsNil(o.Content) { + var ret string + return ret + } + return *o.Content +} + +// GetContentOk returns a tuple with the Content field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetContentOk() (*string, bool) { + if o == nil || IsNil(o.Content) { + return nil, false + } + return o.Content, true +} + +// HasContent returns a boolean if a field has been set. +func (o *ServiceResourceIdRequest) HasContent() bool { + if o != nil && !IsNil(o.Content) { + return true + } + + return false +} + +// SetContent gets a reference to the given string and assigns it to the Content field. +func (o *ServiceResourceIdRequest) SetContent(v string) { + o.Content = &v +} + +// GetFileGroup returns the FileGroup field value +func (o *ServiceResourceIdRequest) GetFileGroup() string { + if o == nil { + var ret string + return ret + } + + return o.FileGroup +} + +// GetFileGroupOk returns a tuple with the FileGroup field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetFileGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileGroup, true +} + +// SetFileGroup sets field value +func (o *ServiceResourceIdRequest) SetFileGroup(v string) { + o.FileGroup = v +} + +// GetFileMode returns the FileMode field value +func (o *ServiceResourceIdRequest) GetFileMode() string { + if o == nil { + var ret string + return ret + } + + return o.FileMode +} + +// GetFileModeOk returns a tuple with the FileMode field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetFileModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileMode, true +} + +// SetFileMode sets field value +func (o *ServiceResourceIdRequest) SetFileMode(v string) { + o.FileMode = v +} + +// GetFileOwner returns the FileOwner field value +func (o *ServiceResourceIdRequest) GetFileOwner() string { + if o == nil { + var ret string + return ret + } + + return o.FileOwner +} + +// GetFileOwnerOk returns a tuple with the FileOwner field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceIdRequest) GetFileOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileOwner, true +} + +// SetFileOwner sets field value +func (o *ServiceResourceIdRequest) SetFileOwner(v string) { + o.FileOwner = v +} + +func (o ServiceResourceIdRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceResourceIdRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.ContentType) { + toSerialize["content_type"] = o.ContentType + } + if !IsNil(o.Trigger) { + toSerialize["trigger"] = o.Trigger + } + if !IsNil(o.Content) { + toSerialize["content"] = o.Content + } + toSerialize["file_group"] = o.FileGroup + toSerialize["file_mode"] = o.FileMode + toSerialize["file_owner"] = o.FileOwner + return toSerialize, nil +} + +func (o *ServiceResourceIdRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "file_group", + "file_mode", + "file_owner", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceResourceIdRequest := _ServiceResourceIdRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceResourceIdRequest) + + if err != nil { + return err + } + + *o = ServiceResourceIdRequest(varServiceResourceIdRequest) + + return err +} + +type NullableServiceResourceIdRequest struct { + value *ServiceResourceIdRequest + isSet bool +} + +func (v NullableServiceResourceIdRequest) Get() *ServiceResourceIdRequest { + return v.value +} + +func (v *NullableServiceResourceIdRequest) Set(val *ServiceResourceIdRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServiceResourceIdRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceResourceIdRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceResourceIdRequest(val *ServiceResourceIdRequest) *NullableServiceResourceIdRequest { + return &NullableServiceResourceIdRequest{value: val, isSet: true} +} + +func (v NullableServiceResourceIdRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceResourceIdRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_resource_id_trigger.go b/azion-api/model_service_resource_id_trigger.go new file mode 100644 index 0000000..2bb8b1e --- /dev/null +++ b/azion-api/model_service_resource_id_trigger.go @@ -0,0 +1,134 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// ServiceResourceIdTrigger - struct for ServiceResourceIdTrigger +type ServiceResourceIdTrigger struct { + String *string +} + +// stringAsServiceResourceIdTrigger is a convenience function that returns string wrapped in ServiceResourceIdTrigger +func StringAsServiceResourceIdTrigger(v *string) ServiceResourceIdTrigger { + return ServiceResourceIdTrigger{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *ServiceResourceIdTrigger) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(ServiceResourceIdTrigger)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(ServiceResourceIdTrigger)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src ServiceResourceIdTrigger) MarshalJSON() ([]byte, error) { + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *ServiceResourceIdTrigger) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj ServiceResourceIdTrigger) GetActualInstanceValue() (interface{}) { + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableServiceResourceIdTrigger struct { + value *ServiceResourceIdTrigger + isSet bool +} + +func (v NullableServiceResourceIdTrigger) Get() *ServiceResourceIdTrigger { + return v.value +} + +func (v *NullableServiceResourceIdTrigger) Set(val *ServiceResourceIdTrigger) { + v.value = val + v.isSet = true +} + +func (v NullableServiceResourceIdTrigger) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceResourceIdTrigger) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceResourceIdTrigger(val *ServiceResourceIdTrigger) *NullableServiceResourceIdTrigger { + return &NullableServiceResourceIdTrigger{value: val, isSet: true} +} + +func (v NullableServiceResourceIdTrigger) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceResourceIdTrigger) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_resource_request.go b/azion-api/model_service_resource_request.go new file mode 100644 index 0000000..911768d --- /dev/null +++ b/azion-api/model_service_resource_request.go @@ -0,0 +1,271 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ServiceResourceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceResourceRequest{} + +// ServiceResourceRequest struct for ServiceResourceRequest +type ServiceResourceRequest struct { + Name string `json:"name"` + ContentType string `json:"content_type"` + FileGroup string `json:"file_group"` + FileMode string `json:"file_mode"` + FileOwner string `json:"file_owner"` +} + +type _ServiceResourceRequest ServiceResourceRequest + +// NewServiceResourceRequest instantiates a new ServiceResourceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceResourceRequest(name string, contentType string, fileGroup string, fileMode string, fileOwner string) *ServiceResourceRequest { + this := ServiceResourceRequest{} + this.Name = name + this.ContentType = contentType + this.FileGroup = fileGroup + this.FileMode = fileMode + this.FileOwner = fileOwner + return &this +} + +// NewServiceResourceRequestWithDefaults instantiates a new ServiceResourceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceResourceRequestWithDefaults() *ServiceResourceRequest { + this := ServiceResourceRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ServiceResourceRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceResourceRequest) SetName(v string) { + o.Name = v +} + +// GetContentType returns the ContentType field value +func (o *ServiceResourceRequest) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceRequest) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *ServiceResourceRequest) SetContentType(v string) { + o.ContentType = v +} + +// GetFileGroup returns the FileGroup field value +func (o *ServiceResourceRequest) GetFileGroup() string { + if o == nil { + var ret string + return ret + } + + return o.FileGroup +} + +// GetFileGroupOk returns a tuple with the FileGroup field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceRequest) GetFileGroupOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileGroup, true +} + +// SetFileGroup sets field value +func (o *ServiceResourceRequest) SetFileGroup(v string) { + o.FileGroup = v +} + +// GetFileMode returns the FileMode field value +func (o *ServiceResourceRequest) GetFileMode() string { + if o == nil { + var ret string + return ret + } + + return o.FileMode +} + +// GetFileModeOk returns a tuple with the FileMode field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceRequest) GetFileModeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileMode, true +} + +// SetFileMode sets field value +func (o *ServiceResourceRequest) SetFileMode(v string) { + o.FileMode = v +} + +// GetFileOwner returns the FileOwner field value +func (o *ServiceResourceRequest) GetFileOwner() string { + if o == nil { + var ret string + return ret + } + + return o.FileOwner +} + +// GetFileOwnerOk returns a tuple with the FileOwner field value +// and a boolean to check if the value has been set. +func (o *ServiceResourceRequest) GetFileOwnerOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FileOwner, true +} + +// SetFileOwner sets field value +func (o *ServiceResourceRequest) SetFileOwner(v string) { + o.FileOwner = v +} + +func (o ServiceResourceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceResourceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["content_type"] = o.ContentType + toSerialize["file_group"] = o.FileGroup + toSerialize["file_mode"] = o.FileMode + toSerialize["file_owner"] = o.FileOwner + return toSerialize, nil +} + +func (o *ServiceResourceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "content_type", + "file_group", + "file_mode", + "file_owner", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceResourceRequest := _ServiceResourceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceResourceRequest) + + if err != nil { + return err + } + + *o = ServiceResourceRequest(varServiceResourceRequest) + + return err +} + +type NullableServiceResourceRequest struct { + value *ServiceResourceRequest + isSet bool +} + +func (v NullableServiceResourceRequest) Get() *ServiceResourceRequest { + return v.value +} + +func (v *NullableServiceResourceRequest) Set(val *ServiceResourceRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServiceResourceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceResourceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceResourceRequest(val *ServiceResourceRequest) *NullableServiceResourceRequest { + return &NullableServiceResourceRequest{value: val, isSet: true} +} + +func (v NullableServiceResourceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceResourceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_token.go b/azion-api/model_service_token.go new file mode 100644 index 0000000..0c1b9f1 --- /dev/null +++ b/azion-api/model_service_token.go @@ -0,0 +1,456 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ServiceToken type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceToken{} + +// ServiceToken struct for ServiceToken +type ServiceToken struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` + Description *string `json:"description,omitempty"` + Expires time.Time `json:"expires"` + LastUsed time.Time `json:"last_used"` +} + +type _ServiceToken ServiceToken + +// NewServiceToken instantiates a new ServiceToken object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceToken(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, expires time.Time, lastUsed time.Time) *ServiceToken { + this := ServiceToken{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + this.Expires = expires + this.LastUsed = lastUsed + return &this +} + +// NewServiceTokenWithDefaults instantiates a new ServiceToken object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceTokenWithDefaults() *ServiceToken { + this := ServiceToken{} + return &this +} + +// GetId returns the Id field value +func (o *ServiceToken) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceToken) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ServiceToken) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceToken) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *ServiceToken) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ServiceToken) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *ServiceToken) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ServiceToken) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ServiceToken) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ServiceToken) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ServiceToken) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ServiceToken) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ServiceToken) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ServiceToken) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ServiceToken) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *ServiceToken) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ServiceToken) SetAccountId(v int64) { + o.AccountId = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceToken) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceToken) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceToken) SetDescription(v string) { + o.Description = &v +} + +// GetExpires returns the Expires field value +func (o *ServiceToken) GetExpires() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Expires, true +} + +// SetExpires sets field value +func (o *ServiceToken) SetExpires(v time.Time) { + o.Expires = v +} + +// GetLastUsed returns the LastUsed field value +func (o *ServiceToken) GetLastUsed() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastUsed +} + +// GetLastUsedOk returns a tuple with the LastUsed field value +// and a boolean to check if the value has been set. +func (o *ServiceToken) GetLastUsedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastUsed, true +} + +// SetLastUsed sets field value +func (o *ServiceToken) SetLastUsed(v time.Time) { + o.LastUsed = v +} + +func (o ServiceToken) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceToken) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["expires"] = o.Expires + toSerialize["last_used"] = o.LastUsed + return toSerialize, nil +} + +func (o *ServiceToken) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + "expires", + "last_used", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceToken := _ServiceToken{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceToken) + + if err != nil { + return err + } + + *o = ServiceToken(varServiceToken) + + return err +} + +type NullableServiceToken struct { + value *ServiceToken + isSet bool +} + +func (v NullableServiceToken) Get() *ServiceToken { + return v.value +} + +func (v *NullableServiceToken) Set(val *ServiceToken) { + v.value = val + v.isSet = true +} + +func (v NullableServiceToken) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceToken(val *ServiceToken) *NullableServiceToken { + return &NullableServiceToken{value: val, isSet: true} +} + +func (v NullableServiceToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_token_create.go b/azion-api/model_service_token_create.go new file mode 100644 index 0000000..fc15b2d --- /dev/null +++ b/azion-api/model_service_token_create.go @@ -0,0 +1,484 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ServiceTokenCreate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceTokenCreate{} + +// ServiceTokenCreate struct for ServiceTokenCreate +type ServiceTokenCreate struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` + Description *string `json:"description,omitempty"` + Expires time.Time `json:"expires"` + LastUsed time.Time `json:"last_used"` + Token string `json:"token"` +} + +type _ServiceTokenCreate ServiceTokenCreate + +// NewServiceTokenCreate instantiates a new ServiceTokenCreate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceTokenCreate(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, expires time.Time, lastUsed time.Time, token string) *ServiceTokenCreate { + this := ServiceTokenCreate{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + this.Expires = expires + this.LastUsed = lastUsed + this.Token = token + return &this +} + +// NewServiceTokenCreateWithDefaults instantiates a new ServiceTokenCreate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceTokenCreateWithDefaults() *ServiceTokenCreate { + this := ServiceTokenCreate{} + return &this +} + +// GetId returns the Id field value +func (o *ServiceTokenCreate) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceTokenCreate) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ServiceTokenCreate) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceTokenCreate) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *ServiceTokenCreate) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ServiceTokenCreate) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *ServiceTokenCreate) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ServiceTokenCreate) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ServiceTokenCreate) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ServiceTokenCreate) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ServiceTokenCreate) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ServiceTokenCreate) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ServiceTokenCreate) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ServiceTokenCreate) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ServiceTokenCreate) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *ServiceTokenCreate) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ServiceTokenCreate) SetAccountId(v int64) { + o.AccountId = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceTokenCreate) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceTokenCreate) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceTokenCreate) SetDescription(v string) { + o.Description = &v +} + +// GetExpires returns the Expires field value +func (o *ServiceTokenCreate) GetExpires() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Expires, true +} + +// SetExpires sets field value +func (o *ServiceTokenCreate) SetExpires(v time.Time) { + o.Expires = v +} + +// GetLastUsed returns the LastUsed field value +func (o *ServiceTokenCreate) GetLastUsed() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastUsed +} + +// GetLastUsedOk returns a tuple with the LastUsed field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetLastUsedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastUsed, true +} + +// SetLastUsed sets field value +func (o *ServiceTokenCreate) SetLastUsed(v time.Time) { + o.LastUsed = v +} + +// GetToken returns the Token field value +func (o *ServiceTokenCreate) GetToken() string { + if o == nil { + var ret string + return ret + } + + return o.Token +} + +// GetTokenOk returns a tuple with the Token field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreate) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Token, true +} + +// SetToken sets field value +func (o *ServiceTokenCreate) SetToken(v string) { + o.Token = v +} + +func (o ServiceTokenCreate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceTokenCreate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["expires"] = o.Expires + toSerialize["last_used"] = o.LastUsed + toSerialize["token"] = o.Token + return toSerialize, nil +} + +func (o *ServiceTokenCreate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + "expires", + "last_used", + "token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceTokenCreate := _ServiceTokenCreate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceTokenCreate) + + if err != nil { + return err + } + + *o = ServiceTokenCreate(varServiceTokenCreate) + + return err +} + +type NullableServiceTokenCreate struct { + value *ServiceTokenCreate + isSet bool +} + +func (v NullableServiceTokenCreate) Get() *ServiceTokenCreate { + return v.value +} + +func (v *NullableServiceTokenCreate) Set(val *ServiceTokenCreate) { + v.value = val + v.isSet = true +} + +func (v NullableServiceTokenCreate) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceTokenCreate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceTokenCreate(val *ServiceTokenCreate) *NullableServiceTokenCreate { + return &NullableServiceTokenCreate{value: val, isSet: true} +} + +func (v NullableServiceTokenCreate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceTokenCreate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_token_create_request.go b/azion-api/model_service_token_create_request.go new file mode 100644 index 0000000..d0cfac6 --- /dev/null +++ b/azion-api/model_service_token_create_request.go @@ -0,0 +1,260 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ServiceTokenCreateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceTokenCreateRequest{} + +// ServiceTokenCreateRequest struct for ServiceTokenCreateRequest +type ServiceTokenCreateRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Description *string `json:"description,omitempty"` + Expires time.Time `json:"expires"` +} + +type _ServiceTokenCreateRequest ServiceTokenCreateRequest + +// NewServiceTokenCreateRequest instantiates a new ServiceTokenCreateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceTokenCreateRequest(name string, expires time.Time) *ServiceTokenCreateRequest { + this := ServiceTokenCreateRequest{} + this.Name = name + this.Expires = expires + return &this +} + +// NewServiceTokenCreateRequestWithDefaults instantiates a new ServiceTokenCreateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceTokenCreateRequestWithDefaults() *ServiceTokenCreateRequest { + this := ServiceTokenCreateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ServiceTokenCreateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceTokenCreateRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ServiceTokenCreateRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreateRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ServiceTokenCreateRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ServiceTokenCreateRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceTokenCreateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceTokenCreateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceTokenCreateRequest) SetDescription(v string) { + o.Description = &v +} + +// GetExpires returns the Expires field value +func (o *ServiceTokenCreateRequest) GetExpires() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenCreateRequest) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Expires, true +} + +// SetExpires sets field value +func (o *ServiceTokenCreateRequest) SetExpires(v time.Time) { + o.Expires = v +} + +func (o ServiceTokenCreateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceTokenCreateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["expires"] = o.Expires + return toSerialize, nil +} + +func (o *ServiceTokenCreateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "expires", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceTokenCreateRequest := _ServiceTokenCreateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceTokenCreateRequest) + + if err != nil { + return err + } + + *o = ServiceTokenCreateRequest(varServiceTokenCreateRequest) + + return err +} + +type NullableServiceTokenCreateRequest struct { + value *ServiceTokenCreateRequest + isSet bool +} + +func (v NullableServiceTokenCreateRequest) Get() *ServiceTokenCreateRequest { + return v.value +} + +func (v *NullableServiceTokenCreateRequest) Set(val *ServiceTokenCreateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServiceTokenCreateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceTokenCreateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceTokenCreateRequest(val *ServiceTokenCreateRequest) *NullableServiceTokenCreateRequest { + return &NullableServiceTokenCreateRequest{value: val, isSet: true} +} + +func (v NullableServiceTokenCreateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceTokenCreateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_token_renew.go b/azion-api/model_service_token_renew.go new file mode 100644 index 0000000..af0dd26 --- /dev/null +++ b/azion-api/model_service_token_renew.go @@ -0,0 +1,468 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ServiceTokenRenew type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceTokenRenew{} + +// ServiceTokenRenew struct for ServiceTokenRenew +type ServiceTokenRenew struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active bool `json:"active"` + AccountId int64 `json:"account_id"` + Description string `json:"description"` + Expires time.Time `json:"expires"` + LastUsed time.Time `json:"last_used"` + Token string `json:"token"` +} + +type _ServiceTokenRenew ServiceTokenRenew + +// NewServiceTokenRenew instantiates a new ServiceTokenRenew object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceTokenRenew(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, active bool, accountId int64, description string, expires time.Time, lastUsed time.Time, token string) *ServiceTokenRenew { + this := ServiceTokenRenew{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.Active = active + this.AccountId = accountId + this.Description = description + this.Expires = expires + this.LastUsed = lastUsed + this.Token = token + return &this +} + +// NewServiceTokenRenewWithDefaults instantiates a new ServiceTokenRenew object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceTokenRenewWithDefaults() *ServiceTokenRenew { + this := ServiceTokenRenew{} + return &this +} + +// GetId returns the Id field value +func (o *ServiceTokenRenew) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ServiceTokenRenew) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ServiceTokenRenew) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceTokenRenew) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *ServiceTokenRenew) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *ServiceTokenRenew) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *ServiceTokenRenew) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *ServiceTokenRenew) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *ServiceTokenRenew) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *ServiceTokenRenew) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *ServiceTokenRenew) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *ServiceTokenRenew) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value +func (o *ServiceTokenRenew) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *ServiceTokenRenew) SetActive(v bool) { + o.Active = v +} + +// GetAccountId returns the AccountId field value +func (o *ServiceTokenRenew) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *ServiceTokenRenew) SetAccountId(v int64) { + o.AccountId = v +} + +// GetDescription returns the Description field value +func (o *ServiceTokenRenew) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetDescriptionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Description, true +} + +// SetDescription sets field value +func (o *ServiceTokenRenew) SetDescription(v string) { + o.Description = v +} + +// GetExpires returns the Expires field value +func (o *ServiceTokenRenew) GetExpires() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Expires, true +} + +// SetExpires sets field value +func (o *ServiceTokenRenew) SetExpires(v time.Time) { + o.Expires = v +} + +// GetLastUsed returns the LastUsed field value +func (o *ServiceTokenRenew) GetLastUsed() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastUsed +} + +// GetLastUsedOk returns a tuple with the LastUsed field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetLastUsedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastUsed, true +} + +// SetLastUsed sets field value +func (o *ServiceTokenRenew) SetLastUsed(v time.Time) { + o.LastUsed = v +} + +// GetToken returns the Token field value +func (o *ServiceTokenRenew) GetToken() string { + if o == nil { + var ret string + return ret + } + + return o.Token +} + +// GetTokenOk returns a tuple with the Token field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenew) GetTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Token, true +} + +// SetToken sets field value +func (o *ServiceTokenRenew) SetToken(v string) { + o.Token = v +} + +func (o ServiceTokenRenew) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceTokenRenew) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["active"] = o.Active + toSerialize["account_id"] = o.AccountId + toSerialize["description"] = o.Description + toSerialize["expires"] = o.Expires + toSerialize["last_used"] = o.LastUsed + toSerialize["token"] = o.Token + return toSerialize, nil +} + +func (o *ServiceTokenRenew) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "active", + "account_id", + "description", + "expires", + "last_used", + "token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceTokenRenew := _ServiceTokenRenew{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceTokenRenew) + + if err != nil { + return err + } + + *o = ServiceTokenRenew(varServiceTokenRenew) + + return err +} + +type NullableServiceTokenRenew struct { + value *ServiceTokenRenew + isSet bool +} + +func (v NullableServiceTokenRenew) Get() *ServiceTokenRenew { + return v.value +} + +func (v *NullableServiceTokenRenew) Set(val *ServiceTokenRenew) { + v.value = val + v.isSet = true +} + +func (v NullableServiceTokenRenew) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceTokenRenew) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceTokenRenew(val *ServiceTokenRenew) *NullableServiceTokenRenew { + return &NullableServiceTokenRenew{value: val, isSet: true} +} + +func (v NullableServiceTokenRenew) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceTokenRenew) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_token_renew_request.go b/azion-api/model_service_token_renew_request.go new file mode 100644 index 0000000..b60e187 --- /dev/null +++ b/azion-api/model_service_token_renew_request.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ServiceTokenRenewRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceTokenRenewRequest{} + +// ServiceTokenRenewRequest struct for ServiceTokenRenewRequest +type ServiceTokenRenewRequest struct { + Expires time.Time `json:"expires"` +} + +type _ServiceTokenRenewRequest ServiceTokenRenewRequest + +// NewServiceTokenRenewRequest instantiates a new ServiceTokenRenewRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceTokenRenewRequest(expires time.Time) *ServiceTokenRenewRequest { + this := ServiceTokenRenewRequest{} + this.Expires = expires + return &this +} + +// NewServiceTokenRenewRequestWithDefaults instantiates a new ServiceTokenRenewRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceTokenRenewRequestWithDefaults() *ServiceTokenRenewRequest { + this := ServiceTokenRenewRequest{} + return &this +} + +// GetExpires returns the Expires field value +func (o *ServiceTokenRenewRequest) GetExpires() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Expires +} + +// GetExpiresOk returns a tuple with the Expires field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenRenewRequest) GetExpiresOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Expires, true +} + +// SetExpires sets field value +func (o *ServiceTokenRenewRequest) SetExpires(v time.Time) { + o.Expires = v +} + +func (o ServiceTokenRenewRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceTokenRenewRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["expires"] = o.Expires + return toSerialize, nil +} + +func (o *ServiceTokenRenewRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "expires", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceTokenRenewRequest := _ServiceTokenRenewRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceTokenRenewRequest) + + if err != nil { + return err + } + + *o = ServiceTokenRenewRequest(varServiceTokenRenewRequest) + + return err +} + +type NullableServiceTokenRenewRequest struct { + value *ServiceTokenRenewRequest + isSet bool +} + +func (v NullableServiceTokenRenewRequest) Get() *ServiceTokenRenewRequest { + return v.value +} + +func (v *NullableServiceTokenRenewRequest) Set(val *ServiceTokenRenewRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServiceTokenRenewRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceTokenRenewRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceTokenRenewRequest(val *ServiceTokenRenewRequest) *NullableServiceTokenRenewRequest { + return &NullableServiceTokenRenewRequest{value: val, isSet: true} +} + +func (v NullableServiceTokenRenewRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceTokenRenewRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_service_token_update_request.go b/azion-api/model_service_token_update_request.go new file mode 100644 index 0000000..d09e689 --- /dev/null +++ b/azion-api/model_service_token_update_request.go @@ -0,0 +1,231 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ServiceTokenUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServiceTokenUpdateRequest{} + +// ServiceTokenUpdateRequest struct for ServiceTokenUpdateRequest +type ServiceTokenUpdateRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + Description *string `json:"description,omitempty"` +} + +type _ServiceTokenUpdateRequest ServiceTokenUpdateRequest + +// NewServiceTokenUpdateRequest instantiates a new ServiceTokenUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServiceTokenUpdateRequest(name string) *ServiceTokenUpdateRequest { + this := ServiceTokenUpdateRequest{} + this.Name = name + return &this +} + +// NewServiceTokenUpdateRequestWithDefaults instantiates a new ServiceTokenUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServiceTokenUpdateRequestWithDefaults() *ServiceTokenUpdateRequest { + this := ServiceTokenUpdateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ServiceTokenUpdateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ServiceTokenUpdateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ServiceTokenUpdateRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ServiceTokenUpdateRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceTokenUpdateRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ServiceTokenUpdateRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ServiceTokenUpdateRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ServiceTokenUpdateRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServiceTokenUpdateRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ServiceTokenUpdateRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ServiceTokenUpdateRequest) SetDescription(v string) { + o.Description = &v +} + +func (o ServiceTokenUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServiceTokenUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + return toSerialize, nil +} + +func (o *ServiceTokenUpdateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServiceTokenUpdateRequest := _ServiceTokenUpdateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServiceTokenUpdateRequest) + + if err != nil { + return err + } + + *o = ServiceTokenUpdateRequest(varServiceTokenUpdateRequest) + + return err +} + +type NullableServiceTokenUpdateRequest struct { + value *ServiceTokenUpdateRequest + isSet bool +} + +func (v NullableServiceTokenUpdateRequest) Get() *ServiceTokenUpdateRequest { + return v.value +} + +func (v *NullableServiceTokenUpdateRequest) Set(val *ServiceTokenUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServiceTokenUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServiceTokenUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServiceTokenUpdateRequest(val *ServiceTokenUpdateRequest) *NullableServiceTokenUpdateRequest { + return &NullableServiceTokenUpdateRequest{value: val, isSet: true} +} + +func (v NullableServiceTokenUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServiceTokenUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_services.go b/azion-api/model_services.go new file mode 100644 index 0000000..748ac84 --- /dev/null +++ b/azion-api/model_services.go @@ -0,0 +1,415 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Services type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Services{} + +// Services struct for Services +type Services struct { + Id int64 `json:"id"` + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + MinVersion *string `json:"min_version,omitempty"` + Permissions *int64 `json:"permissions,omitempty"` + LastEditor string `json:"last_editor"` + LastModified string `json:"last_modified"` + RefCount int64 `json:"ref_count"` + ProductVersion string `json:"product_version"` +} + +type _Services Services + +// NewServices instantiates a new Services object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServices(id int64, lastEditor string, lastModified string, refCount int64, productVersion string) *Services { + this := Services{} + this.Id = id + this.LastEditor = lastEditor + this.LastModified = lastModified + this.RefCount = refCount + this.ProductVersion = productVersion + return &this +} + +// NewServicesWithDefaults instantiates a new Services object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServicesWithDefaults() *Services { + this := Services{} + return &this +} + +// GetId returns the Id field value +func (o *Services) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Services) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Services) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Services) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Services) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Services) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Services) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Services) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Services) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Services) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Services) SetActive(v bool) { + o.Active = &v +} + +// GetMinVersion returns the MinVersion field value if set, zero value otherwise. +func (o *Services) GetMinVersion() string { + if o == nil || IsNil(o.MinVersion) { + var ret string + return ret + } + return *o.MinVersion +} + +// GetMinVersionOk returns a tuple with the MinVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Services) GetMinVersionOk() (*string, bool) { + if o == nil || IsNil(o.MinVersion) { + return nil, false + } + return o.MinVersion, true +} + +// HasMinVersion returns a boolean if a field has been set. +func (o *Services) HasMinVersion() bool { + if o != nil && !IsNil(o.MinVersion) { + return true + } + + return false +} + +// SetMinVersion gets a reference to the given string and assigns it to the MinVersion field. +func (o *Services) SetMinVersion(v string) { + o.MinVersion = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *Services) GetPermissions() int64 { + if o == nil || IsNil(o.Permissions) { + var ret int64 + return ret + } + return *o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Services) GetPermissionsOk() (*int64, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *Services) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given int64 and assigns it to the Permissions field. +func (o *Services) SetPermissions(v int64) { + o.Permissions = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *Services) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Services) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Services) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Services) GetLastModified() string { + if o == nil { + var ret string + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Services) GetLastModifiedOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Services) SetLastModified(v string) { + o.LastModified = v +} + +// GetRefCount returns the RefCount field value +func (o *Services) GetRefCount() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.RefCount +} + +// GetRefCountOk returns a tuple with the RefCount field value +// and a boolean to check if the value has been set. +func (o *Services) GetRefCountOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.RefCount, true +} + +// SetRefCount sets field value +func (o *Services) SetRefCount(v int64) { + o.RefCount = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Services) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Services) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Services) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Services) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Services) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.MinVersion) { + toSerialize["min_version"] = o.MinVersion + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["ref_count"] = o.RefCount + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Services) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "last_editor", + "last_modified", + "ref_count", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varServices := _Services{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varServices) + + if err != nil { + return err + } + + *o = Services(varServices) + + return err +} + +type NullableServices struct { + value *Services + isSet bool +} + +func (v NullableServices) Get() *Services { + return v.value +} + +func (v *NullableServices) Set(val *Services) { + v.value = val + v.isSet = true +} + +func (v NullableServices) IsSet() bool { + return v.isSet +} + +func (v *NullableServices) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServices(val *Services) *NullableServices { + return &NullableServices{value: val, isSet: true} +} + +func (v NullableServices) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServices) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_services_request.go b/azion-api/model_services_request.go new file mode 100644 index 0000000..6a66e8b --- /dev/null +++ b/azion-api/model_services_request.go @@ -0,0 +1,235 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the ServicesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ServicesRequest{} + +// ServicesRequest struct for ServicesRequest +type ServicesRequest struct { + Name *string `json:"name,omitempty"` + Active *bool `json:"active,omitempty"` + MinVersion *string `json:"min_version,omitempty"` + Permissions *int64 `json:"permissions,omitempty"` +} + +// NewServicesRequest instantiates a new ServicesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewServicesRequest() *ServicesRequest { + this := ServicesRequest{} + return &this +} + +// NewServicesRequestWithDefaults instantiates a new ServicesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewServicesRequestWithDefaults() *ServicesRequest { + this := ServicesRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ServicesRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicesRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ServicesRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ServicesRequest) SetName(v string) { + o.Name = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ServicesRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicesRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ServicesRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ServicesRequest) SetActive(v bool) { + o.Active = &v +} + +// GetMinVersion returns the MinVersion field value if set, zero value otherwise. +func (o *ServicesRequest) GetMinVersion() string { + if o == nil || IsNil(o.MinVersion) { + var ret string + return ret + } + return *o.MinVersion +} + +// GetMinVersionOk returns a tuple with the MinVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicesRequest) GetMinVersionOk() (*string, bool) { + if o == nil || IsNil(o.MinVersion) { + return nil, false + } + return o.MinVersion, true +} + +// HasMinVersion returns a boolean if a field has been set. +func (o *ServicesRequest) HasMinVersion() bool { + if o != nil && !IsNil(o.MinVersion) { + return true + } + + return false +} + +// SetMinVersion gets a reference to the given string and assigns it to the MinVersion field. +func (o *ServicesRequest) SetMinVersion(v string) { + o.MinVersion = &v +} + +// GetPermissions returns the Permissions field value if set, zero value otherwise. +func (o *ServicesRequest) GetPermissions() int64 { + if o == nil || IsNil(o.Permissions) { + var ret int64 + return ret + } + return *o.Permissions +} + +// GetPermissionsOk returns a tuple with the Permissions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ServicesRequest) GetPermissionsOk() (*int64, bool) { + if o == nil || IsNil(o.Permissions) { + return nil, false + } + return o.Permissions, true +} + +// HasPermissions returns a boolean if a field has been set. +func (o *ServicesRequest) HasPermissions() bool { + if o != nil && !IsNil(o.Permissions) { + return true + } + + return false +} + +// SetPermissions gets a reference to the given int64 and assigns it to the Permissions field. +func (o *ServicesRequest) SetPermissions(v int64) { + o.Permissions = &v +} + +func (o ServicesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ServicesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.MinVersion) { + toSerialize["min_version"] = o.MinVersion + } + if !IsNil(o.Permissions) { + toSerialize["permissions"] = o.Permissions + } + return toSerialize, nil +} + +type NullableServicesRequest struct { + value *ServicesRequest + isSet bool +} + +func (v NullableServicesRequest) Get() *ServicesRequest { + return v.value +} + +func (v *NullableServicesRequest) Set(val *ServicesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableServicesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableServicesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableServicesRequest(val *ServicesRequest) *NullableServicesRequest { + return &NullableServicesRequest{value: val, isSet: true} +} + +func (v NullableServicesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableServicesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_session_timeout_policy.go b/azion-api/model_session_timeout_policy.go new file mode 100644 index 0000000..5be5987 --- /dev/null +++ b/azion-api/model_session_timeout_policy.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SessionTimeoutPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionTimeoutPolicy{} + +// SessionTimeoutPolicy struct for SessionTimeoutPolicy +type SessionTimeoutPolicy struct { + MaxIdleTime int64 `json:"max_idle_time"` + MaxSessionTime int64 `json:"max_session_time"` +} + +type _SessionTimeoutPolicy SessionTimeoutPolicy + +// NewSessionTimeoutPolicy instantiates a new SessionTimeoutPolicy object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSessionTimeoutPolicy(maxIdleTime int64, maxSessionTime int64) *SessionTimeoutPolicy { + this := SessionTimeoutPolicy{} + this.MaxIdleTime = maxIdleTime + this.MaxSessionTime = maxSessionTime + return &this +} + +// NewSessionTimeoutPolicyWithDefaults instantiates a new SessionTimeoutPolicy object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSessionTimeoutPolicyWithDefaults() *SessionTimeoutPolicy { + this := SessionTimeoutPolicy{} + return &this +} + +// GetMaxIdleTime returns the MaxIdleTime field value +func (o *SessionTimeoutPolicy) GetMaxIdleTime() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MaxIdleTime +} + +// GetMaxIdleTimeOk returns a tuple with the MaxIdleTime field value +// and a boolean to check if the value has been set. +func (o *SessionTimeoutPolicy) GetMaxIdleTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MaxIdleTime, true +} + +// SetMaxIdleTime sets field value +func (o *SessionTimeoutPolicy) SetMaxIdleTime(v int64) { + o.MaxIdleTime = v +} + +// GetMaxSessionTime returns the MaxSessionTime field value +func (o *SessionTimeoutPolicy) GetMaxSessionTime() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MaxSessionTime +} + +// GetMaxSessionTimeOk returns a tuple with the MaxSessionTime field value +// and a boolean to check if the value has been set. +func (o *SessionTimeoutPolicy) GetMaxSessionTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MaxSessionTime, true +} + +// SetMaxSessionTime sets field value +func (o *SessionTimeoutPolicy) SetMaxSessionTime(v int64) { + o.MaxSessionTime = v +} + +func (o SessionTimeoutPolicy) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionTimeoutPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["max_idle_time"] = o.MaxIdleTime + toSerialize["max_session_time"] = o.MaxSessionTime + return toSerialize, nil +} + +func (o *SessionTimeoutPolicy) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "max_idle_time", + "max_session_time", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSessionTimeoutPolicy := _SessionTimeoutPolicy{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSessionTimeoutPolicy) + + if err != nil { + return err + } + + *o = SessionTimeoutPolicy(varSessionTimeoutPolicy) + + return err +} + +type NullableSessionTimeoutPolicy struct { + value *SessionTimeoutPolicy + isSet bool +} + +func (v NullableSessionTimeoutPolicy) Get() *SessionTimeoutPolicy { + return v.value +} + +func (v *NullableSessionTimeoutPolicy) Set(val *SessionTimeoutPolicy) { + v.value = val + v.isSet = true +} + +func (v NullableSessionTimeoutPolicy) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionTimeoutPolicy) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionTimeoutPolicy(val *SessionTimeoutPolicy) *NullableSessionTimeoutPolicy { + return &NullableSessionTimeoutPolicy{value: val, isSet: true} +} + +func (v NullableSessionTimeoutPolicy) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionTimeoutPolicy) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_session_timeout_policy_request.go b/azion-api/model_session_timeout_policy_request.go new file mode 100644 index 0000000..86da8cc --- /dev/null +++ b/azion-api/model_session_timeout_policy_request.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SessionTimeoutPolicyRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionTimeoutPolicyRequest{} + +// SessionTimeoutPolicyRequest struct for SessionTimeoutPolicyRequest +type SessionTimeoutPolicyRequest struct { + MaxIdleTime int64 `json:"max_idle_time"` + MaxSessionTime int64 `json:"max_session_time"` +} + +type _SessionTimeoutPolicyRequest SessionTimeoutPolicyRequest + +// NewSessionTimeoutPolicyRequest instantiates a new SessionTimeoutPolicyRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSessionTimeoutPolicyRequest(maxIdleTime int64, maxSessionTime int64) *SessionTimeoutPolicyRequest { + this := SessionTimeoutPolicyRequest{} + this.MaxIdleTime = maxIdleTime + this.MaxSessionTime = maxSessionTime + return &this +} + +// NewSessionTimeoutPolicyRequestWithDefaults instantiates a new SessionTimeoutPolicyRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSessionTimeoutPolicyRequestWithDefaults() *SessionTimeoutPolicyRequest { + this := SessionTimeoutPolicyRequest{} + return &this +} + +// GetMaxIdleTime returns the MaxIdleTime field value +func (o *SessionTimeoutPolicyRequest) GetMaxIdleTime() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MaxIdleTime +} + +// GetMaxIdleTimeOk returns a tuple with the MaxIdleTime field value +// and a boolean to check if the value has been set. +func (o *SessionTimeoutPolicyRequest) GetMaxIdleTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MaxIdleTime, true +} + +// SetMaxIdleTime sets field value +func (o *SessionTimeoutPolicyRequest) SetMaxIdleTime(v int64) { + o.MaxIdleTime = v +} + +// GetMaxSessionTime returns the MaxSessionTime field value +func (o *SessionTimeoutPolicyRequest) GetMaxSessionTime() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.MaxSessionTime +} + +// GetMaxSessionTimeOk returns a tuple with the MaxSessionTime field value +// and a boolean to check if the value has been set. +func (o *SessionTimeoutPolicyRequest) GetMaxSessionTimeOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.MaxSessionTime, true +} + +// SetMaxSessionTime sets field value +func (o *SessionTimeoutPolicyRequest) SetMaxSessionTime(v int64) { + o.MaxSessionTime = v +} + +func (o SessionTimeoutPolicyRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionTimeoutPolicyRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["max_idle_time"] = o.MaxIdleTime + toSerialize["max_session_time"] = o.MaxSessionTime + return toSerialize, nil +} + +func (o *SessionTimeoutPolicyRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "max_idle_time", + "max_session_time", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSessionTimeoutPolicyRequest := _SessionTimeoutPolicyRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSessionTimeoutPolicyRequest) + + if err != nil { + return err + } + + *o = SessionTimeoutPolicyRequest(varSessionTimeoutPolicyRequest) + + return err +} + +type NullableSessionTimeoutPolicyRequest struct { + value *SessionTimeoutPolicyRequest + isSet bool +} + +func (v NullableSessionTimeoutPolicyRequest) Get() *SessionTimeoutPolicyRequest { + return v.value +} + +func (v *NullableSessionTimeoutPolicyRequest) Set(val *SessionTimeoutPolicyRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSessionTimeoutPolicyRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionTimeoutPolicyRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionTimeoutPolicyRequest(val *SessionTimeoutPolicyRequest) *NullableSessionTimeoutPolicyRequest { + return &NullableSessionTimeoutPolicyRequest{value: val, isSet: true} +} + +func (v NullableSessionTimeoutPolicyRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionTimeoutPolicyRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_session_timeout_policy_response.go b/azion-api/model_session_timeout_policy_response.go new file mode 100644 index 0000000..ce73523 --- /dev/null +++ b/azion-api/model_session_timeout_policy_response.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SessionTimeoutPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SessionTimeoutPolicyResponse{} + +// SessionTimeoutPolicyResponse struct for SessionTimeoutPolicyResponse +type SessionTimeoutPolicyResponse struct { + Data SessionTimeoutPolicy `json:"data"` +} + +type _SessionTimeoutPolicyResponse SessionTimeoutPolicyResponse + +// NewSessionTimeoutPolicyResponse instantiates a new SessionTimeoutPolicyResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSessionTimeoutPolicyResponse(data SessionTimeoutPolicy) *SessionTimeoutPolicyResponse { + this := SessionTimeoutPolicyResponse{} + this.Data = data + return &this +} + +// NewSessionTimeoutPolicyResponseWithDefaults instantiates a new SessionTimeoutPolicyResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSessionTimeoutPolicyResponseWithDefaults() *SessionTimeoutPolicyResponse { + this := SessionTimeoutPolicyResponse{} + return &this +} + +// GetData returns the Data field value +func (o *SessionTimeoutPolicyResponse) GetData() SessionTimeoutPolicy { + if o == nil { + var ret SessionTimeoutPolicy + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SessionTimeoutPolicyResponse) GetDataOk() (*SessionTimeoutPolicy, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SessionTimeoutPolicyResponse) SetData(v SessionTimeoutPolicy) { + o.Data = v +} + +func (o SessionTimeoutPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SessionTimeoutPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SessionTimeoutPolicyResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSessionTimeoutPolicyResponse := _SessionTimeoutPolicyResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSessionTimeoutPolicyResponse) + + if err != nil { + return err + } + + *o = SessionTimeoutPolicyResponse(varSessionTimeoutPolicyResponse) + + return err +} + +type NullableSessionTimeoutPolicyResponse struct { + value *SessionTimeoutPolicyResponse + isSet bool +} + +func (v NullableSessionTimeoutPolicyResponse) Get() *SessionTimeoutPolicyResponse { + return v.value +} + +func (v *NullableSessionTimeoutPolicyResponse) Set(val *SessionTimeoutPolicyResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSessionTimeoutPolicyResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSessionTimeoutPolicyResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSessionTimeoutPolicyResponse(val *SessionTimeoutPolicyResponse) *NullableSessionTimeoutPolicyResponse { + return &NullableSessionTimeoutPolicyResponse{value: val, isSet: true} +} + +func (v NullableSessionTimeoutPolicyResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSessionTimeoutPolicyResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_splunk_endpoint.go b/azion-api/model_splunk_endpoint.go new file mode 100644 index 0000000..f022fca --- /dev/null +++ b/azion-api/model_splunk_endpoint.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SplunkEndpoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SplunkEndpoint{} + +// SplunkEndpoint struct for SplunkEndpoint +type SplunkEndpoint struct { + Url string `json:"url"` + ApiKey string `json:"api_key"` + // Type identifier for this endpoint (splunk) + Type string `json:"type"` +} + +type _SplunkEndpoint SplunkEndpoint + +// NewSplunkEndpoint instantiates a new SplunkEndpoint object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSplunkEndpoint(url string, apiKey string, type_ string) *SplunkEndpoint { + this := SplunkEndpoint{} + this.Url = url + this.ApiKey = apiKey + this.Type = type_ + return &this +} + +// NewSplunkEndpointWithDefaults instantiates a new SplunkEndpoint object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSplunkEndpointWithDefaults() *SplunkEndpoint { + this := SplunkEndpoint{} + return &this +} + +// GetUrl returns the Url field value +func (o *SplunkEndpoint) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *SplunkEndpoint) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *SplunkEndpoint) SetUrl(v string) { + o.Url = v +} + +// GetApiKey returns the ApiKey field value +func (o *SplunkEndpoint) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *SplunkEndpoint) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *SplunkEndpoint) SetApiKey(v string) { + o.ApiKey = v +} + +// GetType returns the Type field value +func (o *SplunkEndpoint) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SplunkEndpoint) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *SplunkEndpoint) SetType(v string) { + o.Type = v +} + +func (o SplunkEndpoint) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplunkEndpoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["api_key"] = o.ApiKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *SplunkEndpoint) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "api_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSplunkEndpoint := _SplunkEndpoint{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSplunkEndpoint) + + if err != nil { + return err + } + + *o = SplunkEndpoint(varSplunkEndpoint) + + return err +} + +type NullableSplunkEndpoint struct { + value *SplunkEndpoint + isSet bool +} + +func (v NullableSplunkEndpoint) Get() *SplunkEndpoint { + return v.value +} + +func (v *NullableSplunkEndpoint) Set(val *SplunkEndpoint) { + v.value = val + v.isSet = true +} + +func (v NullableSplunkEndpoint) IsSet() bool { + return v.isSet +} + +func (v *NullableSplunkEndpoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSplunkEndpoint(val *SplunkEndpoint) *NullableSplunkEndpoint { + return &NullableSplunkEndpoint{value: val, isSet: true} +} + +func (v NullableSplunkEndpoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSplunkEndpoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_splunk_endpoint_request.go b/azion-api/model_splunk_endpoint_request.go new file mode 100644 index 0000000..7871467 --- /dev/null +++ b/azion-api/model_splunk_endpoint_request.go @@ -0,0 +1,216 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SplunkEndpointRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SplunkEndpointRequest{} + +// SplunkEndpointRequest struct for SplunkEndpointRequest +type SplunkEndpointRequest struct { + Url string `json:"url"` + ApiKey string `json:"api_key"` + // Type identifier for this endpoint (splunk) + Type string `json:"type"` +} + +type _SplunkEndpointRequest SplunkEndpointRequest + +// NewSplunkEndpointRequest instantiates a new SplunkEndpointRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSplunkEndpointRequest(url string, apiKey string, type_ string) *SplunkEndpointRequest { + this := SplunkEndpointRequest{} + this.Url = url + this.ApiKey = apiKey + this.Type = type_ + return &this +} + +// NewSplunkEndpointRequestWithDefaults instantiates a new SplunkEndpointRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSplunkEndpointRequestWithDefaults() *SplunkEndpointRequest { + this := SplunkEndpointRequest{} + return &this +} + +// GetUrl returns the Url field value +func (o *SplunkEndpointRequest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *SplunkEndpointRequest) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *SplunkEndpointRequest) SetUrl(v string) { + o.Url = v +} + +// GetApiKey returns the ApiKey field value +func (o *SplunkEndpointRequest) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *SplunkEndpointRequest) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *SplunkEndpointRequest) SetApiKey(v string) { + o.ApiKey = v +} + +// GetType returns the Type field value +func (o *SplunkEndpointRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *SplunkEndpointRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *SplunkEndpointRequest) SetType(v string) { + o.Type = v +} + +func (o SplunkEndpointRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SplunkEndpointRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["api_key"] = o.ApiKey + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *SplunkEndpointRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "api_key", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSplunkEndpointRequest := _SplunkEndpointRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSplunkEndpointRequest) + + if err != nil { + return err + } + + *o = SplunkEndpointRequest(varSplunkEndpointRequest) + + return err +} + +type NullableSplunkEndpointRequest struct { + value *SplunkEndpointRequest + isSet bool +} + +func (v NullableSplunkEndpointRequest) Get() *SplunkEndpointRequest { + return v.value +} + +func (v *NullableSplunkEndpointRequest) Set(val *SplunkEndpointRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSplunkEndpointRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSplunkEndpointRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSplunkEndpointRequest(val *SplunkEndpointRequest) *NullableSplunkEndpointRequest { + return &NullableSplunkEndpointRequest{value: val, isSet: true} +} + +func (v NullableSplunkEndpointRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSplunkEndpointRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_sql_result.go b/azion-api/model_sql_result.go new file mode 100644 index 0000000..0ee7d6a --- /dev/null +++ b/azion-api/model_sql_result.go @@ -0,0 +1,189 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SQLResult type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SQLResult{} + +// SQLResult struct for SQLResult +type SQLResult struct { + // List of column names + Columns []interface{} `json:"columns"` + // List of result rows + Rows []interface{} `json:"rows"` +} + +type _SQLResult SQLResult + +// NewSQLResult instantiates a new SQLResult object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSQLResult(columns []interface{}, rows []interface{}) *SQLResult { + this := SQLResult{} + this.Columns = columns + this.Rows = rows + return &this +} + +// NewSQLResultWithDefaults instantiates a new SQLResult object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSQLResultWithDefaults() *SQLResult { + this := SQLResult{} + return &this +} + +// GetColumns returns the Columns field value +func (o *SQLResult) GetColumns() []interface{} { + if o == nil { + var ret []interface{} + return ret + } + + return o.Columns +} + +// GetColumnsOk returns a tuple with the Columns field value +// and a boolean to check if the value has been set. +func (o *SQLResult) GetColumnsOk() ([]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Columns, true +} + +// SetColumns sets field value +func (o *SQLResult) SetColumns(v []interface{}) { + o.Columns = v +} + +// GetRows returns the Rows field value +func (o *SQLResult) GetRows() []interface{} { + if o == nil { + var ret []interface{} + return ret + } + + return o.Rows +} + +// GetRowsOk returns a tuple with the Rows field value +// and a boolean to check if the value has been set. +func (o *SQLResult) GetRowsOk() ([]interface{}, bool) { + if o == nil { + return nil, false + } + return o.Rows, true +} + +// SetRows sets field value +func (o *SQLResult) SetRows(v []interface{}) { + o.Rows = v +} + +func (o SQLResult) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SQLResult) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["columns"] = o.Columns + toSerialize["rows"] = o.Rows + return toSerialize, nil +} + +func (o *SQLResult) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "columns", + "rows", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSQLResult := _SQLResult{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSQLResult) + + if err != nil { + return err + } + + *o = SQLResult(varSQLResult) + + return err +} + +type NullableSQLResult struct { + value *SQLResult + isSet bool +} + +func (v NullableSQLResult) Get() *SQLResult { + return v.value +} + +func (v *NullableSQLResult) Set(val *SQLResult) { + v.value = val + v.isSet = true +} + +func (v NullableSQLResult) IsSet() bool { + return v.isSet +} + +func (v *NullableSQLResult) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSQLResult(val *SQLResult) *NullableSQLResult { + return &NullableSQLResult{value: val, isSet: true} +} + +func (v NullableSQLResult) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSQLResult) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_sql_result_response.go b/azion-api/model_sql_result_response.go new file mode 100644 index 0000000..7d1692b --- /dev/null +++ b/azion-api/model_sql_result_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SQLResultResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SQLResultResponse{} + +// SQLResultResponse struct for SQLResultResponse +type SQLResultResponse struct { + State *string `json:"state,omitempty"` + Data SQLResult `json:"data"` +} + +type _SQLResultResponse SQLResultResponse + +// NewSQLResultResponse instantiates a new SQLResultResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSQLResultResponse(data SQLResult) *SQLResultResponse { + this := SQLResultResponse{} + this.Data = data + return &this +} + +// NewSQLResultResponseWithDefaults instantiates a new SQLResultResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSQLResultResponseWithDefaults() *SQLResultResponse { + this := SQLResultResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *SQLResultResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SQLResultResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *SQLResultResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *SQLResultResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *SQLResultResponse) GetData() SQLResult { + if o == nil { + var ret SQLResult + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SQLResultResponse) GetDataOk() (*SQLResult, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SQLResultResponse) SetData(v SQLResult) { + o.Data = v +} + +func (o SQLResultResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SQLResultResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SQLResultResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSQLResultResponse := _SQLResultResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSQLResultResponse) + + if err != nil { + return err + } + + *o = SQLResultResponse(varSQLResultResponse) + + return err +} + +type NullableSQLResultResponse struct { + value *SQLResultResponse + isSet bool +} + +func (v NullableSQLResultResponse) Get() *SQLResultResponse { + return v.value +} + +func (v *NullableSQLResultResponse) Set(val *SQLResultResponse) { + v.value = val + v.isSet = true +} + +func (v NullableSQLResultResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableSQLResultResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSQLResultResponse(val *SQLResultResponse) *NullableSQLResultResponse { + return &NullableSQLResultResponse{value: val, isSet: true} +} + +func (v NullableSQLResultResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSQLResultResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_sql_statements_request.go b/azion-api/model_sql_statements_request.go new file mode 100644 index 0000000..3fee2f4 --- /dev/null +++ b/azion-api/model_sql_statements_request.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SQLStatementsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SQLStatementsRequest{} + +// SQLStatementsRequest struct for SQLStatementsRequest +type SQLStatementsRequest struct { + // List of SQL statements to execute + Statements []string `json:"statements"` +} + +type _SQLStatementsRequest SQLStatementsRequest + +// NewSQLStatementsRequest instantiates a new SQLStatementsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSQLStatementsRequest(statements []string) *SQLStatementsRequest { + this := SQLStatementsRequest{} + this.Statements = statements + return &this +} + +// NewSQLStatementsRequestWithDefaults instantiates a new SQLStatementsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSQLStatementsRequestWithDefaults() *SQLStatementsRequest { + this := SQLStatementsRequest{} + return &this +} + +// GetStatements returns the Statements field value +func (o *SQLStatementsRequest) GetStatements() []string { + if o == nil { + var ret []string + return ret + } + + return o.Statements +} + +// GetStatementsOk returns a tuple with the Statements field value +// and a boolean to check if the value has been set. +func (o *SQLStatementsRequest) GetStatementsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Statements, true +} + +// SetStatements sets field value +func (o *SQLStatementsRequest) SetStatements(v []string) { + o.Statements = v +} + +func (o SQLStatementsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SQLStatementsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["statements"] = o.Statements + return toSerialize, nil +} + +func (o *SQLStatementsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "statements", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSQLStatementsRequest := _SQLStatementsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSQLStatementsRequest) + + if err != nil { + return err + } + + *o = SQLStatementsRequest(varSQLStatementsRequest) + + return err +} + +type NullableSQLStatementsRequest struct { + value *SQLStatementsRequest + isSet bool +} + +func (v NullableSQLStatementsRequest) Get() *SQLStatementsRequest { + return v.value +} + +func (v *NullableSQLStatementsRequest) Set(val *SQLStatementsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableSQLStatementsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableSQLStatementsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSQLStatementsRequest(val *SQLStatementsRequest) *NullableSQLStatementsRequest { + return &NullableSQLStatementsRequest{value: val, isSet: true} +} + +func (v NullableSQLStatementsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSQLStatementsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_state_cache_module.go b/azion-api/model_state_cache_module.go new file mode 100644 index 0000000..2abc71c --- /dev/null +++ b/azion-api/model_state_cache_module.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the StateCacheModule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StateCacheModule{} + +// StateCacheModule struct for StateCacheModule +type StateCacheModule struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewStateCacheModule instantiates a new StateCacheModule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStateCacheModule() *StateCacheModule { + this := StateCacheModule{} + return &this +} + +// NewStateCacheModuleWithDefaults instantiates a new StateCacheModule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStateCacheModuleWithDefaults() *StateCacheModule { + this := StateCacheModule{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *StateCacheModule) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StateCacheModule) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *StateCacheModule) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *StateCacheModule) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o StateCacheModule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StateCacheModule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableStateCacheModule struct { + value *StateCacheModule + isSet bool +} + +func (v NullableStateCacheModule) Get() *StateCacheModule { + return v.value +} + +func (v *NullableStateCacheModule) Set(val *StateCacheModule) { + v.value = val + v.isSet = true +} + +func (v NullableStateCacheModule) IsSet() bool { + return v.isSet +} + +func (v *NullableStateCacheModule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStateCacheModule(val *StateCacheModule) *NullableStateCacheModule { + return &NullableStateCacheModule{value: val, isSet: true} +} + +func (v NullableStateCacheModule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStateCacheModule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_state_cache_module_request.go b/azion-api/model_state_cache_module_request.go new file mode 100644 index 0000000..b9d5697 --- /dev/null +++ b/azion-api/model_state_cache_module_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the StateCacheModuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StateCacheModuleRequest{} + +// StateCacheModuleRequest struct for StateCacheModuleRequest +type StateCacheModuleRequest struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// NewStateCacheModuleRequest instantiates a new StateCacheModuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStateCacheModuleRequest() *StateCacheModuleRequest { + this := StateCacheModuleRequest{} + return &this +} + +// NewStateCacheModuleRequestWithDefaults instantiates a new StateCacheModuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStateCacheModuleRequestWithDefaults() *StateCacheModuleRequest { + this := StateCacheModuleRequest{} + return &this +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *StateCacheModuleRequest) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StateCacheModuleRequest) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *StateCacheModuleRequest) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *StateCacheModuleRequest) SetEnabled(v bool) { + o.Enabled = &v +} + +func (o StateCacheModuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StateCacheModuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + return toSerialize, nil +} + +type NullableStateCacheModuleRequest struct { + value *StateCacheModuleRequest + isSet bool +} + +func (v NullableStateCacheModuleRequest) Get() *StateCacheModuleRequest { + return v.value +} + +func (v *NullableStateCacheModuleRequest) Set(val *StateCacheModuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableStateCacheModuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableStateCacheModuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStateCacheModuleRequest(val *StateCacheModuleRequest) *NullableStateCacheModuleRequest { + return &NullableStateCacheModuleRequest{value: val, isSet: true} +} + +func (v NullableStateCacheModuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStateCacheModuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_state_executed_response.go b/azion-api/model_state_executed_response.go new file mode 100644 index 0000000..68cbd16 --- /dev/null +++ b/azion-api/model_state_executed_response.go @@ -0,0 +1,128 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the StateExecutedResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StateExecutedResponse{} + +// StateExecutedResponse struct for StateExecutedResponse +type StateExecutedResponse struct { + // State of the operation (lowercase with underscores) + State *string `json:"state,omitempty"` +} + +// NewStateExecutedResponse instantiates a new StateExecutedResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStateExecutedResponse() *StateExecutedResponse { + this := StateExecutedResponse{} + return &this +} + +// NewStateExecutedResponseWithDefaults instantiates a new StateExecutedResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStateExecutedResponseWithDefaults() *StateExecutedResponse { + this := StateExecutedResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *StateExecutedResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StateExecutedResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *StateExecutedResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *StateExecutedResponse) SetState(v string) { + o.State = &v +} + +func (o StateExecutedResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StateExecutedResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + return toSerialize, nil +} + +type NullableStateExecutedResponse struct { + value *StateExecutedResponse + isSet bool +} + +func (v NullableStateExecutedResponse) Get() *StateExecutedResponse { + return v.value +} + +func (v *NullableStateExecutedResponse) Set(val *StateExecutedResponse) { + v.value = val + v.isSet = true +} + +func (v NullableStateExecutedResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableStateExecutedResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStateExecutedResponse(val *StateExecutedResponse) *NullableStateExecutedResponse { + return &NullableStateExecutedResponse{value: val, isSet: true} +} + +func (v NullableStateExecutedResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStateExecutedResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_success_object_operation.go b/azion-api/model_success_object_operation.go new file mode 100644 index 0000000..f522641 --- /dev/null +++ b/azion-api/model_success_object_operation.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SuccessObjectOperation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuccessObjectOperation{} + +// SuccessObjectOperation struct for SuccessObjectOperation +type SuccessObjectOperation struct { + State *string `json:"state,omitempty"` + Data ObjectResponseData `json:"data"` +} + +type _SuccessObjectOperation SuccessObjectOperation + +// NewSuccessObjectOperation instantiates a new SuccessObjectOperation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSuccessObjectOperation(data ObjectResponseData) *SuccessObjectOperation { + this := SuccessObjectOperation{} + this.Data = data + return &this +} + +// NewSuccessObjectOperationWithDefaults instantiates a new SuccessObjectOperation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSuccessObjectOperationWithDefaults() *SuccessObjectOperation { + this := SuccessObjectOperation{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *SuccessObjectOperation) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuccessObjectOperation) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *SuccessObjectOperation) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *SuccessObjectOperation) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *SuccessObjectOperation) GetData() ObjectResponseData { + if o == nil { + var ret ObjectResponseData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SuccessObjectOperation) GetDataOk() (*ObjectResponseData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SuccessObjectOperation) SetData(v ObjectResponseData) { + o.Data = v +} + +func (o SuccessObjectOperation) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SuccessObjectOperation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SuccessObjectOperation) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSuccessObjectOperation := _SuccessObjectOperation{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSuccessObjectOperation) + + if err != nil { + return err + } + + *o = SuccessObjectOperation(varSuccessObjectOperation) + + return err +} + +type NullableSuccessObjectOperation struct { + value *SuccessObjectOperation + isSet bool +} + +func (v NullableSuccessObjectOperation) Get() *SuccessObjectOperation { + return v.value +} + +func (v *NullableSuccessObjectOperation) Set(val *SuccessObjectOperation) { + v.value = val + v.isSet = true +} + +func (v NullableSuccessObjectOperation) IsSet() bool { + return v.isSet +} + +func (v *NullableSuccessObjectOperation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuccessObjectOperation(val *SuccessObjectOperation) *NullableSuccessObjectOperation { + return &NullableSuccessObjectOperation{value: val, isSet: true} +} + +func (v NullableSuccessObjectOperation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuccessObjectOperation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_success_object_operation_async.go b/azion-api/model_success_object_operation_async.go new file mode 100644 index 0000000..572f7f8 --- /dev/null +++ b/azion-api/model_success_object_operation_async.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SuccessObjectOperationAsync type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuccessObjectOperationAsync{} + +// SuccessObjectOperationAsync struct for SuccessObjectOperationAsync +type SuccessObjectOperationAsync struct { + State *string `json:"state,omitempty"` + Data ObjectResponseAsyncData `json:"data"` +} + +type _SuccessObjectOperationAsync SuccessObjectOperationAsync + +// NewSuccessObjectOperationAsync instantiates a new SuccessObjectOperationAsync object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSuccessObjectOperationAsync(data ObjectResponseAsyncData) *SuccessObjectOperationAsync { + this := SuccessObjectOperationAsync{} + this.Data = data + return &this +} + +// NewSuccessObjectOperationAsyncWithDefaults instantiates a new SuccessObjectOperationAsync object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSuccessObjectOperationAsyncWithDefaults() *SuccessObjectOperationAsync { + this := SuccessObjectOperationAsync{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *SuccessObjectOperationAsync) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuccessObjectOperationAsync) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *SuccessObjectOperationAsync) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *SuccessObjectOperationAsync) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *SuccessObjectOperationAsync) GetData() ObjectResponseAsyncData { + if o == nil { + var ret ObjectResponseAsyncData + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *SuccessObjectOperationAsync) GetDataOk() (*ObjectResponseAsyncData, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *SuccessObjectOperationAsync) SetData(v ObjectResponseAsyncData) { + o.Data = v +} + +func (o SuccessObjectOperationAsync) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SuccessObjectOperationAsync) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *SuccessObjectOperationAsync) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSuccessObjectOperationAsync := _SuccessObjectOperationAsync{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSuccessObjectOperationAsync) + + if err != nil { + return err + } + + *o = SuccessObjectOperationAsync(varSuccessObjectOperationAsync) + + return err +} + +type NullableSuccessObjectOperationAsync struct { + value *SuccessObjectOperationAsync + isSet bool +} + +func (v NullableSuccessObjectOperationAsync) Get() *SuccessObjectOperationAsync { + return v.value +} + +func (v *NullableSuccessObjectOperationAsync) Set(val *SuccessObjectOperationAsync) { + v.value = val + v.isSet = true +} + +func (v NullableSuccessObjectOperationAsync) IsSet() bool { + return v.isSet +} + +func (v *NullableSuccessObjectOperationAsync) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuccessObjectOperationAsync(val *SuccessObjectOperationAsync) *NullableSuccessObjectOperationAsync { + return &NullableSuccessObjectOperationAsync{value: val, isSet: true} +} + +func (v NullableSuccessObjectOperationAsync) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuccessObjectOperationAsync) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_template.go b/azion-api/model_template.go new file mode 100644 index 0000000..2f7dd6c --- /dev/null +++ b/azion-api/model_template.go @@ -0,0 +1,336 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Template type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Template{} + +// Template struct for Template +type Template struct { + Id int64 `json:"id"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Custom bool `json:"custom"` + Active *bool `json:"active,omitempty"` + DataSet string `json:"data_set"` +} + +type _Template Template + +// NewTemplate instantiates a new Template object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplate(id int64, name string, lastEditor string, lastModified time.Time, custom bool, dataSet string) *Template { + this := Template{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.Custom = custom + this.DataSet = dataSet + return &this +} + +// NewTemplateWithDefaults instantiates a new Template object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateWithDefaults() *Template { + this := Template{} + return &this +} + +// GetId returns the Id field value +func (o *Template) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Template) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Template) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Template) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Template) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Template) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Template) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Template) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Template) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Template) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Template) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Template) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetCustom returns the Custom field value +func (o *Template) GetCustom() bool { + if o == nil { + var ret bool + return ret + } + + return o.Custom +} + +// GetCustomOk returns a tuple with the Custom field value +// and a boolean to check if the value has been set. +func (o *Template) GetCustomOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Custom, true +} + +// SetCustom sets field value +func (o *Template) SetCustom(v bool) { + o.Custom = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Template) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Template) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Template) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Template) SetActive(v bool) { + o.Active = &v +} + +// GetDataSet returns the DataSet field value +func (o *Template) GetDataSet() string { + if o == nil { + var ret string + return ret + } + + return o.DataSet +} + +// GetDataSetOk returns a tuple with the DataSet field value +// and a boolean to check if the value has been set. +func (o *Template) GetDataSetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataSet, true +} + +// SetDataSet sets field value +func (o *Template) SetDataSet(v string) { + o.DataSet = v +} + +func (o Template) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Template) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["custom"] = o.Custom + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["data_set"] = o.DataSet + return toSerialize, nil +} + +func (o *Template) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "custom", + "data_set", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTemplate := _Template{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTemplate) + + if err != nil { + return err + } + + *o = Template(varTemplate) + + return err +} + +type NullableTemplate struct { + value *Template + isSet bool +} + +func (v NullableTemplate) Get() *Template { + return v.value +} + +func (v *NullableTemplate) Set(val *Template) { + v.value = val + v.isSet = true +} + +func (v NullableTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplate(val *Template) *NullableTemplate { + return &NullableTemplate{value: val, isSet: true} +} + +func (v NullableTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_template_request.go b/azion-api/model_template_request.go new file mode 100644 index 0000000..2c5fc88 --- /dev/null +++ b/azion-api/model_template_request.go @@ -0,0 +1,223 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TemplateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateRequest{} + +// TemplateRequest struct for TemplateRequest +type TemplateRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + DataSet string `json:"data_set"` +} + +type _TemplateRequest TemplateRequest + +// NewTemplateRequest instantiates a new TemplateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateRequest(name string, dataSet string) *TemplateRequest { + this := TemplateRequest{} + this.Name = name + this.DataSet = dataSet + return &this +} + +// NewTemplateRequestWithDefaults instantiates a new TemplateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateRequestWithDefaults() *TemplateRequest { + this := TemplateRequest{} + return &this +} + +// GetName returns the Name field value +func (o *TemplateRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TemplateRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TemplateRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *TemplateRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *TemplateRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *TemplateRequest) SetActive(v bool) { + o.Active = &v +} + +// GetDataSet returns the DataSet field value +func (o *TemplateRequest) GetDataSet() string { + if o == nil { + var ret string + return ret + } + + return o.DataSet +} + +// GetDataSetOk returns a tuple with the DataSet field value +// and a boolean to check if the value has been set. +func (o *TemplateRequest) GetDataSetOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DataSet, true +} + +// SetDataSet sets field value +func (o *TemplateRequest) SetDataSet(v string) { + o.DataSet = v +} + +func (o TemplateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["data_set"] = o.DataSet + return toSerialize, nil +} + +func (o *TemplateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "data_set", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTemplateRequest := _TemplateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTemplateRequest) + + if err != nil { + return err + } + + *o = TemplateRequest(varTemplateRequest) + + return err +} + +type NullableTemplateRequest struct { + value *TemplateRequest + isSet bool +} + +func (v NullableTemplateRequest) Get() *TemplateRequest { + return v.value +} + +func (v *NullableTemplateRequest) Set(val *TemplateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateRequest(val *TemplateRequest) *NullableTemplateRequest { + return &NullableTemplateRequest{value: val, isSet: true} +} + +func (v NullableTemplateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_template_response.go b/azion-api/model_template_response.go new file mode 100644 index 0000000..26c7ab8 --- /dev/null +++ b/azion-api/model_template_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TemplateResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TemplateResponse{} + +// TemplateResponse struct for TemplateResponse +type TemplateResponse struct { + State *string `json:"state,omitempty"` + Data Template `json:"data"` +} + +type _TemplateResponse TemplateResponse + +// NewTemplateResponse instantiates a new TemplateResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTemplateResponse(data Template) *TemplateResponse { + this := TemplateResponse{} + this.Data = data + return &this +} + +// NewTemplateResponseWithDefaults instantiates a new TemplateResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTemplateResponseWithDefaults() *TemplateResponse { + this := TemplateResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *TemplateResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TemplateResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *TemplateResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *TemplateResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *TemplateResponse) GetData() Template { + if o == nil { + var ret Template + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *TemplateResponse) GetDataOk() (*Template, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TemplateResponse) SetData(v Template) { + o.Data = v +} + +func (o TemplateResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TemplateResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *TemplateResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTemplateResponse := _TemplateResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTemplateResponse) + + if err != nil { + return err + } + + *o = TemplateResponse(varTemplateResponse) + + return err +} + +type NullableTemplateResponse struct { + value *TemplateResponse + isSet bool +} + +func (v NullableTemplateResponse) Get() *TemplateResponse { + return v.value +} + +func (v *NullableTemplateResponse) Set(val *TemplateResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTemplateResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTemplateResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTemplateResponse(val *TemplateResponse) *NullableTemplateResponse { + return &NullableTemplateResponse{value: val, isSet: true} +} + +func (v NullableTemplateResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTemplateResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_thresholds_config_field.go b/azion-api/model_thresholds_config_field.go new file mode 100644 index 0000000..a10c7a9 --- /dev/null +++ b/azion-api/model_thresholds_config_field.go @@ -0,0 +1,197 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ThresholdsConfigField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ThresholdsConfigField{} + +// ThresholdsConfigField struct for ThresholdsConfigField +type ThresholdsConfigField struct { + // * `cross_site_scripting` - cross_site_scripting * `directory_traversal` - directory_traversal * `evading_tricks` - evading_tricks * `file_upload` - file_upload * `identified_attack` - identified_attack * `remote_file_inclusion` - remote_file_inclusion * `sql_injection` - sql_injection * `unwanted_access` - unwanted_access + Threat string `json:"threat"` + // * `highest` - Highest * `high` - High * `medium` - Medium * `low` - Low * `lowest` - Lowest + Sensitivity *string `json:"sensitivity,omitempty"` +} + +type _ThresholdsConfigField ThresholdsConfigField + +// NewThresholdsConfigField instantiates a new ThresholdsConfigField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewThresholdsConfigField(threat string) *ThresholdsConfigField { + this := ThresholdsConfigField{} + this.Threat = threat + return &this +} + +// NewThresholdsConfigFieldWithDefaults instantiates a new ThresholdsConfigField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewThresholdsConfigFieldWithDefaults() *ThresholdsConfigField { + this := ThresholdsConfigField{} + return &this +} + +// GetThreat returns the Threat field value +func (o *ThresholdsConfigField) GetThreat() string { + if o == nil { + var ret string + return ret + } + + return o.Threat +} + +// GetThreatOk returns a tuple with the Threat field value +// and a boolean to check if the value has been set. +func (o *ThresholdsConfigField) GetThreatOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Threat, true +} + +// SetThreat sets field value +func (o *ThresholdsConfigField) SetThreat(v string) { + o.Threat = v +} + +// GetSensitivity returns the Sensitivity field value if set, zero value otherwise. +func (o *ThresholdsConfigField) GetSensitivity() string { + if o == nil || IsNil(o.Sensitivity) { + var ret string + return ret + } + return *o.Sensitivity +} + +// GetSensitivityOk returns a tuple with the Sensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThresholdsConfigField) GetSensitivityOk() (*string, bool) { + if o == nil || IsNil(o.Sensitivity) { + return nil, false + } + return o.Sensitivity, true +} + +// HasSensitivity returns a boolean if a field has been set. +func (o *ThresholdsConfigField) HasSensitivity() bool { + if o != nil && !IsNil(o.Sensitivity) { + return true + } + + return false +} + +// SetSensitivity gets a reference to the given string and assigns it to the Sensitivity field. +func (o *ThresholdsConfigField) SetSensitivity(v string) { + o.Sensitivity = &v +} + +func (o ThresholdsConfigField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThresholdsConfigField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["threat"] = o.Threat + if !IsNil(o.Sensitivity) { + toSerialize["sensitivity"] = o.Sensitivity + } + return toSerialize, nil +} + +func (o *ThresholdsConfigField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "threat", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varThresholdsConfigField := _ThresholdsConfigField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varThresholdsConfigField) + + if err != nil { + return err + } + + *o = ThresholdsConfigField(varThresholdsConfigField) + + return err +} + +type NullableThresholdsConfigField struct { + value *ThresholdsConfigField + isSet bool +} + +func (v NullableThresholdsConfigField) Get() *ThresholdsConfigField { + return v.value +} + +func (v *NullableThresholdsConfigField) Set(val *ThresholdsConfigField) { + v.value = val + v.isSet = true +} + +func (v NullableThresholdsConfigField) IsSet() bool { + return v.isSet +} + +func (v *NullableThresholdsConfigField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThresholdsConfigField(val *ThresholdsConfigField) *NullableThresholdsConfigField { + return &NullableThresholdsConfigField{value: val, isSet: true} +} + +func (v NullableThresholdsConfigField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThresholdsConfigField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_thresholds_config_field_request.go b/azion-api/model_thresholds_config_field_request.go new file mode 100644 index 0000000..c16568e --- /dev/null +++ b/azion-api/model_thresholds_config_field_request.go @@ -0,0 +1,197 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ThresholdsConfigFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ThresholdsConfigFieldRequest{} + +// ThresholdsConfigFieldRequest struct for ThresholdsConfigFieldRequest +type ThresholdsConfigFieldRequest struct { + // * `cross_site_scripting` - cross_site_scripting * `directory_traversal` - directory_traversal * `evading_tricks` - evading_tricks * `file_upload` - file_upload * `identified_attack` - identified_attack * `remote_file_inclusion` - remote_file_inclusion * `sql_injection` - sql_injection * `unwanted_access` - unwanted_access + Threat string `json:"threat"` + // * `highest` - Highest * `high` - High * `medium` - Medium * `low` - Low * `lowest` - Lowest + Sensitivity *string `json:"sensitivity,omitempty"` +} + +type _ThresholdsConfigFieldRequest ThresholdsConfigFieldRequest + +// NewThresholdsConfigFieldRequest instantiates a new ThresholdsConfigFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewThresholdsConfigFieldRequest(threat string) *ThresholdsConfigFieldRequest { + this := ThresholdsConfigFieldRequest{} + this.Threat = threat + return &this +} + +// NewThresholdsConfigFieldRequestWithDefaults instantiates a new ThresholdsConfigFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewThresholdsConfigFieldRequestWithDefaults() *ThresholdsConfigFieldRequest { + this := ThresholdsConfigFieldRequest{} + return &this +} + +// GetThreat returns the Threat field value +func (o *ThresholdsConfigFieldRequest) GetThreat() string { + if o == nil { + var ret string + return ret + } + + return o.Threat +} + +// GetThreatOk returns a tuple with the Threat field value +// and a boolean to check if the value has been set. +func (o *ThresholdsConfigFieldRequest) GetThreatOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Threat, true +} + +// SetThreat sets field value +func (o *ThresholdsConfigFieldRequest) SetThreat(v string) { + o.Threat = v +} + +// GetSensitivity returns the Sensitivity field value if set, zero value otherwise. +func (o *ThresholdsConfigFieldRequest) GetSensitivity() string { + if o == nil || IsNil(o.Sensitivity) { + var ret string + return ret + } + return *o.Sensitivity +} + +// GetSensitivityOk returns a tuple with the Sensitivity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ThresholdsConfigFieldRequest) GetSensitivityOk() (*string, bool) { + if o == nil || IsNil(o.Sensitivity) { + return nil, false + } + return o.Sensitivity, true +} + +// HasSensitivity returns a boolean if a field has been set. +func (o *ThresholdsConfigFieldRequest) HasSensitivity() bool { + if o != nil && !IsNil(o.Sensitivity) { + return true + } + + return false +} + +// SetSensitivity gets a reference to the given string and assigns it to the Sensitivity field. +func (o *ThresholdsConfigFieldRequest) SetSensitivity(v string) { + o.Sensitivity = &v +} + +func (o ThresholdsConfigFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ThresholdsConfigFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["threat"] = o.Threat + if !IsNil(o.Sensitivity) { + toSerialize["sensitivity"] = o.Sensitivity + } + return toSerialize, nil +} + +func (o *ThresholdsConfigFieldRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "threat", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varThresholdsConfigFieldRequest := _ThresholdsConfigFieldRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varThresholdsConfigFieldRequest) + + if err != nil { + return err + } + + *o = ThresholdsConfigFieldRequest(varThresholdsConfigFieldRequest) + + return err +} + +type NullableThresholdsConfigFieldRequest struct { + value *ThresholdsConfigFieldRequest + isSet bool +} + +func (v NullableThresholdsConfigFieldRequest) Get() *ThresholdsConfigFieldRequest { + return v.value +} + +func (v *NullableThresholdsConfigFieldRequest) Set(val *ThresholdsConfigFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableThresholdsConfigFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableThresholdsConfigFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableThresholdsConfigFieldRequest(val *ThresholdsConfigFieldRequest) *NullableThresholdsConfigFieldRequest { + return &NullableThresholdsConfigFieldRequest{value: val, isSet: true} +} + +func (v NullableThresholdsConfigFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableThresholdsConfigFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_tls_workload.go b/azion-api/model_tls_workload.go new file mode 100644 index 0000000..08b0663 --- /dev/null +++ b/azion-api/model_tls_workload.go @@ -0,0 +1,220 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the TLSWorkload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSWorkload{} + +// TLSWorkload struct for TLSWorkload +type TLSWorkload struct { + Certificate NullableInt64 `json:"certificate,omitempty"` + // Allow to configure which set of ciphers will be used when TLS ciphers negotiation. * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 + Ciphers *int64 `json:"ciphers,omitempty"` + MinimumVersion NullableTLSWorkloadMinimumVersion `json:"minimum_version,omitempty"` +} + +// NewTLSWorkload instantiates a new TLSWorkload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTLSWorkload() *TLSWorkload { + this := TLSWorkload{} + return &this +} + +// NewTLSWorkloadWithDefaults instantiates a new TLSWorkload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTLSWorkloadWithDefaults() *TLSWorkload { + this := TLSWorkload{} + return &this +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TLSWorkload) GetCertificate() int64 { + if o == nil || IsNil(o.Certificate.Get()) { + var ret int64 + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TLSWorkload) GetCertificateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *TLSWorkload) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableInt64 and assigns it to the Certificate field. +func (o *TLSWorkload) SetCertificate(v int64) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *TLSWorkload) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *TLSWorkload) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetCiphers returns the Ciphers field value if set, zero value otherwise. +func (o *TLSWorkload) GetCiphers() int64 { + if o == nil || IsNil(o.Ciphers) { + var ret int64 + return ret + } + return *o.Ciphers +} + +// GetCiphersOk returns a tuple with the Ciphers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSWorkload) GetCiphersOk() (*int64, bool) { + if o == nil || IsNil(o.Ciphers) { + return nil, false + } + return o.Ciphers, true +} + +// HasCiphers returns a boolean if a field has been set. +func (o *TLSWorkload) HasCiphers() bool { + if o != nil && !IsNil(o.Ciphers) { + return true + } + + return false +} + +// SetCiphers gets a reference to the given int64 and assigns it to the Ciphers field. +func (o *TLSWorkload) SetCiphers(v int64) { + o.Ciphers = &v +} + +// GetMinimumVersion returns the MinimumVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TLSWorkload) GetMinimumVersion() TLSWorkloadMinimumVersion { + if o == nil || IsNil(o.MinimumVersion.Get()) { + var ret TLSWorkloadMinimumVersion + return ret + } + return *o.MinimumVersion.Get() +} + +// GetMinimumVersionOk returns a tuple with the MinimumVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TLSWorkload) GetMinimumVersionOk() (*TLSWorkloadMinimumVersion, bool) { + if o == nil { + return nil, false + } + return o.MinimumVersion.Get(), o.MinimumVersion.IsSet() +} + +// HasMinimumVersion returns a boolean if a field has been set. +func (o *TLSWorkload) HasMinimumVersion() bool { + if o != nil && o.MinimumVersion.IsSet() { + return true + } + + return false +} + +// SetMinimumVersion gets a reference to the given NullableTLSWorkloadMinimumVersion and assigns it to the MinimumVersion field. +func (o *TLSWorkload) SetMinimumVersion(v TLSWorkloadMinimumVersion) { + o.MinimumVersion.Set(&v) +} +// SetMinimumVersionNil sets the value for MinimumVersion to be an explicit nil +func (o *TLSWorkload) SetMinimumVersionNil() { + o.MinimumVersion.Set(nil) +} + +// UnsetMinimumVersion ensures that no value is present for MinimumVersion, not even an explicit nil +func (o *TLSWorkload) UnsetMinimumVersion() { + o.MinimumVersion.Unset() +} + +func (o TLSWorkload) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TLSWorkload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if !IsNil(o.Ciphers) { + toSerialize["ciphers"] = o.Ciphers + } + if o.MinimumVersion.IsSet() { + toSerialize["minimum_version"] = o.MinimumVersion.Get() + } + return toSerialize, nil +} + +type NullableTLSWorkload struct { + value *TLSWorkload + isSet bool +} + +func (v NullableTLSWorkload) Get() *TLSWorkload { + return v.value +} + +func (v *NullableTLSWorkload) Set(val *TLSWorkload) { + v.value = val + v.isSet = true +} + +func (v NullableTLSWorkload) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSWorkload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSWorkload(val *TLSWorkload) *NullableTLSWorkload { + return &NullableTLSWorkload{value: val, isSet: true} +} + +func (v NullableTLSWorkload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSWorkload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_tls_workload_minimum_version.go b/azion-api/model_tls_workload_minimum_version.go new file mode 100644 index 0000000..3b97640 --- /dev/null +++ b/azion-api/model_tls_workload_minimum_version.go @@ -0,0 +1,139 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// TLSWorkloadMinimumVersion - struct for TLSWorkloadMinimumVersion +type TLSWorkloadMinimumVersion struct { + String *string +} + +// stringAsTLSWorkloadMinimumVersion is a convenience function that returns string wrapped in TLSWorkloadMinimumVersion +func StringAsTLSWorkloadMinimumVersion(v *string) TLSWorkloadMinimumVersion { + return TLSWorkloadMinimumVersion{ + String: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *TLSWorkloadMinimumVersion) UnmarshalJSON(data []byte) error { + var err error + // this object is nullable so check if the payload is null or empty string + if string(data) == "" || string(data) == "{}" { + return nil + } + + match := 0 + // try to unmarshal data into String + err = newStrictDecoder(data).Decode(&dst.String) + if err == nil { + jsonString, _ := json.Marshal(dst.String) + if string(jsonString) == "{}" { // empty struct + dst.String = nil + } else { + if err = validator.Validate(dst.String); err != nil { + dst.String = nil + } else { + match++ + } + } + } else { + dst.String = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.String = nil + + return fmt.Errorf("data matches more than one schema in oneOf(TLSWorkloadMinimumVersion)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(TLSWorkloadMinimumVersion)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TLSWorkloadMinimumVersion) MarshalJSON() ([]byte, error) { + if src.String != nil { + return json.Marshal(&src.String) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *TLSWorkloadMinimumVersion) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.String != nil { + return obj.String + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj TLSWorkloadMinimumVersion) GetActualInstanceValue() (interface{}) { + if obj.String != nil { + return *obj.String + } + + // all schemas are nil + return nil +} + +type NullableTLSWorkloadMinimumVersion struct { + value *TLSWorkloadMinimumVersion + isSet bool +} + +func (v NullableTLSWorkloadMinimumVersion) Get() *TLSWorkloadMinimumVersion { + return v.value +} + +func (v *NullableTLSWorkloadMinimumVersion) Set(val *TLSWorkloadMinimumVersion) { + v.value = val + v.isSet = true +} + +func (v NullableTLSWorkloadMinimumVersion) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSWorkloadMinimumVersion) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSWorkloadMinimumVersion(val *TLSWorkloadMinimumVersion) *NullableTLSWorkloadMinimumVersion { + return &NullableTLSWorkloadMinimumVersion{value: val, isSet: true} +} + +func (v NullableTLSWorkloadMinimumVersion) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSWorkloadMinimumVersion) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_tls_workload_request.go b/azion-api/model_tls_workload_request.go new file mode 100644 index 0000000..fced3a3 --- /dev/null +++ b/azion-api/model_tls_workload_request.go @@ -0,0 +1,220 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the TLSWorkloadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TLSWorkloadRequest{} + +// TLSWorkloadRequest struct for TLSWorkloadRequest +type TLSWorkloadRequest struct { + Certificate NullableInt64 `json:"certificate,omitempty"` + // Allow to configure which set of ciphers will be used when TLS ciphers negotiation. * `1` - TLSv1.2_2018 - TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256 * `2` - TLSv1.2_2019 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:TLS_AES_256_GCM_SHA384:ECDHE-RSA-AES128-GCM-SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `3` - TLSv1.3_2022 - ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256 * `4` - TLSv1.2_2021 - ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:TLS_AES_128_GCM_SHA256 * `5` - Legacy_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA * `6` - Compatible_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:AES256-GCM-SHA384:AES128-GCM-SHA256 * `7` - Modern_v2025Q1 - TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-CHACHA20-POLY1305 * `8` - Legacy_v2017Q1 - AES128-CCM:AES128-CCM8:AES128-GCM-SHA256:AES128-SHA:AES128-SHA256:AES256-CCM:AES256-CCM8:AES256-GCM-SHA384:AES256-SHA:AES256-SHA256:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 + Ciphers *int64 `json:"ciphers,omitempty"` + MinimumVersion NullableTLSWorkloadMinimumVersion `json:"minimum_version,omitempty"` +} + +// NewTLSWorkloadRequest instantiates a new TLSWorkloadRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTLSWorkloadRequest() *TLSWorkloadRequest { + this := TLSWorkloadRequest{} + return &this +} + +// NewTLSWorkloadRequestWithDefaults instantiates a new TLSWorkloadRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTLSWorkloadRequestWithDefaults() *TLSWorkloadRequest { + this := TLSWorkloadRequest{} + return &this +} + +// GetCertificate returns the Certificate field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TLSWorkloadRequest) GetCertificate() int64 { + if o == nil || IsNil(o.Certificate.Get()) { + var ret int64 + return ret + } + return *o.Certificate.Get() +} + +// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TLSWorkloadRequest) GetCertificateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.Certificate.Get(), o.Certificate.IsSet() +} + +// HasCertificate returns a boolean if a field has been set. +func (o *TLSWorkloadRequest) HasCertificate() bool { + if o != nil && o.Certificate.IsSet() { + return true + } + + return false +} + +// SetCertificate gets a reference to the given NullableInt64 and assigns it to the Certificate field. +func (o *TLSWorkloadRequest) SetCertificate(v int64) { + o.Certificate.Set(&v) +} +// SetCertificateNil sets the value for Certificate to be an explicit nil +func (o *TLSWorkloadRequest) SetCertificateNil() { + o.Certificate.Set(nil) +} + +// UnsetCertificate ensures that no value is present for Certificate, not even an explicit nil +func (o *TLSWorkloadRequest) UnsetCertificate() { + o.Certificate.Unset() +} + +// GetCiphers returns the Ciphers field value if set, zero value otherwise. +func (o *TLSWorkloadRequest) GetCiphers() int64 { + if o == nil || IsNil(o.Ciphers) { + var ret int64 + return ret + } + return *o.Ciphers +} + +// GetCiphersOk returns a tuple with the Ciphers field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TLSWorkloadRequest) GetCiphersOk() (*int64, bool) { + if o == nil || IsNil(o.Ciphers) { + return nil, false + } + return o.Ciphers, true +} + +// HasCiphers returns a boolean if a field has been set. +func (o *TLSWorkloadRequest) HasCiphers() bool { + if o != nil && !IsNil(o.Ciphers) { + return true + } + + return false +} + +// SetCiphers gets a reference to the given int64 and assigns it to the Ciphers field. +func (o *TLSWorkloadRequest) SetCiphers(v int64) { + o.Ciphers = &v +} + +// GetMinimumVersion returns the MinimumVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TLSWorkloadRequest) GetMinimumVersion() TLSWorkloadMinimumVersion { + if o == nil || IsNil(o.MinimumVersion.Get()) { + var ret TLSWorkloadMinimumVersion + return ret + } + return *o.MinimumVersion.Get() +} + +// GetMinimumVersionOk returns a tuple with the MinimumVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TLSWorkloadRequest) GetMinimumVersionOk() (*TLSWorkloadMinimumVersion, bool) { + if o == nil { + return nil, false + } + return o.MinimumVersion.Get(), o.MinimumVersion.IsSet() +} + +// HasMinimumVersion returns a boolean if a field has been set. +func (o *TLSWorkloadRequest) HasMinimumVersion() bool { + if o != nil && o.MinimumVersion.IsSet() { + return true + } + + return false +} + +// SetMinimumVersion gets a reference to the given NullableTLSWorkloadMinimumVersion and assigns it to the MinimumVersion field. +func (o *TLSWorkloadRequest) SetMinimumVersion(v TLSWorkloadMinimumVersion) { + o.MinimumVersion.Set(&v) +} +// SetMinimumVersionNil sets the value for MinimumVersion to be an explicit nil +func (o *TLSWorkloadRequest) SetMinimumVersionNil() { + o.MinimumVersion.Set(nil) +} + +// UnsetMinimumVersion ensures that no value is present for MinimumVersion, not even an explicit nil +func (o *TLSWorkloadRequest) UnsetMinimumVersion() { + o.MinimumVersion.Unset() +} + +func (o TLSWorkloadRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TLSWorkloadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Certificate.IsSet() { + toSerialize["certificate"] = o.Certificate.Get() + } + if !IsNil(o.Ciphers) { + toSerialize["ciphers"] = o.Ciphers + } + if o.MinimumVersion.IsSet() { + toSerialize["minimum_version"] = o.MinimumVersion.Get() + } + return toSerialize, nil +} + +type NullableTLSWorkloadRequest struct { + value *TLSWorkloadRequest + isSet bool +} + +func (v NullableTLSWorkloadRequest) Get() *TLSWorkloadRequest { + return v.value +} + +func (v *NullableTLSWorkloadRequest) Set(val *TLSWorkloadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTLSWorkloadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTLSWorkloadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTLSWorkloadRequest(val *TLSWorkloadRequest) *NullableTLSWorkloadRequest { + return &NullableTLSWorkloadRequest{value: val, isSet: true} +} + +func (v NullableTLSWorkloadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTLSWorkloadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_token.go b/azion-api/model_token.go new file mode 100644 index 0000000..7b43750 --- /dev/null +++ b/azion-api/model_token.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Token type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Token{} + +// Token struct for Token +type Token struct { + AccessToken string `json:"access_token"` +} + +type _Token Token + +// NewToken instantiates a new Token object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToken(accessToken string) *Token { + this := Token{} + this.AccessToken = accessToken + return &this +} + +// NewTokenWithDefaults instantiates a new Token object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenWithDefaults() *Token { + this := Token{} + return &this +} + +// GetAccessToken returns the AccessToken field value +func (o *Token) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *Token) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *Token) SetAccessToken(v string) { + o.AccessToken = v +} + +func (o Token) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Token) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_token"] = o.AccessToken + return toSerialize, nil +} + +func (o *Token) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToken := _Token{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varToken) + + if err != nil { + return err + } + + *o = Token(varToken) + + return err +} + +type NullableToken struct { + value *Token + isSet bool +} + +func (v NullableToken) Get() *Token { + return v.value +} + +func (v *NullableToken) Set(val *Token) { + v.value = val + v.isSet = true +} + +func (v NullableToken) IsSet() bool { + return v.isSet +} + +func (v *NullableToken) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToken(val *Token) *NullableToken { + return &NullableToken{value: val, isSet: true} +} + +func (v NullableToken) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToken) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_token_pair.go b/azion-api/model_token_pair.go new file mode 100644 index 0000000..4fbd641 --- /dev/null +++ b/azion-api/model_token_pair.go @@ -0,0 +1,218 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TokenPair type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenPair{} + +// TokenPair Used when user does not have MFA enabled or after successful MFA verification. Returns both access and refresh tokens for API authentication. +type TokenPair struct { + // The access_token is a short-lived token (e.g., 10 minutes) used for API authentication in the Authorization: Bearer header. + AccessToken string `json:"access_token"` + // A long-lived JWT token used to refresh the access_token without requiring the user to authenticate again. + RefreshToken string `json:"refresh_token"` + // Discriminator field for LoginResponse + ResponseType string `json:"response_type"` +} + +type _TokenPair TokenPair + +// NewTokenPair instantiates a new TokenPair object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenPair(accessToken string, refreshToken string, responseType string) *TokenPair { + this := TokenPair{} + this.AccessToken = accessToken + this.RefreshToken = refreshToken + this.ResponseType = responseType + return &this +} + +// NewTokenPairWithDefaults instantiates a new TokenPair object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenPairWithDefaults() *TokenPair { + this := TokenPair{} + return &this +} + +// GetAccessToken returns the AccessToken field value +func (o *TokenPair) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *TokenPair) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *TokenPair) SetAccessToken(v string) { + o.AccessToken = v +} + +// GetRefreshToken returns the RefreshToken field value +func (o *TokenPair) GetRefreshToken() string { + if o == nil { + var ret string + return ret + } + + return o.RefreshToken +} + +// GetRefreshTokenOk returns a tuple with the RefreshToken field value +// and a boolean to check if the value has been set. +func (o *TokenPair) GetRefreshTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RefreshToken, true +} + +// SetRefreshToken sets field value +func (o *TokenPair) SetRefreshToken(v string) { + o.RefreshToken = v +} + +// GetResponseType returns the ResponseType field value +func (o *TokenPair) GetResponseType() string { + if o == nil { + var ret string + return ret + } + + return o.ResponseType +} + +// GetResponseTypeOk returns a tuple with the ResponseType field value +// and a boolean to check if the value has been set. +func (o *TokenPair) GetResponseTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResponseType, true +} + +// SetResponseType sets field value +func (o *TokenPair) SetResponseType(v string) { + o.ResponseType = v +} + +func (o TokenPair) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenPair) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["access_token"] = o.AccessToken + toSerialize["refresh_token"] = o.RefreshToken + toSerialize["response_type"] = o.ResponseType + return toSerialize, nil +} + +func (o *TokenPair) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "access_token", + "refresh_token", + "response_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTokenPair := _TokenPair{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTokenPair) + + if err != nil { + return err + } + + *o = TokenPair(varTokenPair) + + return err +} + +type NullableTokenPair struct { + value *TokenPair + isSet bool +} + +func (v NullableTokenPair) Get() *TokenPair { + return v.value +} + +func (v *NullableTokenPair) Set(val *TokenPair) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPair) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPair) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPair(val *TokenPair) *NullableTokenPair { + return &NullableTokenPair{value: val, isSet: true} +} + +func (v NullableTokenPair) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPair) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_token_pair_response.go b/azion-api/model_token_pair_response.go new file mode 100644 index 0000000..9004b4e --- /dev/null +++ b/azion-api/model_token_pair_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TokenPairResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenPairResponse{} + +// TokenPairResponse struct for TokenPairResponse +type TokenPairResponse struct { + State *string `json:"state,omitempty"` + Data TokenPair `json:"data"` +} + +type _TokenPairResponse TokenPairResponse + +// NewTokenPairResponse instantiates a new TokenPairResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenPairResponse(data TokenPair) *TokenPairResponse { + this := TokenPairResponse{} + this.Data = data + return &this +} + +// NewTokenPairResponseWithDefaults instantiates a new TokenPairResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenPairResponseWithDefaults() *TokenPairResponse { + this := TokenPairResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *TokenPairResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenPairResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *TokenPairResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *TokenPairResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *TokenPairResponse) GetData() TokenPair { + if o == nil { + var ret TokenPair + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *TokenPairResponse) GetDataOk() (*TokenPair, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TokenPairResponse) SetData(v TokenPair) { + o.Data = v +} + +func (o TokenPairResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenPairResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *TokenPairResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTokenPairResponse := _TokenPairResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTokenPairResponse) + + if err != nil { + return err + } + + *o = TokenPairResponse(varTokenPairResponse) + + return err +} + +type NullableTokenPairResponse struct { + value *TokenPairResponse + isSet bool +} + +func (v NullableTokenPairResponse) Get() *TokenPairResponse { + return v.value +} + +func (v *NullableTokenPairResponse) Set(val *TokenPairResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTokenPairResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenPairResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenPairResponse(val *TokenPairResponse) *NullableTokenPairResponse { + return &NullableTokenPairResponse{value: val, isSet: true} +} + +func (v NullableTokenPairResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenPairResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_token_request.go b/azion-api/model_token_request.go new file mode 100644 index 0000000..cf90f49 --- /dev/null +++ b/azion-api/model_token_request.go @@ -0,0 +1,137 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the TokenRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenRequest{} + +// TokenRequest struct for TokenRequest +type TokenRequest struct { + AccountId NullableInt64 `json:"account_id,omitempty"` +} + +// NewTokenRequest instantiates a new TokenRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenRequest() *TokenRequest { + this := TokenRequest{} + return &this +} + +// NewTokenRequestWithDefaults instantiates a new TokenRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenRequestWithDefaults() *TokenRequest { + this := TokenRequest{} + return &this +} + +// GetAccountId returns the AccountId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *TokenRequest) GetAccountId() int64 { + if o == nil || IsNil(o.AccountId.Get()) { + var ret int64 + return ret + } + return *o.AccountId.Get() +} + +// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *TokenRequest) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return o.AccountId.Get(), o.AccountId.IsSet() +} + +// HasAccountId returns a boolean if a field has been set. +func (o *TokenRequest) HasAccountId() bool { + if o != nil && o.AccountId.IsSet() { + return true + } + + return false +} + +// SetAccountId gets a reference to the given NullableInt64 and assigns it to the AccountId field. +func (o *TokenRequest) SetAccountId(v int64) { + o.AccountId.Set(&v) +} +// SetAccountIdNil sets the value for AccountId to be an explicit nil +func (o *TokenRequest) SetAccountIdNil() { + o.AccountId.Set(nil) +} + +// UnsetAccountId ensures that no value is present for AccountId, not even an explicit nil +func (o *TokenRequest) UnsetAccountId() { + o.AccountId.Unset() +} + +func (o TokenRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.AccountId.IsSet() { + toSerialize["account_id"] = o.AccountId.Get() + } + return toSerialize, nil +} + +type NullableTokenRequest struct { + value *TokenRequest + isSet bool +} + +func (v NullableTokenRequest) Get() *TokenRequest { + return v.value +} + +func (v *NullableTokenRequest) Set(val *TokenRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTokenRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenRequest(val *TokenRequest) *NullableTokenRequest { + return &NullableTokenRequest{value: val, isSet: true} +} + +func (v NullableTokenRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_token_response.go b/azion-api/model_token_response.go new file mode 100644 index 0000000..f96e11d --- /dev/null +++ b/azion-api/model_token_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TokenResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TokenResponse{} + +// TokenResponse struct for TokenResponse +type TokenResponse struct { + State *string `json:"state,omitempty"` + Data Token `json:"data"` +} + +type _TokenResponse TokenResponse + +// NewTokenResponse instantiates a new TokenResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTokenResponse(data Token) *TokenResponse { + this := TokenResponse{} + this.Data = data + return &this +} + +// NewTokenResponseWithDefaults instantiates a new TokenResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTokenResponseWithDefaults() *TokenResponse { + this := TokenResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *TokenResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TokenResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *TokenResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *TokenResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *TokenResponse) GetData() Token { + if o == nil { + var ret Token + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *TokenResponse) GetDataOk() (*Token, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TokenResponse) SetData(v Token) { + o.Data = v +} + +func (o TokenResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TokenResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *TokenResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTokenResponse := _TokenResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTokenResponse) + + if err != nil { + return err + } + + *o = TokenResponse(varTokenResponse) + + return err +} + +type NullableTokenResponse struct { + value *TokenResponse + isSet bool +} + +func (v NullableTokenResponse) Get() *TokenResponse { + return v.value +} + +func (v *NullableTokenResponse) Set(val *TokenResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTokenResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTokenResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTokenResponse(val *TokenResponse) *NullableTokenResponse { + return &NullableTokenResponse{value: val, isSet: true} +} + +func (v NullableTokenResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTokenResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_tool.go b/azion-api/model_tool.go new file mode 100644 index 0000000..332a9aa --- /dev/null +++ b/azion-api/model_tool.go @@ -0,0 +1,408 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Tool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Tool{} + +// Tool struct for Tool +type Tool struct { + ToolId int64 `json:"tool_id"` + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Type string `json:"type"` + JsonSchema map[string]interface{} `json:"json_schema,omitempty"` + Active *bool `json:"active,omitempty"` + Kbs string `json:"kbs"` + LastModified time.Time `json:"last_modified"` + LastEditor string `json:"last_editor"` +} + +type _Tool Tool + +// NewTool instantiates a new Tool object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTool(toolId int64, name string, type_ string, kbs string, lastModified time.Time, lastEditor string) *Tool { + this := Tool{} + this.ToolId = toolId + this.Name = name + this.Type = type_ + this.Kbs = kbs + this.LastModified = lastModified + this.LastEditor = lastEditor + return &this +} + +// NewToolWithDefaults instantiates a new Tool object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewToolWithDefaults() *Tool { + this := Tool{} + return &this +} + +// GetToolId returns the ToolId field value +func (o *Tool) GetToolId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ToolId +} + +// GetToolIdOk returns a tuple with the ToolId field value +// and a boolean to check if the value has been set. +func (o *Tool) GetToolIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ToolId, true +} + +// SetToolId sets field value +func (o *Tool) SetToolId(v int64) { + o.ToolId = v +} + +// GetName returns the Name field value +func (o *Tool) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Tool) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Tool) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Tool) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tool) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Tool) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Tool) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value +func (o *Tool) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Tool) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Tool) SetType(v string) { + o.Type = v +} + +// GetJsonSchema returns the JsonSchema field value if set, zero value otherwise. +func (o *Tool) GetJsonSchema() map[string]interface{} { + if o == nil || IsNil(o.JsonSchema) { + var ret map[string]interface{} + return ret + } + return o.JsonSchema +} + +// GetJsonSchemaOk returns a tuple with the JsonSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tool) GetJsonSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.JsonSchema) { + return map[string]interface{}{}, false + } + return o.JsonSchema, true +} + +// HasJsonSchema returns a boolean if a field has been set. +func (o *Tool) HasJsonSchema() bool { + if o != nil && !IsNil(o.JsonSchema) { + return true + } + + return false +} + +// SetJsonSchema gets a reference to the given map[string]interface{} and assigns it to the JsonSchema field. +func (o *Tool) SetJsonSchema(v map[string]interface{}) { + o.JsonSchema = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Tool) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Tool) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Tool) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Tool) SetActive(v bool) { + o.Active = &v +} + +// GetKbs returns the Kbs field value +func (o *Tool) GetKbs() string { + if o == nil { + var ret string + return ret + } + + return o.Kbs +} + +// GetKbsOk returns a tuple with the Kbs field value +// and a boolean to check if the value has been set. +func (o *Tool) GetKbsOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Kbs, true +} + +// SetKbs sets field value +func (o *Tool) SetKbs(v string) { + o.Kbs = v +} + +// GetLastModified returns the LastModified field value +func (o *Tool) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Tool) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Tool) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Tool) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Tool) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Tool) SetLastEditor(v string) { + o.LastEditor = v +} + +func (o Tool) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Tool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tool_id"] = o.ToolId + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["type"] = o.Type + if !IsNil(o.JsonSchema) { + toSerialize["json_schema"] = o.JsonSchema + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["kbs"] = o.Kbs + toSerialize["last_modified"] = o.LastModified + toSerialize["last_editor"] = o.LastEditor + return toSerialize, nil +} + +func (o *Tool) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tool_id", + "name", + "type", + "kbs", + "last_modified", + "last_editor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTool := _Tool{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTool) + + if err != nil { + return err + } + + *o = Tool(varTool) + + return err +} + +type NullableTool struct { + value *Tool + isSet bool +} + +func (v NullableTool) Get() *Tool { + return v.value +} + +func (v *NullableTool) Set(val *Tool) { + v.value = val + v.isSet = true +} + +func (v NullableTool) IsSet() bool { + return v.isSet +} + +func (v *NullableTool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTool(val *Tool) *NullableTool { + return &NullableTool{value: val, isSet: true} +} + +func (v NullableTool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_tool_kb_link.go b/azion-api/model_tool_kb_link.go new file mode 100644 index 0000000..7c98119 --- /dev/null +++ b/azion-api/model_tool_kb_link.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ToolKBLink type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ToolKBLink{} + +// ToolKBLink struct for ToolKBLink +type ToolKBLink struct { + ToolKbId int64 `json:"tool_kb_id"` + KbId int64 `json:"kb_id"` +} + +type _ToolKBLink ToolKBLink + +// NewToolKBLink instantiates a new ToolKBLink object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToolKBLink(toolKbId int64, kbId int64) *ToolKBLink { + this := ToolKBLink{} + this.ToolKbId = toolKbId + this.KbId = kbId + return &this +} + +// NewToolKBLinkWithDefaults instantiates a new ToolKBLink object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewToolKBLinkWithDefaults() *ToolKBLink { + this := ToolKBLink{} + return &this +} + +// GetToolKbId returns the ToolKbId field value +func (o *ToolKBLink) GetToolKbId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ToolKbId +} + +// GetToolKbIdOk returns a tuple with the ToolKbId field value +// and a boolean to check if the value has been set. +func (o *ToolKBLink) GetToolKbIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ToolKbId, true +} + +// SetToolKbId sets field value +func (o *ToolKBLink) SetToolKbId(v int64) { + o.ToolKbId = v +} + +// GetKbId returns the KbId field value +func (o *ToolKBLink) GetKbId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.KbId +} + +// GetKbIdOk returns a tuple with the KbId field value +// and a boolean to check if the value has been set. +func (o *ToolKBLink) GetKbIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.KbId, true +} + +// SetKbId sets field value +func (o *ToolKBLink) SetKbId(v int64) { + o.KbId = v +} + +func (o ToolKBLink) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ToolKBLink) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["tool_kb_id"] = o.ToolKbId + toSerialize["kb_id"] = o.KbId + return toSerialize, nil +} + +func (o *ToolKBLink) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "tool_kb_id", + "kb_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToolKBLink := _ToolKBLink{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varToolKBLink) + + if err != nil { + return err + } + + *o = ToolKBLink(varToolKBLink) + + return err +} + +type NullableToolKBLink struct { + value *ToolKBLink + isSet bool +} + +func (v NullableToolKBLink) Get() *ToolKBLink { + return v.value +} + +func (v *NullableToolKBLink) Set(val *ToolKBLink) { + v.value = val + v.isSet = true +} + +func (v NullableToolKBLink) IsSet() bool { + return v.isSet +} + +func (v *NullableToolKBLink) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToolKBLink(val *ToolKBLink) *NullableToolKBLink { + return &NullableToolKBLink{value: val, isSet: true} +} + +func (v NullableToolKBLink) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToolKBLink) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_tool_request.go b/azion-api/model_tool_request.go new file mode 100644 index 0000000..d7a7e15 --- /dev/null +++ b/azion-api/model_tool_request.go @@ -0,0 +1,295 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ToolRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ToolRequest{} + +// ToolRequest struct for ToolRequest +type ToolRequest struct { + Name string `json:"name"` + Description *string `json:"description,omitempty"` + Type string `json:"type"` + JsonSchema map[string]interface{} `json:"json_schema,omitempty"` + Active *bool `json:"active,omitempty"` +} + +type _ToolRequest ToolRequest + +// NewToolRequest instantiates a new ToolRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewToolRequest(name string, type_ string) *ToolRequest { + this := ToolRequest{} + this.Name = name + this.Type = type_ + return &this +} + +// NewToolRequestWithDefaults instantiates a new ToolRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewToolRequestWithDefaults() *ToolRequest { + this := ToolRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ToolRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ToolRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ToolRequest) SetName(v string) { + o.Name = v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *ToolRequest) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolRequest) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *ToolRequest) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *ToolRequest) SetDescription(v string) { + o.Description = &v +} + +// GetType returns the Type field value +func (o *ToolRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ToolRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ToolRequest) SetType(v string) { + o.Type = v +} + +// GetJsonSchema returns the JsonSchema field value if set, zero value otherwise. +func (o *ToolRequest) GetJsonSchema() map[string]interface{} { + if o == nil || IsNil(o.JsonSchema) { + var ret map[string]interface{} + return ret + } + return o.JsonSchema +} + +// GetJsonSchemaOk returns a tuple with the JsonSchema field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolRequest) GetJsonSchemaOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.JsonSchema) { + return map[string]interface{}{}, false + } + return o.JsonSchema, true +} + +// HasJsonSchema returns a boolean if a field has been set. +func (o *ToolRequest) HasJsonSchema() bool { + if o != nil && !IsNil(o.JsonSchema) { + return true + } + + return false +} + +// SetJsonSchema gets a reference to the given map[string]interface{} and assigns it to the JsonSchema field. +func (o *ToolRequest) SetJsonSchema(v map[string]interface{}) { + o.JsonSchema = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *ToolRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ToolRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *ToolRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *ToolRequest) SetActive(v bool) { + o.Active = &v +} + +func (o ToolRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ToolRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + toSerialize["type"] = o.Type + if !IsNil(o.JsonSchema) { + toSerialize["json_schema"] = o.JsonSchema + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *ToolRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varToolRequest := _ToolRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varToolRequest) + + if err != nil { + return err + } + + *o = ToolRequest(varToolRequest) + + return err +} + +type NullableToolRequest struct { + value *ToolRequest + isSet bool +} + +func (v NullableToolRequest) Get() *ToolRequest { + return v.value +} + +func (v *NullableToolRequest) Set(val *ToolRequest) { + v.value = val + v.isSet = true +} + +func (v NullableToolRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableToolRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableToolRequest(val *ToolRequest) *NullableToolRequest { + return &NullableToolRequest{value: val, isSet: true} +} + +func (v NullableToolRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableToolRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_totp_device.go b/azion-api/model_totp_device.go new file mode 100644 index 0000000..0720ee3 --- /dev/null +++ b/azion-api/model_totp_device.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TOTPDevice type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TOTPDevice{} + +// TOTPDevice struct for TOTPDevice +type TOTPDevice struct { + Url string `json:"url"` +} + +type _TOTPDevice TOTPDevice + +// NewTOTPDevice instantiates a new TOTPDevice object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTOTPDevice(url string) *TOTPDevice { + this := TOTPDevice{} + this.Url = url + return &this +} + +// NewTOTPDeviceWithDefaults instantiates a new TOTPDevice object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTOTPDeviceWithDefaults() *TOTPDevice { + this := TOTPDevice{} + return &this +} + +// GetUrl returns the Url field value +func (o *TOTPDevice) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *TOTPDevice) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *TOTPDevice) SetUrl(v string) { + o.Url = v +} + +func (o TOTPDevice) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TOTPDevice) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + return toSerialize, nil +} + +func (o *TOTPDevice) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTOTPDevice := _TOTPDevice{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTOTPDevice) + + if err != nil { + return err + } + + *o = TOTPDevice(varTOTPDevice) + + return err +} + +type NullableTOTPDevice struct { + value *TOTPDevice + isSet bool +} + +func (v NullableTOTPDevice) Get() *TOTPDevice { + return v.value +} + +func (v *NullableTOTPDevice) Set(val *TOTPDevice) { + v.value = val + v.isSet = true +} + +func (v NullableTOTPDevice) IsSet() bool { + return v.isSet +} + +func (v *NullableTOTPDevice) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTOTPDevice(val *TOTPDevice) *NullableTOTPDevice { + return &NullableTOTPDevice{value: val, isSet: true} +} + +func (v NullableTOTPDevice) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTOTPDevice) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_totp_device_list.go b/azion-api/model_totp_device_list.go new file mode 100644 index 0000000..8b83c02 --- /dev/null +++ b/azion-api/model_totp_device_list.go @@ -0,0 +1,283 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TOTPDeviceList type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TOTPDeviceList{} + +// TOTPDeviceList struct for TOTPDeviceList +type TOTPDeviceList struct { + Id int64 `json:"id"` + // User's full name (alphanumeric, spaces, hyphens, dots) + Name string `json:"name"` + // User's email address + Email string `json:"email"` + // Is this device ready for use? + Confirmed *bool `json:"confirmed,omitempty"` + // The user that this device belongs to. + UserId int64 `json:"user_id"` +} + +type _TOTPDeviceList TOTPDeviceList + +// NewTOTPDeviceList instantiates a new TOTPDeviceList object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTOTPDeviceList(id int64, name string, email string, userId int64) *TOTPDeviceList { + this := TOTPDeviceList{} + this.Id = id + this.Name = name + this.Email = email + this.UserId = userId + return &this +} + +// NewTOTPDeviceListWithDefaults instantiates a new TOTPDeviceList object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTOTPDeviceListWithDefaults() *TOTPDeviceList { + this := TOTPDeviceList{} + return &this +} + +// GetId returns the Id field value +func (o *TOTPDeviceList) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *TOTPDeviceList) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *TOTPDeviceList) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *TOTPDeviceList) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *TOTPDeviceList) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *TOTPDeviceList) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *TOTPDeviceList) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *TOTPDeviceList) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *TOTPDeviceList) SetEmail(v string) { + o.Email = v +} + +// GetConfirmed returns the Confirmed field value if set, zero value otherwise. +func (o *TOTPDeviceList) GetConfirmed() bool { + if o == nil || IsNil(o.Confirmed) { + var ret bool + return ret + } + return *o.Confirmed +} + +// GetConfirmedOk returns a tuple with the Confirmed field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TOTPDeviceList) GetConfirmedOk() (*bool, bool) { + if o == nil || IsNil(o.Confirmed) { + return nil, false + } + return o.Confirmed, true +} + +// HasConfirmed returns a boolean if a field has been set. +func (o *TOTPDeviceList) HasConfirmed() bool { + if o != nil && !IsNil(o.Confirmed) { + return true + } + + return false +} + +// SetConfirmed gets a reference to the given bool and assigns it to the Confirmed field. +func (o *TOTPDeviceList) SetConfirmed(v bool) { + o.Confirmed = &v +} + +// GetUserId returns the UserId field value +func (o *TOTPDeviceList) GetUserId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.UserId +} + +// GetUserIdOk returns a tuple with the UserId field value +// and a boolean to check if the value has been set. +func (o *TOTPDeviceList) GetUserIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.UserId, true +} + +// SetUserId sets field value +func (o *TOTPDeviceList) SetUserId(v int64) { + o.UserId = v +} + +func (o TOTPDeviceList) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TOTPDeviceList) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + if !IsNil(o.Confirmed) { + toSerialize["confirmed"] = o.Confirmed + } + toSerialize["user_id"] = o.UserId + return toSerialize, nil +} + +func (o *TOTPDeviceList) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "user_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTOTPDeviceList := _TOTPDeviceList{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTOTPDeviceList) + + if err != nil { + return err + } + + *o = TOTPDeviceList(varTOTPDeviceList) + + return err +} + +type NullableTOTPDeviceList struct { + value *TOTPDeviceList + isSet bool +} + +func (v NullableTOTPDeviceList) Get() *TOTPDeviceList { + return v.value +} + +func (v *NullableTOTPDeviceList) Set(val *TOTPDeviceList) { + v.value = val + v.isSet = true +} + +func (v NullableTOTPDeviceList) IsSet() bool { + return v.isSet +} + +func (v *NullableTOTPDeviceList) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTOTPDeviceList(val *TOTPDeviceList) *NullableTOTPDeviceList { + return &NullableTOTPDeviceList{value: val, isSet: true} +} + +func (v NullableTOTPDeviceList) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTOTPDeviceList) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_totp_device_response.go b/azion-api/model_totp_device_response.go new file mode 100644 index 0000000..ce78806 --- /dev/null +++ b/azion-api/model_totp_device_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TOTPDeviceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TOTPDeviceResponse{} + +// TOTPDeviceResponse struct for TOTPDeviceResponse +type TOTPDeviceResponse struct { + State *string `json:"state,omitempty"` + Data TOTPDevice `json:"data"` +} + +type _TOTPDeviceResponse TOTPDeviceResponse + +// NewTOTPDeviceResponse instantiates a new TOTPDeviceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTOTPDeviceResponse(data TOTPDevice) *TOTPDeviceResponse { + this := TOTPDeviceResponse{} + this.Data = data + return &this +} + +// NewTOTPDeviceResponseWithDefaults instantiates a new TOTPDeviceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTOTPDeviceResponseWithDefaults() *TOTPDeviceResponse { + this := TOTPDeviceResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *TOTPDeviceResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *TOTPDeviceResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *TOTPDeviceResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *TOTPDeviceResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *TOTPDeviceResponse) GetData() TOTPDevice { + if o == nil { + var ret TOTPDevice + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *TOTPDeviceResponse) GetDataOk() (*TOTPDevice, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *TOTPDeviceResponse) SetData(v TOTPDevice) { + o.Data = v +} + +func (o TOTPDeviceResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TOTPDeviceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *TOTPDeviceResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTOTPDeviceResponse := _TOTPDeviceResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTOTPDeviceResponse) + + if err != nil { + return err + } + + *o = TOTPDeviceResponse(varTOTPDeviceResponse) + + return err +} + +type NullableTOTPDeviceResponse struct { + value *TOTPDeviceResponse + isSet bool +} + +func (v NullableTOTPDeviceResponse) Get() *TOTPDeviceResponse { + return v.value +} + +func (v *NullableTOTPDeviceResponse) Set(val *TOTPDeviceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableTOTPDeviceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableTOTPDeviceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTOTPDeviceResponse(val *TOTPDeviceResponse) *NullableTOTPDeviceResponse { + return &NullableTOTPDeviceResponse{value: val, isSet: true} +} + +func (v NullableTOTPDeviceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTOTPDeviceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_totp_verification_request.go b/azion-api/model_totp_verification_request.go new file mode 100644 index 0000000..bff9757 --- /dev/null +++ b/azion-api/model_totp_verification_request.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TOTPVerificationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TOTPVerificationRequest{} + +// TOTPVerificationRequest Serializer for TOTP verification process. Handles the verification of TOTP codes for MFA-enabled users. On successful verification, returns access and refresh tokens. +type TOTPVerificationRequest struct { + // 6-digit TOTP code + Code string `json:"code"` +} + +type _TOTPVerificationRequest TOTPVerificationRequest + +// NewTOTPVerificationRequest instantiates a new TOTPVerificationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTOTPVerificationRequest(code string) *TOTPVerificationRequest { + this := TOTPVerificationRequest{} + this.Code = code + return &this +} + +// NewTOTPVerificationRequestWithDefaults instantiates a new TOTPVerificationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTOTPVerificationRequestWithDefaults() *TOTPVerificationRequest { + this := TOTPVerificationRequest{} + return &this +} + +// GetCode returns the Code field value +func (o *TOTPVerificationRequest) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *TOTPVerificationRequest) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *TOTPVerificationRequest) SetCode(v string) { + o.Code = v +} + +func (o TOTPVerificationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TOTPVerificationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + return toSerialize, nil +} + +func (o *TOTPVerificationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTOTPVerificationRequest := _TOTPVerificationRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTOTPVerificationRequest) + + if err != nil { + return err + } + + *o = TOTPVerificationRequest(varTOTPVerificationRequest) + + return err +} + +type NullableTOTPVerificationRequest struct { + value *TOTPVerificationRequest + isSet bool +} + +func (v NullableTOTPVerificationRequest) Get() *TOTPVerificationRequest { + return v.value +} + +func (v *NullableTOTPVerificationRequest) Set(val *TOTPVerificationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTOTPVerificationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTOTPVerificationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTOTPVerificationRequest(val *TOTPVerificationRequest) *NullableTOTPVerificationRequest { + return &NullableTOTPVerificationRequest{value: val, isSet: true} +} + +func (v NullableTOTPVerificationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTOTPVerificationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform.go b/azion-api/model_transform.go new file mode 100644 index 0000000..8cef87e --- /dev/null +++ b/azion-api/model_transform.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// Transform - struct for Transform +type Transform struct { + TransformTransformFilterWorkloadsAttributes *TransformTransformFilterWorkloadsAttributes + TransformTransformRenderTemplateAttributes *TransformTransformRenderTemplateAttributes + TransformTransformSamplingAttributes *TransformTransformSamplingAttributes +} + +// TransformTransformFilterWorkloadsAttributesAsTransform is a convenience function that returns TransformTransformFilterWorkloadsAttributes wrapped in Transform +func TransformTransformFilterWorkloadsAttributesAsTransform(v *TransformTransformFilterWorkloadsAttributes) Transform { + return Transform{ + TransformTransformFilterWorkloadsAttributes: v, + } +} + +// TransformTransformRenderTemplateAttributesAsTransform is a convenience function that returns TransformTransformRenderTemplateAttributes wrapped in Transform +func TransformTransformRenderTemplateAttributesAsTransform(v *TransformTransformRenderTemplateAttributes) Transform { + return Transform{ + TransformTransformRenderTemplateAttributes: v, + } +} + +// TransformTransformSamplingAttributesAsTransform is a convenience function that returns TransformTransformSamplingAttributes wrapped in Transform +func TransformTransformSamplingAttributesAsTransform(v *TransformTransformSamplingAttributes) Transform { + return Transform{ + TransformTransformSamplingAttributes: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *Transform) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into TransformTransformFilterWorkloadsAttributes + err = newStrictDecoder(data).Decode(&dst.TransformTransformFilterWorkloadsAttributes) + if err == nil { + jsonTransformTransformFilterWorkloadsAttributes, _ := json.Marshal(dst.TransformTransformFilterWorkloadsAttributes) + if string(jsonTransformTransformFilterWorkloadsAttributes) == "{}" { // empty struct + dst.TransformTransformFilterWorkloadsAttributes = nil + } else { + if err = validator.Validate(dst.TransformTransformFilterWorkloadsAttributes); err != nil { + dst.TransformTransformFilterWorkloadsAttributes = nil + } else { + match++ + } + } + } else { + dst.TransformTransformFilterWorkloadsAttributes = nil + } + + // try to unmarshal data into TransformTransformRenderTemplateAttributes + err = newStrictDecoder(data).Decode(&dst.TransformTransformRenderTemplateAttributes) + if err == nil { + jsonTransformTransformRenderTemplateAttributes, _ := json.Marshal(dst.TransformTransformRenderTemplateAttributes) + if string(jsonTransformTransformRenderTemplateAttributes) == "{}" { // empty struct + dst.TransformTransformRenderTemplateAttributes = nil + } else { + if err = validator.Validate(dst.TransformTransformRenderTemplateAttributes); err != nil { + dst.TransformTransformRenderTemplateAttributes = nil + } else { + match++ + } + } + } else { + dst.TransformTransformRenderTemplateAttributes = nil + } + + // try to unmarshal data into TransformTransformSamplingAttributes + err = newStrictDecoder(data).Decode(&dst.TransformTransformSamplingAttributes) + if err == nil { + jsonTransformTransformSamplingAttributes, _ := json.Marshal(dst.TransformTransformSamplingAttributes) + if string(jsonTransformTransformSamplingAttributes) == "{}" { // empty struct + dst.TransformTransformSamplingAttributes = nil + } else { + if err = validator.Validate(dst.TransformTransformSamplingAttributes); err != nil { + dst.TransformTransformSamplingAttributes = nil + } else { + match++ + } + } + } else { + dst.TransformTransformSamplingAttributes = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.TransformTransformFilterWorkloadsAttributes = nil + dst.TransformTransformRenderTemplateAttributes = nil + dst.TransformTransformSamplingAttributes = nil + + return fmt.Errorf("data matches more than one schema in oneOf(Transform)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(Transform)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src Transform) MarshalJSON() ([]byte, error) { + if src.TransformTransformFilterWorkloadsAttributes != nil { + return json.Marshal(&src.TransformTransformFilterWorkloadsAttributes) + } + + if src.TransformTransformRenderTemplateAttributes != nil { + return json.Marshal(&src.TransformTransformRenderTemplateAttributes) + } + + if src.TransformTransformSamplingAttributes != nil { + return json.Marshal(&src.TransformTransformSamplingAttributes) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *Transform) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.TransformTransformFilterWorkloadsAttributes != nil { + return obj.TransformTransformFilterWorkloadsAttributes + } + + if obj.TransformTransformRenderTemplateAttributes != nil { + return obj.TransformTransformRenderTemplateAttributes + } + + if obj.TransformTransformSamplingAttributes != nil { + return obj.TransformTransformSamplingAttributes + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj Transform) GetActualInstanceValue() (interface{}) { + if obj.TransformTransformFilterWorkloadsAttributes != nil { + return *obj.TransformTransformFilterWorkloadsAttributes + } + + if obj.TransformTransformRenderTemplateAttributes != nil { + return *obj.TransformTransformRenderTemplateAttributes + } + + if obj.TransformTransformSamplingAttributes != nil { + return *obj.TransformTransformSamplingAttributes + } + + // all schemas are nil + return nil +} + +type NullableTransform struct { + value *Transform + isSet bool +} + +func (v NullableTransform) Get() *Transform { + return v.value +} + +func (v *NullableTransform) Set(val *Transform) { + v.value = val + v.isSet = true +} + +func (v NullableTransform) IsSet() bool { + return v.isSet +} + +func (v *NullableTransform) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransform(val *Transform) *NullableTransform { + return &NullableTransform{value: val, isSet: true} +} + +func (v NullableTransform) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransform) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_filter_workloads.go b/azion-api/model_transform_filter_workloads.go new file mode 100644 index 0000000..b043097 --- /dev/null +++ b/azion-api/model_transform_filter_workloads.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformFilterWorkloads type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformFilterWorkloads{} + +// TransformFilterWorkloads Serializer for filter_workloads transform attributes. +type TransformFilterWorkloads struct { + Workloads []int64 `json:"workloads"` +} + +type _TransformFilterWorkloads TransformFilterWorkloads + +// NewTransformFilterWorkloads instantiates a new TransformFilterWorkloads object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformFilterWorkloads(workloads []int64) *TransformFilterWorkloads { + this := TransformFilterWorkloads{} + this.Workloads = workloads + return &this +} + +// NewTransformFilterWorkloadsWithDefaults instantiates a new TransformFilterWorkloads object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformFilterWorkloadsWithDefaults() *TransformFilterWorkloads { + this := TransformFilterWorkloads{} + return &this +} + +// GetWorkloads returns the Workloads field value +func (o *TransformFilterWorkloads) GetWorkloads() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Workloads +} + +// GetWorkloadsOk returns a tuple with the Workloads field value +// and a boolean to check if the value has been set. +func (o *TransformFilterWorkloads) GetWorkloadsOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Workloads, true +} + +// SetWorkloads sets field value +func (o *TransformFilterWorkloads) SetWorkloads(v []int64) { + o.Workloads = v +} + +func (o TransformFilterWorkloads) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformFilterWorkloads) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["workloads"] = o.Workloads + return toSerialize, nil +} + +func (o *TransformFilterWorkloads) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "workloads", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformFilterWorkloads := _TransformFilterWorkloads{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformFilterWorkloads) + + if err != nil { + return err + } + + *o = TransformFilterWorkloads(varTransformFilterWorkloads) + + return err +} + +type NullableTransformFilterWorkloads struct { + value *TransformFilterWorkloads + isSet bool +} + +func (v NullableTransformFilterWorkloads) Get() *TransformFilterWorkloads { + return v.value +} + +func (v *NullableTransformFilterWorkloads) Set(val *TransformFilterWorkloads) { + v.value = val + v.isSet = true +} + +func (v NullableTransformFilterWorkloads) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformFilterWorkloads) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformFilterWorkloads(val *TransformFilterWorkloads) *NullableTransformFilterWorkloads { + return &NullableTransformFilterWorkloads{value: val, isSet: true} +} + +func (v NullableTransformFilterWorkloads) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformFilterWorkloads) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_filter_workloads_attributes.go b/azion-api/model_transform_filter_workloads_attributes.go new file mode 100644 index 0000000..89c28b0 --- /dev/null +++ b/azion-api/model_transform_filter_workloads_attributes.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformFilterWorkloadsAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformFilterWorkloadsAttributes{} + +// TransformFilterWorkloadsAttributes struct for TransformFilterWorkloadsAttributes +type TransformFilterWorkloadsAttributes struct { + // * `filter_workloads` - Filter Workloads + Type string `json:"type"` + Attributes TransformFilterWorkloads `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _TransformFilterWorkloadsAttributes TransformFilterWorkloadsAttributes + +// NewTransformFilterWorkloadsAttributes instantiates a new TransformFilterWorkloadsAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformFilterWorkloadsAttributes(type_ string, attributes TransformFilterWorkloads) *TransformFilterWorkloadsAttributes { + this := TransformFilterWorkloadsAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformFilterWorkloadsAttributesWithDefaults instantiates a new TransformFilterWorkloadsAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformFilterWorkloadsAttributesWithDefaults() *TransformFilterWorkloadsAttributes { + this := TransformFilterWorkloadsAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *TransformFilterWorkloadsAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformFilterWorkloadsAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformFilterWorkloadsAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformFilterWorkloadsAttributes) GetAttributes() TransformFilterWorkloads { + if o == nil { + var ret TransformFilterWorkloads + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformFilterWorkloadsAttributes) GetAttributesOk() (*TransformFilterWorkloads, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformFilterWorkloadsAttributes) SetAttributes(v TransformFilterWorkloads) { + o.Attributes = v +} + +func (o TransformFilterWorkloadsAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformFilterWorkloadsAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformFilterWorkloadsAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformFilterWorkloadsAttributes := _TransformFilterWorkloadsAttributes{} + + err = json.Unmarshal(data, &varTransformFilterWorkloadsAttributes) + + if err != nil { + return err + } + + *o = TransformFilterWorkloadsAttributes(varTransformFilterWorkloadsAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformFilterWorkloadsAttributes struct { + value *TransformFilterWorkloadsAttributes + isSet bool +} + +func (v NullableTransformFilterWorkloadsAttributes) Get() *TransformFilterWorkloadsAttributes { + return v.value +} + +func (v *NullableTransformFilterWorkloadsAttributes) Set(val *TransformFilterWorkloadsAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableTransformFilterWorkloadsAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformFilterWorkloadsAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformFilterWorkloadsAttributes(val *TransformFilterWorkloadsAttributes) *NullableTransformFilterWorkloadsAttributes { + return &NullableTransformFilterWorkloadsAttributes{value: val, isSet: true} +} + +func (v NullableTransformFilterWorkloadsAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformFilterWorkloadsAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_filter_workloads_attributes_request.go b/azion-api/model_transform_filter_workloads_attributes_request.go new file mode 100644 index 0000000..8b257a5 --- /dev/null +++ b/azion-api/model_transform_filter_workloads_attributes_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformFilterWorkloadsAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformFilterWorkloadsAttributesRequest{} + +// TransformFilterWorkloadsAttributesRequest struct for TransformFilterWorkloadsAttributesRequest +type TransformFilterWorkloadsAttributesRequest struct { + // * `filter_workloads` - Filter Workloads + Type string `json:"type"` + Attributes TransformFilterWorkloadsRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _TransformFilterWorkloadsAttributesRequest TransformFilterWorkloadsAttributesRequest + +// NewTransformFilterWorkloadsAttributesRequest instantiates a new TransformFilterWorkloadsAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformFilterWorkloadsAttributesRequest(type_ string, attributes TransformFilterWorkloadsRequest) *TransformFilterWorkloadsAttributesRequest { + this := TransformFilterWorkloadsAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformFilterWorkloadsAttributesRequestWithDefaults instantiates a new TransformFilterWorkloadsAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformFilterWorkloadsAttributesRequestWithDefaults() *TransformFilterWorkloadsAttributesRequest { + this := TransformFilterWorkloadsAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *TransformFilterWorkloadsAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformFilterWorkloadsAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformFilterWorkloadsAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformFilterWorkloadsAttributesRequest) GetAttributes() TransformFilterWorkloadsRequest { + if o == nil { + var ret TransformFilterWorkloadsRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformFilterWorkloadsAttributesRequest) GetAttributesOk() (*TransformFilterWorkloadsRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformFilterWorkloadsAttributesRequest) SetAttributes(v TransformFilterWorkloadsRequest) { + o.Attributes = v +} + +func (o TransformFilterWorkloadsAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformFilterWorkloadsAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformFilterWorkloadsAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformFilterWorkloadsAttributesRequest := _TransformFilterWorkloadsAttributesRequest{} + + err = json.Unmarshal(data, &varTransformFilterWorkloadsAttributesRequest) + + if err != nil { + return err + } + + *o = TransformFilterWorkloadsAttributesRequest(varTransformFilterWorkloadsAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformFilterWorkloadsAttributesRequest struct { + value *TransformFilterWorkloadsAttributesRequest + isSet bool +} + +func (v NullableTransformFilterWorkloadsAttributesRequest) Get() *TransformFilterWorkloadsAttributesRequest { + return v.value +} + +func (v *NullableTransformFilterWorkloadsAttributesRequest) Set(val *TransformFilterWorkloadsAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformFilterWorkloadsAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformFilterWorkloadsAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformFilterWorkloadsAttributesRequest(val *TransformFilterWorkloadsAttributesRequest) *NullableTransformFilterWorkloadsAttributesRequest { + return &NullableTransformFilterWorkloadsAttributesRequest{value: val, isSet: true} +} + +func (v NullableTransformFilterWorkloadsAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformFilterWorkloadsAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_filter_workloads_request.go b/azion-api/model_transform_filter_workloads_request.go new file mode 100644 index 0000000..7f8866a --- /dev/null +++ b/azion-api/model_transform_filter_workloads_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformFilterWorkloadsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformFilterWorkloadsRequest{} + +// TransformFilterWorkloadsRequest Serializer for filter_workloads transform attributes. +type TransformFilterWorkloadsRequest struct { + Workloads []int64 `json:"workloads"` +} + +type _TransformFilterWorkloadsRequest TransformFilterWorkloadsRequest + +// NewTransformFilterWorkloadsRequest instantiates a new TransformFilterWorkloadsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformFilterWorkloadsRequest(workloads []int64) *TransformFilterWorkloadsRequest { + this := TransformFilterWorkloadsRequest{} + this.Workloads = workloads + return &this +} + +// NewTransformFilterWorkloadsRequestWithDefaults instantiates a new TransformFilterWorkloadsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformFilterWorkloadsRequestWithDefaults() *TransformFilterWorkloadsRequest { + this := TransformFilterWorkloadsRequest{} + return &this +} + +// GetWorkloads returns the Workloads field value +func (o *TransformFilterWorkloadsRequest) GetWorkloads() []int64 { + if o == nil { + var ret []int64 + return ret + } + + return o.Workloads +} + +// GetWorkloadsOk returns a tuple with the Workloads field value +// and a boolean to check if the value has been set. +func (o *TransformFilterWorkloadsRequest) GetWorkloadsOk() ([]int64, bool) { + if o == nil { + return nil, false + } + return o.Workloads, true +} + +// SetWorkloads sets field value +func (o *TransformFilterWorkloadsRequest) SetWorkloads(v []int64) { + o.Workloads = v +} + +func (o TransformFilterWorkloadsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformFilterWorkloadsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["workloads"] = o.Workloads + return toSerialize, nil +} + +func (o *TransformFilterWorkloadsRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "workloads", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformFilterWorkloadsRequest := _TransformFilterWorkloadsRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformFilterWorkloadsRequest) + + if err != nil { + return err + } + + *o = TransformFilterWorkloadsRequest(varTransformFilterWorkloadsRequest) + + return err +} + +type NullableTransformFilterWorkloadsRequest struct { + value *TransformFilterWorkloadsRequest + isSet bool +} + +func (v NullableTransformFilterWorkloadsRequest) Get() *TransformFilterWorkloadsRequest { + return v.value +} + +func (v *NullableTransformFilterWorkloadsRequest) Set(val *TransformFilterWorkloadsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformFilterWorkloadsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformFilterWorkloadsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformFilterWorkloadsRequest(val *TransformFilterWorkloadsRequest) *NullableTransformFilterWorkloadsRequest { + return &NullableTransformFilterWorkloadsRequest{value: val, isSet: true} +} + +func (v NullableTransformFilterWorkloadsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformFilterWorkloadsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_render_template.go b/azion-api/model_transform_render_template.go new file mode 100644 index 0000000..8b85ecc --- /dev/null +++ b/azion-api/model_transform_render_template.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformRenderTemplate type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformRenderTemplate{} + +// TransformRenderTemplate Serializer for render_template transform attributes. +type TransformRenderTemplate struct { + Template int64 `json:"template"` +} + +type _TransformRenderTemplate TransformRenderTemplate + +// NewTransformRenderTemplate instantiates a new TransformRenderTemplate object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformRenderTemplate(template int64) *TransformRenderTemplate { + this := TransformRenderTemplate{} + this.Template = template + return &this +} + +// NewTransformRenderTemplateWithDefaults instantiates a new TransformRenderTemplate object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformRenderTemplateWithDefaults() *TransformRenderTemplate { + this := TransformRenderTemplate{} + return &this +} + +// GetTemplate returns the Template field value +func (o *TransformRenderTemplate) GetTemplate() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Template +} + +// GetTemplateOk returns a tuple with the Template field value +// and a boolean to check if the value has been set. +func (o *TransformRenderTemplate) GetTemplateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Template, true +} + +// SetTemplate sets field value +func (o *TransformRenderTemplate) SetTemplate(v int64) { + o.Template = v +} + +func (o TransformRenderTemplate) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformRenderTemplate) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template"] = o.Template + return toSerialize, nil +} + +func (o *TransformRenderTemplate) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformRenderTemplate := _TransformRenderTemplate{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformRenderTemplate) + + if err != nil { + return err + } + + *o = TransformRenderTemplate(varTransformRenderTemplate) + + return err +} + +type NullableTransformRenderTemplate struct { + value *TransformRenderTemplate + isSet bool +} + +func (v NullableTransformRenderTemplate) Get() *TransformRenderTemplate { + return v.value +} + +func (v *NullableTransformRenderTemplate) Set(val *TransformRenderTemplate) { + v.value = val + v.isSet = true +} + +func (v NullableTransformRenderTemplate) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformRenderTemplate) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformRenderTemplate(val *TransformRenderTemplate) *NullableTransformRenderTemplate { + return &NullableTransformRenderTemplate{value: val, isSet: true} +} + +func (v NullableTransformRenderTemplate) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformRenderTemplate) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_render_template_attributes.go b/azion-api/model_transform_render_template_attributes.go new file mode 100644 index 0000000..32d6ec4 --- /dev/null +++ b/azion-api/model_transform_render_template_attributes.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformRenderTemplateAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformRenderTemplateAttributes{} + +// TransformRenderTemplateAttributes struct for TransformRenderTemplateAttributes +type TransformRenderTemplateAttributes struct { + // * `render_template` - Render Template + Type string `json:"type"` + Attributes TransformRenderTemplate `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _TransformRenderTemplateAttributes TransformRenderTemplateAttributes + +// NewTransformRenderTemplateAttributes instantiates a new TransformRenderTemplateAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformRenderTemplateAttributes(type_ string, attributes TransformRenderTemplate) *TransformRenderTemplateAttributes { + this := TransformRenderTemplateAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformRenderTemplateAttributesWithDefaults instantiates a new TransformRenderTemplateAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformRenderTemplateAttributesWithDefaults() *TransformRenderTemplateAttributes { + this := TransformRenderTemplateAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *TransformRenderTemplateAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformRenderTemplateAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformRenderTemplateAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformRenderTemplateAttributes) GetAttributes() TransformRenderTemplate { + if o == nil { + var ret TransformRenderTemplate + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformRenderTemplateAttributes) GetAttributesOk() (*TransformRenderTemplate, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformRenderTemplateAttributes) SetAttributes(v TransformRenderTemplate) { + o.Attributes = v +} + +func (o TransformRenderTemplateAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformRenderTemplateAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformRenderTemplateAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformRenderTemplateAttributes := _TransformRenderTemplateAttributes{} + + err = json.Unmarshal(data, &varTransformRenderTemplateAttributes) + + if err != nil { + return err + } + + *o = TransformRenderTemplateAttributes(varTransformRenderTemplateAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformRenderTemplateAttributes struct { + value *TransformRenderTemplateAttributes + isSet bool +} + +func (v NullableTransformRenderTemplateAttributes) Get() *TransformRenderTemplateAttributes { + return v.value +} + +func (v *NullableTransformRenderTemplateAttributes) Set(val *TransformRenderTemplateAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableTransformRenderTemplateAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformRenderTemplateAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformRenderTemplateAttributes(val *TransformRenderTemplateAttributes) *NullableTransformRenderTemplateAttributes { + return &NullableTransformRenderTemplateAttributes{value: val, isSet: true} +} + +func (v NullableTransformRenderTemplateAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformRenderTemplateAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_render_template_attributes_request.go b/azion-api/model_transform_render_template_attributes_request.go new file mode 100644 index 0000000..9987adb --- /dev/null +++ b/azion-api/model_transform_render_template_attributes_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformRenderTemplateAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformRenderTemplateAttributesRequest{} + +// TransformRenderTemplateAttributesRequest struct for TransformRenderTemplateAttributesRequest +type TransformRenderTemplateAttributesRequest struct { + // * `render_template` - Render Template + Type string `json:"type"` + Attributes TransformRenderTemplateRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _TransformRenderTemplateAttributesRequest TransformRenderTemplateAttributesRequest + +// NewTransformRenderTemplateAttributesRequest instantiates a new TransformRenderTemplateAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformRenderTemplateAttributesRequest(type_ string, attributes TransformRenderTemplateRequest) *TransformRenderTemplateAttributesRequest { + this := TransformRenderTemplateAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformRenderTemplateAttributesRequestWithDefaults instantiates a new TransformRenderTemplateAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformRenderTemplateAttributesRequestWithDefaults() *TransformRenderTemplateAttributesRequest { + this := TransformRenderTemplateAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *TransformRenderTemplateAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformRenderTemplateAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformRenderTemplateAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformRenderTemplateAttributesRequest) GetAttributes() TransformRenderTemplateRequest { + if o == nil { + var ret TransformRenderTemplateRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformRenderTemplateAttributesRequest) GetAttributesOk() (*TransformRenderTemplateRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformRenderTemplateAttributesRequest) SetAttributes(v TransformRenderTemplateRequest) { + o.Attributes = v +} + +func (o TransformRenderTemplateAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformRenderTemplateAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformRenderTemplateAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformRenderTemplateAttributesRequest := _TransformRenderTemplateAttributesRequest{} + + err = json.Unmarshal(data, &varTransformRenderTemplateAttributesRequest) + + if err != nil { + return err + } + + *o = TransformRenderTemplateAttributesRequest(varTransformRenderTemplateAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformRenderTemplateAttributesRequest struct { + value *TransformRenderTemplateAttributesRequest + isSet bool +} + +func (v NullableTransformRenderTemplateAttributesRequest) Get() *TransformRenderTemplateAttributesRequest { + return v.value +} + +func (v *NullableTransformRenderTemplateAttributesRequest) Set(val *TransformRenderTemplateAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformRenderTemplateAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformRenderTemplateAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformRenderTemplateAttributesRequest(val *TransformRenderTemplateAttributesRequest) *NullableTransformRenderTemplateAttributesRequest { + return &NullableTransformRenderTemplateAttributesRequest{value: val, isSet: true} +} + +func (v NullableTransformRenderTemplateAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformRenderTemplateAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_render_template_request.go b/azion-api/model_transform_render_template_request.go new file mode 100644 index 0000000..dcbae4e --- /dev/null +++ b/azion-api/model_transform_render_template_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformRenderTemplateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformRenderTemplateRequest{} + +// TransformRenderTemplateRequest Serializer for render_template transform attributes. +type TransformRenderTemplateRequest struct { + Template int64 `json:"template"` +} + +type _TransformRenderTemplateRequest TransformRenderTemplateRequest + +// NewTransformRenderTemplateRequest instantiates a new TransformRenderTemplateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformRenderTemplateRequest(template int64) *TransformRenderTemplateRequest { + this := TransformRenderTemplateRequest{} + this.Template = template + return &this +} + +// NewTransformRenderTemplateRequestWithDefaults instantiates a new TransformRenderTemplateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformRenderTemplateRequestWithDefaults() *TransformRenderTemplateRequest { + this := TransformRenderTemplateRequest{} + return &this +} + +// GetTemplate returns the Template field value +func (o *TransformRenderTemplateRequest) GetTemplate() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Template +} + +// GetTemplateOk returns a tuple with the Template field value +// and a boolean to check if the value has been set. +func (o *TransformRenderTemplateRequest) GetTemplateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Template, true +} + +// SetTemplate sets field value +func (o *TransformRenderTemplateRequest) SetTemplate(v int64) { + o.Template = v +} + +func (o TransformRenderTemplateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformRenderTemplateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["template"] = o.Template + return toSerialize, nil +} + +func (o *TransformRenderTemplateRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "template", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformRenderTemplateRequest := _TransformRenderTemplateRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformRenderTemplateRequest) + + if err != nil { + return err + } + + *o = TransformRenderTemplateRequest(varTransformRenderTemplateRequest) + + return err +} + +type NullableTransformRenderTemplateRequest struct { + value *TransformRenderTemplateRequest + isSet bool +} + +func (v NullableTransformRenderTemplateRequest) Get() *TransformRenderTemplateRequest { + return v.value +} + +func (v *NullableTransformRenderTemplateRequest) Set(val *TransformRenderTemplateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformRenderTemplateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformRenderTemplateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformRenderTemplateRequest(val *TransformRenderTemplateRequest) *NullableTransformRenderTemplateRequest { + return &NullableTransformRenderTemplateRequest{value: val, isSet: true} +} + +func (v NullableTransformRenderTemplateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformRenderTemplateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_request.go b/azion-api/model_transform_request.go new file mode 100644 index 0000000..8a43a1c --- /dev/null +++ b/azion-api/model_transform_request.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// TransformRequest - struct for TransformRequest +type TransformRequest struct { + TransformTransformFilterWorkloadsAttributesRequest *TransformTransformFilterWorkloadsAttributesRequest + TransformTransformRenderTemplateAttributesRequest *TransformTransformRenderTemplateAttributesRequest + TransformTransformSamplingAttributesRequest *TransformTransformSamplingAttributesRequest +} + +// TransformTransformFilterWorkloadsAttributesRequestAsTransformRequest is a convenience function that returns TransformTransformFilterWorkloadsAttributesRequest wrapped in TransformRequest +func TransformTransformFilterWorkloadsAttributesRequestAsTransformRequest(v *TransformTransformFilterWorkloadsAttributesRequest) TransformRequest { + return TransformRequest{ + TransformTransformFilterWorkloadsAttributesRequest: v, + } +} + +// TransformTransformRenderTemplateAttributesRequestAsTransformRequest is a convenience function that returns TransformTransformRenderTemplateAttributesRequest wrapped in TransformRequest +func TransformTransformRenderTemplateAttributesRequestAsTransformRequest(v *TransformTransformRenderTemplateAttributesRequest) TransformRequest { + return TransformRequest{ + TransformTransformRenderTemplateAttributesRequest: v, + } +} + +// TransformTransformSamplingAttributesRequestAsTransformRequest is a convenience function that returns TransformTransformSamplingAttributesRequest wrapped in TransformRequest +func TransformTransformSamplingAttributesRequestAsTransformRequest(v *TransformTransformSamplingAttributesRequest) TransformRequest { + return TransformRequest{ + TransformTransformSamplingAttributesRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *TransformRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into TransformTransformFilterWorkloadsAttributesRequest + err = newStrictDecoder(data).Decode(&dst.TransformTransformFilterWorkloadsAttributesRequest) + if err == nil { + jsonTransformTransformFilterWorkloadsAttributesRequest, _ := json.Marshal(dst.TransformTransformFilterWorkloadsAttributesRequest) + if string(jsonTransformTransformFilterWorkloadsAttributesRequest) == "{}" { // empty struct + dst.TransformTransformFilterWorkloadsAttributesRequest = nil + } else { + if err = validator.Validate(dst.TransformTransformFilterWorkloadsAttributesRequest); err != nil { + dst.TransformTransformFilterWorkloadsAttributesRequest = nil + } else { + match++ + } + } + } else { + dst.TransformTransformFilterWorkloadsAttributesRequest = nil + } + + // try to unmarshal data into TransformTransformRenderTemplateAttributesRequest + err = newStrictDecoder(data).Decode(&dst.TransformTransformRenderTemplateAttributesRequest) + if err == nil { + jsonTransformTransformRenderTemplateAttributesRequest, _ := json.Marshal(dst.TransformTransformRenderTemplateAttributesRequest) + if string(jsonTransformTransformRenderTemplateAttributesRequest) == "{}" { // empty struct + dst.TransformTransformRenderTemplateAttributesRequest = nil + } else { + if err = validator.Validate(dst.TransformTransformRenderTemplateAttributesRequest); err != nil { + dst.TransformTransformRenderTemplateAttributesRequest = nil + } else { + match++ + } + } + } else { + dst.TransformTransformRenderTemplateAttributesRequest = nil + } + + // try to unmarshal data into TransformTransformSamplingAttributesRequest + err = newStrictDecoder(data).Decode(&dst.TransformTransformSamplingAttributesRequest) + if err == nil { + jsonTransformTransformSamplingAttributesRequest, _ := json.Marshal(dst.TransformTransformSamplingAttributesRequest) + if string(jsonTransformTransformSamplingAttributesRequest) == "{}" { // empty struct + dst.TransformTransformSamplingAttributesRequest = nil + } else { + if err = validator.Validate(dst.TransformTransformSamplingAttributesRequest); err != nil { + dst.TransformTransformSamplingAttributesRequest = nil + } else { + match++ + } + } + } else { + dst.TransformTransformSamplingAttributesRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.TransformTransformFilterWorkloadsAttributesRequest = nil + dst.TransformTransformRenderTemplateAttributesRequest = nil + dst.TransformTransformSamplingAttributesRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(TransformRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(TransformRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src TransformRequest) MarshalJSON() ([]byte, error) { + if src.TransformTransformFilterWorkloadsAttributesRequest != nil { + return json.Marshal(&src.TransformTransformFilterWorkloadsAttributesRequest) + } + + if src.TransformTransformRenderTemplateAttributesRequest != nil { + return json.Marshal(&src.TransformTransformRenderTemplateAttributesRequest) + } + + if src.TransformTransformSamplingAttributesRequest != nil { + return json.Marshal(&src.TransformTransformSamplingAttributesRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *TransformRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.TransformTransformFilterWorkloadsAttributesRequest != nil { + return obj.TransformTransformFilterWorkloadsAttributesRequest + } + + if obj.TransformTransformRenderTemplateAttributesRequest != nil { + return obj.TransformTransformRenderTemplateAttributesRequest + } + + if obj.TransformTransformSamplingAttributesRequest != nil { + return obj.TransformTransformSamplingAttributesRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj TransformRequest) GetActualInstanceValue() (interface{}) { + if obj.TransformTransformFilterWorkloadsAttributesRequest != nil { + return *obj.TransformTransformFilterWorkloadsAttributesRequest + } + + if obj.TransformTransformRenderTemplateAttributesRequest != nil { + return *obj.TransformTransformRenderTemplateAttributesRequest + } + + if obj.TransformTransformSamplingAttributesRequest != nil { + return *obj.TransformTransformSamplingAttributesRequest + } + + // all schemas are nil + return nil +} + +type NullableTransformRequest struct { + value *TransformRequest + isSet bool +} + +func (v NullableTransformRequest) Get() *TransformRequest { + return v.value +} + +func (v *NullableTransformRequest) Set(val *TransformRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformRequest(val *TransformRequest) *NullableTransformRequest { + return &NullableTransformRequest{value: val, isSet: true} +} + +func (v NullableTransformRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_sampling.go b/azion-api/model_transform_sampling.go new file mode 100644 index 0000000..689b179 --- /dev/null +++ b/azion-api/model_transform_sampling.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformSampling type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformSampling{} + +// TransformSampling Serializer for sampling transform attributes. +type TransformSampling struct { + Rate int64 `json:"rate"` +} + +type _TransformSampling TransformSampling + +// NewTransformSampling instantiates a new TransformSampling object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformSampling(rate int64) *TransformSampling { + this := TransformSampling{} + this.Rate = rate + return &this +} + +// NewTransformSamplingWithDefaults instantiates a new TransformSampling object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformSamplingWithDefaults() *TransformSampling { + this := TransformSampling{} + return &this +} + +// GetRate returns the Rate field value +func (o *TransformSampling) GetRate() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Rate +} + +// GetRateOk returns a tuple with the Rate field value +// and a boolean to check if the value has been set. +func (o *TransformSampling) GetRateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Rate, true +} + +// SetRate sets field value +func (o *TransformSampling) SetRate(v int64) { + o.Rate = v +} + +func (o TransformSampling) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformSampling) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rate"] = o.Rate + return toSerialize, nil +} + +func (o *TransformSampling) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rate", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformSampling := _TransformSampling{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformSampling) + + if err != nil { + return err + } + + *o = TransformSampling(varTransformSampling) + + return err +} + +type NullableTransformSampling struct { + value *TransformSampling + isSet bool +} + +func (v NullableTransformSampling) Get() *TransformSampling { + return v.value +} + +func (v *NullableTransformSampling) Set(val *TransformSampling) { + v.value = val + v.isSet = true +} + +func (v NullableTransformSampling) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformSampling) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformSampling(val *TransformSampling) *NullableTransformSampling { + return &NullableTransformSampling{value: val, isSet: true} +} + +func (v NullableTransformSampling) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformSampling) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_sampling_attributes.go b/azion-api/model_transform_sampling_attributes.go new file mode 100644 index 0000000..47ec037 --- /dev/null +++ b/azion-api/model_transform_sampling_attributes.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformSamplingAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformSamplingAttributes{} + +// TransformSamplingAttributes struct for TransformSamplingAttributes +type TransformSamplingAttributes struct { + // * `sampling` - Sampling + Type string `json:"type"` + Attributes TransformSampling `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _TransformSamplingAttributes TransformSamplingAttributes + +// NewTransformSamplingAttributes instantiates a new TransformSamplingAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformSamplingAttributes(type_ string, attributes TransformSampling) *TransformSamplingAttributes { + this := TransformSamplingAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformSamplingAttributesWithDefaults instantiates a new TransformSamplingAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformSamplingAttributesWithDefaults() *TransformSamplingAttributes { + this := TransformSamplingAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *TransformSamplingAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformSamplingAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformSamplingAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformSamplingAttributes) GetAttributes() TransformSampling { + if o == nil { + var ret TransformSampling + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformSamplingAttributes) GetAttributesOk() (*TransformSampling, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformSamplingAttributes) SetAttributes(v TransformSampling) { + o.Attributes = v +} + +func (o TransformSamplingAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformSamplingAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformSamplingAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformSamplingAttributes := _TransformSamplingAttributes{} + + err = json.Unmarshal(data, &varTransformSamplingAttributes) + + if err != nil { + return err + } + + *o = TransformSamplingAttributes(varTransformSamplingAttributes) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformSamplingAttributes struct { + value *TransformSamplingAttributes + isSet bool +} + +func (v NullableTransformSamplingAttributes) Get() *TransformSamplingAttributes { + return v.value +} + +func (v *NullableTransformSamplingAttributes) Set(val *TransformSamplingAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableTransformSamplingAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformSamplingAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformSamplingAttributes(val *TransformSamplingAttributes) *NullableTransformSamplingAttributes { + return &NullableTransformSamplingAttributes{value: val, isSet: true} +} + +func (v NullableTransformSamplingAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformSamplingAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_sampling_attributes_request.go b/azion-api/model_transform_sampling_attributes_request.go new file mode 100644 index 0000000..bcaa56f --- /dev/null +++ b/azion-api/model_transform_sampling_attributes_request.go @@ -0,0 +1,199 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformSamplingAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformSamplingAttributesRequest{} + +// TransformSamplingAttributesRequest struct for TransformSamplingAttributesRequest +type TransformSamplingAttributesRequest struct { + // * `sampling` - Sampling + Type string `json:"type"` + Attributes TransformSamplingRequest `json:"attributes"` + AdditionalProperties map[string]interface{} +} + +type _TransformSamplingAttributesRequest TransformSamplingAttributesRequest + +// NewTransformSamplingAttributesRequest instantiates a new TransformSamplingAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformSamplingAttributesRequest(type_ string, attributes TransformSamplingRequest) *TransformSamplingAttributesRequest { + this := TransformSamplingAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformSamplingAttributesRequestWithDefaults instantiates a new TransformSamplingAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformSamplingAttributesRequestWithDefaults() *TransformSamplingAttributesRequest { + this := TransformSamplingAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *TransformSamplingAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformSamplingAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformSamplingAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformSamplingAttributesRequest) GetAttributes() TransformSamplingRequest { + if o == nil { + var ret TransformSamplingRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformSamplingAttributesRequest) GetAttributesOk() (*TransformSamplingRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformSamplingAttributesRequest) SetAttributes(v TransformSamplingRequest) { + o.Attributes = v +} + +func (o TransformSamplingAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformSamplingAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformSamplingAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformSamplingAttributesRequest := _TransformSamplingAttributesRequest{} + + err = json.Unmarshal(data, &varTransformSamplingAttributesRequest) + + if err != nil { + return err + } + + *o = TransformSamplingAttributesRequest(varTransformSamplingAttributesRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "attributes") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformSamplingAttributesRequest struct { + value *TransformSamplingAttributesRequest + isSet bool +} + +func (v NullableTransformSamplingAttributesRequest) Get() *TransformSamplingAttributesRequest { + return v.value +} + +func (v *NullableTransformSamplingAttributesRequest) Set(val *TransformSamplingAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformSamplingAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformSamplingAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformSamplingAttributesRequest(val *TransformSamplingAttributesRequest) *NullableTransformSamplingAttributesRequest { + return &NullableTransformSamplingAttributesRequest{value: val, isSet: true} +} + +func (v NullableTransformSamplingAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformSamplingAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_sampling_request.go b/azion-api/model_transform_sampling_request.go new file mode 100644 index 0000000..2557fca --- /dev/null +++ b/azion-api/model_transform_sampling_request.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformSamplingRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformSamplingRequest{} + +// TransformSamplingRequest Serializer for sampling transform attributes. +type TransformSamplingRequest struct { + Rate int64 `json:"rate"` +} + +type _TransformSamplingRequest TransformSamplingRequest + +// NewTransformSamplingRequest instantiates a new TransformSamplingRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformSamplingRequest(rate int64) *TransformSamplingRequest { + this := TransformSamplingRequest{} + this.Rate = rate + return &this +} + +// NewTransformSamplingRequestWithDefaults instantiates a new TransformSamplingRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformSamplingRequestWithDefaults() *TransformSamplingRequest { + this := TransformSamplingRequest{} + return &this +} + +// GetRate returns the Rate field value +func (o *TransformSamplingRequest) GetRate() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Rate +} + +// GetRateOk returns a tuple with the Rate field value +// and a boolean to check if the value has been set. +func (o *TransformSamplingRequest) GetRateOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Rate, true +} + +// SetRate sets field value +func (o *TransformSamplingRequest) SetRate(v int64) { + o.Rate = v +} + +func (o TransformSamplingRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformSamplingRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["rate"] = o.Rate + return toSerialize, nil +} + +func (o *TransformSamplingRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "rate", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformSamplingRequest := _TransformSamplingRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformSamplingRequest) + + if err != nil { + return err + } + + *o = TransformSamplingRequest(varTransformSamplingRequest) + + return err +} + +type NullableTransformSamplingRequest struct { + value *TransformSamplingRequest + isSet bool +} + +func (v NullableTransformSamplingRequest) Get() *TransformSamplingRequest { + return v.value +} + +func (v *NullableTransformSamplingRequest) Set(val *TransformSamplingRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformSamplingRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformSamplingRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformSamplingRequest(val *TransformSamplingRequest) *NullableTransformSamplingRequest { + return &NullableTransformSamplingRequest{value: val, isSet: true} +} + +func (v NullableTransformSamplingRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformSamplingRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_shared.go b/azion-api/model_transform_shared.go new file mode 100644 index 0000000..43a0ad7 --- /dev/null +++ b/azion-api/model_transform_shared.go @@ -0,0 +1,169 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" +) + +// checks if the TransformShared type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformShared{} + +// TransformShared struct for TransformShared +type TransformShared struct { + Type string `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _TransformShared TransformShared + +// NewTransformShared instantiates a new TransformShared object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformShared(type_ string) *TransformShared { + this := TransformShared{} + this.Type = type_ + return &this +} + +// NewTransformSharedWithDefaults instantiates a new TransformShared object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformSharedWithDefaults() *TransformShared { + this := TransformShared{} + return &this +} + +// GetType returns the Type field value +func (o *TransformShared) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformShared) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformShared) SetType(v string) { + o.Type = v +} + +func (o TransformShared) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformShared) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *TransformShared) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformShared := _TransformShared{} + + err = json.Unmarshal(data, &varTransformShared) + + if err != nil { + return err + } + + *o = TransformShared(varTransformShared) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableTransformShared struct { + value *TransformShared + isSet bool +} + +func (v NullableTransformShared) Get() *TransformShared { + return v.value +} + +func (v *NullableTransformShared) Set(val *TransformShared) { + v.value = val + v.isSet = true +} + +func (v NullableTransformShared) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformShared) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformShared(val *TransformShared) *NullableTransformShared { + return &NullableTransformShared{value: val, isSet: true} +} + +func (v NullableTransformShared) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformShared) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_transform_filter_workloads_attributes.go b/azion-api/model_transform_transform_filter_workloads_attributes.go new file mode 100644 index 0000000..d3de6be --- /dev/null +++ b/azion-api/model_transform_transform_filter_workloads_attributes.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformTransformFilterWorkloadsAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformTransformFilterWorkloadsAttributes{} + +// TransformTransformFilterWorkloadsAttributes struct for TransformTransformFilterWorkloadsAttributes +type TransformTransformFilterWorkloadsAttributes struct { + // Type identifier for this endpoint (filter_workloads) + Type string `json:"type"` + Attributes TransformFilterWorkloads `json:"attributes"` +} + +type _TransformTransformFilterWorkloadsAttributes TransformTransformFilterWorkloadsAttributes + +// NewTransformTransformFilterWorkloadsAttributes instantiates a new TransformTransformFilterWorkloadsAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformTransformFilterWorkloadsAttributes(type_ string, attributes TransformFilterWorkloads) *TransformTransformFilterWorkloadsAttributes { + this := TransformTransformFilterWorkloadsAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformTransformFilterWorkloadsAttributesWithDefaults instantiates a new TransformTransformFilterWorkloadsAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformTransformFilterWorkloadsAttributesWithDefaults() *TransformTransformFilterWorkloadsAttributes { + this := TransformTransformFilterWorkloadsAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *TransformTransformFilterWorkloadsAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformTransformFilterWorkloadsAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformTransformFilterWorkloadsAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformTransformFilterWorkloadsAttributes) GetAttributes() TransformFilterWorkloads { + if o == nil { + var ret TransformFilterWorkloads + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformTransformFilterWorkloadsAttributes) GetAttributesOk() (*TransformFilterWorkloads, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformTransformFilterWorkloadsAttributes) SetAttributes(v TransformFilterWorkloads) { + o.Attributes = v +} + +func (o TransformTransformFilterWorkloadsAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformTransformFilterWorkloadsAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *TransformTransformFilterWorkloadsAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformTransformFilterWorkloadsAttributes := _TransformTransformFilterWorkloadsAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformTransformFilterWorkloadsAttributes) + + if err != nil { + return err + } + + *o = TransformTransformFilterWorkloadsAttributes(varTransformTransformFilterWorkloadsAttributes) + + return err +} + +type NullableTransformTransformFilterWorkloadsAttributes struct { + value *TransformTransformFilterWorkloadsAttributes + isSet bool +} + +func (v NullableTransformTransformFilterWorkloadsAttributes) Get() *TransformTransformFilterWorkloadsAttributes { + return v.value +} + +func (v *NullableTransformTransformFilterWorkloadsAttributes) Set(val *TransformTransformFilterWorkloadsAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableTransformTransformFilterWorkloadsAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformTransformFilterWorkloadsAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformTransformFilterWorkloadsAttributes(val *TransformTransformFilterWorkloadsAttributes) *NullableTransformTransformFilterWorkloadsAttributes { + return &NullableTransformTransformFilterWorkloadsAttributes{value: val, isSet: true} +} + +func (v NullableTransformTransformFilterWorkloadsAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformTransformFilterWorkloadsAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_transform_filter_workloads_attributes_request.go b/azion-api/model_transform_transform_filter_workloads_attributes_request.go new file mode 100644 index 0000000..17a47b8 --- /dev/null +++ b/azion-api/model_transform_transform_filter_workloads_attributes_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformTransformFilterWorkloadsAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformTransformFilterWorkloadsAttributesRequest{} + +// TransformTransformFilterWorkloadsAttributesRequest struct for TransformTransformFilterWorkloadsAttributesRequest +type TransformTransformFilterWorkloadsAttributesRequest struct { + // Type identifier for this endpoint (filter_workloads) + Type string `json:"type"` + Attributes TransformFilterWorkloadsRequest `json:"attributes"` +} + +type _TransformTransformFilterWorkloadsAttributesRequest TransformTransformFilterWorkloadsAttributesRequest + +// NewTransformTransformFilterWorkloadsAttributesRequest instantiates a new TransformTransformFilterWorkloadsAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformTransformFilterWorkloadsAttributesRequest(type_ string, attributes TransformFilterWorkloadsRequest) *TransformTransformFilterWorkloadsAttributesRequest { + this := TransformTransformFilterWorkloadsAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformTransformFilterWorkloadsAttributesRequestWithDefaults instantiates a new TransformTransformFilterWorkloadsAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformTransformFilterWorkloadsAttributesRequestWithDefaults() *TransformTransformFilterWorkloadsAttributesRequest { + this := TransformTransformFilterWorkloadsAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *TransformTransformFilterWorkloadsAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformTransformFilterWorkloadsAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformTransformFilterWorkloadsAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformTransformFilterWorkloadsAttributesRequest) GetAttributes() TransformFilterWorkloadsRequest { + if o == nil { + var ret TransformFilterWorkloadsRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformTransformFilterWorkloadsAttributesRequest) GetAttributesOk() (*TransformFilterWorkloadsRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformTransformFilterWorkloadsAttributesRequest) SetAttributes(v TransformFilterWorkloadsRequest) { + o.Attributes = v +} + +func (o TransformTransformFilterWorkloadsAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformTransformFilterWorkloadsAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *TransformTransformFilterWorkloadsAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformTransformFilterWorkloadsAttributesRequest := _TransformTransformFilterWorkloadsAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformTransformFilterWorkloadsAttributesRequest) + + if err != nil { + return err + } + + *o = TransformTransformFilterWorkloadsAttributesRequest(varTransformTransformFilterWorkloadsAttributesRequest) + + return err +} + +type NullableTransformTransformFilterWorkloadsAttributesRequest struct { + value *TransformTransformFilterWorkloadsAttributesRequest + isSet bool +} + +func (v NullableTransformTransformFilterWorkloadsAttributesRequest) Get() *TransformTransformFilterWorkloadsAttributesRequest { + return v.value +} + +func (v *NullableTransformTransformFilterWorkloadsAttributesRequest) Set(val *TransformTransformFilterWorkloadsAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformTransformFilterWorkloadsAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformTransformFilterWorkloadsAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformTransformFilterWorkloadsAttributesRequest(val *TransformTransformFilterWorkloadsAttributesRequest) *NullableTransformTransformFilterWorkloadsAttributesRequest { + return &NullableTransformTransformFilterWorkloadsAttributesRequest{value: val, isSet: true} +} + +func (v NullableTransformTransformFilterWorkloadsAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformTransformFilterWorkloadsAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_transform_render_template_attributes.go b/azion-api/model_transform_transform_render_template_attributes.go new file mode 100644 index 0000000..14a7286 --- /dev/null +++ b/azion-api/model_transform_transform_render_template_attributes.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformTransformRenderTemplateAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformTransformRenderTemplateAttributes{} + +// TransformTransformRenderTemplateAttributes struct for TransformTransformRenderTemplateAttributes +type TransformTransformRenderTemplateAttributes struct { + // Type identifier for this endpoint (render_template) + Type string `json:"type"` + Attributes TransformRenderTemplate `json:"attributes"` +} + +type _TransformTransformRenderTemplateAttributes TransformTransformRenderTemplateAttributes + +// NewTransformTransformRenderTemplateAttributes instantiates a new TransformTransformRenderTemplateAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformTransformRenderTemplateAttributes(type_ string, attributes TransformRenderTemplate) *TransformTransformRenderTemplateAttributes { + this := TransformTransformRenderTemplateAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformTransformRenderTemplateAttributesWithDefaults instantiates a new TransformTransformRenderTemplateAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformTransformRenderTemplateAttributesWithDefaults() *TransformTransformRenderTemplateAttributes { + this := TransformTransformRenderTemplateAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *TransformTransformRenderTemplateAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformTransformRenderTemplateAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformTransformRenderTemplateAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformTransformRenderTemplateAttributes) GetAttributes() TransformRenderTemplate { + if o == nil { + var ret TransformRenderTemplate + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformTransformRenderTemplateAttributes) GetAttributesOk() (*TransformRenderTemplate, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformTransformRenderTemplateAttributes) SetAttributes(v TransformRenderTemplate) { + o.Attributes = v +} + +func (o TransformTransformRenderTemplateAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformTransformRenderTemplateAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *TransformTransformRenderTemplateAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformTransformRenderTemplateAttributes := _TransformTransformRenderTemplateAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformTransformRenderTemplateAttributes) + + if err != nil { + return err + } + + *o = TransformTransformRenderTemplateAttributes(varTransformTransformRenderTemplateAttributes) + + return err +} + +type NullableTransformTransformRenderTemplateAttributes struct { + value *TransformTransformRenderTemplateAttributes + isSet bool +} + +func (v NullableTransformTransformRenderTemplateAttributes) Get() *TransformTransformRenderTemplateAttributes { + return v.value +} + +func (v *NullableTransformTransformRenderTemplateAttributes) Set(val *TransformTransformRenderTemplateAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableTransformTransformRenderTemplateAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformTransformRenderTemplateAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformTransformRenderTemplateAttributes(val *TransformTransformRenderTemplateAttributes) *NullableTransformTransformRenderTemplateAttributes { + return &NullableTransformTransformRenderTemplateAttributes{value: val, isSet: true} +} + +func (v NullableTransformTransformRenderTemplateAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformTransformRenderTemplateAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_transform_render_template_attributes_request.go b/azion-api/model_transform_transform_render_template_attributes_request.go new file mode 100644 index 0000000..ed71293 --- /dev/null +++ b/azion-api/model_transform_transform_render_template_attributes_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformTransformRenderTemplateAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformTransformRenderTemplateAttributesRequest{} + +// TransformTransformRenderTemplateAttributesRequest struct for TransformTransformRenderTemplateAttributesRequest +type TransformTransformRenderTemplateAttributesRequest struct { + // Type identifier for this endpoint (render_template) + Type string `json:"type"` + Attributes TransformRenderTemplateRequest `json:"attributes"` +} + +type _TransformTransformRenderTemplateAttributesRequest TransformTransformRenderTemplateAttributesRequest + +// NewTransformTransformRenderTemplateAttributesRequest instantiates a new TransformTransformRenderTemplateAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformTransformRenderTemplateAttributesRequest(type_ string, attributes TransformRenderTemplateRequest) *TransformTransformRenderTemplateAttributesRequest { + this := TransformTransformRenderTemplateAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformTransformRenderTemplateAttributesRequestWithDefaults instantiates a new TransformTransformRenderTemplateAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformTransformRenderTemplateAttributesRequestWithDefaults() *TransformTransformRenderTemplateAttributesRequest { + this := TransformTransformRenderTemplateAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *TransformTransformRenderTemplateAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformTransformRenderTemplateAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformTransformRenderTemplateAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformTransformRenderTemplateAttributesRequest) GetAttributes() TransformRenderTemplateRequest { + if o == nil { + var ret TransformRenderTemplateRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformTransformRenderTemplateAttributesRequest) GetAttributesOk() (*TransformRenderTemplateRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformTransformRenderTemplateAttributesRequest) SetAttributes(v TransformRenderTemplateRequest) { + o.Attributes = v +} + +func (o TransformTransformRenderTemplateAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformTransformRenderTemplateAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *TransformTransformRenderTemplateAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformTransformRenderTemplateAttributesRequest := _TransformTransformRenderTemplateAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformTransformRenderTemplateAttributesRequest) + + if err != nil { + return err + } + + *o = TransformTransformRenderTemplateAttributesRequest(varTransformTransformRenderTemplateAttributesRequest) + + return err +} + +type NullableTransformTransformRenderTemplateAttributesRequest struct { + value *TransformTransformRenderTemplateAttributesRequest + isSet bool +} + +func (v NullableTransformTransformRenderTemplateAttributesRequest) Get() *TransformTransformRenderTemplateAttributesRequest { + return v.value +} + +func (v *NullableTransformTransformRenderTemplateAttributesRequest) Set(val *TransformTransformRenderTemplateAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformTransformRenderTemplateAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformTransformRenderTemplateAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformTransformRenderTemplateAttributesRequest(val *TransformTransformRenderTemplateAttributesRequest) *NullableTransformTransformRenderTemplateAttributesRequest { + return &NullableTransformTransformRenderTemplateAttributesRequest{value: val, isSet: true} +} + +func (v NullableTransformTransformRenderTemplateAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformTransformRenderTemplateAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_transform_sampling_attributes.go b/azion-api/model_transform_transform_sampling_attributes.go new file mode 100644 index 0000000..5c4aff9 --- /dev/null +++ b/azion-api/model_transform_transform_sampling_attributes.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformTransformSamplingAttributes type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformTransformSamplingAttributes{} + +// TransformTransformSamplingAttributes struct for TransformTransformSamplingAttributes +type TransformTransformSamplingAttributes struct { + // Type identifier for this endpoint (sampling) + Type string `json:"type"` + Attributes TransformSampling `json:"attributes"` +} + +type _TransformTransformSamplingAttributes TransformTransformSamplingAttributes + +// NewTransformTransformSamplingAttributes instantiates a new TransformTransformSamplingAttributes object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformTransformSamplingAttributes(type_ string, attributes TransformSampling) *TransformTransformSamplingAttributes { + this := TransformTransformSamplingAttributes{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformTransformSamplingAttributesWithDefaults instantiates a new TransformTransformSamplingAttributes object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformTransformSamplingAttributesWithDefaults() *TransformTransformSamplingAttributes { + this := TransformTransformSamplingAttributes{} + return &this +} + +// GetType returns the Type field value +func (o *TransformTransformSamplingAttributes) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformTransformSamplingAttributes) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformTransformSamplingAttributes) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformTransformSamplingAttributes) GetAttributes() TransformSampling { + if o == nil { + var ret TransformSampling + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformTransformSamplingAttributes) GetAttributesOk() (*TransformSampling, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformTransformSamplingAttributes) SetAttributes(v TransformSampling) { + o.Attributes = v +} + +func (o TransformTransformSamplingAttributes) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformTransformSamplingAttributes) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *TransformTransformSamplingAttributes) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformTransformSamplingAttributes := _TransformTransformSamplingAttributes{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformTransformSamplingAttributes) + + if err != nil { + return err + } + + *o = TransformTransformSamplingAttributes(varTransformTransformSamplingAttributes) + + return err +} + +type NullableTransformTransformSamplingAttributes struct { + value *TransformTransformSamplingAttributes + isSet bool +} + +func (v NullableTransformTransformSamplingAttributes) Get() *TransformTransformSamplingAttributes { + return v.value +} + +func (v *NullableTransformTransformSamplingAttributes) Set(val *TransformTransformSamplingAttributes) { + v.value = val + v.isSet = true +} + +func (v NullableTransformTransformSamplingAttributes) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformTransformSamplingAttributes) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformTransformSamplingAttributes(val *TransformTransformSamplingAttributes) *NullableTransformTransformSamplingAttributes { + return &NullableTransformTransformSamplingAttributes{value: val, isSet: true} +} + +func (v NullableTransformTransformSamplingAttributes) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformTransformSamplingAttributes) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_transform_transform_sampling_attributes_request.go b/azion-api/model_transform_transform_sampling_attributes_request.go new file mode 100644 index 0000000..6817cdf --- /dev/null +++ b/azion-api/model_transform_transform_sampling_attributes_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the TransformTransformSamplingAttributesRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &TransformTransformSamplingAttributesRequest{} + +// TransformTransformSamplingAttributesRequest struct for TransformTransformSamplingAttributesRequest +type TransformTransformSamplingAttributesRequest struct { + // Type identifier for this endpoint (sampling) + Type string `json:"type"` + Attributes TransformSamplingRequest `json:"attributes"` +} + +type _TransformTransformSamplingAttributesRequest TransformTransformSamplingAttributesRequest + +// NewTransformTransformSamplingAttributesRequest instantiates a new TransformTransformSamplingAttributesRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewTransformTransformSamplingAttributesRequest(type_ string, attributes TransformSamplingRequest) *TransformTransformSamplingAttributesRequest { + this := TransformTransformSamplingAttributesRequest{} + this.Type = type_ + this.Attributes = attributes + return &this +} + +// NewTransformTransformSamplingAttributesRequestWithDefaults instantiates a new TransformTransformSamplingAttributesRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewTransformTransformSamplingAttributesRequestWithDefaults() *TransformTransformSamplingAttributesRequest { + this := TransformTransformSamplingAttributesRequest{} + return &this +} + +// GetType returns the Type field value +func (o *TransformTransformSamplingAttributesRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *TransformTransformSamplingAttributesRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *TransformTransformSamplingAttributesRequest) SetType(v string) { + o.Type = v +} + +// GetAttributes returns the Attributes field value +func (o *TransformTransformSamplingAttributesRequest) GetAttributes() TransformSamplingRequest { + if o == nil { + var ret TransformSamplingRequest + return ret + } + + return o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value +// and a boolean to check if the value has been set. +func (o *TransformTransformSamplingAttributesRequest) GetAttributesOk() (*TransformSamplingRequest, bool) { + if o == nil { + return nil, false + } + return &o.Attributes, true +} + +// SetAttributes sets field value +func (o *TransformTransformSamplingAttributesRequest) SetAttributes(v TransformSamplingRequest) { + o.Attributes = v +} + +func (o TransformTransformSamplingAttributesRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o TransformTransformSamplingAttributesRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["attributes"] = o.Attributes + return toSerialize, nil +} + +func (o *TransformTransformSamplingAttributesRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "attributes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransformTransformSamplingAttributesRequest := _TransformTransformSamplingAttributesRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varTransformTransformSamplingAttributesRequest) + + if err != nil { + return err + } + + *o = TransformTransformSamplingAttributesRequest(varTransformTransformSamplingAttributesRequest) + + return err +} + +type NullableTransformTransformSamplingAttributesRequest struct { + value *TransformTransformSamplingAttributesRequest + isSet bool +} + +func (v NullableTransformTransformSamplingAttributesRequest) Get() *TransformTransformSamplingAttributesRequest { + return v.value +} + +func (v *NullableTransformTransformSamplingAttributesRequest) Set(val *TransformTransformSamplingAttributesRequest) { + v.value = val + v.isSet = true +} + +func (v NullableTransformTransformSamplingAttributesRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableTransformTransformSamplingAttributesRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTransformTransformSamplingAttributesRequest(val *TransformTransformSamplingAttributesRequest) *NullableTransformTransformSamplingAttributesRequest { + return &NullableTransformTransformSamplingAttributesRequest{value: val, isSet: true} +} + +func (v NullableTransformTransformSamplingAttributesRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTransformTransformSamplingAttributesRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_update_account_info_details_request.go b/azion-api/model_update_account_info_details_request.go new file mode 100644 index 0000000..46ffd57 --- /dev/null +++ b/azion-api/model_update_account_info_details_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the UpdateAccountInfoDetailsRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateAccountInfoDetailsRequest{} + +// UpdateAccountInfoDetailsRequest struct for UpdateAccountInfoDetailsRequest +type UpdateAccountInfoDetailsRequest struct { + Info *AccountInfoRequest `json:"info,omitempty"` +} + +// NewUpdateAccountInfoDetailsRequest instantiates a new UpdateAccountInfoDetailsRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateAccountInfoDetailsRequest() *UpdateAccountInfoDetailsRequest { + this := UpdateAccountInfoDetailsRequest{} + return &this +} + +// NewUpdateAccountInfoDetailsRequestWithDefaults instantiates a new UpdateAccountInfoDetailsRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateAccountInfoDetailsRequestWithDefaults() *UpdateAccountInfoDetailsRequest { + this := UpdateAccountInfoDetailsRequest{} + return &this +} + +// GetInfo returns the Info field value if set, zero value otherwise. +func (o *UpdateAccountInfoDetailsRequest) GetInfo() AccountInfoRequest { + if o == nil || IsNil(o.Info) { + var ret AccountInfoRequest + return ret + } + return *o.Info +} + +// GetInfoOk returns a tuple with the Info field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAccountInfoDetailsRequest) GetInfoOk() (*AccountInfoRequest, bool) { + if o == nil || IsNil(o.Info) { + return nil, false + } + return o.Info, true +} + +// HasInfo returns a boolean if a field has been set. +func (o *UpdateAccountInfoDetailsRequest) HasInfo() bool { + if o != nil && !IsNil(o.Info) { + return true + } + + return false +} + +// SetInfo gets a reference to the given AccountInfoRequest and assigns it to the Info field. +func (o *UpdateAccountInfoDetailsRequest) SetInfo(v AccountInfoRequest) { + o.Info = &v +} + +func (o UpdateAccountInfoDetailsRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateAccountInfoDetailsRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Info) { + toSerialize["info"] = o.Info + } + return toSerialize, nil +} + +type NullableUpdateAccountInfoDetailsRequest struct { + value *UpdateAccountInfoDetailsRequest + isSet bool +} + +func (v NullableUpdateAccountInfoDetailsRequest) Get() *UpdateAccountInfoDetailsRequest { + return v.value +} + +func (v *NullableUpdateAccountInfoDetailsRequest) Set(val *UpdateAccountInfoDetailsRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateAccountInfoDetailsRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateAccountInfoDetailsRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateAccountInfoDetailsRequest(val *UpdateAccountInfoDetailsRequest) *NullableUpdateAccountInfoDetailsRequest { + return &NullableUpdateAccountInfoDetailsRequest{value: val, isSet: true} +} + +func (v NullableUpdateAccountInfoDetailsRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateAccountInfoDetailsRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_update_user_info_request.go b/azion-api/model_update_user_info_request.go new file mode 100644 index 0000000..8a2f685 --- /dev/null +++ b/azion-api/model_update_user_info_request.go @@ -0,0 +1,127 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the UpdateUserInfoRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUserInfoRequest{} + +// UpdateUserInfoRequest struct for UpdateUserInfoRequest +type UpdateUserInfoRequest struct { + Info *UserInfoRequest `json:"info,omitempty"` +} + +// NewUpdateUserInfoRequest instantiates a new UpdateUserInfoRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateUserInfoRequest() *UpdateUserInfoRequest { + this := UpdateUserInfoRequest{} + return &this +} + +// NewUpdateUserInfoRequestWithDefaults instantiates a new UpdateUserInfoRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateUserInfoRequestWithDefaults() *UpdateUserInfoRequest { + this := UpdateUserInfoRequest{} + return &this +} + +// GetInfo returns the Info field value if set, zero value otherwise. +func (o *UpdateUserInfoRequest) GetInfo() UserInfoRequest { + if o == nil || IsNil(o.Info) { + var ret UserInfoRequest + return ret + } + return *o.Info +} + +// GetInfoOk returns a tuple with the Info field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUserInfoRequest) GetInfoOk() (*UserInfoRequest, bool) { + if o == nil || IsNil(o.Info) { + return nil, false + } + return o.Info, true +} + +// HasInfo returns a boolean if a field has been set. +func (o *UpdateUserInfoRequest) HasInfo() bool { + if o != nil && !IsNil(o.Info) { + return true + } + + return false +} + +// SetInfo gets a reference to the given UserInfoRequest and assigns it to the Info field. +func (o *UpdateUserInfoRequest) SetInfo(v UserInfoRequest) { + o.Info = &v +} + +func (o UpdateUserInfoRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateUserInfoRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Info) { + toSerialize["info"] = o.Info + } + return toSerialize, nil +} + +type NullableUpdateUserInfoRequest struct { + value *UpdateUserInfoRequest + isSet bool +} + +func (v NullableUpdateUserInfoRequest) Get() *UpdateUserInfoRequest { + return v.value +} + +func (v *NullableUpdateUserInfoRequest) Set(val *UpdateUserInfoRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUserInfoRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUserInfoRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUserInfoRequest(val *UpdateUserInfoRequest) *NullableUpdateUserInfoRequest { + return &NullableUpdateUserInfoRequest{value: val, isSet: true} +} + +func (v NullableUpdateUserInfoRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUserInfoRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_update_zone_request.go b/azion-api/model_update_zone_request.go new file mode 100644 index 0000000..ec59ce6 --- /dev/null +++ b/azion-api/model_update_zone_request.go @@ -0,0 +1,187 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the UpdateZoneRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateZoneRequest{} + +// UpdateZoneRequest struct for UpdateZoneRequest +type UpdateZoneRequest struct { + Name string `json:"name"` + Active bool `json:"active"` +} + +type _UpdateZoneRequest UpdateZoneRequest + +// NewUpdateZoneRequest instantiates a new UpdateZoneRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateZoneRequest(name string, active bool) *UpdateZoneRequest { + this := UpdateZoneRequest{} + this.Name = name + this.Active = active + return &this +} + +// NewUpdateZoneRequestWithDefaults instantiates a new UpdateZoneRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateZoneRequestWithDefaults() *UpdateZoneRequest { + this := UpdateZoneRequest{} + return &this +} + +// GetName returns the Name field value +func (o *UpdateZoneRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdateZoneRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateZoneRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *UpdateZoneRequest) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *UpdateZoneRequest) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *UpdateZoneRequest) SetActive(v bool) { + o.Active = v +} + +func (o UpdateZoneRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateZoneRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + return toSerialize, nil +} + +func (o *UpdateZoneRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "active", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateZoneRequest := _UpdateZoneRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateZoneRequest) + + if err != nil { + return err + } + + *o = UpdateZoneRequest(varUpdateZoneRequest) + + return err +} + +type NullableUpdateZoneRequest struct { + value *UpdateZoneRequest + isSet bool +} + +func (v NullableUpdateZoneRequest) Get() *UpdateZoneRequest { + return v.value +} + +func (v *NullableUpdateZoneRequest) Set(val *UpdateZoneRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateZoneRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateZoneRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateZoneRequest(val *UpdateZoneRequest) *NullableUpdateZoneRequest { + return &NullableUpdateZoneRequest{value: val, isSet: true} +} + +func (v NullableUpdateZoneRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateZoneRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_user.go b/azion-api/model_user.go new file mode 100644 index 0000000..805babb --- /dev/null +++ b/azion-api/model_user.go @@ -0,0 +1,557 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Created time.Time `json:"created"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + Active *bool `json:"active,omitempty"` + AccountId int64 `json:"account_id"` + LastLogin time.Time `json:"last_login"` + TwoFactorEnabled *bool `json:"two_factor_enabled,omitempty"` + // User-specific preferences in JSON format. + Preferences map[string]interface{} `json:"preferences,omitempty"` + Phone *string `json:"phone,omitempty"` + Info map[string]interface{} `json:"info"` + Lockout string `json:"lockout"` +} + +type _User User + +// NewUser instantiates a new User object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUser(id int64, name string, email string, created time.Time, lastEditor string, lastModified time.Time, accountId int64, lastLogin time.Time, info map[string]interface{}, lockout string) *User { + this := User{} + this.Id = id + this.Name = name + this.Email = email + this.Created = created + this.LastEditor = lastEditor + this.LastModified = lastModified + this.AccountId = accountId + this.LastLogin = lastLogin + this.Info = info + this.Lockout = lockout + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetId returns the Id field value +func (o *User) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *User) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *User) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *User) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *User) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *User) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *User) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *User) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *User) SetEmail(v string) { + o.Email = v +} + +// GetCreated returns the Created field value +func (o *User) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *User) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *User) SetCreated(v time.Time) { + o.Created = v +} + +// GetLastEditor returns the LastEditor field value +func (o *User) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *User) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *User) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *User) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *User) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *User) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *User) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *User) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *User) SetActive(v bool) { + o.Active = &v +} + +// GetAccountId returns the AccountId field value +func (o *User) GetAccountId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *User) GetAccountIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *User) SetAccountId(v int64) { + o.AccountId = v +} + +// GetLastLogin returns the LastLogin field value +func (o *User) GetLastLogin() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastLogin +} + +// GetLastLoginOk returns a tuple with the LastLogin field value +// and a boolean to check if the value has been set. +func (o *User) GetLastLoginOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastLogin, true +} + +// SetLastLogin sets field value +func (o *User) SetLastLogin(v time.Time) { + o.LastLogin = v +} + +// GetTwoFactorEnabled returns the TwoFactorEnabled field value if set, zero value otherwise. +func (o *User) GetTwoFactorEnabled() bool { + if o == nil || IsNil(o.TwoFactorEnabled) { + var ret bool + return ret + } + return *o.TwoFactorEnabled +} + +// GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetTwoFactorEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.TwoFactorEnabled) { + return nil, false + } + return o.TwoFactorEnabled, true +} + +// HasTwoFactorEnabled returns a boolean if a field has been set. +func (o *User) HasTwoFactorEnabled() bool { + if o != nil && !IsNil(o.TwoFactorEnabled) { + return true + } + + return false +} + +// SetTwoFactorEnabled gets a reference to the given bool and assigns it to the TwoFactorEnabled field. +func (o *User) SetTwoFactorEnabled(v bool) { + o.TwoFactorEnabled = &v +} + +// GetPreferences returns the Preferences field value if set, zero value otherwise. +func (o *User) GetPreferences() map[string]interface{} { + if o == nil || IsNil(o.Preferences) { + var ret map[string]interface{} + return ret + } + return o.Preferences +} + +// GetPreferencesOk returns a tuple with the Preferences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPreferencesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Preferences) { + return map[string]interface{}{}, false + } + return o.Preferences, true +} + +// HasPreferences returns a boolean if a field has been set. +func (o *User) HasPreferences() bool { + if o != nil && !IsNil(o.Preferences) { + return true + } + + return false +} + +// SetPreferences gets a reference to the given map[string]interface{} and assigns it to the Preferences field. +func (o *User) SetPreferences(v map[string]interface{}) { + o.Preferences = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *User) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *User) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *User) SetPhone(v string) { + o.Phone = &v +} + +// GetInfo returns the Info field value +func (o *User) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *User) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *User) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetLockout returns the Lockout field value +func (o *User) GetLockout() string { + if o == nil { + var ret string + return ret + } + + return o.Lockout +} + +// GetLockoutOk returns a tuple with the Lockout field value +// and a boolean to check if the value has been set. +func (o *User) GetLockoutOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Lockout, true +} + +// SetLockout sets field value +func (o *User) SetLockout(v string) { + o.Lockout = v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + toSerialize["created"] = o.Created + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["account_id"] = o.AccountId + toSerialize["last_login"] = o.LastLogin + if !IsNil(o.TwoFactorEnabled) { + toSerialize["two_factor_enabled"] = o.TwoFactorEnabled + } + if !IsNil(o.Preferences) { + toSerialize["preferences"] = o.Preferences + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + toSerialize["info"] = o.Info + toSerialize["lockout"] = o.Lockout + return toSerialize, nil +} + +func (o *User) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "email", + "created", + "last_editor", + "last_modified", + "account_id", + "last_login", + "info", + "lockout", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUser := _User{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUser) + + if err != nil { + return err + } + + *o = User(varUser) + + return err +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_user_info.go b/azion-api/model_user_info.go new file mode 100644 index 0000000..400667e --- /dev/null +++ b/azion-api/model_user_info.go @@ -0,0 +1,159 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the UserInfo type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserInfo{} + +// UserInfo struct for UserInfo +type UserInfo struct { + Info map[string]interface{} `json:"info"` +} + +type _UserInfo UserInfo + +// NewUserInfo instantiates a new UserInfo object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserInfo(info map[string]interface{}) *UserInfo { + this := UserInfo{} + this.Info = info + return &this +} + +// NewUserInfoWithDefaults instantiates a new UserInfo object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserInfoWithDefaults() *UserInfo { + this := UserInfo{} + return &this +} + +// GetInfo returns the Info field value +func (o *UserInfo) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *UserInfo) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *UserInfo) SetInfo(v map[string]interface{}) { + o.Info = v +} + +func (o UserInfo) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserInfo) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["info"] = o.Info + return toSerialize, nil +} + +func (o *UserInfo) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "info", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserInfo := _UserInfo{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserInfo) + + if err != nil { + return err + } + + *o = UserInfo(varUserInfo) + + return err +} + +type NullableUserInfo struct { + value *UserInfo + isSet bool +} + +func (v NullableUserInfo) Get() *UserInfo { + return v.value +} + +func (v *NullableUserInfo) Set(val *UserInfo) { + v.value = val + v.isSet = true +} + +func (v NullableUserInfo) IsSet() bool { + return v.isSet +} + +func (v *NullableUserInfo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserInfo(val *UserInfo) *NullableUserInfo { + return &NullableUserInfo{value: val, isSet: true} +} + +func (v NullableUserInfo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserInfo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_user_info_request.go b/azion-api/model_user_info_request.go new file mode 100644 index 0000000..851b1f9 --- /dev/null +++ b/azion-api/model_user_info_request.go @@ -0,0 +1,128 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the UserInfoRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserInfoRequest{} + +// UserInfoRequest struct for UserInfoRequest +type UserInfoRequest struct { + // The job function. + JobFunction *string `json:"job_function,omitempty"` +} + +// NewUserInfoRequest instantiates a new UserInfoRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserInfoRequest() *UserInfoRequest { + this := UserInfoRequest{} + return &this +} + +// NewUserInfoRequestWithDefaults instantiates a new UserInfoRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserInfoRequestWithDefaults() *UserInfoRequest { + this := UserInfoRequest{} + return &this +} + +// GetJobFunction returns the JobFunction field value if set, zero value otherwise. +func (o *UserInfoRequest) GetJobFunction() string { + if o == nil || IsNil(o.JobFunction) { + var ret string + return ret + } + return *o.JobFunction +} + +// GetJobFunctionOk returns a tuple with the JobFunction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserInfoRequest) GetJobFunctionOk() (*string, bool) { + if o == nil || IsNil(o.JobFunction) { + return nil, false + } + return o.JobFunction, true +} + +// HasJobFunction returns a boolean if a field has been set. +func (o *UserInfoRequest) HasJobFunction() bool { + if o != nil && !IsNil(o.JobFunction) { + return true + } + + return false +} + +// SetJobFunction gets a reference to the given string and assigns it to the JobFunction field. +func (o *UserInfoRequest) SetJobFunction(v string) { + o.JobFunction = &v +} + +func (o UserInfoRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserInfoRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.JobFunction) { + toSerialize["job_function"] = o.JobFunction + } + return toSerialize, nil +} + +type NullableUserInfoRequest struct { + value *UserInfoRequest + isSet bool +} + +func (v NullableUserInfoRequest) Get() *UserInfoRequest { + return v.value +} + +func (v *NullableUserInfoRequest) Set(val *UserInfoRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUserInfoRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUserInfoRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserInfoRequest(val *UserInfoRequest) *NullableUserInfoRequest { + return &NullableUserInfoRequest{value: val, isSet: true} +} + +func (v NullableUserInfoRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserInfoRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_user_login_method_response.go b/azion-api/model_user_login_method_response.go new file mode 100644 index 0000000..e83db60 --- /dev/null +++ b/azion-api/model_user_login_method_response.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the UserLoginMethodResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserLoginMethodResponse{} + +// UserLoginMethodResponse struct for UserLoginMethodResponse +type UserLoginMethodResponse struct { + // Login method type (lowercase with underscores) + Method string `json:"method"` + Url string `json:"url"` +} + +type _UserLoginMethodResponse UserLoginMethodResponse + +// NewUserLoginMethodResponse instantiates a new UserLoginMethodResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserLoginMethodResponse(method string, url string) *UserLoginMethodResponse { + this := UserLoginMethodResponse{} + this.Method = method + this.Url = url + return &this +} + +// NewUserLoginMethodResponseWithDefaults instantiates a new UserLoginMethodResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserLoginMethodResponseWithDefaults() *UserLoginMethodResponse { + this := UserLoginMethodResponse{} + return &this +} + +// GetMethod returns the Method field value +func (o *UserLoginMethodResponse) GetMethod() string { + if o == nil { + var ret string + return ret + } + + return o.Method +} + +// GetMethodOk returns a tuple with the Method field value +// and a boolean to check if the value has been set. +func (o *UserLoginMethodResponse) GetMethodOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Method, true +} + +// SetMethod sets field value +func (o *UserLoginMethodResponse) SetMethod(v string) { + o.Method = v +} + +// GetUrl returns the Url field value +func (o *UserLoginMethodResponse) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *UserLoginMethodResponse) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *UserLoginMethodResponse) SetUrl(v string) { + o.Url = v +} + +func (o UserLoginMethodResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserLoginMethodResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["method"] = o.Method + toSerialize["url"] = o.Url + return toSerialize, nil +} + +func (o *UserLoginMethodResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "method", + "url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserLoginMethodResponse := _UserLoginMethodResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserLoginMethodResponse) + + if err != nil { + return err + } + + *o = UserLoginMethodResponse(varUserLoginMethodResponse) + + return err +} + +type NullableUserLoginMethodResponse struct { + value *UserLoginMethodResponse + isSet bool +} + +func (v NullableUserLoginMethodResponse) Get() *UserLoginMethodResponse { + return v.value +} + +func (v *NullableUserLoginMethodResponse) Set(val *UserLoginMethodResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUserLoginMethodResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUserLoginMethodResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserLoginMethodResponse(val *UserLoginMethodResponse) *NullableUserLoginMethodResponse { + return &NullableUserLoginMethodResponse{value: val, isSet: true} +} + +func (v NullableUserLoginMethodResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserLoginMethodResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_user_request.go b/azion-api/model_user_request.go new file mode 100644 index 0000000..141363b --- /dev/null +++ b/azion-api/model_user_request.go @@ -0,0 +1,332 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the UserRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UserRequest{} + +// UserRequest struct for UserRequest +type UserRequest struct { + Name string `json:"name"` + Email string `json:"email"` + Active *bool `json:"active,omitempty"` + TwoFactorEnabled *bool `json:"two_factor_enabled,omitempty"` + // User-specific preferences in JSON format. + Preferences map[string]interface{} `json:"preferences,omitempty"` + Phone *string `json:"phone,omitempty"` +} + +type _UserRequest UserRequest + +// NewUserRequest instantiates a new UserRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUserRequest(name string, email string) *UserRequest { + this := UserRequest{} + this.Name = name + this.Email = email + return &this +} + +// NewUserRequestWithDefaults instantiates a new UserRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUserRequestWithDefaults() *UserRequest { + this := UserRequest{} + return &this +} + +// GetName returns the Name field value +func (o *UserRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UserRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UserRequest) SetName(v string) { + o.Name = v +} + +// GetEmail returns the Email field value +func (o *UserRequest) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// GetEmailOk returns a tuple with the Email field value +// and a boolean to check if the value has been set. +func (o *UserRequest) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Email, true +} + +// SetEmail sets field value +func (o *UserRequest) SetEmail(v string) { + o.Email = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *UserRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *UserRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *UserRequest) SetActive(v bool) { + o.Active = &v +} + +// GetTwoFactorEnabled returns the TwoFactorEnabled field value if set, zero value otherwise. +func (o *UserRequest) GetTwoFactorEnabled() bool { + if o == nil || IsNil(o.TwoFactorEnabled) { + var ret bool + return ret + } + return *o.TwoFactorEnabled +} + +// GetTwoFactorEnabledOk returns a tuple with the TwoFactorEnabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRequest) GetTwoFactorEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.TwoFactorEnabled) { + return nil, false + } + return o.TwoFactorEnabled, true +} + +// HasTwoFactorEnabled returns a boolean if a field has been set. +func (o *UserRequest) HasTwoFactorEnabled() bool { + if o != nil && !IsNil(o.TwoFactorEnabled) { + return true + } + + return false +} + +// SetTwoFactorEnabled gets a reference to the given bool and assigns it to the TwoFactorEnabled field. +func (o *UserRequest) SetTwoFactorEnabled(v bool) { + o.TwoFactorEnabled = &v +} + +// GetPreferences returns the Preferences field value if set, zero value otherwise. +func (o *UserRequest) GetPreferences() map[string]interface{} { + if o == nil || IsNil(o.Preferences) { + var ret map[string]interface{} + return ret + } + return o.Preferences +} + +// GetPreferencesOk returns a tuple with the Preferences field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRequest) GetPreferencesOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Preferences) { + return map[string]interface{}{}, false + } + return o.Preferences, true +} + +// HasPreferences returns a boolean if a field has been set. +func (o *UserRequest) HasPreferences() bool { + if o != nil && !IsNil(o.Preferences) { + return true + } + + return false +} + +// SetPreferences gets a reference to the given map[string]interface{} and assigns it to the Preferences field. +func (o *UserRequest) SetPreferences(v map[string]interface{}) { + o.Preferences = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *UserRequest) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UserRequest) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *UserRequest) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *UserRequest) SetPhone(v string) { + o.Phone = &v +} + +func (o UserRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UserRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["email"] = o.Email + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.TwoFactorEnabled) { + toSerialize["two_factor_enabled"] = o.TwoFactorEnabled + } + if !IsNil(o.Preferences) { + toSerialize["preferences"] = o.Preferences + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + return toSerialize, nil +} + +func (o *UserRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "email", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUserRequest := _UserRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUserRequest) + + if err != nil { + return err + } + + *o = UserRequest(varUserRequest) + + return err +} + +type NullableUserRequest struct { + value *UserRequest + isSet bool +} + +func (v NullableUserRequest) Get() *UserRequest { + return v.value +} + +func (v *NullableUserRequest) Set(val *UserRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUserRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUserRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUserRequest(val *UserRequest) *NullableUserRequest { + return &NullableUserRequest{value: val, isSet: true} +} + +func (v NullableUserRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUserRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf.go b/azion-api/model_waf.go new file mode 100644 index 0000000..cadb781 --- /dev/null +++ b/azion-api/model_waf.go @@ -0,0 +1,362 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the WAF type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAF{} + +// WAF struct for WAF +type WAF struct { + Id int64 `json:"id"` + Active *bool `json:"active,omitempty"` + Name string `json:"name"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ProductVersion NullableString `json:"product_version,omitempty"` + EngineSettings *WAFEngineSettingsField `json:"engine_settings,omitempty"` +} + +type _WAF WAF + +// NewWAF instantiates a new WAF object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAF(id int64, name string, lastEditor string, lastModified time.Time) *WAF { + this := WAF{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewWAFWithDefaults instantiates a new WAF object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFWithDefaults() *WAF { + this := WAF{} + return &this +} + +// GetId returns the Id field value +func (o *WAF) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WAF) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WAF) SetId(v int64) { + o.Id = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WAF) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAF) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WAF) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WAF) SetActive(v bool) { + o.Active = &v +} + +// GetName returns the Name field value +func (o *WAF) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAF) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WAF) SetName(v string) { + o.Name = v +} + +// GetLastEditor returns the LastEditor field value +func (o *WAF) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *WAF) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *WAF) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *WAF) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *WAF) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *WAF) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WAF) GetProductVersion() string { + if o == nil || IsNil(o.ProductVersion.Get()) { + var ret string + return ret + } + return *o.ProductVersion.Get() +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WAF) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProductVersion.Get(), o.ProductVersion.IsSet() +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *WAF) HasProductVersion() bool { + if o != nil && o.ProductVersion.IsSet() { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given NullableString and assigns it to the ProductVersion field. +func (o *WAF) SetProductVersion(v string) { + o.ProductVersion.Set(&v) +} +// SetProductVersionNil sets the value for ProductVersion to be an explicit nil +func (o *WAF) SetProductVersionNil() { + o.ProductVersion.Set(nil) +} + +// UnsetProductVersion ensures that no value is present for ProductVersion, not even an explicit nil +func (o *WAF) UnsetProductVersion() { + o.ProductVersion.Unset() +} + +// GetEngineSettings returns the EngineSettings field value if set, zero value otherwise. +func (o *WAF) GetEngineSettings() WAFEngineSettingsField { + if o == nil || IsNil(o.EngineSettings) { + var ret WAFEngineSettingsField + return ret + } + return *o.EngineSettings +} + +// GetEngineSettingsOk returns a tuple with the EngineSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAF) GetEngineSettingsOk() (*WAFEngineSettingsField, bool) { + if o == nil || IsNil(o.EngineSettings) { + return nil, false + } + return o.EngineSettings, true +} + +// HasEngineSettings returns a boolean if a field has been set. +func (o *WAF) HasEngineSettings() bool { + if o != nil && !IsNil(o.EngineSettings) { + return true + } + + return false +} + +// SetEngineSettings gets a reference to the given WAFEngineSettingsField and assigns it to the EngineSettings field. +func (o *WAF) SetEngineSettings(v WAFEngineSettingsField) { + o.EngineSettings = &v +} + +func (o WAF) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAF) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["name"] = o.Name + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if o.ProductVersion.IsSet() { + toSerialize["product_version"] = o.ProductVersion.Get() + } + if !IsNil(o.EngineSettings) { + toSerialize["engine_settings"] = o.EngineSettings + } + return toSerialize, nil +} + +func (o *WAF) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAF := _WAF{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAF) + + if err != nil { + return err + } + + *o = WAF(varWAF) + + return err +} + +type NullableWAF struct { + value *WAF + isSet bool +} + +func (v NullableWAF) Get() *WAF { + return v.value +} + +func (v *NullableWAF) Set(val *WAF) { + v.value = val + v.isSet = true +} + +func (v NullableWAF) IsSet() bool { + return v.isSet +} + +func (v *NullableWAF) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAF(val *WAF) *NullableWAF { + return &NullableWAF{value: val, isSet: true} +} + +func (v NullableWAF) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAF) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_engine_settings_attributes_field.go b/azion-api/model_waf_engine_settings_attributes_field.go new file mode 100644 index 0000000..13f2a4b --- /dev/null +++ b/azion-api/model_waf_engine_settings_attributes_field.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the WAFEngineSettingsAttributesField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFEngineSettingsAttributesField{} + +// WAFEngineSettingsAttributesField struct for WAFEngineSettingsAttributesField +type WAFEngineSettingsAttributesField struct { + Rulesets []int64 `json:"rulesets,omitempty"` + Thresholds []ThresholdsConfigField `json:"thresholds,omitempty"` +} + +// NewWAFEngineSettingsAttributesField instantiates a new WAFEngineSettingsAttributesField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFEngineSettingsAttributesField() *WAFEngineSettingsAttributesField { + this := WAFEngineSettingsAttributesField{} + return &this +} + +// NewWAFEngineSettingsAttributesFieldWithDefaults instantiates a new WAFEngineSettingsAttributesField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFEngineSettingsAttributesFieldWithDefaults() *WAFEngineSettingsAttributesField { + this := WAFEngineSettingsAttributesField{} + return &this +} + +// GetRulesets returns the Rulesets field value if set, zero value otherwise. +func (o *WAFEngineSettingsAttributesField) GetRulesets() []int64 { + if o == nil || IsNil(o.Rulesets) { + var ret []int64 + return ret + } + return o.Rulesets +} + +// GetRulesetsOk returns a tuple with the Rulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsAttributesField) GetRulesetsOk() ([]int64, bool) { + if o == nil || IsNil(o.Rulesets) { + return nil, false + } + return o.Rulesets, true +} + +// HasRulesets returns a boolean if a field has been set. +func (o *WAFEngineSettingsAttributesField) HasRulesets() bool { + if o != nil && !IsNil(o.Rulesets) { + return true + } + + return false +} + +// SetRulesets gets a reference to the given []int64 and assigns it to the Rulesets field. +func (o *WAFEngineSettingsAttributesField) SetRulesets(v []int64) { + o.Rulesets = v +} + +// GetThresholds returns the Thresholds field value if set, zero value otherwise. +func (o *WAFEngineSettingsAttributesField) GetThresholds() []ThresholdsConfigField { + if o == nil || IsNil(o.Thresholds) { + var ret []ThresholdsConfigField + return ret + } + return o.Thresholds +} + +// GetThresholdsOk returns a tuple with the Thresholds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsAttributesField) GetThresholdsOk() ([]ThresholdsConfigField, bool) { + if o == nil || IsNil(o.Thresholds) { + return nil, false + } + return o.Thresholds, true +} + +// HasThresholds returns a boolean if a field has been set. +func (o *WAFEngineSettingsAttributesField) HasThresholds() bool { + if o != nil && !IsNil(o.Thresholds) { + return true + } + + return false +} + +// SetThresholds gets a reference to the given []ThresholdsConfigField and assigns it to the Thresholds field. +func (o *WAFEngineSettingsAttributesField) SetThresholds(v []ThresholdsConfigField) { + o.Thresholds = v +} + +func (o WAFEngineSettingsAttributesField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFEngineSettingsAttributesField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Rulesets) { + toSerialize["rulesets"] = o.Rulesets + } + if !IsNil(o.Thresholds) { + toSerialize["thresholds"] = o.Thresholds + } + return toSerialize, nil +} + +type NullableWAFEngineSettingsAttributesField struct { + value *WAFEngineSettingsAttributesField + isSet bool +} + +func (v NullableWAFEngineSettingsAttributesField) Get() *WAFEngineSettingsAttributesField { + return v.value +} + +func (v *NullableWAFEngineSettingsAttributesField) Set(val *WAFEngineSettingsAttributesField) { + v.value = val + v.isSet = true +} + +func (v NullableWAFEngineSettingsAttributesField) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFEngineSettingsAttributesField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFEngineSettingsAttributesField(val *WAFEngineSettingsAttributesField) *NullableWAFEngineSettingsAttributesField { + return &NullableWAFEngineSettingsAttributesField{value: val, isSet: true} +} + +func (v NullableWAFEngineSettingsAttributesField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFEngineSettingsAttributesField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_engine_settings_attributes_field_request.go b/azion-api/model_waf_engine_settings_attributes_field_request.go new file mode 100644 index 0000000..d263abf --- /dev/null +++ b/azion-api/model_waf_engine_settings_attributes_field_request.go @@ -0,0 +1,163 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the WAFEngineSettingsAttributesFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFEngineSettingsAttributesFieldRequest{} + +// WAFEngineSettingsAttributesFieldRequest struct for WAFEngineSettingsAttributesFieldRequest +type WAFEngineSettingsAttributesFieldRequest struct { + Rulesets []int64 `json:"rulesets,omitempty"` + Thresholds []ThresholdsConfigFieldRequest `json:"thresholds,omitempty"` +} + +// NewWAFEngineSettingsAttributesFieldRequest instantiates a new WAFEngineSettingsAttributesFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFEngineSettingsAttributesFieldRequest() *WAFEngineSettingsAttributesFieldRequest { + this := WAFEngineSettingsAttributesFieldRequest{} + return &this +} + +// NewWAFEngineSettingsAttributesFieldRequestWithDefaults instantiates a new WAFEngineSettingsAttributesFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFEngineSettingsAttributesFieldRequestWithDefaults() *WAFEngineSettingsAttributesFieldRequest { + this := WAFEngineSettingsAttributesFieldRequest{} + return &this +} + +// GetRulesets returns the Rulesets field value if set, zero value otherwise. +func (o *WAFEngineSettingsAttributesFieldRequest) GetRulesets() []int64 { + if o == nil || IsNil(o.Rulesets) { + var ret []int64 + return ret + } + return o.Rulesets +} + +// GetRulesetsOk returns a tuple with the Rulesets field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsAttributesFieldRequest) GetRulesetsOk() ([]int64, bool) { + if o == nil || IsNil(o.Rulesets) { + return nil, false + } + return o.Rulesets, true +} + +// HasRulesets returns a boolean if a field has been set. +func (o *WAFEngineSettingsAttributesFieldRequest) HasRulesets() bool { + if o != nil && !IsNil(o.Rulesets) { + return true + } + + return false +} + +// SetRulesets gets a reference to the given []int64 and assigns it to the Rulesets field. +func (o *WAFEngineSettingsAttributesFieldRequest) SetRulesets(v []int64) { + o.Rulesets = v +} + +// GetThresholds returns the Thresholds field value if set, zero value otherwise. +func (o *WAFEngineSettingsAttributesFieldRequest) GetThresholds() []ThresholdsConfigFieldRequest { + if o == nil || IsNil(o.Thresholds) { + var ret []ThresholdsConfigFieldRequest + return ret + } + return o.Thresholds +} + +// GetThresholdsOk returns a tuple with the Thresholds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsAttributesFieldRequest) GetThresholdsOk() ([]ThresholdsConfigFieldRequest, bool) { + if o == nil || IsNil(o.Thresholds) { + return nil, false + } + return o.Thresholds, true +} + +// HasThresholds returns a boolean if a field has been set. +func (o *WAFEngineSettingsAttributesFieldRequest) HasThresholds() bool { + if o != nil && !IsNil(o.Thresholds) { + return true + } + + return false +} + +// SetThresholds gets a reference to the given []ThresholdsConfigFieldRequest and assigns it to the Thresholds field. +func (o *WAFEngineSettingsAttributesFieldRequest) SetThresholds(v []ThresholdsConfigFieldRequest) { + o.Thresholds = v +} + +func (o WAFEngineSettingsAttributesFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFEngineSettingsAttributesFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Rulesets) { + toSerialize["rulesets"] = o.Rulesets + } + if !IsNil(o.Thresholds) { + toSerialize["thresholds"] = o.Thresholds + } + return toSerialize, nil +} + +type NullableWAFEngineSettingsAttributesFieldRequest struct { + value *WAFEngineSettingsAttributesFieldRequest + isSet bool +} + +func (v NullableWAFEngineSettingsAttributesFieldRequest) Get() *WAFEngineSettingsAttributesFieldRequest { + return v.value +} + +func (v *NullableWAFEngineSettingsAttributesFieldRequest) Set(val *WAFEngineSettingsAttributesFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFEngineSettingsAttributesFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFEngineSettingsAttributesFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFEngineSettingsAttributesFieldRequest(val *WAFEngineSettingsAttributesFieldRequest) *NullableWAFEngineSettingsAttributesFieldRequest { + return &NullableWAFEngineSettingsAttributesFieldRequest{value: val, isSet: true} +} + +func (v NullableWAFEngineSettingsAttributesFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFEngineSettingsAttributesFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_engine_settings_field.go b/azion-api/model_waf_engine_settings_field.go new file mode 100644 index 0000000..e40bca9 --- /dev/null +++ b/azion-api/model_waf_engine_settings_field.go @@ -0,0 +1,201 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the WAFEngineSettingsField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFEngineSettingsField{} + +// WAFEngineSettingsField struct for WAFEngineSettingsField +type WAFEngineSettingsField struct { + // * `2021-Q3` - 2021-Q3 + EngineVersion *string `json:"engine_version,omitempty"` + // * `score` - score + Type *string `json:"type,omitempty"` + Attributes *WAFEngineSettingsAttributesField `json:"attributes,omitempty"` +} + +// NewWAFEngineSettingsField instantiates a new WAFEngineSettingsField object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFEngineSettingsField() *WAFEngineSettingsField { + this := WAFEngineSettingsField{} + return &this +} + +// NewWAFEngineSettingsFieldWithDefaults instantiates a new WAFEngineSettingsField object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFEngineSettingsFieldWithDefaults() *WAFEngineSettingsField { + this := WAFEngineSettingsField{} + return &this +} + +// GetEngineVersion returns the EngineVersion field value if set, zero value otherwise. +func (o *WAFEngineSettingsField) GetEngineVersion() string { + if o == nil || IsNil(o.EngineVersion) { + var ret string + return ret + } + return *o.EngineVersion +} + +// GetEngineVersionOk returns a tuple with the EngineVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsField) GetEngineVersionOk() (*string, bool) { + if o == nil || IsNil(o.EngineVersion) { + return nil, false + } + return o.EngineVersion, true +} + +// HasEngineVersion returns a boolean if a field has been set. +func (o *WAFEngineSettingsField) HasEngineVersion() bool { + if o != nil && !IsNil(o.EngineVersion) { + return true + } + + return false +} + +// SetEngineVersion gets a reference to the given string and assigns it to the EngineVersion field. +func (o *WAFEngineSettingsField) SetEngineVersion(v string) { + o.EngineVersion = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *WAFEngineSettingsField) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsField) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *WAFEngineSettingsField) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *WAFEngineSettingsField) SetType(v string) { + o.Type = &v +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *WAFEngineSettingsField) GetAttributes() WAFEngineSettingsAttributesField { + if o == nil || IsNil(o.Attributes) { + var ret WAFEngineSettingsAttributesField + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsField) GetAttributesOk() (*WAFEngineSettingsAttributesField, bool) { + if o == nil || IsNil(o.Attributes) { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *WAFEngineSettingsField) HasAttributes() bool { + if o != nil && !IsNil(o.Attributes) { + return true + } + + return false +} + +// SetAttributes gets a reference to the given WAFEngineSettingsAttributesField and assigns it to the Attributes field. +func (o *WAFEngineSettingsField) SetAttributes(v WAFEngineSettingsAttributesField) { + o.Attributes = &v +} + +func (o WAFEngineSettingsField) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFEngineSettingsField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EngineVersion) { + toSerialize["engine_version"] = o.EngineVersion + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Attributes) { + toSerialize["attributes"] = o.Attributes + } + return toSerialize, nil +} + +type NullableWAFEngineSettingsField struct { + value *WAFEngineSettingsField + isSet bool +} + +func (v NullableWAFEngineSettingsField) Get() *WAFEngineSettingsField { + return v.value +} + +func (v *NullableWAFEngineSettingsField) Set(val *WAFEngineSettingsField) { + v.value = val + v.isSet = true +} + +func (v NullableWAFEngineSettingsField) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFEngineSettingsField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFEngineSettingsField(val *WAFEngineSettingsField) *NullableWAFEngineSettingsField { + return &NullableWAFEngineSettingsField{value: val, isSet: true} +} + +func (v NullableWAFEngineSettingsField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFEngineSettingsField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_engine_settings_field_request.go b/azion-api/model_waf_engine_settings_field_request.go new file mode 100644 index 0000000..2230145 --- /dev/null +++ b/azion-api/model_waf_engine_settings_field_request.go @@ -0,0 +1,201 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" +) + +// checks if the WAFEngineSettingsFieldRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFEngineSettingsFieldRequest{} + +// WAFEngineSettingsFieldRequest struct for WAFEngineSettingsFieldRequest +type WAFEngineSettingsFieldRequest struct { + // * `2021-Q3` - 2021-Q3 + EngineVersion *string `json:"engine_version,omitempty"` + // * `score` - score + Type *string `json:"type,omitempty"` + Attributes *WAFEngineSettingsAttributesFieldRequest `json:"attributes,omitempty"` +} + +// NewWAFEngineSettingsFieldRequest instantiates a new WAFEngineSettingsFieldRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFEngineSettingsFieldRequest() *WAFEngineSettingsFieldRequest { + this := WAFEngineSettingsFieldRequest{} + return &this +} + +// NewWAFEngineSettingsFieldRequestWithDefaults instantiates a new WAFEngineSettingsFieldRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFEngineSettingsFieldRequestWithDefaults() *WAFEngineSettingsFieldRequest { + this := WAFEngineSettingsFieldRequest{} + return &this +} + +// GetEngineVersion returns the EngineVersion field value if set, zero value otherwise. +func (o *WAFEngineSettingsFieldRequest) GetEngineVersion() string { + if o == nil || IsNil(o.EngineVersion) { + var ret string + return ret + } + return *o.EngineVersion +} + +// GetEngineVersionOk returns a tuple with the EngineVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsFieldRequest) GetEngineVersionOk() (*string, bool) { + if o == nil || IsNil(o.EngineVersion) { + return nil, false + } + return o.EngineVersion, true +} + +// HasEngineVersion returns a boolean if a field has been set. +func (o *WAFEngineSettingsFieldRequest) HasEngineVersion() bool { + if o != nil && !IsNil(o.EngineVersion) { + return true + } + + return false +} + +// SetEngineVersion gets a reference to the given string and assigns it to the EngineVersion field. +func (o *WAFEngineSettingsFieldRequest) SetEngineVersion(v string) { + o.EngineVersion = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *WAFEngineSettingsFieldRequest) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsFieldRequest) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *WAFEngineSettingsFieldRequest) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *WAFEngineSettingsFieldRequest) SetType(v string) { + o.Type = &v +} + +// GetAttributes returns the Attributes field value if set, zero value otherwise. +func (o *WAFEngineSettingsFieldRequest) GetAttributes() WAFEngineSettingsAttributesFieldRequest { + if o == nil || IsNil(o.Attributes) { + var ret WAFEngineSettingsAttributesFieldRequest + return ret + } + return *o.Attributes +} + +// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFEngineSettingsFieldRequest) GetAttributesOk() (*WAFEngineSettingsAttributesFieldRequest, bool) { + if o == nil || IsNil(o.Attributes) { + return nil, false + } + return o.Attributes, true +} + +// HasAttributes returns a boolean if a field has been set. +func (o *WAFEngineSettingsFieldRequest) HasAttributes() bool { + if o != nil && !IsNil(o.Attributes) { + return true + } + + return false +} + +// SetAttributes gets a reference to the given WAFEngineSettingsAttributesFieldRequest and assigns it to the Attributes field. +func (o *WAFEngineSettingsFieldRequest) SetAttributes(v WAFEngineSettingsAttributesFieldRequest) { + o.Attributes = &v +} + +func (o WAFEngineSettingsFieldRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFEngineSettingsFieldRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EngineVersion) { + toSerialize["engine_version"] = o.EngineVersion + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Attributes) { + toSerialize["attributes"] = o.Attributes + } + return toSerialize, nil +} + +type NullableWAFEngineSettingsFieldRequest struct { + value *WAFEngineSettingsFieldRequest + isSet bool +} + +func (v NullableWAFEngineSettingsFieldRequest) Get() *WAFEngineSettingsFieldRequest { + return v.value +} + +func (v *NullableWAFEngineSettingsFieldRequest) Set(val *WAFEngineSettingsFieldRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFEngineSettingsFieldRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFEngineSettingsFieldRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFEngineSettingsFieldRequest(val *WAFEngineSettingsFieldRequest) *NullableWAFEngineSettingsFieldRequest { + return &NullableWAFEngineSettingsFieldRequest{value: val, isSet: true} +} + +func (v NullableWAFEngineSettingsFieldRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFEngineSettingsFieldRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_condition.go b/azion-api/model_waf_exception_condition.go new file mode 100644 index 0000000..18d209f --- /dev/null +++ b/azion-api/model_waf_exception_condition.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// WAFExceptionCondition - struct for WAFExceptionCondition +type WAFExceptionCondition struct { + WAFExceptionGenericCondition *WAFExceptionGenericCondition + WAFExceptionSpecificConditionOnName *WAFExceptionSpecificConditionOnName + WAFExceptionSpecificConditionOnValue *WAFExceptionSpecificConditionOnValue +} + +// WAFExceptionGenericConditionAsWAFExceptionCondition is a convenience function that returns WAFExceptionGenericCondition wrapped in WAFExceptionCondition +func WAFExceptionGenericConditionAsWAFExceptionCondition(v *WAFExceptionGenericCondition) WAFExceptionCondition { + return WAFExceptionCondition{ + WAFExceptionGenericCondition: v, + } +} + +// WAFExceptionSpecificConditionOnNameAsWAFExceptionCondition is a convenience function that returns WAFExceptionSpecificConditionOnName wrapped in WAFExceptionCondition +func WAFExceptionSpecificConditionOnNameAsWAFExceptionCondition(v *WAFExceptionSpecificConditionOnName) WAFExceptionCondition { + return WAFExceptionCondition{ + WAFExceptionSpecificConditionOnName: v, + } +} + +// WAFExceptionSpecificConditionOnValueAsWAFExceptionCondition is a convenience function that returns WAFExceptionSpecificConditionOnValue wrapped in WAFExceptionCondition +func WAFExceptionSpecificConditionOnValueAsWAFExceptionCondition(v *WAFExceptionSpecificConditionOnValue) WAFExceptionCondition { + return WAFExceptionCondition{ + WAFExceptionSpecificConditionOnValue: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *WAFExceptionCondition) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into WAFExceptionGenericCondition + err = newStrictDecoder(data).Decode(&dst.WAFExceptionGenericCondition) + if err == nil { + jsonWAFExceptionGenericCondition, _ := json.Marshal(dst.WAFExceptionGenericCondition) + if string(jsonWAFExceptionGenericCondition) == "{}" { // empty struct + dst.WAFExceptionGenericCondition = nil + } else { + if err = validator.Validate(dst.WAFExceptionGenericCondition); err != nil { + dst.WAFExceptionGenericCondition = nil + } else { + match++ + } + } + } else { + dst.WAFExceptionGenericCondition = nil + } + + // try to unmarshal data into WAFExceptionSpecificConditionOnName + err = newStrictDecoder(data).Decode(&dst.WAFExceptionSpecificConditionOnName) + if err == nil { + jsonWAFExceptionSpecificConditionOnName, _ := json.Marshal(dst.WAFExceptionSpecificConditionOnName) + if string(jsonWAFExceptionSpecificConditionOnName) == "{}" { // empty struct + dst.WAFExceptionSpecificConditionOnName = nil + } else { + if err = validator.Validate(dst.WAFExceptionSpecificConditionOnName); err != nil { + dst.WAFExceptionSpecificConditionOnName = nil + } else { + match++ + } + } + } else { + dst.WAFExceptionSpecificConditionOnName = nil + } + + // try to unmarshal data into WAFExceptionSpecificConditionOnValue + err = newStrictDecoder(data).Decode(&dst.WAFExceptionSpecificConditionOnValue) + if err == nil { + jsonWAFExceptionSpecificConditionOnValue, _ := json.Marshal(dst.WAFExceptionSpecificConditionOnValue) + if string(jsonWAFExceptionSpecificConditionOnValue) == "{}" { // empty struct + dst.WAFExceptionSpecificConditionOnValue = nil + } else { + if err = validator.Validate(dst.WAFExceptionSpecificConditionOnValue); err != nil { + dst.WAFExceptionSpecificConditionOnValue = nil + } else { + match++ + } + } + } else { + dst.WAFExceptionSpecificConditionOnValue = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.WAFExceptionGenericCondition = nil + dst.WAFExceptionSpecificConditionOnName = nil + dst.WAFExceptionSpecificConditionOnValue = nil + + return fmt.Errorf("data matches more than one schema in oneOf(WAFExceptionCondition)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(WAFExceptionCondition)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src WAFExceptionCondition) MarshalJSON() ([]byte, error) { + if src.WAFExceptionGenericCondition != nil { + return json.Marshal(&src.WAFExceptionGenericCondition) + } + + if src.WAFExceptionSpecificConditionOnName != nil { + return json.Marshal(&src.WAFExceptionSpecificConditionOnName) + } + + if src.WAFExceptionSpecificConditionOnValue != nil { + return json.Marshal(&src.WAFExceptionSpecificConditionOnValue) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *WAFExceptionCondition) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.WAFExceptionGenericCondition != nil { + return obj.WAFExceptionGenericCondition + } + + if obj.WAFExceptionSpecificConditionOnName != nil { + return obj.WAFExceptionSpecificConditionOnName + } + + if obj.WAFExceptionSpecificConditionOnValue != nil { + return obj.WAFExceptionSpecificConditionOnValue + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj WAFExceptionCondition) GetActualInstanceValue() (interface{}) { + if obj.WAFExceptionGenericCondition != nil { + return *obj.WAFExceptionGenericCondition + } + + if obj.WAFExceptionSpecificConditionOnName != nil { + return *obj.WAFExceptionSpecificConditionOnName + } + + if obj.WAFExceptionSpecificConditionOnValue != nil { + return *obj.WAFExceptionSpecificConditionOnValue + } + + // all schemas are nil + return nil +} + +type NullableWAFExceptionCondition struct { + value *WAFExceptionCondition + isSet bool +} + +func (v NullableWAFExceptionCondition) Get() *WAFExceptionCondition { + return v.value +} + +func (v *NullableWAFExceptionCondition) Set(val *WAFExceptionCondition) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionCondition) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionCondition(val *WAFExceptionCondition) *NullableWAFExceptionCondition { + return &NullableWAFExceptionCondition{value: val, isSet: true} +} + +func (v NullableWAFExceptionCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_condition_request.go b/azion-api/model_waf_exception_condition_request.go new file mode 100644 index 0000000..e3b28d2 --- /dev/null +++ b/azion-api/model_waf_exception_condition_request.go @@ -0,0 +1,210 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// WAFExceptionConditionRequest - struct for WAFExceptionConditionRequest +type WAFExceptionConditionRequest struct { + WAFExceptionGenericConditionRequest *WAFExceptionGenericConditionRequest + WAFExceptionSpecificConditionOnNameRequest *WAFExceptionSpecificConditionOnNameRequest + WAFExceptionSpecificConditionOnValueRequest *WAFExceptionSpecificConditionOnValueRequest +} + +// WAFExceptionGenericConditionRequestAsWAFExceptionConditionRequest is a convenience function that returns WAFExceptionGenericConditionRequest wrapped in WAFExceptionConditionRequest +func WAFExceptionGenericConditionRequestAsWAFExceptionConditionRequest(v *WAFExceptionGenericConditionRequest) WAFExceptionConditionRequest { + return WAFExceptionConditionRequest{ + WAFExceptionGenericConditionRequest: v, + } +} + +// WAFExceptionSpecificConditionOnNameRequestAsWAFExceptionConditionRequest is a convenience function that returns WAFExceptionSpecificConditionOnNameRequest wrapped in WAFExceptionConditionRequest +func WAFExceptionSpecificConditionOnNameRequestAsWAFExceptionConditionRequest(v *WAFExceptionSpecificConditionOnNameRequest) WAFExceptionConditionRequest { + return WAFExceptionConditionRequest{ + WAFExceptionSpecificConditionOnNameRequest: v, + } +} + +// WAFExceptionSpecificConditionOnValueRequestAsWAFExceptionConditionRequest is a convenience function that returns WAFExceptionSpecificConditionOnValueRequest wrapped in WAFExceptionConditionRequest +func WAFExceptionSpecificConditionOnValueRequestAsWAFExceptionConditionRequest(v *WAFExceptionSpecificConditionOnValueRequest) WAFExceptionConditionRequest { + return WAFExceptionConditionRequest{ + WAFExceptionSpecificConditionOnValueRequest: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *WAFExceptionConditionRequest) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into WAFExceptionGenericConditionRequest + err = newStrictDecoder(data).Decode(&dst.WAFExceptionGenericConditionRequest) + if err == nil { + jsonWAFExceptionGenericConditionRequest, _ := json.Marshal(dst.WAFExceptionGenericConditionRequest) + if string(jsonWAFExceptionGenericConditionRequest) == "{}" { // empty struct + dst.WAFExceptionGenericConditionRequest = nil + } else { + if err = validator.Validate(dst.WAFExceptionGenericConditionRequest); err != nil { + dst.WAFExceptionGenericConditionRequest = nil + } else { + match++ + } + } + } else { + dst.WAFExceptionGenericConditionRequest = nil + } + + // try to unmarshal data into WAFExceptionSpecificConditionOnNameRequest + err = newStrictDecoder(data).Decode(&dst.WAFExceptionSpecificConditionOnNameRequest) + if err == nil { + jsonWAFExceptionSpecificConditionOnNameRequest, _ := json.Marshal(dst.WAFExceptionSpecificConditionOnNameRequest) + if string(jsonWAFExceptionSpecificConditionOnNameRequest) == "{}" { // empty struct + dst.WAFExceptionSpecificConditionOnNameRequest = nil + } else { + if err = validator.Validate(dst.WAFExceptionSpecificConditionOnNameRequest); err != nil { + dst.WAFExceptionSpecificConditionOnNameRequest = nil + } else { + match++ + } + } + } else { + dst.WAFExceptionSpecificConditionOnNameRequest = nil + } + + // try to unmarshal data into WAFExceptionSpecificConditionOnValueRequest + err = newStrictDecoder(data).Decode(&dst.WAFExceptionSpecificConditionOnValueRequest) + if err == nil { + jsonWAFExceptionSpecificConditionOnValueRequest, _ := json.Marshal(dst.WAFExceptionSpecificConditionOnValueRequest) + if string(jsonWAFExceptionSpecificConditionOnValueRequest) == "{}" { // empty struct + dst.WAFExceptionSpecificConditionOnValueRequest = nil + } else { + if err = validator.Validate(dst.WAFExceptionSpecificConditionOnValueRequest); err != nil { + dst.WAFExceptionSpecificConditionOnValueRequest = nil + } else { + match++ + } + } + } else { + dst.WAFExceptionSpecificConditionOnValueRequest = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.WAFExceptionGenericConditionRequest = nil + dst.WAFExceptionSpecificConditionOnNameRequest = nil + dst.WAFExceptionSpecificConditionOnValueRequest = nil + + return fmt.Errorf("data matches more than one schema in oneOf(WAFExceptionConditionRequest)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(WAFExceptionConditionRequest)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src WAFExceptionConditionRequest) MarshalJSON() ([]byte, error) { + if src.WAFExceptionGenericConditionRequest != nil { + return json.Marshal(&src.WAFExceptionGenericConditionRequest) + } + + if src.WAFExceptionSpecificConditionOnNameRequest != nil { + return json.Marshal(&src.WAFExceptionSpecificConditionOnNameRequest) + } + + if src.WAFExceptionSpecificConditionOnValueRequest != nil { + return json.Marshal(&src.WAFExceptionSpecificConditionOnValueRequest) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *WAFExceptionConditionRequest) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.WAFExceptionGenericConditionRequest != nil { + return obj.WAFExceptionGenericConditionRequest + } + + if obj.WAFExceptionSpecificConditionOnNameRequest != nil { + return obj.WAFExceptionSpecificConditionOnNameRequest + } + + if obj.WAFExceptionSpecificConditionOnValueRequest != nil { + return obj.WAFExceptionSpecificConditionOnValueRequest + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj WAFExceptionConditionRequest) GetActualInstanceValue() (interface{}) { + if obj.WAFExceptionGenericConditionRequest != nil { + return *obj.WAFExceptionGenericConditionRequest + } + + if obj.WAFExceptionSpecificConditionOnNameRequest != nil { + return *obj.WAFExceptionSpecificConditionOnNameRequest + } + + if obj.WAFExceptionSpecificConditionOnValueRequest != nil { + return *obj.WAFExceptionSpecificConditionOnValueRequest + } + + // all schemas are nil + return nil +} + +type NullableWAFExceptionConditionRequest struct { + value *WAFExceptionConditionRequest + isSet bool +} + +func (v NullableWAFExceptionConditionRequest) Get() *WAFExceptionConditionRequest { + return v.value +} + +func (v *NullableWAFExceptionConditionRequest) Set(val *WAFExceptionConditionRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionConditionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionConditionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionConditionRequest(val *WAFExceptionConditionRequest) *NullableWAFExceptionConditionRequest { + return &NullableWAFExceptionConditionRequest{value: val, isSet: true} +} + +func (v NullableWAFExceptionConditionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionConditionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_generic_condition.go b/azion-api/model_waf_exception_generic_condition.go new file mode 100644 index 0000000..8356a5f --- /dev/null +++ b/azion-api/model_waf_exception_generic_condition.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFExceptionGenericCondition type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFExceptionGenericCondition{} + +// WAFExceptionGenericCondition struct for WAFExceptionGenericCondition +type WAFExceptionGenericCondition struct { + // * `any_http_header_name` - any_http_header_name * `any_http_header_value` - any_http_header_value * `any_query_string_name` - any_query_string_name * `any_query_string_value` - any_query_string_value * `any_url` - any_url * `body_form_field_name` - body_form_field_name * `body_form_field_value` - body_form_field_value * `file_extension` - file_extension * `raw_body` - raw_body + Match string `json:"match"` +} + +type _WAFExceptionGenericCondition WAFExceptionGenericCondition + +// NewWAFExceptionGenericCondition instantiates a new WAFExceptionGenericCondition object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFExceptionGenericCondition(match string) *WAFExceptionGenericCondition { + this := WAFExceptionGenericCondition{} + this.Match = match + return &this +} + +// NewWAFExceptionGenericConditionWithDefaults instantiates a new WAFExceptionGenericCondition object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFExceptionGenericConditionWithDefaults() *WAFExceptionGenericCondition { + this := WAFExceptionGenericCondition{} + return &this +} + +// GetMatch returns the Match field value +func (o *WAFExceptionGenericCondition) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionGenericCondition) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *WAFExceptionGenericCondition) SetMatch(v string) { + o.Match = v +} + +func (o WAFExceptionGenericCondition) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFExceptionGenericCondition) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["match"] = o.Match + return toSerialize, nil +} + +func (o *WAFExceptionGenericCondition) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "match", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFExceptionGenericCondition := _WAFExceptionGenericCondition{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFExceptionGenericCondition) + + if err != nil { + return err + } + + *o = WAFExceptionGenericCondition(varWAFExceptionGenericCondition) + + return err +} + +type NullableWAFExceptionGenericCondition struct { + value *WAFExceptionGenericCondition + isSet bool +} + +func (v NullableWAFExceptionGenericCondition) Get() *WAFExceptionGenericCondition { + return v.value +} + +func (v *NullableWAFExceptionGenericCondition) Set(val *WAFExceptionGenericCondition) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionGenericCondition) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionGenericCondition) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionGenericCondition(val *WAFExceptionGenericCondition) *NullableWAFExceptionGenericCondition { + return &NullableWAFExceptionGenericCondition{value: val, isSet: true} +} + +func (v NullableWAFExceptionGenericCondition) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionGenericCondition) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_generic_condition_request.go b/azion-api/model_waf_exception_generic_condition_request.go new file mode 100644 index 0000000..2394ff4 --- /dev/null +++ b/azion-api/model_waf_exception_generic_condition_request.go @@ -0,0 +1,160 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFExceptionGenericConditionRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFExceptionGenericConditionRequest{} + +// WAFExceptionGenericConditionRequest struct for WAFExceptionGenericConditionRequest +type WAFExceptionGenericConditionRequest struct { + // * `any_http_header_name` - any_http_header_name * `any_http_header_value` - any_http_header_value * `any_query_string_name` - any_query_string_name * `any_query_string_value` - any_query_string_value * `any_url` - any_url * `body_form_field_name` - body_form_field_name * `body_form_field_value` - body_form_field_value * `file_extension` - file_extension * `raw_body` - raw_body + Match string `json:"match"` +} + +type _WAFExceptionGenericConditionRequest WAFExceptionGenericConditionRequest + +// NewWAFExceptionGenericConditionRequest instantiates a new WAFExceptionGenericConditionRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFExceptionGenericConditionRequest(match string) *WAFExceptionGenericConditionRequest { + this := WAFExceptionGenericConditionRequest{} + this.Match = match + return &this +} + +// NewWAFExceptionGenericConditionRequestWithDefaults instantiates a new WAFExceptionGenericConditionRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFExceptionGenericConditionRequestWithDefaults() *WAFExceptionGenericConditionRequest { + this := WAFExceptionGenericConditionRequest{} + return &this +} + +// GetMatch returns the Match field value +func (o *WAFExceptionGenericConditionRequest) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionGenericConditionRequest) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *WAFExceptionGenericConditionRequest) SetMatch(v string) { + o.Match = v +} + +func (o WAFExceptionGenericConditionRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFExceptionGenericConditionRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["match"] = o.Match + return toSerialize, nil +} + +func (o *WAFExceptionGenericConditionRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "match", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFExceptionGenericConditionRequest := _WAFExceptionGenericConditionRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFExceptionGenericConditionRequest) + + if err != nil { + return err + } + + *o = WAFExceptionGenericConditionRequest(varWAFExceptionGenericConditionRequest) + + return err +} + +type NullableWAFExceptionGenericConditionRequest struct { + value *WAFExceptionGenericConditionRequest + isSet bool +} + +func (v NullableWAFExceptionGenericConditionRequest) Get() *WAFExceptionGenericConditionRequest { + return v.value +} + +func (v *NullableWAFExceptionGenericConditionRequest) Set(val *WAFExceptionGenericConditionRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionGenericConditionRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionGenericConditionRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionGenericConditionRequest(val *WAFExceptionGenericConditionRequest) *NullableWAFExceptionGenericConditionRequest { + return &NullableWAFExceptionGenericConditionRequest{value: val, isSet: true} +} + +func (v NullableWAFExceptionGenericConditionRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionGenericConditionRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_specific_condition_on_name.go b/azion-api/model_waf_exception_specific_condition_on_name.go new file mode 100644 index 0000000..f5d4fd3 --- /dev/null +++ b/azion-api/model_waf_exception_specific_condition_on_name.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFExceptionSpecificConditionOnName type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFExceptionSpecificConditionOnName{} + +// WAFExceptionSpecificConditionOnName struct for WAFExceptionSpecificConditionOnName +type WAFExceptionSpecificConditionOnName struct { + // * `specific_body_form_field_name` - specific_body_form_field_name * `specific_http_header_name` - specific_http_header_name * `specific_query_string_name` - specific_query_string_name + Match string `json:"match"` + Name string `json:"name"` +} + +type _WAFExceptionSpecificConditionOnName WAFExceptionSpecificConditionOnName + +// NewWAFExceptionSpecificConditionOnName instantiates a new WAFExceptionSpecificConditionOnName object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFExceptionSpecificConditionOnName(match string, name string) *WAFExceptionSpecificConditionOnName { + this := WAFExceptionSpecificConditionOnName{} + this.Match = match + this.Name = name + return &this +} + +// NewWAFExceptionSpecificConditionOnNameWithDefaults instantiates a new WAFExceptionSpecificConditionOnName object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFExceptionSpecificConditionOnNameWithDefaults() *WAFExceptionSpecificConditionOnName { + this := WAFExceptionSpecificConditionOnName{} + return &this +} + +// GetMatch returns the Match field value +func (o *WAFExceptionSpecificConditionOnName) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnName) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *WAFExceptionSpecificConditionOnName) SetMatch(v string) { + o.Match = v +} + +// GetName returns the Name field value +func (o *WAFExceptionSpecificConditionOnName) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnName) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WAFExceptionSpecificConditionOnName) SetName(v string) { + o.Name = v +} + +func (o WAFExceptionSpecificConditionOnName) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFExceptionSpecificConditionOnName) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["match"] = o.Match + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *WAFExceptionSpecificConditionOnName) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "match", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFExceptionSpecificConditionOnName := _WAFExceptionSpecificConditionOnName{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFExceptionSpecificConditionOnName) + + if err != nil { + return err + } + + *o = WAFExceptionSpecificConditionOnName(varWAFExceptionSpecificConditionOnName) + + return err +} + +type NullableWAFExceptionSpecificConditionOnName struct { + value *WAFExceptionSpecificConditionOnName + isSet bool +} + +func (v NullableWAFExceptionSpecificConditionOnName) Get() *WAFExceptionSpecificConditionOnName { + return v.value +} + +func (v *NullableWAFExceptionSpecificConditionOnName) Set(val *WAFExceptionSpecificConditionOnName) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionSpecificConditionOnName) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionSpecificConditionOnName) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionSpecificConditionOnName(val *WAFExceptionSpecificConditionOnName) *NullableWAFExceptionSpecificConditionOnName { + return &NullableWAFExceptionSpecificConditionOnName{value: val, isSet: true} +} + +func (v NullableWAFExceptionSpecificConditionOnName) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionSpecificConditionOnName) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_specific_condition_on_name_request.go b/azion-api/model_waf_exception_specific_condition_on_name_request.go new file mode 100644 index 0000000..2e67248 --- /dev/null +++ b/azion-api/model_waf_exception_specific_condition_on_name_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFExceptionSpecificConditionOnNameRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFExceptionSpecificConditionOnNameRequest{} + +// WAFExceptionSpecificConditionOnNameRequest struct for WAFExceptionSpecificConditionOnNameRequest +type WAFExceptionSpecificConditionOnNameRequest struct { + // * `specific_body_form_field_name` - specific_body_form_field_name * `specific_http_header_name` - specific_http_header_name * `specific_query_string_name` - specific_query_string_name + Match string `json:"match"` + Name string `json:"name"` +} + +type _WAFExceptionSpecificConditionOnNameRequest WAFExceptionSpecificConditionOnNameRequest + +// NewWAFExceptionSpecificConditionOnNameRequest instantiates a new WAFExceptionSpecificConditionOnNameRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFExceptionSpecificConditionOnNameRequest(match string, name string) *WAFExceptionSpecificConditionOnNameRequest { + this := WAFExceptionSpecificConditionOnNameRequest{} + this.Match = match + this.Name = name + return &this +} + +// NewWAFExceptionSpecificConditionOnNameRequestWithDefaults instantiates a new WAFExceptionSpecificConditionOnNameRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFExceptionSpecificConditionOnNameRequestWithDefaults() *WAFExceptionSpecificConditionOnNameRequest { + this := WAFExceptionSpecificConditionOnNameRequest{} + return &this +} + +// GetMatch returns the Match field value +func (o *WAFExceptionSpecificConditionOnNameRequest) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnNameRequest) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *WAFExceptionSpecificConditionOnNameRequest) SetMatch(v string) { + o.Match = v +} + +// GetName returns the Name field value +func (o *WAFExceptionSpecificConditionOnNameRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnNameRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WAFExceptionSpecificConditionOnNameRequest) SetName(v string) { + o.Name = v +} + +func (o WAFExceptionSpecificConditionOnNameRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFExceptionSpecificConditionOnNameRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["match"] = o.Match + toSerialize["name"] = o.Name + return toSerialize, nil +} + +func (o *WAFExceptionSpecificConditionOnNameRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "match", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFExceptionSpecificConditionOnNameRequest := _WAFExceptionSpecificConditionOnNameRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFExceptionSpecificConditionOnNameRequest) + + if err != nil { + return err + } + + *o = WAFExceptionSpecificConditionOnNameRequest(varWAFExceptionSpecificConditionOnNameRequest) + + return err +} + +type NullableWAFExceptionSpecificConditionOnNameRequest struct { + value *WAFExceptionSpecificConditionOnNameRequest + isSet bool +} + +func (v NullableWAFExceptionSpecificConditionOnNameRequest) Get() *WAFExceptionSpecificConditionOnNameRequest { + return v.value +} + +func (v *NullableWAFExceptionSpecificConditionOnNameRequest) Set(val *WAFExceptionSpecificConditionOnNameRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionSpecificConditionOnNameRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionSpecificConditionOnNameRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionSpecificConditionOnNameRequest(val *WAFExceptionSpecificConditionOnNameRequest) *NullableWAFExceptionSpecificConditionOnNameRequest { + return &NullableWAFExceptionSpecificConditionOnNameRequest{value: val, isSet: true} +} + +func (v NullableWAFExceptionSpecificConditionOnNameRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionSpecificConditionOnNameRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_specific_condition_on_value.go b/azion-api/model_waf_exception_specific_condition_on_value.go new file mode 100644 index 0000000..015de58 --- /dev/null +++ b/azion-api/model_waf_exception_specific_condition_on_value.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFExceptionSpecificConditionOnValue type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFExceptionSpecificConditionOnValue{} + +// WAFExceptionSpecificConditionOnValue struct for WAFExceptionSpecificConditionOnValue +type WAFExceptionSpecificConditionOnValue struct { + // * `specific_body_form_field_value` - specific_body_form_field_value * `specific_http_header_value` - specific_http_header_value * `specific_query_string_value` - specific_query_string_value + Match string `json:"match"` + Value string `json:"value"` +} + +type _WAFExceptionSpecificConditionOnValue WAFExceptionSpecificConditionOnValue + +// NewWAFExceptionSpecificConditionOnValue instantiates a new WAFExceptionSpecificConditionOnValue object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFExceptionSpecificConditionOnValue(match string, value string) *WAFExceptionSpecificConditionOnValue { + this := WAFExceptionSpecificConditionOnValue{} + this.Match = match + this.Value = value + return &this +} + +// NewWAFExceptionSpecificConditionOnValueWithDefaults instantiates a new WAFExceptionSpecificConditionOnValue object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFExceptionSpecificConditionOnValueWithDefaults() *WAFExceptionSpecificConditionOnValue { + this := WAFExceptionSpecificConditionOnValue{} + return &this +} + +// GetMatch returns the Match field value +func (o *WAFExceptionSpecificConditionOnValue) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnValue) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *WAFExceptionSpecificConditionOnValue) SetMatch(v string) { + o.Match = v +} + +// GetValue returns the Value field value +func (o *WAFExceptionSpecificConditionOnValue) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnValue) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *WAFExceptionSpecificConditionOnValue) SetValue(v string) { + o.Value = v +} + +func (o WAFExceptionSpecificConditionOnValue) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFExceptionSpecificConditionOnValue) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["match"] = o.Match + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *WAFExceptionSpecificConditionOnValue) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "match", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFExceptionSpecificConditionOnValue := _WAFExceptionSpecificConditionOnValue{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFExceptionSpecificConditionOnValue) + + if err != nil { + return err + } + + *o = WAFExceptionSpecificConditionOnValue(varWAFExceptionSpecificConditionOnValue) + + return err +} + +type NullableWAFExceptionSpecificConditionOnValue struct { + value *WAFExceptionSpecificConditionOnValue + isSet bool +} + +func (v NullableWAFExceptionSpecificConditionOnValue) Get() *WAFExceptionSpecificConditionOnValue { + return v.value +} + +func (v *NullableWAFExceptionSpecificConditionOnValue) Set(val *WAFExceptionSpecificConditionOnValue) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionSpecificConditionOnValue) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionSpecificConditionOnValue) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionSpecificConditionOnValue(val *WAFExceptionSpecificConditionOnValue) *NullableWAFExceptionSpecificConditionOnValue { + return &NullableWAFExceptionSpecificConditionOnValue{value: val, isSet: true} +} + +func (v NullableWAFExceptionSpecificConditionOnValue) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionSpecificConditionOnValue) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_exception_specific_condition_on_value_request.go b/azion-api/model_waf_exception_specific_condition_on_value_request.go new file mode 100644 index 0000000..9a55d38 --- /dev/null +++ b/azion-api/model_waf_exception_specific_condition_on_value_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFExceptionSpecificConditionOnValueRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFExceptionSpecificConditionOnValueRequest{} + +// WAFExceptionSpecificConditionOnValueRequest struct for WAFExceptionSpecificConditionOnValueRequest +type WAFExceptionSpecificConditionOnValueRequest struct { + // * `specific_body_form_field_value` - specific_body_form_field_value * `specific_http_header_value` - specific_http_header_value * `specific_query_string_value` - specific_query_string_value + Match string `json:"match"` + Value string `json:"value"` +} + +type _WAFExceptionSpecificConditionOnValueRequest WAFExceptionSpecificConditionOnValueRequest + +// NewWAFExceptionSpecificConditionOnValueRequest instantiates a new WAFExceptionSpecificConditionOnValueRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFExceptionSpecificConditionOnValueRequest(match string, value string) *WAFExceptionSpecificConditionOnValueRequest { + this := WAFExceptionSpecificConditionOnValueRequest{} + this.Match = match + this.Value = value + return &this +} + +// NewWAFExceptionSpecificConditionOnValueRequestWithDefaults instantiates a new WAFExceptionSpecificConditionOnValueRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFExceptionSpecificConditionOnValueRequestWithDefaults() *WAFExceptionSpecificConditionOnValueRequest { + this := WAFExceptionSpecificConditionOnValueRequest{} + return &this +} + +// GetMatch returns the Match field value +func (o *WAFExceptionSpecificConditionOnValueRequest) GetMatch() string { + if o == nil { + var ret string + return ret + } + + return o.Match +} + +// GetMatchOk returns a tuple with the Match field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnValueRequest) GetMatchOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Match, true +} + +// SetMatch sets field value +func (o *WAFExceptionSpecificConditionOnValueRequest) SetMatch(v string) { + o.Match = v +} + +// GetValue returns the Value field value +func (o *WAFExceptionSpecificConditionOnValueRequest) GetValue() string { + if o == nil { + var ret string + return ret + } + + return o.Value +} + +// GetValueOk returns a tuple with the Value field value +// and a boolean to check if the value has been set. +func (o *WAFExceptionSpecificConditionOnValueRequest) GetValueOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Value, true +} + +// SetValue sets field value +func (o *WAFExceptionSpecificConditionOnValueRequest) SetValue(v string) { + o.Value = v +} + +func (o WAFExceptionSpecificConditionOnValueRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFExceptionSpecificConditionOnValueRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["match"] = o.Match + toSerialize["value"] = o.Value + return toSerialize, nil +} + +func (o *WAFExceptionSpecificConditionOnValueRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "match", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFExceptionSpecificConditionOnValueRequest := _WAFExceptionSpecificConditionOnValueRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFExceptionSpecificConditionOnValueRequest) + + if err != nil { + return err + } + + *o = WAFExceptionSpecificConditionOnValueRequest(varWAFExceptionSpecificConditionOnValueRequest) + + return err +} + +type NullableWAFExceptionSpecificConditionOnValueRequest struct { + value *WAFExceptionSpecificConditionOnValueRequest + isSet bool +} + +func (v NullableWAFExceptionSpecificConditionOnValueRequest) Get() *WAFExceptionSpecificConditionOnValueRequest { + return v.value +} + +func (v *NullableWAFExceptionSpecificConditionOnValueRequest) Set(val *WAFExceptionSpecificConditionOnValueRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFExceptionSpecificConditionOnValueRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFExceptionSpecificConditionOnValueRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFExceptionSpecificConditionOnValueRequest(val *WAFExceptionSpecificConditionOnValueRequest) *NullableWAFExceptionSpecificConditionOnValueRequest { + return &NullableWAFExceptionSpecificConditionOnValueRequest{value: val, isSet: true} +} + +func (v NullableWAFExceptionSpecificConditionOnValueRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFExceptionSpecificConditionOnValueRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_request.go b/azion-api/model_waf_request.go new file mode 100644 index 0000000..ef25320 --- /dev/null +++ b/azion-api/model_waf_request.go @@ -0,0 +1,277 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRequest{} + +// WAFRequest struct for WAFRequest +type WAFRequest struct { + Active *bool `json:"active,omitempty"` + Name string `json:"name"` + ProductVersion NullableString `json:"product_version,omitempty"` + EngineSettings *WAFEngineSettingsFieldRequest `json:"engine_settings,omitempty"` +} + +type _WAFRequest WAFRequest + +// NewWAFRequest instantiates a new WAFRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFRequest(name string) *WAFRequest { + this := WAFRequest{} + this.Name = name + return &this +} + +// NewWAFRequestWithDefaults instantiates a new WAFRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFRequestWithDefaults() *WAFRequest { + this := WAFRequest{} + return &this +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WAFRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WAFRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WAFRequest) SetActive(v bool) { + o.Active = &v +} + +// GetName returns the Name field value +func (o *WAFRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WAFRequest) SetName(v string) { + o.Name = v +} + +// GetProductVersion returns the ProductVersion field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WAFRequest) GetProductVersion() string { + if o == nil || IsNil(o.ProductVersion.Get()) { + var ret string + return ret + } + return *o.ProductVersion.Get() +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WAFRequest) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ProductVersion.Get(), o.ProductVersion.IsSet() +} + +// HasProductVersion returns a boolean if a field has been set. +func (o *WAFRequest) HasProductVersion() bool { + if o != nil && o.ProductVersion.IsSet() { + return true + } + + return false +} + +// SetProductVersion gets a reference to the given NullableString and assigns it to the ProductVersion field. +func (o *WAFRequest) SetProductVersion(v string) { + o.ProductVersion.Set(&v) +} +// SetProductVersionNil sets the value for ProductVersion to be an explicit nil +func (o *WAFRequest) SetProductVersionNil() { + o.ProductVersion.Set(nil) +} + +// UnsetProductVersion ensures that no value is present for ProductVersion, not even an explicit nil +func (o *WAFRequest) UnsetProductVersion() { + o.ProductVersion.Unset() +} + +// GetEngineSettings returns the EngineSettings field value if set, zero value otherwise. +func (o *WAFRequest) GetEngineSettings() WAFEngineSettingsFieldRequest { + if o == nil || IsNil(o.EngineSettings) { + var ret WAFEngineSettingsFieldRequest + return ret + } + return *o.EngineSettings +} + +// GetEngineSettingsOk returns a tuple with the EngineSettings field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRequest) GetEngineSettingsOk() (*WAFEngineSettingsFieldRequest, bool) { + if o == nil || IsNil(o.EngineSettings) { + return nil, false + } + return o.EngineSettings, true +} + +// HasEngineSettings returns a boolean if a field has been set. +func (o *WAFRequest) HasEngineSettings() bool { + if o != nil && !IsNil(o.EngineSettings) { + return true + } + + return false +} + +// SetEngineSettings gets a reference to the given WAFEngineSettingsFieldRequest and assigns it to the EngineSettings field. +func (o *WAFRequest) SetEngineSettings(v WAFEngineSettingsFieldRequest) { + o.EngineSettings = &v +} + +func (o WAFRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["name"] = o.Name + if o.ProductVersion.IsSet() { + toSerialize["product_version"] = o.ProductVersion.Get() + } + if !IsNil(o.EngineSettings) { + toSerialize["engine_settings"] = o.EngineSettings + } + return toSerialize, nil +} + +func (o *WAFRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFRequest := _WAFRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFRequest) + + if err != nil { + return err + } + + *o = WAFRequest(varWAFRequest) + + return err +} + +type NullableWAFRequest struct { + value *WAFRequest + isSet bool +} + +func (v NullableWAFRequest) Get() *WAFRequest { + return v.value +} + +func (v *NullableWAFRequest) Set(val *WAFRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRequest(val *WAFRequest) *NullableWAFRequest { + return &NullableWAFRequest{value: val, isSet: true} +} + +func (v NullableWAFRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_response.go b/azion-api/model_waf_response.go new file mode 100644 index 0000000..1e6c5c0 --- /dev/null +++ b/azion-api/model_waf_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFResponse{} + +// WAFResponse struct for WAFResponse +type WAFResponse struct { + State *string `json:"state,omitempty"` + Data WAF `json:"data"` +} + +type _WAFResponse WAFResponse + +// NewWAFResponse instantiates a new WAFResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFResponse(data WAF) *WAFResponse { + this := WAFResponse{} + this.Data = data + return &this +} + +// NewWAFResponseWithDefaults instantiates a new WAFResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFResponseWithDefaults() *WAFResponse { + this := WAFResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WAFResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WAFResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *WAFResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *WAFResponse) GetData() WAF { + if o == nil { + var ret WAF + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *WAFResponse) GetDataOk() (*WAF, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *WAFResponse) SetData(v WAF) { + o.Data = v +} + +func (o WAFResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *WAFResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFResponse := _WAFResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFResponse) + + if err != nil { + return err + } + + *o = WAFResponse(varWAFResponse) + + return err +} + +type NullableWAFResponse struct { + value *WAFResponse + isSet bool +} + +func (v NullableWAFResponse) Get() *WAFResponse { + return v.value +} + +func (v *NullableWAFResponse) Set(val *WAFResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWAFResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFResponse(val *WAFResponse) *NullableWAFResponse { + return &NullableWAFResponse{value: val, isSet: true} +} + +func (v NullableWAFResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_rule.go b/azion-api/model_waf_rule.go new file mode 100644 index 0000000..a39fe84 --- /dev/null +++ b/azion-api/model_waf_rule.go @@ -0,0 +1,428 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the WAFRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRule{} + +// WAFRule struct for WAFRule +type WAFRule struct { + Id int64 `json:"id"` + // 0 - All Rules
1 - Validation of protocol compliance: weird request, unable to parse
2 - Request too big, stored on disk and not parsed
10 - Validation of protocol compliance: invalid HEX encoding (null bytes)
11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)
12 - Validation of protocol compliance: invalid formatted URL
13 - Validation of protocol compliance: invalid POST format
14 - Validation of protocol compliance: invalid POST boundary
15 - Validation of protocol compliance: invalid JSON
16 - Validation of protocol compliance: POST with no body
17 - Possible SQL Injection attack: validation with libinjection_sql
18 - Possible XSS attack: validation with libinjection_xss
1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies
1001 - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies
1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies
1003 - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies
1004 - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies
1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies
1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies
1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies
1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String
1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String
1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies
1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies
1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies
1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies
1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies
1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies
1100 - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies
1101 - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies
1102 - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies
1103 - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies
1104 - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies
1105 - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies
1106 - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies
1107 - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies
1108 - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies
1109 - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies
1110 - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies
1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR
1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies
1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies
1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies
1203 - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies
1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies
1205 - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies
1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies
1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies
1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies
1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies
1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies
1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies
1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies
1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies
1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies
1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies
1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies
1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies
1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies
1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies
1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies
1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file
2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering * `0` - All Rules * `1` - Validation of protocol compliance: weird request, unable to parse * `2` - Request too big, stored on disk and not parsed * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) * `12` - Validation of protocol compliance: invalid formatted URL * `13` - Validation of protocol compliance: invalid POST format * `14` - Validation of protocol compliance: invalid POST boundary * `15` - Validation of protocol compliance: invalid JSON * `16` - Validation of protocol compliance: POST with no body * `17` - Possible SQL Injection attack: validation with libinjection_sql * `18` - Possible XSS attack: validation with libinjection_xss * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies * `1001` - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies * `1003` - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies * `1004` - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies * `1100` - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies * `1101` - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies * `1102` - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies * `1103` - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies * `1104` - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies * `1105` - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies * `1106` - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies * `1107` - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies * `1108` - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies * `1109` - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies * `1110` - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies * `1203` - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies * `1205` - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + RuleId *int64 `json:"rule_id,omitempty"` + Name string `json:"name"` + Path NullableString `json:"path,omitempty"` + Conditions []WAFExceptionCondition `json:"conditions"` + // * `regex` - regex * `contains` - contains + Operator *string `json:"operator,omitempty"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` +} + +type _WAFRule WAFRule + +// NewWAFRule instantiates a new WAFRule object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFRule(id int64, name string, conditions []WAFExceptionCondition, lastEditor string, lastModified time.Time) *WAFRule { + this := WAFRule{} + this.Id = id + this.Name = name + this.Conditions = conditions + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewWAFRuleWithDefaults instantiates a new WAFRule object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFRuleWithDefaults() *WAFRule { + this := WAFRule{} + return &this +} + +// GetId returns the Id field value +func (o *WAFRule) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WAFRule) SetId(v int64) { + o.Id = v +} + +// GetRuleId returns the RuleId field value if set, zero value otherwise. +func (o *WAFRule) GetRuleId() int64 { + if o == nil || IsNil(o.RuleId) { + var ret int64 + return ret + } + return *o.RuleId +} + +// GetRuleIdOk returns a tuple with the RuleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRule) GetRuleIdOk() (*int64, bool) { + if o == nil || IsNil(o.RuleId) { + return nil, false + } + return o.RuleId, true +} + +// HasRuleId returns a boolean if a field has been set. +func (o *WAFRule) HasRuleId() bool { + if o != nil && !IsNil(o.RuleId) { + return true + } + + return false +} + +// SetRuleId gets a reference to the given int64 and assigns it to the RuleId field. +func (o *WAFRule) SetRuleId(v int64) { + o.RuleId = &v +} + +// GetName returns the Name field value +func (o *WAFRule) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WAFRule) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WAFRule) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WAFRule) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *WAFRule) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *WAFRule) SetPath(v string) { + o.Path.Set(&v) +} +// SetPathNil sets the value for Path to be an explicit nil +func (o *WAFRule) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *WAFRule) UnsetPath() { + o.Path.Unset() +} + +// GetConditions returns the Conditions field value +func (o *WAFRule) GetConditions() []WAFExceptionCondition { + if o == nil { + var ret []WAFExceptionCondition + return ret + } + + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetConditionsOk() ([]WAFExceptionCondition, bool) { + if o == nil { + return nil, false + } + return o.Conditions, true +} + +// SetConditions sets field value +func (o *WAFRule) SetConditions(v []WAFExceptionCondition) { + o.Conditions = v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *WAFRule) GetOperator() string { + if o == nil || IsNil(o.Operator) { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRule) GetOperatorOk() (*string, bool) { + if o == nil || IsNil(o.Operator) { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *WAFRule) HasOperator() bool { + if o != nil && !IsNil(o.Operator) { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *WAFRule) SetOperator(v string) { + o.Operator = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WAFRule) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRule) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WAFRule) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WAFRule) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *WAFRule) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *WAFRule) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *WAFRule) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *WAFRule) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *WAFRule) SetLastModified(v time.Time) { + o.LastModified = v +} + +func (o WAFRule) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + if !IsNil(o.RuleId) { + toSerialize["rule_id"] = o.RuleId + } + toSerialize["name"] = o.Name + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + toSerialize["conditions"] = o.Conditions + if !IsNil(o.Operator) { + toSerialize["operator"] = o.Operator + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *WAFRule) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "conditions", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFRule := _WAFRule{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFRule) + + if err != nil { + return err + } + + *o = WAFRule(varWAFRule) + + return err +} + +type NullableWAFRule struct { + value *WAFRule + isSet bool +} + +func (v NullableWAFRule) Get() *WAFRule { + return v.value +} + +func (v *NullableWAFRule) Set(val *WAFRule) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRule) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRule(val *WAFRule) *NullableWAFRule { + return &NullableWAFRule{value: val, isSet: true} +} + +func (v NullableWAFRule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_rule_request.go b/azion-api/model_waf_rule_request.go new file mode 100644 index 0000000..8113d5f --- /dev/null +++ b/azion-api/model_waf_rule_request.go @@ -0,0 +1,343 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFRuleRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRuleRequest{} + +// WAFRuleRequest struct for WAFRuleRequest +type WAFRuleRequest struct { + // 0 - All Rules
1 - Validation of protocol compliance: weird request, unable to parse
2 - Request too big, stored on disk and not parsed
10 - Validation of protocol compliance: invalid HEX encoding (null bytes)
11 - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone)
12 - Validation of protocol compliance: invalid formatted URL
13 - Validation of protocol compliance: invalid POST format
14 - Validation of protocol compliance: invalid POST boundary
15 - Validation of protocol compliance: invalid JSON
16 - Validation of protocol compliance: POST with no body
17 - Possible SQL Injection attack: validation with libinjection_sql
18 - Possible XSS attack: validation with libinjection_xss
1000 - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies
1001 - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies
1002 - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies
1003 - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies
1004 - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies
1005 - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies
1006 - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies
1007 - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies
1008 - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String
1009 - Possible SQL Injection attack: equal sign (=) found in Body or Query String
1010 - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies
1011 - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies
1013 - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies
1015 - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies
1016 - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies
1017 - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies
1100 - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies
1101 - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies
1102 - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies
1103 - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies
1104 - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies
1105 - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies
1106 - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies
1107 - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies
1108 - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies
1109 - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies
1110 - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies
1198 - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR
1199 - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies
1200 - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies
1202 - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies
1203 - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies
1204 - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies
1205 - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies
1206 - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies
1207 - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies
1208 - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies
1209 - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies
1210 - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies
1302 - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies
1303 - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies
1310 - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies
1311 - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies
1312 - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies
1314 - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies
1315 - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies
1400 - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies
1401 - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies
1402 - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies
1500 - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file
2001 - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering * `0` - All Rules * `1` - Validation of protocol compliance: weird request, unable to parse * `2` - Request too big, stored on disk and not parsed * `10` - Validation of protocol compliance: invalid HEX encoding (null bytes) * `11` - Validation of protocol compliance: missing or unknown Content-Type header in a POST (this rule applies only to Request Body match zone) * `12` - Validation of protocol compliance: invalid formatted URL * `13` - Validation of protocol compliance: invalid POST format * `14` - Validation of protocol compliance: invalid POST boundary * `15` - Validation of protocol compliance: invalid JSON * `16` - Validation of protocol compliance: POST with no body * `17` - Possible SQL Injection attack: validation with libinjection_sql * `18` - Possible XSS attack: validation with libinjection_xss * `1000` - Possible SQL Injection attack: SQL keywords found in Body, Path, Query String or Cookies * `1001` - Possible SQL Injection or XSS attack: double quote (\") found in Body, Path, Query String or Cookies * `1002` - Possible SQL Injection attack: possible hex encoding (0x) found in Body, Path, Query String or Cookies * `1003` - Possible SQL Injection attack: MySQL comment (/_*) found in Body, Path, Query String or Cookies * `1004` - Possible SQL Injection attack: MySQL comment (*_/) found in Body, Path, Query String or Cookies * `1005` - Possible SQL Injection attack: MySQL keyword (|) found in Body, Path, Query String or Cookies * `1006` - Possible SQL Injection attack: MySQL keyword (&&) found in Body, Path, Query String or Cookies * `1007` - Possible SQL Injection attack: MySQL comment (--) found in Body, Path, Query String or Cookies * `1008` - Possible SQL Injection or XSS attack: semicolon (;) found in Body, Path or Query String * `1009` - Possible SQL Injection attack: equal sign (=) found in Body or Query String * `1010` - Possible SQL Injection or XSS attack: open parenthesis [(] found in Body, Path, Query String or Cookies * `1011` - Possible SQL Injection or XSS attack: close parenthesis [)] found in Body, Path, Query String or Cookies * `1013` - Possible SQL Injection or XSS attack: apostrophe (') found in Body, Path, Query String or Cookies * `1015` - Possible SQL Injection attack: comma (,) found in Body, Path, Query String or Cookies * `1016` - Possible SQL Injection attack: MySQL comment (#) found in Body, Path, Query String or Cookies * `1017` - Possible SQL Injection attack: double at sign (@@) found in Body, Path, Query String or Cookies * `1100` - Possible RFI attack: scheme \"http://\" found in Body, Query String or Cookies * `1101` - Possible RFI attack: scheme \"https://\" found in Body, Query String or Cookies * `1102` - Possible RFI attack: scheme \"ftp://\" found in Body, Query String or Cookies * `1103` - Possible RFI attack: scheme \"php://\" found in Body, Query String or Cookies * `1104` - Possible RFI attack: scheme \"sftp://\" found in Body, Query String or Cookies * `1105` - Possible RFI attack: scheme \"zlib://\" found in Body, Query String or Cookies * `1106` - Possible RFI attack: scheme \"data://\" found in Body, Query String or Cookies * `1107` - Possible RFI attack: scheme \"glob://\" found in Body, Query String or Cookies * `1108` - Possible RFI attack: scheme \"phar://\" found in Body, Query String or Cookies * `1109` - Possible RFI attack: scheme \"file://\" found in Body, Query String or Cookies * `1110` - Possible RFI attack: scheme \"gopher://\" found in Body, Query String or Cookies * `1198` - Possible RCE attack: validation with log4j (Log4Shell) in HEADERS_VAR * `1199` - Possible RCE attack: validation with log4j (Log4Shell) in Body, Path, Query String, Headers or Cookies * `1200` - Possible Directory Traversal attack: double dot (..) found in Body, Path, Query String or Cookies * `1202` - Possible Directory Traversal attack: obvious probe (/etc/passwd) found in Body, Path, Query String or Cookies * `1203` - Possible Directory Traversal attack: obvious windows path (c:\\) found in Body, Path, Query String or Cookies * `1204` - Possible Directory Traversal attack: obvious probe (cmd.exe) found in Body, Path, Query String or Cookies * `1205` - Possible Directory Traversal attack: backslash (\\) found in Body, Path, Query String or Cookies * `1206` - Possible Directory Traversal attack: slash (/) found in Body, Query String or Cookies * `1207` - Possible Directory Traversal attack: obvious path probe (/..;/) found in Body, Query String or Cookies * `1208` - Possible Directory Traversal attack: obvious path probe (/.;/) found in Body, Query String or Cookies * `1209` - Possible Directory Traversal attack: obvious path probe (/.%2e/) found in Body, Query String or Cookies * `1210` - Possible Directory Traversal attack: obvious path probe (/%2e./) found in Body, Query String or Cookies * `1302` - Possible XSS attack: html open tag (<) found in Body, Path, Query String or Cookies * `1303` - Possible XSS attack: html close tag (>) found in Body, Path, Query String or Cookies * `1310` - Possible XSS attack: open square bracket ([) found in Body, Path, Query String or Cookies * `1311` - Possible XSS attack: close square bracket (]) found in Body, Path, Query String or Cookies * `1312` - Possible XSS attack: tilde character (~) found in Body, Path, Query String or Cookies * `1314` - Possible XSS attack: back quote ( `) found in Body, Path, Query String or Cookies * `1315` - Possible XSS attack: double encoding (%[2|3]) found in Body, Path, Query String or Cookies * `1400` - Possible trick to evade protection: UTF7/8 encoding (&#) found in Body, Path, Query String or Cookies * `1401` - Possible trick to evade protection: MS encoding (%U) found in Body, Path, Query String or Cookies * `1402` - Possible trick to evade protection: encoded chars (%20-%3F) found in Body, Query String or Cookies * `1500` - Possible File Upload attempt: asp/php (.ph, .asp or .ht) found in filename in a multipart POST containing a file * `2001` - Possible CVE-2022-22965 attack: Tomcat Pipeline Context tampering + RuleId *int64 `json:"rule_id,omitempty"` + Name string `json:"name"` + Path NullableString `json:"path,omitempty"` + Conditions []WAFExceptionConditionRequest `json:"conditions"` + // * `regex` - regex * `contains` - contains + Operator *string `json:"operator,omitempty"` + Active *bool `json:"active,omitempty"` +} + +type _WAFRuleRequest WAFRuleRequest + +// NewWAFRuleRequest instantiates a new WAFRuleRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFRuleRequest(name string, conditions []WAFExceptionConditionRequest) *WAFRuleRequest { + this := WAFRuleRequest{} + this.Name = name + this.Conditions = conditions + return &this +} + +// NewWAFRuleRequestWithDefaults instantiates a new WAFRuleRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFRuleRequestWithDefaults() *WAFRuleRequest { + this := WAFRuleRequest{} + return &this +} + +// GetRuleId returns the RuleId field value if set, zero value otherwise. +func (o *WAFRuleRequest) GetRuleId() int64 { + if o == nil || IsNil(o.RuleId) { + var ret int64 + return ret + } + return *o.RuleId +} + +// GetRuleIdOk returns a tuple with the RuleId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRuleRequest) GetRuleIdOk() (*int64, bool) { + if o == nil || IsNil(o.RuleId) { + return nil, false + } + return o.RuleId, true +} + +// HasRuleId returns a boolean if a field has been set. +func (o *WAFRuleRequest) HasRuleId() bool { + if o != nil && !IsNil(o.RuleId) { + return true + } + + return false +} + +// SetRuleId gets a reference to the given int64 and assigns it to the RuleId field. +func (o *WAFRuleRequest) SetRuleId(v int64) { + o.RuleId = &v +} + +// GetName returns the Name field value +func (o *WAFRuleRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WAFRuleRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WAFRuleRequest) SetName(v string) { + o.Name = v +} + +// GetPath returns the Path field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WAFRuleRequest) GetPath() string { + if o == nil || IsNil(o.Path.Get()) { + var ret string + return ret + } + return *o.Path.Get() +} + +// GetPathOk returns a tuple with the Path field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WAFRuleRequest) GetPathOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Path.Get(), o.Path.IsSet() +} + +// HasPath returns a boolean if a field has been set. +func (o *WAFRuleRequest) HasPath() bool { + if o != nil && o.Path.IsSet() { + return true + } + + return false +} + +// SetPath gets a reference to the given NullableString and assigns it to the Path field. +func (o *WAFRuleRequest) SetPath(v string) { + o.Path.Set(&v) +} +// SetPathNil sets the value for Path to be an explicit nil +func (o *WAFRuleRequest) SetPathNil() { + o.Path.Set(nil) +} + +// UnsetPath ensures that no value is present for Path, not even an explicit nil +func (o *WAFRuleRequest) UnsetPath() { + o.Path.Unset() +} + +// GetConditions returns the Conditions field value +func (o *WAFRuleRequest) GetConditions() []WAFExceptionConditionRequest { + if o == nil { + var ret []WAFExceptionConditionRequest + return ret + } + + return o.Conditions +} + +// GetConditionsOk returns a tuple with the Conditions field value +// and a boolean to check if the value has been set. +func (o *WAFRuleRequest) GetConditionsOk() ([]WAFExceptionConditionRequest, bool) { + if o == nil { + return nil, false + } + return o.Conditions, true +} + +// SetConditions sets field value +func (o *WAFRuleRequest) SetConditions(v []WAFExceptionConditionRequest) { + o.Conditions = v +} + +// GetOperator returns the Operator field value if set, zero value otherwise. +func (o *WAFRuleRequest) GetOperator() string { + if o == nil || IsNil(o.Operator) { + var ret string + return ret + } + return *o.Operator +} + +// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRuleRequest) GetOperatorOk() (*string, bool) { + if o == nil || IsNil(o.Operator) { + return nil, false + } + return o.Operator, true +} + +// HasOperator returns a boolean if a field has been set. +func (o *WAFRuleRequest) HasOperator() bool { + if o != nil && !IsNil(o.Operator) { + return true + } + + return false +} + +// SetOperator gets a reference to the given string and assigns it to the Operator field. +func (o *WAFRuleRequest) SetOperator(v string) { + o.Operator = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WAFRuleRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRuleRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WAFRuleRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WAFRuleRequest) SetActive(v bool) { + o.Active = &v +} + +func (o WAFRuleRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFRuleRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RuleId) { + toSerialize["rule_id"] = o.RuleId + } + toSerialize["name"] = o.Name + if o.Path.IsSet() { + toSerialize["path"] = o.Path.Get() + } + toSerialize["conditions"] = o.Conditions + if !IsNil(o.Operator) { + toSerialize["operator"] = o.Operator + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + return toSerialize, nil +} + +func (o *WAFRuleRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "conditions", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFRuleRequest := _WAFRuleRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFRuleRequest) + + if err != nil { + return err + } + + *o = WAFRuleRequest(varWAFRuleRequest) + + return err +} + +type NullableWAFRuleRequest struct { + value *WAFRuleRequest + isSet bool +} + +func (v NullableWAFRuleRequest) Get() *WAFRuleRequest { + return v.value +} + +func (v *NullableWAFRuleRequest) Set(val *WAFRuleRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRuleRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRuleRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRuleRequest(val *WAFRuleRequest) *NullableWAFRuleRequest { + return &NullableWAFRuleRequest{value: val, isSet: true} +} + +func (v NullableWAFRuleRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRuleRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_waf_rule_response.go b/azion-api/model_waf_rule_response.go new file mode 100644 index 0000000..90ed011 --- /dev/null +++ b/azion-api/model_waf_rule_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WAFRuleResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WAFRuleResponse{} + +// WAFRuleResponse struct for WAFRuleResponse +type WAFRuleResponse struct { + State *string `json:"state,omitempty"` + Data WAFRule `json:"data"` +} + +type _WAFRuleResponse WAFRuleResponse + +// NewWAFRuleResponse instantiates a new WAFRuleResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWAFRuleResponse(data WAFRule) *WAFRuleResponse { + this := WAFRuleResponse{} + this.Data = data + return &this +} + +// NewWAFRuleResponseWithDefaults instantiates a new WAFRuleResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWAFRuleResponseWithDefaults() *WAFRuleResponse { + this := WAFRuleResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WAFRuleResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WAFRuleResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WAFRuleResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *WAFRuleResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *WAFRuleResponse) GetData() WAFRule { + if o == nil { + var ret WAFRule + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *WAFRuleResponse) GetDataOk() (*WAFRule, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *WAFRuleResponse) SetData(v WAFRule) { + o.Data = v +} + +func (o WAFRuleResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WAFRuleResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *WAFRuleResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWAFRuleResponse := _WAFRuleResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWAFRuleResponse) + + if err != nil { + return err + } + + *o = WAFRuleResponse(varWAFRuleResponse) + + return err +} + +type NullableWAFRuleResponse struct { + value *WAFRuleResponse + isSet bool +} + +func (v NullableWAFRuleResponse) Get() *WAFRuleResponse { + return v.value +} + +func (v *NullableWAFRuleResponse) Set(val *WAFRuleResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWAFRuleResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWAFRuleResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWAFRuleResponse(val *WAFRuleResponse) *NullableWAFRuleResponse { + return &NullableWAFRuleResponse{value: val, isSet: true} +} + +func (v NullableWAFRuleResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWAFRuleResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workload.go b/azion-api/model_workload.go new file mode 100644 index 0000000..a3e0f32 --- /dev/null +++ b/azion-api/model_workload.go @@ -0,0 +1,553 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Workload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Workload{} + +// Workload struct for Workload +type Workload struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + // * `1` - Production Infrastructure (All Locations) * `2` - Staging Infrastructure + Infrastructure *int64 `json:"infrastructure,omitempty"` + Tls *TLSWorkload `json:"tls,omitempty"` + Protocols *Protocols `json:"protocols,omitempty"` + Mtls *MTLS `json:"mtls,omitempty"` + Domains []string `json:"domains,omitempty"` + WorkloadDomainAllowAccess *bool `json:"workload_domain_allow_access,omitempty"` + WorkloadDomain string `json:"workload_domain"` + ProductVersion string `json:"product_version"` +} + +type _Workload Workload + +// NewWorkload instantiates a new Workload object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkload(id int64, name string, lastEditor string, lastModified time.Time, workloadDomain string, productVersion string) *Workload { + this := Workload{} + this.Id = id + this.Name = name + this.LastEditor = lastEditor + this.LastModified = lastModified + this.WorkloadDomain = workloadDomain + this.ProductVersion = productVersion + return &this +} + +// NewWorkloadWithDefaults instantiates a new Workload object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkloadWithDefaults() *Workload { + this := Workload{} + return &this +} + +// GetId returns the Id field value +func (o *Workload) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Workload) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Workload) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Workload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Workload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Workload) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *Workload) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *Workload) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *Workload) SetActive(v bool) { + o.Active = &v +} + +// GetLastEditor returns the LastEditor field value +func (o *Workload) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Workload) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Workload) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Workload) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Workload) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Workload) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetInfrastructure returns the Infrastructure field value if set, zero value otherwise. +func (o *Workload) GetInfrastructure() int64 { + if o == nil || IsNil(o.Infrastructure) { + var ret int64 + return ret + } + return *o.Infrastructure +} + +// GetInfrastructureOk returns a tuple with the Infrastructure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetInfrastructureOk() (*int64, bool) { + if o == nil || IsNil(o.Infrastructure) { + return nil, false + } + return o.Infrastructure, true +} + +// HasInfrastructure returns a boolean if a field has been set. +func (o *Workload) HasInfrastructure() bool { + if o != nil && !IsNil(o.Infrastructure) { + return true + } + + return false +} + +// SetInfrastructure gets a reference to the given int64 and assigns it to the Infrastructure field. +func (o *Workload) SetInfrastructure(v int64) { + o.Infrastructure = &v +} + +// GetTls returns the Tls field value if set, zero value otherwise. +func (o *Workload) GetTls() TLSWorkload { + if o == nil || IsNil(o.Tls) { + var ret TLSWorkload + return ret + } + return *o.Tls +} + +// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetTlsOk() (*TLSWorkload, bool) { + if o == nil || IsNil(o.Tls) { + return nil, false + } + return o.Tls, true +} + +// HasTls returns a boolean if a field has been set. +func (o *Workload) HasTls() bool { + if o != nil && !IsNil(o.Tls) { + return true + } + + return false +} + +// SetTls gets a reference to the given TLSWorkload and assigns it to the Tls field. +func (o *Workload) SetTls(v TLSWorkload) { + o.Tls = &v +} + +// GetProtocols returns the Protocols field value if set, zero value otherwise. +func (o *Workload) GetProtocols() Protocols { + if o == nil || IsNil(o.Protocols) { + var ret Protocols + return ret + } + return *o.Protocols +} + +// GetProtocolsOk returns a tuple with the Protocols field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetProtocolsOk() (*Protocols, bool) { + if o == nil || IsNil(o.Protocols) { + return nil, false + } + return o.Protocols, true +} + +// HasProtocols returns a boolean if a field has been set. +func (o *Workload) HasProtocols() bool { + if o != nil && !IsNil(o.Protocols) { + return true + } + + return false +} + +// SetProtocols gets a reference to the given Protocols and assigns it to the Protocols field. +func (o *Workload) SetProtocols(v Protocols) { + o.Protocols = &v +} + +// GetMtls returns the Mtls field value if set, zero value otherwise. +func (o *Workload) GetMtls() MTLS { + if o == nil || IsNil(o.Mtls) { + var ret MTLS + return ret + } + return *o.Mtls +} + +// GetMtlsOk returns a tuple with the Mtls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetMtlsOk() (*MTLS, bool) { + if o == nil || IsNil(o.Mtls) { + return nil, false + } + return o.Mtls, true +} + +// HasMtls returns a boolean if a field has been set. +func (o *Workload) HasMtls() bool { + if o != nil && !IsNil(o.Mtls) { + return true + } + + return false +} + +// SetMtls gets a reference to the given MTLS and assigns it to the Mtls field. +func (o *Workload) SetMtls(v MTLS) { + o.Mtls = &v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *Workload) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *Workload) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *Workload) SetDomains(v []string) { + o.Domains = v +} + +// GetWorkloadDomainAllowAccess returns the WorkloadDomainAllowAccess field value if set, zero value otherwise. +func (o *Workload) GetWorkloadDomainAllowAccess() bool { + if o == nil || IsNil(o.WorkloadDomainAllowAccess) { + var ret bool + return ret + } + return *o.WorkloadDomainAllowAccess +} + +// GetWorkloadDomainAllowAccessOk returns a tuple with the WorkloadDomainAllowAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Workload) GetWorkloadDomainAllowAccessOk() (*bool, bool) { + if o == nil || IsNil(o.WorkloadDomainAllowAccess) { + return nil, false + } + return o.WorkloadDomainAllowAccess, true +} + +// HasWorkloadDomainAllowAccess returns a boolean if a field has been set. +func (o *Workload) HasWorkloadDomainAllowAccess() bool { + if o != nil && !IsNil(o.WorkloadDomainAllowAccess) { + return true + } + + return false +} + +// SetWorkloadDomainAllowAccess gets a reference to the given bool and assigns it to the WorkloadDomainAllowAccess field. +func (o *Workload) SetWorkloadDomainAllowAccess(v bool) { + o.WorkloadDomainAllowAccess = &v +} + +// GetWorkloadDomain returns the WorkloadDomain field value +func (o *Workload) GetWorkloadDomain() string { + if o == nil { + var ret string + return ret + } + + return o.WorkloadDomain +} + +// GetWorkloadDomainOk returns a tuple with the WorkloadDomain field value +// and a boolean to check if the value has been set. +func (o *Workload) GetWorkloadDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkloadDomain, true +} + +// SetWorkloadDomain sets field value +func (o *Workload) SetWorkloadDomain(v string) { + o.WorkloadDomain = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Workload) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Workload) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Workload) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Workload) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Workload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + if !IsNil(o.Infrastructure) { + toSerialize["infrastructure"] = o.Infrastructure + } + if !IsNil(o.Tls) { + toSerialize["tls"] = o.Tls + } + if !IsNil(o.Protocols) { + toSerialize["protocols"] = o.Protocols + } + if !IsNil(o.Mtls) { + toSerialize["mtls"] = o.Mtls + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.WorkloadDomainAllowAccess) { + toSerialize["workload_domain_allow_access"] = o.WorkloadDomainAllowAccess + } + toSerialize["workload_domain"] = o.WorkloadDomain + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Workload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "last_editor", + "last_modified", + "workload_domain", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkload := _Workload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkload) + + if err != nil { + return err + } + + *o = Workload(varWorkload) + + return err +} + +type NullableWorkload struct { + value *Workload + isSet bool +} + +func (v NullableWorkload) Get() *Workload { + return v.value +} + +func (v *NullableWorkload) Set(val *Workload) { + v.value = val + v.isSet = true +} + +func (v NullableWorkload) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkload(val *Workload) *NullableWorkload { + return &NullableWorkload{value: val, isSet: true} +} + +func (v NullableWorkload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workload_deployment.go b/azion-api/model_workload_deployment.go new file mode 100644 index 0000000..c6018d8 --- /dev/null +++ b/azion-api/model_workload_deployment.go @@ -0,0 +1,344 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the WorkloadDeployment type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkloadDeployment{} + +// WorkloadDeployment struct for WorkloadDeployment +type WorkloadDeployment struct { + Id int64 `json:"id"` + Name string `json:"name"` + Current *bool `json:"current,omitempty"` + Active *bool `json:"active,omitempty"` + Strategy DeploymentStrategyDefaultDeploymentStrategy `json:"strategy"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` +} + +type _WorkloadDeployment WorkloadDeployment + +// NewWorkloadDeployment instantiates a new WorkloadDeployment object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkloadDeployment(id int64, name string, strategy DeploymentStrategyDefaultDeploymentStrategy, lastEditor string, lastModified time.Time) *WorkloadDeployment { + this := WorkloadDeployment{} + this.Id = id + this.Name = name + this.Strategy = strategy + this.LastEditor = lastEditor + this.LastModified = lastModified + return &this +} + +// NewWorkloadDeploymentWithDefaults instantiates a new WorkloadDeployment object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkloadDeploymentWithDefaults() *WorkloadDeployment { + this := WorkloadDeployment{} + return &this +} + +// GetId returns the Id field value +func (o *WorkloadDeployment) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkloadDeployment) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *WorkloadDeployment) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkloadDeployment) SetName(v string) { + o.Name = v +} + +// GetCurrent returns the Current field value if set, zero value otherwise. +func (o *WorkloadDeployment) GetCurrent() bool { + if o == nil || IsNil(o.Current) { + var ret bool + return ret + } + return *o.Current +} + +// GetCurrentOk returns a tuple with the Current field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetCurrentOk() (*bool, bool) { + if o == nil || IsNil(o.Current) { + return nil, false + } + return o.Current, true +} + +// HasCurrent returns a boolean if a field has been set. +func (o *WorkloadDeployment) HasCurrent() bool { + if o != nil && !IsNil(o.Current) { + return true + } + + return false +} + +// SetCurrent gets a reference to the given bool and assigns it to the Current field. +func (o *WorkloadDeployment) SetCurrent(v bool) { + o.Current = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WorkloadDeployment) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WorkloadDeployment) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WorkloadDeployment) SetActive(v bool) { + o.Active = &v +} + +// GetStrategy returns the Strategy field value +func (o *WorkloadDeployment) GetStrategy() DeploymentStrategyDefaultDeploymentStrategy { + if o == nil { + var ret DeploymentStrategyDefaultDeploymentStrategy + return ret + } + + return o.Strategy +} + +// GetStrategyOk returns a tuple with the Strategy field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetStrategyOk() (*DeploymentStrategyDefaultDeploymentStrategy, bool) { + if o == nil { + return nil, false + } + return &o.Strategy, true +} + +// SetStrategy sets field value +func (o *WorkloadDeployment) SetStrategy(v DeploymentStrategyDefaultDeploymentStrategy) { + o.Strategy = v +} + +// GetLastEditor returns the LastEditor field value +func (o *WorkloadDeployment) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *WorkloadDeployment) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *WorkloadDeployment) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeployment) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *WorkloadDeployment) SetLastModified(v time.Time) { + o.LastModified = v +} + +func (o WorkloadDeployment) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkloadDeployment) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + if !IsNil(o.Current) { + toSerialize["current"] = o.Current + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["strategy"] = o.Strategy + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + return toSerialize, nil +} + +func (o *WorkloadDeployment) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "strategy", + "last_editor", + "last_modified", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkloadDeployment := _WorkloadDeployment{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkloadDeployment) + + if err != nil { + return err + } + + *o = WorkloadDeployment(varWorkloadDeployment) + + return err +} + +type NullableWorkloadDeployment struct { + value *WorkloadDeployment + isSet bool +} + +func (v NullableWorkloadDeployment) Get() *WorkloadDeployment { + return v.value +} + +func (v *NullableWorkloadDeployment) Set(val *WorkloadDeployment) { + v.value = val + v.isSet = true +} + +func (v NullableWorkloadDeployment) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkloadDeployment) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkloadDeployment(val *WorkloadDeployment) *NullableWorkloadDeployment { + return &NullableWorkloadDeployment{value: val, isSet: true} +} + +func (v NullableWorkloadDeployment) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkloadDeployment) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workload_deployment_request.go b/azion-api/model_workload_deployment_request.go new file mode 100644 index 0000000..9d26376 --- /dev/null +++ b/azion-api/model_workload_deployment_request.go @@ -0,0 +1,259 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WorkloadDeploymentRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkloadDeploymentRequest{} + +// WorkloadDeploymentRequest struct for WorkloadDeploymentRequest +type WorkloadDeploymentRequest struct { + Name string `json:"name"` + Current *bool `json:"current,omitempty"` + Active *bool `json:"active,omitempty"` + Strategy DeploymentStrategyDefaultDeploymentStrategyRequest `json:"strategy"` +} + +type _WorkloadDeploymentRequest WorkloadDeploymentRequest + +// NewWorkloadDeploymentRequest instantiates a new WorkloadDeploymentRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkloadDeploymentRequest(name string, strategy DeploymentStrategyDefaultDeploymentStrategyRequest) *WorkloadDeploymentRequest { + this := WorkloadDeploymentRequest{} + this.Name = name + this.Strategy = strategy + return &this +} + +// NewWorkloadDeploymentRequestWithDefaults instantiates a new WorkloadDeploymentRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkloadDeploymentRequestWithDefaults() *WorkloadDeploymentRequest { + this := WorkloadDeploymentRequest{} + return &this +} + +// GetName returns the Name field value +func (o *WorkloadDeploymentRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeploymentRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkloadDeploymentRequest) SetName(v string) { + o.Name = v +} + +// GetCurrent returns the Current field value if set, zero value otherwise. +func (o *WorkloadDeploymentRequest) GetCurrent() bool { + if o == nil || IsNil(o.Current) { + var ret bool + return ret + } + return *o.Current +} + +// GetCurrentOk returns a tuple with the Current field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadDeploymentRequest) GetCurrentOk() (*bool, bool) { + if o == nil || IsNil(o.Current) { + return nil, false + } + return o.Current, true +} + +// HasCurrent returns a boolean if a field has been set. +func (o *WorkloadDeploymentRequest) HasCurrent() bool { + if o != nil && !IsNil(o.Current) { + return true + } + + return false +} + +// SetCurrent gets a reference to the given bool and assigns it to the Current field. +func (o *WorkloadDeploymentRequest) SetCurrent(v bool) { + o.Current = &v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WorkloadDeploymentRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadDeploymentRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WorkloadDeploymentRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WorkloadDeploymentRequest) SetActive(v bool) { + o.Active = &v +} + +// GetStrategy returns the Strategy field value +func (o *WorkloadDeploymentRequest) GetStrategy() DeploymentStrategyDefaultDeploymentStrategyRequest { + if o == nil { + var ret DeploymentStrategyDefaultDeploymentStrategyRequest + return ret + } + + return o.Strategy +} + +// GetStrategyOk returns a tuple with the Strategy field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeploymentRequest) GetStrategyOk() (*DeploymentStrategyDefaultDeploymentStrategyRequest, bool) { + if o == nil { + return nil, false + } + return &o.Strategy, true +} + +// SetStrategy sets field value +func (o *WorkloadDeploymentRequest) SetStrategy(v DeploymentStrategyDefaultDeploymentStrategyRequest) { + o.Strategy = v +} + +func (o WorkloadDeploymentRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkloadDeploymentRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Current) { + toSerialize["current"] = o.Current + } + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + toSerialize["strategy"] = o.Strategy + return toSerialize, nil +} + +func (o *WorkloadDeploymentRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "strategy", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkloadDeploymentRequest := _WorkloadDeploymentRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkloadDeploymentRequest) + + if err != nil { + return err + } + + *o = WorkloadDeploymentRequest(varWorkloadDeploymentRequest) + + return err +} + +type NullableWorkloadDeploymentRequest struct { + value *WorkloadDeploymentRequest + isSet bool +} + +func (v NullableWorkloadDeploymentRequest) Get() *WorkloadDeploymentRequest { + return v.value +} + +func (v *NullableWorkloadDeploymentRequest) Set(val *WorkloadDeploymentRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWorkloadDeploymentRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkloadDeploymentRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkloadDeploymentRequest(val *WorkloadDeploymentRequest) *NullableWorkloadDeploymentRequest { + return &NullableWorkloadDeploymentRequest{value: val, isSet: true} +} + +func (v NullableWorkloadDeploymentRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkloadDeploymentRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workload_deployment_response.go b/azion-api/model_workload_deployment_response.go new file mode 100644 index 0000000..806950a --- /dev/null +++ b/azion-api/model_workload_deployment_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WorkloadDeploymentResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkloadDeploymentResponse{} + +// WorkloadDeploymentResponse struct for WorkloadDeploymentResponse +type WorkloadDeploymentResponse struct { + State *string `json:"state,omitempty"` + Data WorkloadDeployment `json:"data"` +} + +type _WorkloadDeploymentResponse WorkloadDeploymentResponse + +// NewWorkloadDeploymentResponse instantiates a new WorkloadDeploymentResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkloadDeploymentResponse(data WorkloadDeployment) *WorkloadDeploymentResponse { + this := WorkloadDeploymentResponse{} + this.Data = data + return &this +} + +// NewWorkloadDeploymentResponseWithDefaults instantiates a new WorkloadDeploymentResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkloadDeploymentResponseWithDefaults() *WorkloadDeploymentResponse { + this := WorkloadDeploymentResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WorkloadDeploymentResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadDeploymentResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WorkloadDeploymentResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *WorkloadDeploymentResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *WorkloadDeploymentResponse) GetData() WorkloadDeployment { + if o == nil { + var ret WorkloadDeployment + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *WorkloadDeploymentResponse) GetDataOk() (*WorkloadDeployment, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *WorkloadDeploymentResponse) SetData(v WorkloadDeployment) { + o.Data = v +} + +func (o WorkloadDeploymentResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkloadDeploymentResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *WorkloadDeploymentResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkloadDeploymentResponse := _WorkloadDeploymentResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkloadDeploymentResponse) + + if err != nil { + return err + } + + *o = WorkloadDeploymentResponse(varWorkloadDeploymentResponse) + + return err +} + +type NullableWorkloadDeploymentResponse struct { + value *WorkloadDeploymentResponse + isSet bool +} + +func (v NullableWorkloadDeploymentResponse) Get() *WorkloadDeploymentResponse { + return v.value +} + +func (v *NullableWorkloadDeploymentResponse) Set(val *WorkloadDeploymentResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkloadDeploymentResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkloadDeploymentResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkloadDeploymentResponse(val *WorkloadDeploymentResponse) *NullableWorkloadDeploymentResponse { + return &NullableWorkloadDeploymentResponse{value: val, isSet: true} +} + +func (v NullableWorkloadDeploymentResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkloadDeploymentResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workload_request.go b/azion-api/model_workload_request.go new file mode 100644 index 0000000..018c1d1 --- /dev/null +++ b/azion-api/model_workload_request.go @@ -0,0 +1,412 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WorkloadRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkloadRequest{} + +// WorkloadRequest struct for WorkloadRequest +type WorkloadRequest struct { + Name string `json:"name"` + Active *bool `json:"active,omitempty"` + // * `1` - Production Infrastructure (All Locations) * `2` - Staging Infrastructure + Infrastructure *int64 `json:"infrastructure,omitempty"` + Tls *TLSWorkloadRequest `json:"tls,omitempty"` + Protocols *ProtocolsRequest `json:"protocols,omitempty"` + Mtls *MTLSRequest `json:"mtls,omitempty"` + Domains []string `json:"domains,omitempty"` + WorkloadDomainAllowAccess *bool `json:"workload_domain_allow_access,omitempty"` +} + +type _WorkloadRequest WorkloadRequest + +// NewWorkloadRequest instantiates a new WorkloadRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkloadRequest(name string) *WorkloadRequest { + this := WorkloadRequest{} + this.Name = name + return &this +} + +// NewWorkloadRequestWithDefaults instantiates a new WorkloadRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkloadRequestWithDefaults() *WorkloadRequest { + this := WorkloadRequest{} + return &this +} + +// GetName returns the Name field value +func (o *WorkloadRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkloadRequest) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value if set, zero value otherwise. +func (o *WorkloadRequest) GetActive() bool { + if o == nil || IsNil(o.Active) { + var ret bool + return ret + } + return *o.Active +} + +// GetActiveOk returns a tuple with the Active field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetActiveOk() (*bool, bool) { + if o == nil || IsNil(o.Active) { + return nil, false + } + return o.Active, true +} + +// HasActive returns a boolean if a field has been set. +func (o *WorkloadRequest) HasActive() bool { + if o != nil && !IsNil(o.Active) { + return true + } + + return false +} + +// SetActive gets a reference to the given bool and assigns it to the Active field. +func (o *WorkloadRequest) SetActive(v bool) { + o.Active = &v +} + +// GetInfrastructure returns the Infrastructure field value if set, zero value otherwise. +func (o *WorkloadRequest) GetInfrastructure() int64 { + if o == nil || IsNil(o.Infrastructure) { + var ret int64 + return ret + } + return *o.Infrastructure +} + +// GetInfrastructureOk returns a tuple with the Infrastructure field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetInfrastructureOk() (*int64, bool) { + if o == nil || IsNil(o.Infrastructure) { + return nil, false + } + return o.Infrastructure, true +} + +// HasInfrastructure returns a boolean if a field has been set. +func (o *WorkloadRequest) HasInfrastructure() bool { + if o != nil && !IsNil(o.Infrastructure) { + return true + } + + return false +} + +// SetInfrastructure gets a reference to the given int64 and assigns it to the Infrastructure field. +func (o *WorkloadRequest) SetInfrastructure(v int64) { + o.Infrastructure = &v +} + +// GetTls returns the Tls field value if set, zero value otherwise. +func (o *WorkloadRequest) GetTls() TLSWorkloadRequest { + if o == nil || IsNil(o.Tls) { + var ret TLSWorkloadRequest + return ret + } + return *o.Tls +} + +// GetTlsOk returns a tuple with the Tls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetTlsOk() (*TLSWorkloadRequest, bool) { + if o == nil || IsNil(o.Tls) { + return nil, false + } + return o.Tls, true +} + +// HasTls returns a boolean if a field has been set. +func (o *WorkloadRequest) HasTls() bool { + if o != nil && !IsNil(o.Tls) { + return true + } + + return false +} + +// SetTls gets a reference to the given TLSWorkloadRequest and assigns it to the Tls field. +func (o *WorkloadRequest) SetTls(v TLSWorkloadRequest) { + o.Tls = &v +} + +// GetProtocols returns the Protocols field value if set, zero value otherwise. +func (o *WorkloadRequest) GetProtocols() ProtocolsRequest { + if o == nil || IsNil(o.Protocols) { + var ret ProtocolsRequest + return ret + } + return *o.Protocols +} + +// GetProtocolsOk returns a tuple with the Protocols field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetProtocolsOk() (*ProtocolsRequest, bool) { + if o == nil || IsNil(o.Protocols) { + return nil, false + } + return o.Protocols, true +} + +// HasProtocols returns a boolean if a field has been set. +func (o *WorkloadRequest) HasProtocols() bool { + if o != nil && !IsNil(o.Protocols) { + return true + } + + return false +} + +// SetProtocols gets a reference to the given ProtocolsRequest and assigns it to the Protocols field. +func (o *WorkloadRequest) SetProtocols(v ProtocolsRequest) { + o.Protocols = &v +} + +// GetMtls returns the Mtls field value if set, zero value otherwise. +func (o *WorkloadRequest) GetMtls() MTLSRequest { + if o == nil || IsNil(o.Mtls) { + var ret MTLSRequest + return ret + } + return *o.Mtls +} + +// GetMtlsOk returns a tuple with the Mtls field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetMtlsOk() (*MTLSRequest, bool) { + if o == nil || IsNil(o.Mtls) { + return nil, false + } + return o.Mtls, true +} + +// HasMtls returns a boolean if a field has been set. +func (o *WorkloadRequest) HasMtls() bool { + if o != nil && !IsNil(o.Mtls) { + return true + } + + return false +} + +// SetMtls gets a reference to the given MTLSRequest and assigns it to the Mtls field. +func (o *WorkloadRequest) SetMtls(v MTLSRequest) { + o.Mtls = &v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *WorkloadRequest) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *WorkloadRequest) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *WorkloadRequest) SetDomains(v []string) { + o.Domains = v +} + +// GetWorkloadDomainAllowAccess returns the WorkloadDomainAllowAccess field value if set, zero value otherwise. +func (o *WorkloadRequest) GetWorkloadDomainAllowAccess() bool { + if o == nil || IsNil(o.WorkloadDomainAllowAccess) { + var ret bool + return ret + } + return *o.WorkloadDomainAllowAccess +} + +// GetWorkloadDomainAllowAccessOk returns a tuple with the WorkloadDomainAllowAccess field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadRequest) GetWorkloadDomainAllowAccessOk() (*bool, bool) { + if o == nil || IsNil(o.WorkloadDomainAllowAccess) { + return nil, false + } + return o.WorkloadDomainAllowAccess, true +} + +// HasWorkloadDomainAllowAccess returns a boolean if a field has been set. +func (o *WorkloadRequest) HasWorkloadDomainAllowAccess() bool { + if o != nil && !IsNil(o.WorkloadDomainAllowAccess) { + return true + } + + return false +} + +// SetWorkloadDomainAllowAccess gets a reference to the given bool and assigns it to the WorkloadDomainAllowAccess field. +func (o *WorkloadRequest) SetWorkloadDomainAllowAccess(v bool) { + o.WorkloadDomainAllowAccess = &v +} + +func (o WorkloadRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkloadRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + if !IsNil(o.Active) { + toSerialize["active"] = o.Active + } + if !IsNil(o.Infrastructure) { + toSerialize["infrastructure"] = o.Infrastructure + } + if !IsNil(o.Tls) { + toSerialize["tls"] = o.Tls + } + if !IsNil(o.Protocols) { + toSerialize["protocols"] = o.Protocols + } + if !IsNil(o.Mtls) { + toSerialize["mtls"] = o.Mtls + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.WorkloadDomainAllowAccess) { + toSerialize["workload_domain_allow_access"] = o.WorkloadDomainAllowAccess + } + return toSerialize, nil +} + +func (o *WorkloadRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkloadRequest := _WorkloadRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkloadRequest) + + if err != nil { + return err + } + + *o = WorkloadRequest(varWorkloadRequest) + + return err +} + +type NullableWorkloadRequest struct { + value *WorkloadRequest + isSet bool +} + +func (v NullableWorkloadRequest) Get() *WorkloadRequest { + return v.value +} + +func (v *NullableWorkloadRequest) Set(val *WorkloadRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWorkloadRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkloadRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkloadRequest(val *WorkloadRequest) *NullableWorkloadRequest { + return &NullableWorkloadRequest{value: val, isSet: true} +} + +func (v NullableWorkloadRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkloadRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workload_response.go b/azion-api/model_workload_response.go new file mode 100644 index 0000000..d84b4b8 --- /dev/null +++ b/azion-api/model_workload_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WorkloadResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkloadResponse{} + +// WorkloadResponse struct for WorkloadResponse +type WorkloadResponse struct { + State *string `json:"state,omitempty"` + Data Workload `json:"data"` +} + +type _WorkloadResponse WorkloadResponse + +// NewWorkloadResponse instantiates a new WorkloadResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkloadResponse(data Workload) *WorkloadResponse { + this := WorkloadResponse{} + this.Data = data + return &this +} + +// NewWorkloadResponseWithDefaults instantiates a new WorkloadResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkloadResponseWithDefaults() *WorkloadResponse { + this := WorkloadResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *WorkloadResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkloadResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *WorkloadResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *WorkloadResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *WorkloadResponse) GetData() Workload { + if o == nil { + var ret Workload + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *WorkloadResponse) GetDataOk() (*Workload, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *WorkloadResponse) SetData(v Workload) { + o.Data = v +} + +func (o WorkloadResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkloadResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *WorkloadResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkloadResponse := _WorkloadResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkloadResponse) + + if err != nil { + return err + } + + *o = WorkloadResponse(varWorkloadResponse) + + return err +} + +type NullableWorkloadResponse struct { + value *WorkloadResponse + isSet bool +} + +func (v NullableWorkloadResponse) Get() *WorkloadResponse { + return v.value +} + +func (v *NullableWorkloadResponse) Set(val *WorkloadResponse) { + v.value = val + v.isSet = true +} + +func (v NullableWorkloadResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkloadResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkloadResponse(val *WorkloadResponse) *NullableWorkloadResponse { + return &NullableWorkloadResponse{value: val, isSet: true} +} + +func (v NullableWorkloadResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkloadResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workspace.go b/azion-api/model_workspace.go new file mode 100644 index 0000000..4e1058a --- /dev/null +++ b/azion-api/model_workspace.go @@ -0,0 +1,413 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the Workspace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Workspace{} + +// Workspace struct for Workspace +type Workspace struct { + Id int64 `json:"id"` + Name string `json:"name"` + Active bool `json:"active"` + LastEditor string `json:"last_editor"` + LastModified time.Time `json:"last_modified"` + ParentId int64 `json:"parent_id"` + Created time.Time `json:"created"` + Info map[string]interface{} `json:"info"` + WorkspaceId string `json:"workspace_id"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _Workspace Workspace + +// NewWorkspace instantiates a new Workspace object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspace(id int64, name string, active bool, lastEditor string, lastModified time.Time, parentId int64, created time.Time, info map[string]interface{}, workspaceId string, type_ string) *Workspace { + this := Workspace{} + this.Id = id + this.Name = name + this.Active = active + this.LastEditor = lastEditor + this.LastModified = lastModified + this.ParentId = parentId + this.Created = created + this.Info = info + this.WorkspaceId = workspaceId + this.Type = type_ + return &this +} + +// NewWorkspaceWithDefaults instantiates a new Workspace object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceWithDefaults() *Workspace { + this := Workspace{} + return &this +} + +// GetId returns the Id field value +func (o *Workspace) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Workspace) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Workspace) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Workspace) SetName(v string) { + o.Name = v +} + +// GetActive returns the Active field value +func (o *Workspace) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Workspace) SetActive(v bool) { + o.Active = v +} + +// GetLastEditor returns the LastEditor field value +func (o *Workspace) GetLastEditor() string { + if o == nil { + var ret string + return ret + } + + return o.LastEditor +} + +// GetLastEditorOk returns a tuple with the LastEditor field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetLastEditorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.LastEditor, true +} + +// SetLastEditor sets field value +func (o *Workspace) SetLastEditor(v string) { + o.LastEditor = v +} + +// GetLastModified returns the LastModified field value +func (o *Workspace) GetLastModified() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.LastModified +} + +// GetLastModifiedOk returns a tuple with the LastModified field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetLastModifiedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.LastModified, true +} + +// SetLastModified sets field value +func (o *Workspace) SetLastModified(v time.Time) { + o.LastModified = v +} + +// GetParentId returns the ParentId field value +func (o *Workspace) GetParentId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetParentIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *Workspace) SetParentId(v int64) { + o.ParentId = v +} + +// GetCreated returns the Created field value +func (o *Workspace) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// GetCreatedOk returns a tuple with the Created field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetCreatedOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.Created, true +} + +// SetCreated sets field value +func (o *Workspace) SetCreated(v time.Time) { + o.Created = v +} + +// GetInfo returns the Info field value +func (o *Workspace) GetInfo() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Info +} + +// GetInfoOk returns a tuple with the Info field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetInfoOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Info, true +} + +// SetInfo sets field value +func (o *Workspace) SetInfo(v map[string]interface{}) { + o.Info = v +} + +// GetWorkspaceId returns the WorkspaceId field value +func (o *Workspace) GetWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceId +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceId, true +} + +// SetWorkspaceId sets field value +func (o *Workspace) SetWorkspaceId(v string) { + o.WorkspaceId = v +} + +// GetType returns the Type field value +func (o *Workspace) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Workspace) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Workspace) SetType(v string) { + o.Type = v +} + +func (o Workspace) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Workspace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["active"] = o.Active + toSerialize["last_editor"] = o.LastEditor + toSerialize["last_modified"] = o.LastModified + toSerialize["parent_id"] = o.ParentId + toSerialize["created"] = o.Created + toSerialize["info"] = o.Info + toSerialize["workspace_id"] = o.WorkspaceId + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Workspace) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "active", + "last_editor", + "last_modified", + "parent_id", + "created", + "info", + "workspace_id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspace := _Workspace{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspace) + + if err != nil { + return err + } + + *o = Workspace(varWorkspace) + + return err +} + +type NullableWorkspace struct { + value *Workspace + isSet bool +} + +func (v NullableWorkspace) Get() *Workspace { + return v.value +} + +func (v *NullableWorkspace) Set(val *Workspace) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspace) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspace) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspace(val *Workspace) *NullableWorkspace { + return &NullableWorkspace{value: val, isSet: true} +} + +func (v NullableWorkspace) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspace) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_workspace_request.go b/azion-api/model_workspace_request.go new file mode 100644 index 0000000..fc30416 --- /dev/null +++ b/azion-api/model_workspace_request.go @@ -0,0 +1,188 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the WorkspaceRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkspaceRequest{} + +// WorkspaceRequest struct for WorkspaceRequest +type WorkspaceRequest struct { + Name string `json:"name"` + // * `Brand` - Brand * `Reseller` - Reseller * `Organization` - Organization * `Workspace` - Workspace + Type string `json:"type"` +} + +type _WorkspaceRequest WorkspaceRequest + +// NewWorkspaceRequest instantiates a new WorkspaceRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkspaceRequest(name string, type_ string) *WorkspaceRequest { + this := WorkspaceRequest{} + this.Name = name + this.Type = type_ + return &this +} + +// NewWorkspaceRequestWithDefaults instantiates a new WorkspaceRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkspaceRequestWithDefaults() *WorkspaceRequest { + this := WorkspaceRequest{} + return &this +} + +// GetName returns the Name field value +func (o *WorkspaceRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkspaceRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkspaceRequest) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *WorkspaceRequest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WorkspaceRequest) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *WorkspaceRequest) SetType(v string) { + o.Type = v +} + +func (o WorkspaceRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkspaceRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *WorkspaceRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkspaceRequest := _WorkspaceRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varWorkspaceRequest) + + if err != nil { + return err + } + + *o = WorkspaceRequest(varWorkspaceRequest) + + return err +} + +type NullableWorkspaceRequest struct { + value *WorkspaceRequest + isSet bool +} + +func (v NullableWorkspaceRequest) Get() *WorkspaceRequest { + return v.value +} + +func (v *NullableWorkspaceRequest) Set(val *WorkspaceRequest) { + v.value = val + v.isSet = true +} + +func (v NullableWorkspaceRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkspaceRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkspaceRequest(val *WorkspaceRequest) *NullableWorkspaceRequest { + return &NullableWorkspaceRequest{value: val, isSet: true} +} + +func (v NullableWorkspaceRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkspaceRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_zone.go b/azion-api/model_zone.go new file mode 100644 index 0000000..b6d1bbf --- /dev/null +++ b/azion-api/model_zone.go @@ -0,0 +1,299 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the Zone type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Zone{} + +// Zone struct for Zone +type Zone struct { + Id int64 `json:"id"` + Name string `json:"name"` + Domain string `json:"domain"` + Active bool `json:"active"` + Nameservers []string `json:"nameservers"` + ProductVersion string `json:"product_version"` +} + +type _Zone Zone + +// NewZone instantiates a new Zone object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewZone(id int64, name string, domain string, active bool, nameservers []string, productVersion string) *Zone { + this := Zone{} + this.Id = id + this.Name = name + this.Domain = domain + this.Active = active + this.Nameservers = nameservers + this.ProductVersion = productVersion + return &this +} + +// NewZoneWithDefaults instantiates a new Zone object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewZoneWithDefaults() *Zone { + this := Zone{} + return &this +} + +// GetId returns the Id field value +func (o *Zone) GetId() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *Zone) GetIdOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *Zone) SetId(v int64) { + o.Id = v +} + +// GetName returns the Name field value +func (o *Zone) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *Zone) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *Zone) SetName(v string) { + o.Name = v +} + +// GetDomain returns the Domain field value +func (o *Zone) GetDomain() string { + if o == nil { + var ret string + return ret + } + + return o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value +// and a boolean to check if the value has been set. +func (o *Zone) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Domain, true +} + +// SetDomain sets field value +func (o *Zone) SetDomain(v string) { + o.Domain = v +} + +// GetActive returns the Active field value +func (o *Zone) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *Zone) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *Zone) SetActive(v bool) { + o.Active = v +} + +// GetNameservers returns the Nameservers field value +func (o *Zone) GetNameservers() []string { + if o == nil { + var ret []string + return ret + } + + return o.Nameservers +} + +// GetNameserversOk returns a tuple with the Nameservers field value +// and a boolean to check if the value has been set. +func (o *Zone) GetNameserversOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Nameservers, true +} + +// SetNameservers sets field value +func (o *Zone) SetNameservers(v []string) { + o.Nameservers = v +} + +// GetProductVersion returns the ProductVersion field value +func (o *Zone) GetProductVersion() string { + if o == nil { + var ret string + return ret + } + + return o.ProductVersion +} + +// GetProductVersionOk returns a tuple with the ProductVersion field value +// and a boolean to check if the value has been set. +func (o *Zone) GetProductVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProductVersion, true +} + +// SetProductVersion sets field value +func (o *Zone) SetProductVersion(v string) { + o.ProductVersion = v +} + +func (o Zone) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Zone) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["domain"] = o.Domain + toSerialize["active"] = o.Active + toSerialize["nameservers"] = o.Nameservers + toSerialize["product_version"] = o.ProductVersion + return toSerialize, nil +} + +func (o *Zone) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "domain", + "active", + "nameservers", + "product_version", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varZone := _Zone{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varZone) + + if err != nil { + return err + } + + *o = Zone(varZone) + + return err +} + +type NullableZone struct { + value *Zone + isSet bool +} + +func (v NullableZone) Get() *Zone { + return v.value +} + +func (v *NullableZone) Set(val *Zone) { + v.value = val + v.isSet = true +} + +func (v NullableZone) IsSet() bool { + return v.isSet +} + +func (v *NullableZone) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZone(val *Zone) *NullableZone { + return &NullableZone{value: val, isSet: true} +} + +func (v NullableZone) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZone) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_zone_request.go b/azion-api/model_zone_request.go new file mode 100644 index 0000000..af0410f --- /dev/null +++ b/azion-api/model_zone_request.go @@ -0,0 +1,215 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ZoneRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ZoneRequest{} + +// ZoneRequest struct for ZoneRequest +type ZoneRequest struct { + Name string `json:"name"` + Domain string `json:"domain"` + Active bool `json:"active"` +} + +type _ZoneRequest ZoneRequest + +// NewZoneRequest instantiates a new ZoneRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewZoneRequest(name string, domain string, active bool) *ZoneRequest { + this := ZoneRequest{} + this.Name = name + this.Domain = domain + this.Active = active + return &this +} + +// NewZoneRequestWithDefaults instantiates a new ZoneRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewZoneRequestWithDefaults() *ZoneRequest { + this := ZoneRequest{} + return &this +} + +// GetName returns the Name field value +func (o *ZoneRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ZoneRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ZoneRequest) SetName(v string) { + o.Name = v +} + +// GetDomain returns the Domain field value +func (o *ZoneRequest) GetDomain() string { + if o == nil { + var ret string + return ret + } + + return o.Domain +} + +// GetDomainOk returns a tuple with the Domain field value +// and a boolean to check if the value has been set. +func (o *ZoneRequest) GetDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Domain, true +} + +// SetDomain sets field value +func (o *ZoneRequest) SetDomain(v string) { + o.Domain = v +} + +// GetActive returns the Active field value +func (o *ZoneRequest) GetActive() bool { + if o == nil { + var ret bool + return ret + } + + return o.Active +} + +// GetActiveOk returns a tuple with the Active field value +// and a boolean to check if the value has been set. +func (o *ZoneRequest) GetActiveOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Active, true +} + +// SetActive sets field value +func (o *ZoneRequest) SetActive(v bool) { + o.Active = v +} + +func (o ZoneRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ZoneRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["domain"] = o.Domain + toSerialize["active"] = o.Active + return toSerialize, nil +} + +func (o *ZoneRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "domain", + "active", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varZoneRequest := _ZoneRequest{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varZoneRequest) + + if err != nil { + return err + } + + *o = ZoneRequest(varZoneRequest) + + return err +} + +type NullableZoneRequest struct { + value *ZoneRequest + isSet bool +} + +func (v NullableZoneRequest) Get() *ZoneRequest { + return v.value +} + +func (v *NullableZoneRequest) Set(val *ZoneRequest) { + v.value = val + v.isSet = true +} + +func (v NullableZoneRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableZoneRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZoneRequest(val *ZoneRequest) *NullableZoneRequest { + return &NullableZoneRequest{value: val, isSet: true} +} + +func (v NullableZoneRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZoneRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/model_zone_response.go b/azion-api/model_zone_response.go new file mode 100644 index 0000000..562492e --- /dev/null +++ b/azion-api/model_zone_response.go @@ -0,0 +1,195 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ZoneResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ZoneResponse{} + +// ZoneResponse struct for ZoneResponse +type ZoneResponse struct { + State *string `json:"state,omitempty"` + Data Zone `json:"data"` +} + +type _ZoneResponse ZoneResponse + +// NewZoneResponse instantiates a new ZoneResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewZoneResponse(data Zone) *ZoneResponse { + this := ZoneResponse{} + this.Data = data + return &this +} + +// NewZoneResponseWithDefaults instantiates a new ZoneResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewZoneResponseWithDefaults() *ZoneResponse { + this := ZoneResponse{} + return &this +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ZoneResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ZoneResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ZoneResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ZoneResponse) SetState(v string) { + o.State = &v +} + +// GetData returns the Data field value +func (o *ZoneResponse) GetData() Zone { + if o == nil { + var ret Zone + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ZoneResponse) GetDataOk() (*Zone, bool) { + if o == nil { + return nil, false + } + return &o.Data, true +} + +// SetData sets field value +func (o *ZoneResponse) SetData(v Zone) { + o.Data = v +} + +func (o ZoneResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ZoneResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["data"] = o.Data + return toSerialize, nil +} + +func (o *ZoneResponse) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varZoneResponse := _ZoneResponse{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varZoneResponse) + + if err != nil { + return err + } + + *o = ZoneResponse(varZoneResponse) + + return err +} + +type NullableZoneResponse struct { + value *ZoneResponse + isSet bool +} + +func (v NullableZoneResponse) Get() *ZoneResponse { + return v.value +} + +func (v *NullableZoneResponse) Set(val *ZoneResponse) { + v.value = val + v.isSet = true +} + +func (v NullableZoneResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableZoneResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableZoneResponse(val *ZoneResponse) *NullableZoneResponse { + return &NullableZoneResponse{value: val, isSet: true} +} + +func (v NullableZoneResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableZoneResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/azion-api/response.go b/azion-api/response.go new file mode 100644 index 0000000..caf1328 --- /dev/null +++ b/azion-api/response.go @@ -0,0 +1,48 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/azion-api/test/api_accounts_descendants_test.go b/azion-api/test/api_accounts_descendants_test.go new file mode 100644 index 0000000..f11defb --- /dev/null +++ b/azion-api/test/api_accounts_descendants_test.go @@ -0,0 +1,91 @@ +/* +azion-api + +Testing AccountsDescendantsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AccountsDescendantsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AccountsDescendantsAPIService CreateDescendantAccount", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountsDescendantsAPI.CreateDescendantAccount(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsDescendantsAPIService ListDescendantsAccounts", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountsDescendantsAPI.ListDescendantsAccounts(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsDescendantsAPIService PartialUpdateDescendantAccount", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var accountId int64 + + resp, httpRes, err := apiClient.AccountsDescendantsAPI.PartialUpdateDescendantAccount(context.Background(), accountId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsDescendantsAPIService RetrieveDescendantAccount", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var accountId int64 + + resp, httpRes, err := apiClient.AccountsDescendantsAPI.RetrieveDescendantAccount(context.Background(), accountId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsDescendantsAPIService UpdateDescendantAccount", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var accountId int64 + + resp, httpRes, err := apiClient.AccountsDescendantsAPI.UpdateDescendantAccount(context.Background(), accountId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_accounts_info_test.go b/azion-api/test/api_accounts_info_test.go new file mode 100644 index 0000000..73f22b3 --- /dev/null +++ b/azion-api/test/api_accounts_info_test.go @@ -0,0 +1,53 @@ +/* +azion-api + +Testing AccountsInfoAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AccountsInfoAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AccountsInfoAPIService RetrieveAccountInfoDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var accountId int64 + + resp, httpRes, err := apiClient.AccountsInfoAPI.RetrieveAccountInfoDetails(context.Background(), accountId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsInfoAPIService UpdateAccountInfoDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var accountId int64 + + resp, httpRes, err := apiClient.AccountsInfoAPI.UpdateAccountInfoDetails(context.Background(), accountId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_accounts_logged_in_test.go b/azion-api/test/api_accounts_logged_in_test.go new file mode 100644 index 0000000..b11c5fa --- /dev/null +++ b/azion-api/test/api_accounts_logged_in_test.go @@ -0,0 +1,61 @@ +/* +azion-api + +Testing AccountsLoggedInAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AccountsLoggedInAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AccountsLoggedInAPIService PartialUpdateLoggedAccount", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountsLoggedInAPI.PartialUpdateLoggedAccount(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsLoggedInAPIService RetrieveLoggedAccountDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountsLoggedInAPI.RetrieveLoggedAccountDetails(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AccountsLoggedInAPIService UpdateLoggedAccount", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AccountsLoggedInAPI.UpdateLoggedAccount(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_ai_studio_chat_threads_test.go b/azion-api/test/api_ai_studio_chat_threads_test.go new file mode 100644 index 0000000..ae14f2f --- /dev/null +++ b/azion-api/test/api_ai_studio_chat_threads_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing AIStudioChatThreadsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AIStudioChatThreadsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AIStudioChatThreadsAPIService CreateChatThread", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AIStudioChatThreadsAPI.CreateChatThread(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioChatThreadsAPIService DestroyAChatThread", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioChatThreadsAPI.DestroyAChatThread(context.Background(), threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioChatThreadsAPIService ListChatThreads", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AIStudioChatThreadsAPI.ListChatThreads(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioChatThreadsAPIService PartialUpdateChatThread", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioChatThreadsAPI.PartialUpdateChatThread(context.Background(), threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioChatThreadsAPIService RetriveChatThread", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioChatThreadsAPI.RetriveChatThread(context.Background(), threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioChatThreadsAPIService UpdateChatThread", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioChatThreadsAPI.UpdateChatThread(context.Background(), threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_ai_studio_chunks_test.go b/azion-api/test/api_ai_studio_chunks_test.go new file mode 100644 index 0000000..9c5f163 --- /dev/null +++ b/azion-api/test/api_ai_studio_chunks_test.go @@ -0,0 +1,40 @@ +/* +azion-api + +Testing AIStudioChunksAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AIStudioChunksAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AIStudioChunksAPIService ListChunks", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var documentId int64 + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioChunksAPI.ListChunks(context.Background(), documentId, kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_ai_studio_documents_test.go b/azion-api/test/api_ai_studio_documents_test.go new file mode 100644 index 0000000..4497a1c --- /dev/null +++ b/azion-api/test/api_ai_studio_documents_test.go @@ -0,0 +1,98 @@ +/* +azion-api + +Testing AIStudioDocumentsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AIStudioDocumentsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AIStudioDocumentsAPIService CreateDocument", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioDocumentsAPI.CreateDocument(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioDocumentsAPIService DestroyADocument", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var documentId int64 + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioDocumentsAPI.DestroyADocument(context.Background(), documentId, kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioDocumentsAPIService ListDocuments", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioDocumentsAPI.ListDocuments(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioDocumentsAPIService RetriveDocument", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var documentId int64 + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioDocumentsAPI.RetriveDocument(context.Background(), documentId, kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioDocumentsAPIService UpdateDocument", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var documentId int64 + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioDocumentsAPI.UpdateDocument(context.Background(), documentId, kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_ai_studio_knowledge_bases_test.go b/azion-api/test/api_ai_studio_knowledge_bases_test.go new file mode 100644 index 0000000..d2bbbec --- /dev/null +++ b/azion-api/test/api_ai_studio_knowledge_bases_test.go @@ -0,0 +1,133 @@ +/* +azion-api + +Testing AIStudioKnowledgeBasesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AIStudioKnowledgeBasesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AIStudioKnowledgeBasesAPIService AskKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.AskKnowledgeBase(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService CreateKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.CreateKnowledgeBase(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService DestroyAKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId string + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.DestroyAKnowledgeBase(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService ListKnowledgeBases", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.ListKnowledgeBases(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService PartialUpdateKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId string + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.PartialUpdateKnowledgeBase(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService QueryChunkFromKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId int64 + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.QueryChunkFromKnowledgeBase(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService RetriveKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId string + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.RetriveKnowledgeBase(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioKnowledgeBasesAPIService UpdateKnowledgeBase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId string + + resp, httpRes, err := apiClient.AIStudioKnowledgeBasesAPI.UpdateKnowledgeBase(context.Background(), kbId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_ai_studio_messages_test.go b/azion-api/test/api_ai_studio_messages_test.go new file mode 100644 index 0000000..76f3670 --- /dev/null +++ b/azion-api/test/api_ai_studio_messages_test.go @@ -0,0 +1,98 @@ +/* +azion-api + +Testing AIStudioMessagesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AIStudioMessagesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AIStudioMessagesAPIService CreateMessage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioMessagesAPI.CreateMessage(context.Background(), threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioMessagesAPIService DestroyAMessage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var messageId int64 + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioMessagesAPI.DestroyAMessage(context.Background(), messageId, threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioMessagesAPIService ListMessages", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioMessagesAPI.ListMessages(context.Background(), threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioMessagesAPIService RetriveMessage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var messageId int64 + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioMessagesAPI.RetriveMessage(context.Background(), messageId, threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioMessagesAPIService UpdateMessage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var messageId int64 + var threadId int64 + + resp, httpRes, err := apiClient.AIStudioMessagesAPI.UpdateMessage(context.Background(), messageId, threadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_ai_studio_tools_test.go b/azion-api/test/api_ai_studio_tools_test.go new file mode 100644 index 0000000..211c28d --- /dev/null +++ b/azion-api/test/api_ai_studio_tools_test.go @@ -0,0 +1,147 @@ +/* +azion-api + +Testing AIStudioToolsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AIStudioToolsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AIStudioToolsAPIService AddKnowledgeBaseToATool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var toolId int64 + + resp, httpRes, err := apiClient.AIStudioToolsAPI.AddKnowledgeBaseToATool(context.Background(), toolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService CreateTool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AIStudioToolsAPI.CreateTool(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService DestroyATool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var toolId int64 + + resp, httpRes, err := apiClient.AIStudioToolsAPI.DestroyATool(context.Background(), toolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService ListKnowledgeBasesLinkedToATool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var toolId int64 + + resp, httpRes, err := apiClient.AIStudioToolsAPI.ListKnowledgeBasesLinkedToATool(context.Background(), toolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService ListTools", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AIStudioToolsAPI.ListTools(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService PartialUpdateTool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var toolId int64 + + resp, httpRes, err := apiClient.AIStudioToolsAPI.PartialUpdateTool(context.Background(), toolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService RemoveKnowledgeBaseFromATool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var kbId int64 + var toolId int64 + + httpRes, err := apiClient.AIStudioToolsAPI.RemoveKnowledgeBaseFromATool(context.Background(), kbId, toolId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService RetriveTool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var toolId int64 + + resp, httpRes, err := apiClient.AIStudioToolsAPI.RetriveTool(context.Background(), toolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AIStudioToolsAPIService UpdateTool", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var toolId int64 + + resp, httpRes, err := apiClient.AIStudioToolsAPI.UpdateTool(context.Background(), toolId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_applications_cache_settings_test.go b/azion-api/test/api_applications_cache_settings_test.go new file mode 100644 index 0000000..63d5c71 --- /dev/null +++ b/azion-api/test/api_applications_cache_settings_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing ApplicationsCacheSettingsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ApplicationsCacheSettingsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApplicationsCacheSettingsAPIService CreateCacheSetting", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsCacheSettingsAPI.CreateCacheSetting(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsCacheSettingsAPIService DeleteCacheSetting", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var cacheSettingId int64 + + resp, httpRes, err := apiClient.ApplicationsCacheSettingsAPI.DeleteCacheSetting(context.Background(), applicationId, cacheSettingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsCacheSettingsAPIService ListCacheSettings", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsCacheSettingsAPI.ListCacheSettings(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsCacheSettingsAPIService PartialUpdateCacheSetting", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var cacheSettingId int64 + + resp, httpRes, err := apiClient.ApplicationsCacheSettingsAPI.PartialUpdateCacheSetting(context.Background(), applicationId, cacheSettingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsCacheSettingsAPIService RetrieveCacheSetting", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var cacheSettingId int64 + + resp, httpRes, err := apiClient.ApplicationsCacheSettingsAPI.RetrieveCacheSetting(context.Background(), applicationId, cacheSettingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsCacheSettingsAPIService UpdateCacheSetting", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var cacheSettingId int64 + + resp, httpRes, err := apiClient.ApplicationsCacheSettingsAPI.UpdateCacheSetting(context.Background(), applicationId, cacheSettingId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_applications_device_groups_test.go b/azion-api/test/api_applications_device_groups_test.go new file mode 100644 index 0000000..afb79e7 --- /dev/null +++ b/azion-api/test/api_applications_device_groups_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing ApplicationsDeviceGroupsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ApplicationsDeviceGroupsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApplicationsDeviceGroupsAPIService CreateDeviceGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsDeviceGroupsAPI.CreateDeviceGroup(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsDeviceGroupsAPIService DeleteDeviceGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var deviceGroupId int64 + + resp, httpRes, err := apiClient.ApplicationsDeviceGroupsAPI.DeleteDeviceGroup(context.Background(), applicationId, deviceGroupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsDeviceGroupsAPIService ListDeviceGroups", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsDeviceGroupsAPI.ListDeviceGroups(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsDeviceGroupsAPIService PartialUpdateDeviceGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var deviceGroupId int64 + + resp, httpRes, err := apiClient.ApplicationsDeviceGroupsAPI.PartialUpdateDeviceGroup(context.Background(), applicationId, deviceGroupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsDeviceGroupsAPIService RetrieveDeviceGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var deviceGroupId int64 + + resp, httpRes, err := apiClient.ApplicationsDeviceGroupsAPI.RetrieveDeviceGroup(context.Background(), applicationId, deviceGroupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsDeviceGroupsAPIService UpdateDeviceGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var deviceGroupId int64 + + resp, httpRes, err := apiClient.ApplicationsDeviceGroupsAPI.UpdateDeviceGroup(context.Background(), applicationId, deviceGroupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_applications_function_test.go b/azion-api/test/api_applications_function_test.go new file mode 100644 index 0000000..57818b7 --- /dev/null +++ b/azion-api/test/api_applications_function_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing ApplicationsFunctionAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ApplicationsFunctionAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApplicationsFunctionAPIService CreateApplicationFunctionInstance", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsFunctionAPI.CreateApplicationFunctionInstance(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsFunctionAPIService DeleteApplicationFunctionInstance", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var functionId int64 + + resp, httpRes, err := apiClient.ApplicationsFunctionAPI.DeleteApplicationFunctionInstance(context.Background(), applicationId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsFunctionAPIService ListApplicationFunctionInstances", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsFunctionAPI.ListApplicationFunctionInstances(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsFunctionAPIService PartialUpdateApplicationFunctionInstance", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var functionId int64 + + resp, httpRes, err := apiClient.ApplicationsFunctionAPI.PartialUpdateApplicationFunctionInstance(context.Background(), applicationId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsFunctionAPIService RetrieveApplicationFunctionInstance", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var functionId int64 + + resp, httpRes, err := apiClient.ApplicationsFunctionAPI.RetrieveApplicationFunctionInstance(context.Background(), applicationId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsFunctionAPIService UpdateApplicationFunctionInstance", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var functionId int64 + + resp, httpRes, err := apiClient.ApplicationsFunctionAPI.UpdateApplicationFunctionInstance(context.Background(), applicationId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_applications_request_rules_test.go b/azion-api/test/api_applications_request_rules_test.go new file mode 100644 index 0000000..0f59c22 --- /dev/null +++ b/azion-api/test/api_applications_request_rules_test.go @@ -0,0 +1,127 @@ +/* +azion-api + +Testing ApplicationsRequestRulesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ApplicationsRequestRulesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApplicationsRequestRulesAPIService CreateApplicationRequestRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.CreateApplicationRequestRule(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsRequestRulesAPIService DeleteApplicationRequestRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.DeleteApplicationRequestRule(context.Background(), applicationId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsRequestRulesAPIService ListApplicationRequestRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.ListApplicationRequestRules(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsRequestRulesAPIService PartialUpdateApplicationRequestRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.PartialUpdateApplicationRequestRule(context.Background(), applicationId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsRequestRulesAPIService RetrieveApplicationRequestRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.RetrieveApplicationRequestRule(context.Background(), applicationId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsRequestRulesAPIService UpdateApplicationRequestRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.UpdateApplicationRequestRule(context.Background(), applicationId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsRequestRulesAPIService UpdateApplicationRequestRulesOrder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsRequestRulesAPI.UpdateApplicationRequestRulesOrder(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_applications_response_rules_test.go b/azion-api/test/api_applications_response_rules_test.go new file mode 100644 index 0000000..81a9c4d --- /dev/null +++ b/azion-api/test/api_applications_response_rules_test.go @@ -0,0 +1,127 @@ +/* +azion-api + +Testing ApplicationsResponseRulesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ApplicationsResponseRulesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApplicationsResponseRulesAPIService CreateApplicationResponseRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.CreateApplicationResponseRule(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsResponseRulesAPIService DeleteApplicationResponseRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var responseRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.DeleteApplicationResponseRule(context.Background(), applicationId, responseRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsResponseRulesAPIService ListApplicationResponseRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.ListApplicationResponseRules(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsResponseRulesAPIService PartialUpdateApplicationResponseRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var responseRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.PartialUpdateApplicationResponseRule(context.Background(), applicationId, responseRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsResponseRulesAPIService RetrieveApplicationResponseRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var responseRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.RetrieveApplicationResponseRule(context.Background(), applicationId, responseRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsResponseRulesAPIService UpdateApplicationResponseRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + var responseRuleId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.UpdateApplicationResponseRule(context.Background(), applicationId, responseRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsResponseRulesAPIService UpdateApplicationResponseRulesOrder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsResponseRulesAPI.UpdateApplicationResponseRulesOrder(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_applications_test.go b/azion-api/test/api_applications_test.go new file mode 100644 index 0000000..6766db9 --- /dev/null +++ b/azion-api/test/api_applications_test.go @@ -0,0 +1,119 @@ +/* +azion-api + +Testing ApplicationsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ApplicationsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ApplicationsAPIService CloneApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsAPI.CloneApplication(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsAPIService CreateApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ApplicationsAPI.CreateApplication(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsAPIService DeleteApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsAPI.DeleteApplication(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsAPIService ListApplications", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ApplicationsAPI.ListApplications(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsAPIService PartialUpdateApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsAPI.PartialUpdateApplication(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsAPIService RetrieveApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsAPI.RetrieveApplication(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ApplicationsAPIService UpdateApplication", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var applicationId int64 + + resp, httpRes, err := apiClient.ApplicationsAPI.UpdateApplication(context.Background(), applicationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_auth_login_test.go b/azion-api/test/api_auth_login_test.go new file mode 100644 index 0000000..4175e65 --- /dev/null +++ b/azion-api/test/api_auth_login_test.go @@ -0,0 +1,61 @@ +/* +azion-api + +Testing AuthLoginAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AuthLoginAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AuthLoginAPIService AuthUserLogin", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthLoginAPI.AuthUserLogin(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthLoginAPIService AuthUserLoginMethod", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthLoginAPI.AuthUserLoginMethod(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthLoginAPIService TotpVerify", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthLoginAPI.TotpVerify(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_auth_mfatotp_device_test.go b/azion-api/test/api_auth_mfatotp_device_test.go new file mode 100644 index 0000000..18940f0 --- /dev/null +++ b/azion-api/test/api_auth_mfatotp_device_test.go @@ -0,0 +1,63 @@ +/* +azion-api + +Testing AuthMFATOTPDeviceAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AuthMFATOTPDeviceAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AuthMFATOTPDeviceAPIService CreateTotpDevice", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthMFATOTPDeviceAPI.CreateTotpDevice(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthMFATOTPDeviceAPIService DeleteTotpDevice", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var deviceId int64 + + resp, httpRes, err := apiClient.AuthMFATOTPDeviceAPI.DeleteTotpDevice(context.Background(), deviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test AuthMFATOTPDeviceAPIService ListTotpDevices", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthMFATOTPDeviceAPI.ListTotpDevices(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_auth_refresh_access_token_test.go b/azion-api/test/api_auth_refresh_access_token_test.go new file mode 100644 index 0000000..5affec2 --- /dev/null +++ b/azion-api/test/api_auth_refresh_access_token_test.go @@ -0,0 +1,37 @@ +/* +azion-api + +Testing AuthRefreshAccessTokenAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AuthRefreshAccessTokenAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AuthRefreshAccessTokenAPIService AuthUserRefreshToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthRefreshAccessTokenAPI.AuthUserRefreshToken(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_auth_revoke_test.go b/azion-api/test/api_auth_revoke_test.go new file mode 100644 index 0000000..173dc33 --- /dev/null +++ b/azion-api/test/api_auth_revoke_test.go @@ -0,0 +1,37 @@ +/* +azion-api + +Testing AuthRevokeAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_AuthRevokeAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test AuthRevokeAPIService AuthUserRevoke", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.AuthRevokeAPI.AuthUserRevoke(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_billing_invoices_test.go b/azion-api/test/api_billing_invoices_test.go new file mode 100644 index 0000000..77c0c18 --- /dev/null +++ b/azion-api/test/api_billing_invoices_test.go @@ -0,0 +1,38 @@ +/* +azion-api + +Testing BillingInvoicesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_BillingInvoicesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BillingInvoicesAPIService RetrieveInvoice", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var period string + + httpRes, err := apiClient.BillingInvoicesAPI.RetrieveInvoice(context.Background(), period).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_billing_payments_test.go b/azion-api/test/api_billing_payments_test.go new file mode 100644 index 0000000..3193822 --- /dev/null +++ b/azion-api/test/api_billing_payments_test.go @@ -0,0 +1,115 @@ +/* +azion-api + +Testing BillingPaymentsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_BillingPaymentsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test BillingPaymentsAPIService AddCredits", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BillingPaymentsAPI.AddCredits(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BillingPaymentsAPIService CreateCreditCard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BillingPaymentsAPI.CreateCreditCard(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BillingPaymentsAPIService DestroyCreditCard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.BillingPaymentsAPI.DestroyCreditCard(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BillingPaymentsAPIService ListCreditCards", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BillingPaymentsAPI.ListCreditCards(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BillingPaymentsAPIService ListPaymentHistory", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.BillingPaymentsAPI.ListPaymentHistory(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BillingPaymentsAPIService PartialUpdateCreditCard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.BillingPaymentsAPI.PartialUpdateCreditCard(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test BillingPaymentsAPIService RetrieveCreditCard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id string + + resp, httpRes, err := apiClient.BillingPaymentsAPI.RetrieveCreditCard(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_connectors_test.go b/azion-api/test/api_connectors_test.go new file mode 100644 index 0000000..10e0f82 --- /dev/null +++ b/azion-api/test/api_connectors_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing ConnectorsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_ConnectorsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test ConnectorsAPIService CreateConnector", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ConnectorsAPI.CreateConnector(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ConnectorsAPIService DeleteConnector", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var connectorId int64 + + resp, httpRes, err := apiClient.ConnectorsAPI.DeleteConnector(context.Background(), connectorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ConnectorsAPIService ListConnectors", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.ConnectorsAPI.ListConnectors(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ConnectorsAPIService PartialUpdateConnector", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var connectorId int64 + + resp, httpRes, err := apiClient.ConnectorsAPI.PartialUpdateConnector(context.Background(), connectorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ConnectorsAPIService RetrieveConnector", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var connectorId int64 + + resp, httpRes, err := apiClient.ConnectorsAPI.RetrieveConnector(context.Background(), connectorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test ConnectorsAPIService UpdateConnector", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var connectorId int64 + + resp, httpRes, err := apiClient.ConnectorsAPI.UpdateConnector(context.Background(), connectorId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_custom_pages_test.go b/azion-api/test/api_custom_pages_test.go new file mode 100644 index 0000000..ffcb79a --- /dev/null +++ b/azion-api/test/api_custom_pages_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing CustomPagesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_CustomPagesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test CustomPagesAPIService CreateCustomPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CustomPagesAPI.CreateCustomPage(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomPagesAPIService DeleteCustomPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customPageId int64 + + resp, httpRes, err := apiClient.CustomPagesAPI.DeleteCustomPage(context.Background(), customPageId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomPagesAPIService ListCustomPages", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.CustomPagesAPI.ListCustomPages(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomPagesAPIService PartialUpdateCustomPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customPageId int64 + + resp, httpRes, err := apiClient.CustomPagesAPI.PartialUpdateCustomPage(context.Background(), customPageId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomPagesAPIService RetrieveCustomPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customPageId int64 + + resp, httpRes, err := apiClient.CustomPagesAPI.RetrieveCustomPage(context.Background(), customPageId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test CustomPagesAPIService UpdateCustomPage", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var customPageId int64 + + resp, httpRes, err := apiClient.CustomPagesAPI.UpdateCustomPage(context.Background(), customPageId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_data_stream_data_sources_test.go b/azion-api/test/api_data_stream_data_sources_test.go new file mode 100644 index 0000000..418a0a5 --- /dev/null +++ b/azion-api/test/api_data_stream_data_sources_test.go @@ -0,0 +1,37 @@ +/* +azion-api + +Testing DataStreamDataSourcesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DataStreamDataSourcesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DataStreamDataSourcesAPIService ListDataSources", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DataStreamDataSourcesAPI.ListDataSources(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_data_stream_streams_test.go b/azion-api/test/api_data_stream_streams_test.go new file mode 100644 index 0000000..55c867c --- /dev/null +++ b/azion-api/test/api_data_stream_streams_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing DataStreamStreamsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DataStreamStreamsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DataStreamStreamsAPIService CreateDataStream", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DataStreamStreamsAPI.CreateDataStream(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamStreamsAPIService DeleteDataStream", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var streamId int64 + + resp, httpRes, err := apiClient.DataStreamStreamsAPI.DeleteDataStream(context.Background(), streamId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamStreamsAPIService ListDataStreams", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DataStreamStreamsAPI.ListDataStreams(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamStreamsAPIService PartialUpdateDataStream", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var streamId int64 + + resp, httpRes, err := apiClient.DataStreamStreamsAPI.PartialUpdateDataStream(context.Background(), streamId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamStreamsAPIService RetrieveDataStream", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var streamId int64 + + resp, httpRes, err := apiClient.DataStreamStreamsAPI.RetrieveDataStream(context.Background(), streamId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamStreamsAPIService UpdateDataStream", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var streamId int64 + + resp, httpRes, err := apiClient.DataStreamStreamsAPI.UpdateDataStream(context.Background(), streamId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_data_stream_templates_test.go b/azion-api/test/api_data_stream_templates_test.go new file mode 100644 index 0000000..cde6b5c --- /dev/null +++ b/azion-api/test/api_data_stream_templates_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing DataStreamTemplatesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DataStreamTemplatesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DataStreamTemplatesAPIService CreateTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DataStreamTemplatesAPI.CreateTemplate(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamTemplatesAPIService DeleteTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var templateId int64 + + resp, httpRes, err := apiClient.DataStreamTemplatesAPI.DeleteTemplate(context.Background(), templateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamTemplatesAPIService ListTemplates", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DataStreamTemplatesAPI.ListTemplates(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamTemplatesAPIService PartialUpdateTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var templateId int64 + + resp, httpRes, err := apiClient.DataStreamTemplatesAPI.PartialUpdateTemplate(context.Background(), templateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamTemplatesAPIService RetrieveTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var templateId int64 + + resp, httpRes, err := apiClient.DataStreamTemplatesAPI.RetrieveTemplate(context.Background(), templateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DataStreamTemplatesAPIService UpdateTemplate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var templateId int64 + + resp, httpRes, err := apiClient.DataStreamTemplatesAPI.UpdateTemplate(context.Background(), templateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_digital_certificates_certificate_revocation_lists_test.go b/azion-api/test/api_digital_certificates_certificate_revocation_lists_test.go new file mode 100644 index 0000000..fdd2df2 --- /dev/null +++ b/azion-api/test/api_digital_certificates_certificate_revocation_lists_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing DigitalCertificatesCertificateRevocationListsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DigitalCertificatesCertificateRevocationListsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DigitalCertificatesCertificateRevocationListsAPIService CreateCertificateRevocationList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.CreateCertificateRevocationList(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificateRevocationListsAPIService DeleteCertificateRevocationList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var crlId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.DeleteCertificateRevocationList(context.Background(), crlId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificateRevocationListsAPIService ListCertificateRevocationLists", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.ListCertificateRevocationLists(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificateRevocationListsAPIService PartialUpdateCertificateRevocationList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var crlId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.PartialUpdateCertificateRevocationList(context.Background(), crlId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificateRevocationListsAPIService RetrieveCertificateRevocationList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var crlId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.RetrieveCertificateRevocationList(context.Background(), crlId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificateRevocationListsAPIService UpdateCertificateRevocationList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var crlId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateRevocationListsAPI.UpdateCertificateRevocationList(context.Background(), crlId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_digital_certificates_certificate_signing_requests_test.go b/azion-api/test/api_digital_certificates_certificate_signing_requests_test.go new file mode 100644 index 0000000..73e0913 --- /dev/null +++ b/azion-api/test/api_digital_certificates_certificate_signing_requests_test.go @@ -0,0 +1,37 @@ +/* +azion-api + +Testing DigitalCertificatesCertificateSigningRequestsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DigitalCertificatesCertificateSigningRequestsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DigitalCertificatesCertificateSigningRequestsAPIService CreateCertificateSigningRequest", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DigitalCertificatesCertificateSigningRequestsAPI.CreateCertificateSigningRequest(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_digital_certificates_certificates_test.go b/azion-api/test/api_digital_certificates_certificates_test.go new file mode 100644 index 0000000..b509221 --- /dev/null +++ b/azion-api/test/api_digital_certificates_certificates_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing DigitalCertificatesCertificatesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DigitalCertificatesCertificatesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DigitalCertificatesCertificatesAPIService CreateCertificate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DigitalCertificatesCertificatesAPI.CreateCertificate(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificatesAPIService DeleteCertificate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var certificateId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificatesAPI.DeleteCertificate(context.Background(), certificateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificatesAPIService ListCertificates", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DigitalCertificatesCertificatesAPI.ListCertificates(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificatesAPIService PartialUpdateCertificate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var certificateId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificatesAPI.PartialUpdateCertificate(context.Background(), certificateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificatesAPIService RetrieveCertificate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var certificateId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificatesAPI.RetrieveCertificate(context.Background(), certificateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DigitalCertificatesCertificatesAPIService UpdateCertificate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var certificateId int64 + + resp, httpRes, err := apiClient.DigitalCertificatesCertificatesAPI.UpdateCertificate(context.Background(), certificateId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_digital_certificates_request_a_certificate_test.go b/azion-api/test/api_digital_certificates_request_a_certificate_test.go new file mode 100644 index 0000000..44d373d --- /dev/null +++ b/azion-api/test/api_digital_certificates_request_a_certificate_test.go @@ -0,0 +1,37 @@ +/* +azion-api + +Testing DigitalCertificatesRequestACertificateAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DigitalCertificatesRequestACertificateAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DigitalCertificatesRequestACertificateAPIService RequestCertificate", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DigitalCertificatesRequestACertificateAPI.RequestCertificate(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_dns_records_test.go b/azion-api/test/api_dns_records_test.go new file mode 100644 index 0000000..c7b6f94 --- /dev/null +++ b/azion-api/test/api_dns_records_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing DNSRecordsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DNSRecordsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DNSRecordsAPIService CreateDnsRecord", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSRecordsAPI.CreateDnsRecord(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSRecordsAPIService DeleteDnsRecord", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var recordId int64 + var zoneId int64 + + resp, httpRes, err := apiClient.DNSRecordsAPI.DeleteDnsRecord(context.Background(), recordId, zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSRecordsAPIService ListDnsRecords", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSRecordsAPI.ListDnsRecords(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSRecordsAPIService PartialUpdateDnsRecord", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var recordId int64 + var zoneId int64 + + resp, httpRes, err := apiClient.DNSRecordsAPI.PartialUpdateDnsRecord(context.Background(), recordId, zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSRecordsAPIService RetrieveDnsRecord", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var recordId int64 + var zoneId int64 + + resp, httpRes, err := apiClient.DNSRecordsAPI.RetrieveDnsRecord(context.Background(), recordId, zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSRecordsAPIService UpdateDnsRecord", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var recordId int64 + var zoneId int64 + + resp, httpRes, err := apiClient.DNSRecordsAPI.UpdateDnsRecord(context.Background(), recordId, zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_dns_zones_test.go b/azion-api/test/api_dns_zones_test.go new file mode 100644 index 0000000..4591e1c --- /dev/null +++ b/azion-api/test/api_dns_zones_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing DNSZonesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DNSZonesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DNSZonesAPIService CreateDnsZone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DNSZonesAPI.CreateDnsZone(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSZonesAPIService DeleteDnsZone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSZonesAPI.DeleteDnsZone(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSZonesAPIService ListDnsZones", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.DNSZonesAPI.ListDnsZones(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSZonesAPIService PartialUpdateDnsZone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSZonesAPI.PartialUpdateDnsZone(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSZonesAPIService RetrieveDnsZone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSZonesAPI.RetrieveDnsZone(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSZonesAPIService UpdateDnsZone", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSZonesAPI.UpdateDnsZone(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_dnsdnssec_test.go b/azion-api/test/api_dnsdnssec_test.go new file mode 100644 index 0000000..b3f0704 --- /dev/null +++ b/azion-api/test/api_dnsdnssec_test.go @@ -0,0 +1,67 @@ +/* +azion-api + +Testing DNSDNSSECAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_DNSDNSSECAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test DNSDNSSECAPIService PartialUpdateDnssec", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSDNSSECAPI.PartialUpdateDnssec(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSDNSSECAPIService RetrieveDnssec", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSDNSSECAPI.RetrieveDnssec(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test DNSDNSSECAPIService UpdateDnssec", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var zoneId int64 + + resp, httpRes, err := apiClient.DNSDNSSECAPI.UpdateDnssec(context.Background(), zoneId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_favorites_test.go b/azion-api/test/api_favorites_test.go new file mode 100644 index 0000000..7b17b48 --- /dev/null +++ b/azion-api/test/api_favorites_test.go @@ -0,0 +1,63 @@ +/* +azion-api + +Testing FavoritesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_FavoritesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FavoritesAPIService CreateFavorite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FavoritesAPI.CreateFavorite(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FavoritesAPIService DeleteFavorite", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var favoriteId int64 + + resp, httpRes, err := apiClient.FavoritesAPI.DeleteFavorite(context.Background(), favoriteId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FavoritesAPIService ListFavorites", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FavoritesAPI.ListFavorites(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_firewalls_function_test.go b/azion-api/test/api_firewalls_function_test.go new file mode 100644 index 0000000..80a5a82 --- /dev/null +++ b/azion-api/test/api_firewalls_function_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing FirewallsFunctionAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_FirewallsFunctionAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FirewallsFunctionAPIService CreateFirewallFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsFunctionAPI.CreateFirewallFunction(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsFunctionAPIService DeleteFirewallFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var functionId int64 + + resp, httpRes, err := apiClient.FirewallsFunctionAPI.DeleteFirewallFunction(context.Background(), firewallId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsFunctionAPIService ListFirewallFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsFunctionAPI.ListFirewallFunction(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsFunctionAPIService PartialUpdateFirewallFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var functionId int64 + + resp, httpRes, err := apiClient.FirewallsFunctionAPI.PartialUpdateFirewallFunction(context.Background(), firewallId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsFunctionAPIService RetrieveFirewallFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var functionId int64 + + resp, httpRes, err := apiClient.FirewallsFunctionAPI.RetrieveFirewallFunction(context.Background(), firewallId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsFunctionAPIService UpdateFirewallFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var functionId int64 + + resp, httpRes, err := apiClient.FirewallsFunctionAPI.UpdateFirewallFunction(context.Background(), firewallId, functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_firewalls_rules_engine_test.go b/azion-api/test/api_firewalls_rules_engine_test.go new file mode 100644 index 0000000..0f6006b --- /dev/null +++ b/azion-api/test/api_firewalls_rules_engine_test.go @@ -0,0 +1,127 @@ +/* +azion-api + +Testing FirewallsRulesEngineAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_FirewallsRulesEngineAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FirewallsRulesEngineAPIService CreateFirewallRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.CreateFirewallRule(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsRulesEngineAPIService DeleteFirewallRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.DeleteFirewallRule(context.Background(), firewallId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsRulesEngineAPIService ListFirewallRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.ListFirewallRules(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsRulesEngineAPIService OrderFirewallRules", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.OrderFirewallRules(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsRulesEngineAPIService PartialUpdateFirewallRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.PartialUpdateFirewallRule(context.Background(), firewallId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsRulesEngineAPIService RetrieveFirewallRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.RetrieveFirewallRule(context.Background(), firewallId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsRulesEngineAPIService UpdateFirewallRule", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + var requestRuleId int64 + + resp, httpRes, err := apiClient.FirewallsRulesEngineAPI.UpdateFirewallRule(context.Background(), firewallId, requestRuleId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_firewalls_test.go b/azion-api/test/api_firewalls_test.go new file mode 100644 index 0000000..3237bbd --- /dev/null +++ b/azion-api/test/api_firewalls_test.go @@ -0,0 +1,119 @@ +/* +azion-api + +Testing FirewallsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_FirewallsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FirewallsAPIService CloneFirewall", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsAPI.CloneFirewall(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsAPIService CreateFirewall", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FirewallsAPI.CreateFirewall(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsAPIService DeleteFirewall", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsAPI.DeleteFirewall(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsAPIService ListFirewalls", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FirewallsAPI.ListFirewalls(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsAPIService PartialUpdateFirewall", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsAPI.PartialUpdateFirewall(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsAPIService RetrieveFirewall", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsAPI.RetrieveFirewall(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FirewallsAPIService UpdateFirewall", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var firewallId int64 + + resp, httpRes, err := apiClient.FirewallsAPI.UpdateFirewall(context.Background(), firewallId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_functions_test.go b/azion-api/test/api_functions_test.go new file mode 100644 index 0000000..6e691b2 --- /dev/null +++ b/azion-api/test/api_functions_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing FunctionsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_FunctionsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test FunctionsAPIService CreateFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FunctionsAPI.CreateFunction(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FunctionsAPIService DeleteFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var functionId int64 + + resp, httpRes, err := apiClient.FunctionsAPI.DeleteFunction(context.Background(), functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FunctionsAPIService ListFunctions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.FunctionsAPI.ListFunctions(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FunctionsAPIService PartialUpdateFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var functionId int64 + + resp, httpRes, err := apiClient.FunctionsAPI.PartialUpdateFunction(context.Background(), functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FunctionsAPIService RetrieveFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var functionId int64 + + resp, httpRes, err := apiClient.FunctionsAPI.RetrieveFunction(context.Background(), functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test FunctionsAPIService UpdateFunction", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var functionId int64 + + resp, httpRes, err := apiClient.FunctionsAPI.UpdateFunction(context.Background(), functionId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_grants_test.go b/azion-api/test/api_identity_grants_test.go new file mode 100644 index 0000000..c5b37d4 --- /dev/null +++ b/azion-api/test/api_identity_grants_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing IdentityGrantsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityGrantsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityGrantsAPIService CreateGrant", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityGrantsAPI.CreateGrant(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGrantsAPIService DeleteGrant", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var grantId string + + resp, httpRes, err := apiClient.IdentityGrantsAPI.DeleteGrant(context.Background(), grantId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGrantsAPIService ListGrants", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityGrantsAPI.ListGrants(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGrantsAPIService PartialUpdateGrant", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var grantId string + + resp, httpRes, err := apiClient.IdentityGrantsAPI.PartialUpdateGrant(context.Background(), grantId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGrantsAPIService RetrieveGrant", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var grantId string + + resp, httpRes, err := apiClient.IdentityGrantsAPI.RetrieveGrant(context.Background(), grantId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGrantsAPIService UpdateGrant", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var grantId string + + resp, httpRes, err := apiClient.IdentityGrantsAPI.UpdateGrant(context.Background(), grantId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_group_members_test.go b/azion-api/test/api_identity_group_members_test.go new file mode 100644 index 0000000..db9cc69 --- /dev/null +++ b/azion-api/test/api_identity_group_members_test.go @@ -0,0 +1,53 @@ +/* +azion-api + +Testing IdentityGroupMembersAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityGroupMembersAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityGroupMembersAPIService RetrieveMembersGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int64 + + resp, httpRes, err := apiClient.IdentityGroupMembersAPI.RetrieveMembersGroup(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGroupMembersAPIService UpdateMembersGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int64 + + resp, httpRes, err := apiClient.IdentityGroupMembersAPI.UpdateMembersGroup(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_groups_test.go b/azion-api/test/api_identity_groups_test.go new file mode 100644 index 0000000..0083014 --- /dev/null +++ b/azion-api/test/api_identity_groups_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing IdentityGroupsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityGroupsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityGroupsAPIService CreateGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityGroupsAPI.CreateGroup(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGroupsAPIService DeleteGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + resp, httpRes, err := apiClient.IdentityGroupsAPI.DeleteGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGroupsAPIService ListGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityGroupsAPI.ListGroup(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGroupsAPIService PartialUpdateGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + resp, httpRes, err := apiClient.IdentityGroupsAPI.PartialUpdateGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGroupsAPIService RetrieveGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + resp, httpRes, err := apiClient.IdentityGroupsAPI.RetrieveGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityGroupsAPIService UpdateGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId string + + resp, httpRes, err := apiClient.IdentityGroupsAPI.UpdateGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_logged_in_user_test.go b/azion-api/test/api_identity_logged_in_user_test.go new file mode 100644 index 0000000..f6aad5e --- /dev/null +++ b/azion-api/test/api_identity_logged_in_user_test.go @@ -0,0 +1,61 @@ +/* +azion-api + +Testing IdentityLoggedInUserAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityLoggedInUserAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityLoggedInUserAPIService ListLoggedUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityLoggedInUserAPI.ListLoggedUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityLoggedInUserAPIService PartialUpdateLoggedUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityLoggedInUserAPI.PartialUpdateLoggedUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityLoggedInUserAPIService UpdateLoggedUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityLoggedInUserAPI.UpdateLoggedUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_service_token_renew_test.go b/azion-api/test/api_identity_service_token_renew_test.go new file mode 100644 index 0000000..adc26e7 --- /dev/null +++ b/azion-api/test/api_identity_service_token_renew_test.go @@ -0,0 +1,39 @@ +/* +azion-api + +Testing IdentityServiceTokenRenewAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityServiceTokenRenewAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityServiceTokenRenewAPIService RenewServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int64 + + resp, httpRes, err := apiClient.IdentityServiceTokenRenewAPI.RenewServiceToken(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_service_tokens_test.go b/azion-api/test/api_identity_service_tokens_test.go new file mode 100644 index 0000000..8eb55d6 --- /dev/null +++ b/azion-api/test/api_identity_service_tokens_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing IdentityServiceTokensAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityServiceTokensAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityServiceTokensAPIService CreateServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityServiceTokensAPI.CreateServiceToken(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityServiceTokensAPIService DeleteServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tokenId string + + resp, httpRes, err := apiClient.IdentityServiceTokensAPI.DeleteServiceToken(context.Background(), tokenId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityServiceTokensAPIService ListServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityServiceTokensAPI.ListServiceToken(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityServiceTokensAPIService PartialUpdateServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tokenId string + + resp, httpRes, err := apiClient.IdentityServiceTokensAPI.PartialUpdateServiceToken(context.Background(), tokenId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityServiceTokensAPIService RetrieveServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tokenId string + + resp, httpRes, err := apiClient.IdentityServiceTokensAPI.RetrieveServiceToken(context.Background(), tokenId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityServiceTokensAPIService UpdateServiceToken", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var tokenId string + + resp, httpRes, err := apiClient.IdentityServiceTokensAPI.UpdateServiceToken(context.Background(), tokenId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_user_info_test.go b/azion-api/test/api_identity_user_info_test.go new file mode 100644 index 0000000..328d38a --- /dev/null +++ b/azion-api/test/api_identity_user_info_test.go @@ -0,0 +1,53 @@ +/* +azion-api + +Testing IdentityUserInfoAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityUserInfoAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityUserInfoAPIService RetrieveUserInfo", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int64 + + resp, httpRes, err := apiClient.IdentityUserInfoAPI.RetrieveUserInfo(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityUserInfoAPIService UpdateUserInfo", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var id int64 + + resp, httpRes, err := apiClient.IdentityUserInfoAPI.UpdateUserInfo(context.Background(), id).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_identity_users_test.go b/azion-api/test/api_identity_users_test.go new file mode 100644 index 0000000..9132583 --- /dev/null +++ b/azion-api/test/api_identity_users_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing IdentityUsersAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_IdentityUsersAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test IdentityUsersAPIService CreateUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityUsersAPI.CreateUser(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityUsersAPIService DeleteUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.IdentityUsersAPI.DeleteUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityUsersAPIService ListUsers", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.IdentityUsersAPI.ListUsers(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityUsersAPIService PartialUpdateUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.IdentityUsersAPI.PartialUpdateUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityUsersAPIService RetrieveUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.IdentityUsersAPI.RetrieveUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test IdentityUsersAPIService UpdateUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId string + + resp, httpRes, err := apiClient.IdentityUsersAPI.UpdateUser(context.Background(), userId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_kv_namespaces_test.go b/azion-api/test/api_kv_namespaces_test.go new file mode 100644 index 0000000..e69a3b7 --- /dev/null +++ b/azion-api/test/api_kv_namespaces_test.go @@ -0,0 +1,63 @@ +/* +azion-api + +Testing KVNamespacesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_KVNamespacesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test KVNamespacesAPIService CreateNamespace", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.KVNamespacesAPI.CreateNamespace(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test KVNamespacesAPIService ListNamespaces", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.KVNamespacesAPI.ListNamespaces(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test KVNamespacesAPIService RetrieveNamespace", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var namespace string + + resp, httpRes, err := apiClient.KVNamespacesAPI.RetrieveNamespace(context.Background(), namespace).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_metrics_dashboard_test.go b/azion-api/test/api_metrics_dashboard_test.go new file mode 100644 index 0000000..3a6fda2 --- /dev/null +++ b/azion-api/test/api_metrics_dashboard_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing MetricsDashboardAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_MetricsDashboardAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MetricsDashboardAPIService CreateDashboard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var folderId int64 + + resp, httpRes, err := apiClient.MetricsDashboardAPI.CreateDashboard(context.Background(), folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsDashboardAPIService DeleteDashboard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsDashboardAPI.DeleteDashboard(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsDashboardAPIService ListDashboards", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var folderId int64 + + resp, httpRes, err := apiClient.MetricsDashboardAPI.ListDashboards(context.Background(), folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsDashboardAPIService PartialUpdateDashboard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsDashboardAPI.PartialUpdateDashboard(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsDashboardAPIService RetrieveDashboard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsDashboardAPI.RetrieveDashboard(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsDashboardAPIService UpdateDashboard", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsDashboardAPI.UpdateDashboard(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_metrics_folders_test.go b/azion-api/test/api_metrics_folders_test.go new file mode 100644 index 0000000..8b15c8d --- /dev/null +++ b/azion-api/test/api_metrics_folders_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing MetricsFoldersAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_MetricsFoldersAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MetricsFoldersAPIService CreateFolder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.MetricsFoldersAPI.CreateFolder(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsFoldersAPIService DeleteFolder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var folderId int64 + + resp, httpRes, err := apiClient.MetricsFoldersAPI.DeleteFolder(context.Background(), folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsFoldersAPIService ListFolders", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.MetricsFoldersAPI.ListFolders(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsFoldersAPIService PartialUpdateFolder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var folderId int64 + + resp, httpRes, err := apiClient.MetricsFoldersAPI.PartialUpdateFolder(context.Background(), folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsFoldersAPIService RetrieveFolder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var folderId int64 + + resp, httpRes, err := apiClient.MetricsFoldersAPI.RetrieveFolder(context.Background(), folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsFoldersAPIService UpdateFolder", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var folderId int64 + + resp, httpRes, err := apiClient.MetricsFoldersAPI.UpdateFolder(context.Background(), folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_metrics_library_reports_test.go b/azion-api/test/api_metrics_library_reports_test.go new file mode 100644 index 0000000..bd922ad --- /dev/null +++ b/azion-api/test/api_metrics_library_reports_test.go @@ -0,0 +1,91 @@ +/* +azion-api + +Testing MetricsLibraryReportsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_MetricsLibraryReportsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MetricsLibraryReportsAPIService CreateLibraryReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.MetricsLibraryReportsAPI.CreateLibraryReport(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsLibraryReportsAPIService DeleteLibraryReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var libraryReportId int64 + + resp, httpRes, err := apiClient.MetricsLibraryReportsAPI.DeleteLibraryReport(context.Background(), libraryReportId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsLibraryReportsAPIService ListLibraryReports", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.MetricsLibraryReportsAPI.ListLibraryReports(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsLibraryReportsAPIService RetrieveLibraryReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var libraryReportId int64 + + resp, httpRes, err := apiClient.MetricsLibraryReportsAPI.RetrieveLibraryReport(context.Background(), libraryReportId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsLibraryReportsAPIService UpdateLibraryReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var libraryReportId int64 + + resp, httpRes, err := apiClient.MetricsLibraryReportsAPI.UpdateLibraryReport(context.Background(), libraryReportId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_metrics_recommendations_test.go b/azion-api/test/api_metrics_recommendations_test.go new file mode 100644 index 0000000..8ee05e6 --- /dev/null +++ b/azion-api/test/api_metrics_recommendations_test.go @@ -0,0 +1,63 @@ +/* +azion-api + +Testing MetricsRecommendationsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_MetricsRecommendationsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MetricsRecommendationsAPIService CreateRecommendation", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.MetricsRecommendationsAPI.CreateRecommendation(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRecommendationsAPIService DeleteRecommendation", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var recommendationId int64 + + resp, httpRes, err := apiClient.MetricsRecommendationsAPI.DeleteRecommendation(context.Background(), recommendationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRecommendationsAPIService ListRecommendations", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.MetricsRecommendationsAPI.ListRecommendations(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_metrics_reports_test.go b/azion-api/test/api_metrics_reports_test.go new file mode 100644 index 0000000..a4e0d2d --- /dev/null +++ b/azion-api/test/api_metrics_reports_test.go @@ -0,0 +1,124 @@ +/* +azion-api + +Testing MetricsReportsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_MetricsReportsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MetricsReportsAPIService CreateReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsReportsAPI.CreateReport(context.Background(), dashboardId, folderId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsReportsAPIService DeleteReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var reportId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsReportsAPI.DeleteReport(context.Background(), dashboardId, folderId, reportId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsReportsAPIService ListReports", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsReportsAPI.ListReports(context.Background(), dashboardId, folderId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsReportsAPIService OrderingReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsReportsAPI.OrderingReport(context.Background(), dashboardId, folderId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsReportsAPIService RetrieveReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var reportId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsReportsAPI.RetrieveReport(context.Background(), dashboardId, folderId, reportId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsReportsAPIService UpdateReport", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var reportId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsReportsAPI.UpdateReport(context.Background(), dashboardId, folderId, reportId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_metrics_rows_test.go b/azion-api/test/api_metrics_rows_test.go new file mode 100644 index 0000000..dbc72fc --- /dev/null +++ b/azion-api/test/api_metrics_rows_test.go @@ -0,0 +1,118 @@ +/* +azion-api + +Testing MetricsRowsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_MetricsRowsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test MetricsRowsAPIService CreateRow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsRowsAPI.CreateRow(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRowsAPIService DeleteRow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsRowsAPI.DeleteRow(context.Background(), dashboardId, folderId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRowsAPIService ListRows", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsRowsAPI.ListRows(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRowsAPIService OrderingRow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + + resp, httpRes, err := apiClient.MetricsRowsAPI.OrderingRow(context.Background(), dashboardId, folderId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRowsAPIService RetrieveRow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsRowsAPI.RetrieveRow(context.Background(), dashboardId, folderId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test MetricsRowsAPIService UpdateRow", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var dashboardId int64 + var folderId int64 + var rowId int64 + + resp, httpRes, err := apiClient.MetricsRowsAPI.UpdateRow(context.Background(), dashboardId, folderId, rowId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_network_lists_test.go b/azion-api/test/api_network_lists_test.go new file mode 100644 index 0000000..269e1de --- /dev/null +++ b/azion-api/test/api_network_lists_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing NetworkListsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_NetworkListsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test NetworkListsAPIService CreateNetworkList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.NetworkListsAPI.CreateNetworkList(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NetworkListsAPIService DeleteNetworkList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var networkListId int64 + + resp, httpRes, err := apiClient.NetworkListsAPI.DeleteNetworkList(context.Background(), networkListId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NetworkListsAPIService ListNetworkLists", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.NetworkListsAPI.ListNetworkLists(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NetworkListsAPIService PartialUpdateNetworkList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var networkListId int64 + + resp, httpRes, err := apiClient.NetworkListsAPI.PartialUpdateNetworkList(context.Background(), networkListId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NetworkListsAPIService RetrieveNetworkList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var networkListId int64 + + resp, httpRes, err := apiClient.NetworkListsAPI.RetrieveNetworkList(context.Background(), networkListId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test NetworkListsAPIService UpdateNetworkList", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var networkListId int64 + + resp, httpRes, err := apiClient.NetworkListsAPI.UpdateNetworkList(context.Background(), networkListId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_orchestrator_node_groups_test.go b/azion-api/test/api_orchestrator_node_groups_test.go new file mode 100644 index 0000000..7fb555d --- /dev/null +++ b/azion-api/test/api_orchestrator_node_groups_test.go @@ -0,0 +1,90 @@ +/* +azion-api + +Testing OrchestratorNodeGroupsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_OrchestratorNodeGroupsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OrchestratorNodeGroupsAPIService BindNodeGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodeGroupsAPI.BindNodeGroup(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeGroupsAPIService CreateNodeGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrchestratorNodeGroupsAPI.CreateNodeGroup(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeGroupsAPIService ListNodeGroups", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrchestratorNodeGroupsAPI.ListNodeGroups(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeGroupsAPIService ListNodeGroupsByID", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodeGroupsAPI.ListNodeGroupsByID(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeGroupsAPIService RemoveNodeGroup", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var groupId int64 + + httpRes, err := apiClient.OrchestratorNodeGroupsAPI.RemoveNodeGroup(context.Background(), groupId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_orchestrator_node_services_test.go b/azion-api/test/api_orchestrator_node_services_test.go new file mode 100644 index 0000000..c22306e --- /dev/null +++ b/azion-api/test/api_orchestrator_node_services_test.go @@ -0,0 +1,83 @@ +/* +azion-api + +Testing OrchestratorNodeServicesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_OrchestratorNodeServicesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OrchestratorNodeServicesAPIService BindNodeServices", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodeServicesAPI.BindNodeServices(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeServicesAPIService ListNodeServices", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodeServicesAPI.ListNodeServices(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeServicesAPIService RetrieveNodeServiceBind", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bindId int64 + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodeServicesAPI.RetrieveNodeServiceBind(context.Background(), bindId, nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodeServicesAPIService UnbindNodeService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bindId int64 + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodeServicesAPI.UnbindNodeService(context.Background(), bindId, nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_orchestrator_nodes_test.go b/azion-api/test/api_orchestrator_nodes_test.go new file mode 100644 index 0000000..f7b86e0 --- /dev/null +++ b/azion-api/test/api_orchestrator_nodes_test.go @@ -0,0 +1,135 @@ +/* +azion-api + +Testing OrchestratorNodesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_OrchestratorNodesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OrchestratorNodesAPIService DeleteNode", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId string + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.DeleteNode(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService ListNodes", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.ListNodes(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService PartialUpdateNode", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId string + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.PartialUpdateNode(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService PartialUpdateNode2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.PartialUpdateNode2(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService RetrieveNode", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId string + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.RetrieveNode(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService RetrieveNode2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.RetrieveNode2(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService UpdateNode", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId string + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.UpdateNode(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorNodesAPIService UpdateNode2", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var nodeId int64 + + resp, httpRes, err := apiClient.OrchestratorNodesAPI.UpdateNode2(context.Background(), nodeId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_orchestrator_service_resources_test.go b/azion-api/test/api_orchestrator_service_resources_test.go new file mode 100644 index 0000000..8cb3121 --- /dev/null +++ b/azion-api/test/api_orchestrator_service_resources_test.go @@ -0,0 +1,127 @@ +/* +azion-api + +Testing OrchestratorServiceResourcesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_OrchestratorServiceResourcesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OrchestratorServiceResourcesAPIService CreateResource", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServiceResourcesAPI.CreateResource(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServiceResourcesAPIService DeleteResource", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var resourceId int64 + var serviceId int64 + + httpRes, err := apiClient.OrchestratorServiceResourcesAPI.DeleteResource(context.Background(), resourceId, serviceId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServiceResourcesAPIService ListResourcesOfAService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServiceResourcesAPI.ListResourcesOfAService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServiceResourcesAPIService RetrieveResource", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var resourceId int64 + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServiceResourcesAPI.RetrieveResource(context.Background(), resourceId, serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServiceResourcesAPIService RetrieveResourceContent", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var resourceId int64 + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServiceResourcesAPI.RetrieveResourceContent(context.Background(), resourceId, serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServiceResourcesAPIService UpdateResource", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var resourceId int64 + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServiceResourcesAPI.UpdateResource(context.Background(), resourceId, serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServiceResourcesAPIService UploadResourceContent", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var resourceId int64 + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServiceResourcesAPI.UploadResourceContent(context.Background(), resourceId, serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_orchestrator_services_test.go b/azion-api/test/api_orchestrator_services_test.go new file mode 100644 index 0000000..6109f66 --- /dev/null +++ b/azion-api/test/api_orchestrator_services_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing OrchestratorServicesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_OrchestratorServicesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test OrchestratorServicesAPIService CreateService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrchestratorServicesAPI.CreateService(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServicesAPIService DestroyService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServicesAPI.DestroyService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServicesAPIService ListServices", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.OrchestratorServicesAPI.ListServices(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServicesAPIService PartialUpdateService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServicesAPI.PartialUpdateService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServicesAPIService RetrieveService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId int64 + + resp, httpRes, err := apiClient.OrchestratorServicesAPI.RetrieveService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test OrchestratorServicesAPIService UpdateService", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var serviceId string + + resp, httpRes, err := apiClient.OrchestratorServicesAPI.UpdateService(context.Background(), serviceId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_policy_lockout_policy_test.go b/azion-api/test/api_policy_lockout_policy_test.go new file mode 100644 index 0000000..5f5f147 --- /dev/null +++ b/azion-api/test/api_policy_lockout_policy_test.go @@ -0,0 +1,49 @@ +/* +azion-api + +Testing PolicyLockoutPolicyAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_PolicyLockoutPolicyAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PolicyLockoutPolicyAPIService RetrieveLockoutPolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PolicyLockoutPolicyAPI.RetrieveLockoutPolicy(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicyLockoutPolicyAPIService UpdateLockoutPolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PolicyLockoutPolicyAPI.UpdateLockoutPolicy(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_policy_policies_test.go b/azion-api/test/api_policy_policies_test.go new file mode 100644 index 0000000..e7a6906 --- /dev/null +++ b/azion-api/test/api_policy_policies_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing PolicyPoliciesAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_PolicyPoliciesAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PolicyPoliciesAPIService CreatePolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PolicyPoliciesAPI.CreatePolicy(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicyPoliciesAPIService DeletePolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var policyId int64 + + resp, httpRes, err := apiClient.PolicyPoliciesAPI.DeletePolicy(context.Background(), policyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicyPoliciesAPIService ListPolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PolicyPoliciesAPI.ListPolicy(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicyPoliciesAPIService PartialUpdatePolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var policyId int64 + + resp, httpRes, err := apiClient.PolicyPoliciesAPI.PartialUpdatePolicy(context.Background(), policyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicyPoliciesAPIService RetrievePolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var policyId int64 + + resp, httpRes, err := apiClient.PolicyPoliciesAPI.RetrievePolicy(context.Background(), policyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicyPoliciesAPIService UpdatePolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var policyId int64 + + resp, httpRes, err := apiClient.PolicyPoliciesAPI.UpdatePolicy(context.Background(), policyId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_policy_session_timeout_policy_test.go b/azion-api/test/api_policy_session_timeout_policy_test.go new file mode 100644 index 0000000..f776698 --- /dev/null +++ b/azion-api/test/api_policy_session_timeout_policy_test.go @@ -0,0 +1,49 @@ +/* +azion-api + +Testing PolicySessionTimeoutPolicyAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_PolicySessionTimeoutPolicyAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PolicySessionTimeoutPolicyAPIService RetrieveSessionTimeoutPolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PolicySessionTimeoutPolicyAPI.RetrieveSessionTimeoutPolicy(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PolicySessionTimeoutPolicyAPIService UpdateSessionTimeoutPolicy", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PolicySessionTimeoutPolicyAPI.UpdateSessionTimeoutPolicy(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_publisher_management_test.go b/azion-api/test/api_publisher_management_test.go new file mode 100644 index 0000000..7f6984c --- /dev/null +++ b/azion-api/test/api_publisher_management_test.go @@ -0,0 +1,49 @@ +/* +azion-api + +Testing PublisherManagementAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_PublisherManagementAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PublisherManagementAPIService GetPublisherDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PublisherManagementAPI.GetPublisherDetails(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test PublisherManagementAPIService UpdatePublisherDetails", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.PublisherManagementAPI.UpdatePublisherDetails(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_purge_test.go b/azion-api/test/api_purge_test.go new file mode 100644 index 0000000..a49dc04 --- /dev/null +++ b/azion-api/test/api_purge_test.go @@ -0,0 +1,39 @@ +/* +azion-api + +Testing PurgeAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_PurgeAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test PurgeAPIService CreatePurgeRequest", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var purgeType string + + resp, httpRes, err := apiClient.PurgeAPI.CreatePurgeRequest(context.Background(), purgeType).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_sql_test.go b/azion-api/test/api_sql_test.go new file mode 100644 index 0000000..afaf6d7 --- /dev/null +++ b/azion-api/test/api_sql_test.go @@ -0,0 +1,91 @@ +/* +azion-api + +Testing SQLAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_SQLAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test SQLAPIService CreateDatabase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SQLAPI.CreateDatabase(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SQLAPIService DeleteDatabase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var databaseId int64 + + resp, httpRes, err := apiClient.SQLAPI.DeleteDatabase(context.Background(), databaseId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SQLAPIService ExecuteQuery", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var databaseId int64 + + resp, httpRes, err := apiClient.SQLAPI.ExecuteQuery(context.Background(), databaseId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SQLAPIService ListDatabases", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.SQLAPI.ListDatabases(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test SQLAPIService RetrieveDatabase", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var databaseId int64 + + resp, httpRes, err := apiClient.SQLAPI.RetrieveDatabase(context.Background(), databaseId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_storage_buckets_test.go b/azion-api/test/api_storage_buckets_test.go new file mode 100644 index 0000000..4a7d337 --- /dev/null +++ b/azion-api/test/api_storage_buckets_test.go @@ -0,0 +1,91 @@ +/* +azion-api + +Testing StorageBucketsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_StorageBucketsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test StorageBucketsAPIService CreateBucket", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.StorageBucketsAPI.CreateBucket(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageBucketsAPIService DeleteBucket", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + + resp, httpRes, err := apiClient.StorageBucketsAPI.DeleteBucket(context.Background(), bucketName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageBucketsAPIService ListBuckets", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.StorageBucketsAPI.ListBuckets(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageBucketsAPIService RetrieveBucket", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + + resp, httpRes, err := apiClient.StorageBucketsAPI.RetrieveBucket(context.Background(), bucketName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageBucketsAPIService UpdateBucket", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + + resp, httpRes, err := apiClient.StorageBucketsAPI.UpdateBucket(context.Background(), bucketName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_storage_credentials_test.go b/azion-api/test/api_storage_credentials_test.go new file mode 100644 index 0000000..0672b36 --- /dev/null +++ b/azion-api/test/api_storage_credentials_test.go @@ -0,0 +1,77 @@ +/* +azion-api + +Testing StorageCredentialsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_StorageCredentialsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test StorageCredentialsAPIService CreateCredential", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.StorageCredentialsAPI.CreateCredential(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageCredentialsAPIService DeleteCredential", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var credentialId int64 + + resp, httpRes, err := apiClient.StorageCredentialsAPI.DeleteCredential(context.Background(), credentialId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageCredentialsAPIService ListCredentials", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.StorageCredentialsAPI.ListCredentials(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageCredentialsAPIService RetrieveCredential", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var credentialId int64 + + resp, httpRes, err := apiClient.StorageCredentialsAPI.RetrieveCredential(context.Background(), credentialId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_storage_objects_test.go b/azion-api/test/api_storage_objects_test.go new file mode 100644 index 0000000..289fe74 --- /dev/null +++ b/azion-api/test/api_storage_objects_test.go @@ -0,0 +1,115 @@ +/* +azion-api + +Testing StorageObjectsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_StorageObjectsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test StorageObjectsAPIService CopyObjectKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + var newObjectKey string + var objectKey string + + resp, httpRes, err := apiClient.StorageObjectsAPI.CopyObjectKey(context.Background(), bucketName, newObjectKey, objectKey).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageObjectsAPIService CreateObjectKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + var objectKey string + + resp, httpRes, err := apiClient.StorageObjectsAPI.CreateObjectKey(context.Background(), bucketName, objectKey).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageObjectsAPIService DeleteObjectKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + var objectKey string + + resp, httpRes, err := apiClient.StorageObjectsAPI.DeleteObjectKey(context.Background(), bucketName, objectKey).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageObjectsAPIService DownloadObject", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + var objectKey string + + resp, httpRes, err := apiClient.StorageObjectsAPI.DownloadObject(context.Background(), bucketName, objectKey).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageObjectsAPIService ListObjects", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + + resp, httpRes, err := apiClient.StorageObjectsAPI.ListObjects(context.Background(), bucketName).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test StorageObjectsAPIService UpdateObjectKey", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var bucketName string + var objectKey string + + resp, httpRes, err := apiClient.StorageObjectsAPI.UpdateObjectKey(context.Background(), bucketName, objectKey).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_users_lockout_test.go b/azion-api/test/api_users_lockout_test.go new file mode 100644 index 0000000..7c7a202 --- /dev/null +++ b/azion-api/test/api_users_lockout_test.go @@ -0,0 +1,38 @@ +/* +azion-api + +Testing UsersLockoutAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_UsersLockoutAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test UsersLockoutAPIService DestroyLockoutUser", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var userId int64 + + httpRes, err := apiClient.UsersLockoutAPI.DestroyLockoutUser(context.Background(), userId).Execute() + + require.Nil(t, err) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_vcs_continuous_deployment_executions_test.go b/azion-api/test/api_vcs_continuous_deployment_executions_test.go new file mode 100644 index 0000000..c183bd3 --- /dev/null +++ b/azion-api/test/api_vcs_continuous_deployment_executions_test.go @@ -0,0 +1,53 @@ +/* +azion-api + +Testing VCSContinuousDeploymentExecutionsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_VCSContinuousDeploymentExecutionsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VCSContinuousDeploymentExecutionsAPIService CreateExecution", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId int64 + + resp, httpRes, err := apiClient.VCSContinuousDeploymentExecutionsAPI.CreateExecution(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentExecutionsAPIService ListExecutions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId int64 + + resp, httpRes, err := apiClient.VCSContinuousDeploymentExecutionsAPI.ListExecutions(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_vcs_continuous_deployment_executor_test.go b/azion-api/test/api_vcs_continuous_deployment_executor_test.go new file mode 100644 index 0000000..beda2d3 --- /dev/null +++ b/azion-api/test/api_vcs_continuous_deployment_executor_test.go @@ -0,0 +1,53 @@ +/* +azion-api + +Testing VCSContinuousDeploymentExecutorAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_VCSContinuousDeploymentExecutorAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VCSContinuousDeploymentExecutorAPIService RetrieveExecutor", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId int64 + + resp, httpRes, err := apiClient.VCSContinuousDeploymentExecutorAPI.RetrieveExecutor(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentExecutorAPIService UpdateExecutor", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId int64 + + resp, httpRes, err := apiClient.VCSContinuousDeploymentExecutorAPI.UpdateExecutor(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_vcs_continuous_deployments_test.go b/azion-api/test/api_vcs_continuous_deployments_test.go new file mode 100644 index 0000000..cb85f5a --- /dev/null +++ b/azion-api/test/api_vcs_continuous_deployments_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing VCSContinuousDeploymentsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_VCSContinuousDeploymentsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VCSContinuousDeploymentsAPIService CreateContinuousDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VCSContinuousDeploymentsAPI.CreateContinuousDeployment(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentsAPIService DeleteContinuousDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId string + + resp, httpRes, err := apiClient.VCSContinuousDeploymentsAPI.DeleteContinuousDeployment(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentsAPIService ListContinuousDeployments", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VCSContinuousDeploymentsAPI.ListContinuousDeployments(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentsAPIService PartialUpdateContinuousDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId string + + resp, httpRes, err := apiClient.VCSContinuousDeploymentsAPI.PartialUpdateContinuousDeployment(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentsAPIService RetrieveContinuousDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId string + + resp, httpRes, err := apiClient.VCSContinuousDeploymentsAPI.RetrieveContinuousDeployment(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSContinuousDeploymentsAPIService UpdateContinuousDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var continuousDeploymentId string + + resp, httpRes, err := apiClient.VCSContinuousDeploymentsAPI.UpdateContinuousDeployment(context.Background(), continuousDeploymentId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_vcs_execution_scripts_test.go b/azion-api/test/api_vcs_execution_scripts_test.go new file mode 100644 index 0000000..3de97ad --- /dev/null +++ b/azion-api/test/api_vcs_execution_scripts_test.go @@ -0,0 +1,51 @@ +/* +azion-api + +Testing VCSExecutionScriptsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_VCSExecutionScriptsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VCSExecutionScriptsAPIService ListExecutionScripts", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VCSExecutionScriptsAPI.ListExecutionScripts(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSExecutionScriptsAPIService RetrieveExecutionScript", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var executionScriptId int64 + + resp, httpRes, err := apiClient.VCSExecutionScriptsAPI.RetrieveExecutionScript(context.Background(), executionScriptId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_vcs_integrations_test.go b/azion-api/test/api_vcs_integrations_test.go new file mode 100644 index 0000000..a379fba --- /dev/null +++ b/azion-api/test/api_vcs_integrations_test.go @@ -0,0 +1,79 @@ +/* +azion-api + +Testing VCSIntegrationsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_VCSIntegrationsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VCSIntegrationsAPIService DeleteIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var integrationId string + + resp, httpRes, err := apiClient.VCSIntegrationsAPI.DeleteIntegration(context.Background(), integrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSIntegrationsAPIService ListIntegrations", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VCSIntegrationsAPI.ListIntegrations(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSIntegrationsAPIService ListRepositories", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var integrationId int64 + + resp, httpRes, err := apiClient.VCSIntegrationsAPI.ListRepositories(context.Background(), integrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test VCSIntegrationsAPIService RetrieveIntegration", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var integrationId string + + resp, httpRes, err := apiClient.VCSIntegrationsAPI.RetrieveIntegration(context.Background(), integrationId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_vcs_providers_test.go b/azion-api/test/api_vcs_providers_test.go new file mode 100644 index 0000000..220b26d --- /dev/null +++ b/azion-api/test/api_vcs_providers_test.go @@ -0,0 +1,37 @@ +/* +azion-api + +Testing VCSProvidersAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_VCSProvidersAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test VCSProvidersAPIService ListProviders", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.VCSProvidersAPI.ListProviders(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_wafs_exceptions_test.go b/azion-api/test/api_wafs_exceptions_test.go new file mode 100644 index 0000000..48b92fd --- /dev/null +++ b/azion-api/test/api_wafs_exceptions_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing WAFsExceptionsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_WAFsExceptionsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test WAFsExceptionsAPIService CreateWafException", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsExceptionsAPI.CreateWafException(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsExceptionsAPIService DeleteWafException", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exceptionId int64 + var wafId int64 + + resp, httpRes, err := apiClient.WAFsExceptionsAPI.DeleteWafException(context.Background(), exceptionId, wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsExceptionsAPIService ListWafExceptions", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsExceptionsAPI.ListWafExceptions(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsExceptionsAPIService PartialUpdateWafException", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exceptionId int64 + var wafId int64 + + resp, httpRes, err := apiClient.WAFsExceptionsAPI.PartialUpdateWafException(context.Background(), exceptionId, wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsExceptionsAPIService RetrieveWafException", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exceptionId int64 + var wafId int64 + + resp, httpRes, err := apiClient.WAFsExceptionsAPI.RetrieveWafException(context.Background(), exceptionId, wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsExceptionsAPIService UpdateWafException", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var exceptionId int64 + var wafId int64 + + resp, httpRes, err := apiClient.WAFsExceptionsAPI.UpdateWafException(context.Background(), exceptionId, wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_wafs_test.go b/azion-api/test/api_wafs_test.go new file mode 100644 index 0000000..e0be282 --- /dev/null +++ b/azion-api/test/api_wafs_test.go @@ -0,0 +1,119 @@ +/* +azion-api + +Testing WAFsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_WAFsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test WAFsAPIService CloneWaf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsAPI.CloneWaf(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsAPIService CreateWaf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.WAFsAPI.CreateWaf(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsAPIService DeleteWaf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsAPI.DeleteWaf(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsAPIService ListWafs", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.WAFsAPI.ListWafs(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsAPIService PartialUpdateWaf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsAPI.PartialUpdateWaf(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsAPIService RetrieveWaf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsAPI.RetrieveWaf(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WAFsAPIService UpdateWaf", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var wafId int64 + + resp, httpRes, err := apiClient.WAFsAPI.UpdateWaf(context.Background(), wafId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_workload_deployments_test.go b/azion-api/test/api_workload_deployments_test.go new file mode 100644 index 0000000..0dd9306 --- /dev/null +++ b/azion-api/test/api_workload_deployments_test.go @@ -0,0 +1,113 @@ +/* +azion-api + +Testing WorkloadDeploymentsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_WorkloadDeploymentsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test WorkloadDeploymentsAPIService CreateWorkloadDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadDeploymentsAPI.CreateWorkloadDeployment(context.Background(), workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadDeploymentsAPIService DeleteWorkloadDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var deploymentId int64 + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadDeploymentsAPI.DeleteWorkloadDeployment(context.Background(), deploymentId, workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadDeploymentsAPIService ListWorkloadDeployments", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadDeploymentsAPI.ListWorkloadDeployments(context.Background(), workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadDeploymentsAPIService PartialUpdateWorkloadDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var deploymentId int64 + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadDeploymentsAPI.PartialUpdateWorkloadDeployment(context.Background(), deploymentId, workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadDeploymentsAPIService RetrieveWorkloadDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var deploymentId int64 + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadDeploymentsAPI.RetrieveWorkloadDeployment(context.Background(), deploymentId, workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadDeploymentsAPIService UpdateWorkloadDeployment", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var deploymentId int64 + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadDeploymentsAPI.UpdateWorkloadDeployment(context.Background(), deploymentId, workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/test/api_workloads_test.go b/azion-api/test/api_workloads_test.go new file mode 100644 index 0000000..4364c3c --- /dev/null +++ b/azion-api/test/api_workloads_test.go @@ -0,0 +1,105 @@ +/* +azion-api + +Testing WorkloadsAPIService + +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); + +package azionapi + +import ( + "context" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "testing" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func Test_azionapi_WorkloadsAPIService(t *testing.T) { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + + t.Run("Test WorkloadsAPIService CreateWorkload", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.WorkloadsAPI.CreateWorkload(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadsAPIService DeleteWorkload", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadsAPI.DeleteWorkload(context.Background(), workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadsAPIService ListWorkloads", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + resp, httpRes, err := apiClient.WorkloadsAPI.ListWorkloads(context.Background()).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadsAPIService PartialUpdateWorkload", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadsAPI.PartialUpdateWorkload(context.Background(), workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadsAPIService RetrieveWorkload", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadsAPI.RetrieveWorkload(context.Background(), workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + + t.Run("Test WorkloadsAPIService UpdateWorkload", func(t *testing.T) { + + t.Skip("skip test") // remove to run test + + var workloadId int64 + + resp, httpRes, err := apiClient.WorkloadsAPI.UpdateWorkload(context.Background(), workloadId).Execute() + + require.Nil(t, err) + require.NotNil(t, resp) + assert.Equal(t, 200, httpRes.StatusCode) + + }) + +} diff --git a/azion-api/utils.go b/azion-api/utils.go new file mode 100644 index 0000000..4fb76b6 --- /dev/null +++ b/azion-api/utils.go @@ -0,0 +1,362 @@ +/* +azion-api + +The AZION v4 REST API. + +API version: 4.0.0 +Contact: support@azion.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package azionapi + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} \ No newline at end of file